This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 226122 - Enable to discover parent MIME type (path)
Summary: Enable to discover parent MIME type (path)
Alias: None
Product: editor
Classification: Unclassified
Component: Settings (show other bugs)
Version: 7.4
Hardware: PC Linux
: P2 normal (vote)
Assignee: Svata Dedic
Depends on:
Blocks: 226413
  Show dependency tree
Reported: 2013-02-14 14:09 UTC by Svata Dedic
Modified: 2013-03-04 01:46 UTC (History)
2 users (show)

See Also:
Exception Reporter:

Proposed changes (5.99 KB, patch)
2013-02-14 14:15 UTC, Svata Dedic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2013-02-14 14:09:39 UTC
The MimePath internally holds a list of inherited Mime paths, which are used e.g. for MimeLookup or Preferences fallbacks. This information proved rather useful, and since there's no API to get the information, it is obtained using j.l.reflection on at least 3 places.

* SettingsProvider in editor.codetemplates
* CompositeFCS, PreferencesImpl in
* MimePathLookup in editor.mimelookup

Possibly there are some more usages, and I intend to add some more in code folding and/or CSL. So I think the method

  // return the inherited mime type, if any, for the content
  public String getInheritedType(); 

  // returns all the included MimePaths including this one.
  public List<MimePath> getIncludedPaths();

should be made added. All current usages work with MimePaths not folders - except MimeLookup implementation itself.

Existing clients that use reflection should be updated.

Please see the proposed diff for details
Comment 1 Svata Dedic 2013-02-14 14:15:26 UTC
Created attachment 131388 [details]
Proposed changes
Comment 2 Svata Dedic 2013-02-27 08:28:53 UTC
No objections so far, going to push
Comment 3 Svata Dedic 2013-02-27 08:46:19 UTC
Changeset: eaddbb772461
Author:    Svata Dedic <>
Date:      2013-02-27 09:46
Message:   #226122: added getIncludedPaths and getInheritedType
Comment 4 Quality Engineering 2013-03-04 01:46:25 UTC
Integrated into 'main-golden', will be available in build *201303032300* on (upload may still be in progress)
User: Svata Dedic <>
Log: Issue #226122 - Enable to discover parent MIME type (path): fixed
#226122: added getIncludedPaths and getInheritedType