Bug 226122 - Enable to discover parent MIME type (path)
Enable to discover parent MIME type (path)
Status: RESOLVED FIXED
Product: editor
Classification: Unclassified
Component: Settings
7.4
PC Linux
: P2 (vote)
: 8.0
Assigned To: Svata Dedic
issues@editor
: API_REVIEW_FAST
Depends on:
Blocks: 226413
  Show dependency treegraph
 
Reported: 2013-02-14 14:09 UTC by Svata Dedic
Modified: 2013-03-04 01:46 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
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 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
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 <sdedic@netbeans.org>
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 http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/eaddbb772461
User: Svata Dedic <sdedic@netbeans.org>
Log: Issue #226122 - Enable to discover parent MIME type (path): fixed
#226122: added getIncludedPaths and getInheritedType


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo