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

Summary: Enable to discover parent MIME type (path)
Product: editor Reporter: Svata Dedic <sdedic>
Component: SettingsAssignee: Svata Dedic <sdedic>
Severity: normal CC: mkristofic, mmetelka
Priority: P2 Keywords: API_REVIEW_FAST
Version: 7.4   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 226413    
Attachments: Proposed changes

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