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 editor.settings.storage
* 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
Created attachment 131388 [details]
No objections so far, going to push
Author: Svata Dedic <email@example.com>
Date: 2013-02-27 09:46
Message: #226122: added getIncludedPaths and getInheritedType
Integrated into 'main-golden', will be available in build *201303032300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Svata Dedic <firstname.lastname@example.org>
Log: Issue #226122 - Enable to discover parent MIME type (path): fixed
#226122: added getIncludedPaths and getInheritedType