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 118099

Summary: Extend MimeDataProvider SPI for better mime path inheritance support
Product: editor Reporter: Vitezslav Stejskal <vstejskal>
Component: SettingsAssignee: Milutin Kristofic <mkristofic>
Status: NEW ---    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: TASK Exception Reporter:

Description Vitezslav Stejskal 2007-10-08 14:17:27 UTC
The general lookup composition should be enforced by the infrastructure and standard MimeDataProviders and now
deprecated MimeLookupInitializers should only provide lookup for a single mimepath item (eg. text/x-jsp/text/x-java).
However, there are some providers (eg. DefaultMimeDataProvider in e/m/impl or SettingsProvider in e/s/storage) that
implement the composition in a special way for certain objects that they contribute to MimeLookup. These special
providers need the exact inheritance tree for a particular MimePath, which was now hacked around by
MimePath.getInheritedPaths and reflection.

The idea is to add new interface that would be implemented by those special providers and pass the MimePath inheritance
tree to the providers implementing this interface. The interface could look something like

interface MimeDataProviderEx {
  Lookup getLookup(MimePath [] mimePaths);
Comment 1 Miloslav Metelka 2007-11-28 13:58:58 UTC
I'm sorry I don't fully understand certain aspects:
- what will be the contents of the mimePaths array? Will it be the same like the current getInheritedPaths()?
- the "root" mime-type (i.e. the one for which the resulting object will be returned) will be the first member of the array?
- the mimePaths array will always be constructred in the same way for all the MimeDataProviderEx providers, right?
- can we name concrete usecases that will use this (at least few)?

Nit: I would prefer to pass a List of mimePaths rather than array but since it's an SPI rather than API it's probably ok.
Comment 2 Jiri Prox 2008-04-11 00:45:57 UTC
moving opened issues from TM <= 6.1 to TM=Dev