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 89282

Summary: Add MimeLookup.getLookup(String mimePath)
Product: editor Reporter: Miloslav Metelka <mmetelka>
Component: -- Other --Assignee: apireviews <apireviews>
Status: RESOLVED FIXED    
Severity: blocker Keywords: API_REVIEW_FAST
Priority: P2    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Patch (test and apichanges not included)

Description Miloslav Metelka 2006-11-14 10:33:36 UTC
I propose to add

    public static Lookup getLookup(String mimePath) {
        getLookup(MimePath.parse(mimePath));
    }

for easier operation with the mime lookup. For example LanguagePath only has
mime-path as a string (to not have a direct dependency on mime lookup) so this
method would help to have simpler code. Also as the mimePath can in fact be a
single mime-type (described in javadoc of the attached patch) this would make
the dealing with the mime lookup easier in such case.
Comment 1 Miloslav Metelka 2006-11-14 10:35:33 UTC
Created attachment 36037 [details]
Patch (test and apichanges not included)
Comment 2 Vitezslav Stejskal 2006-11-14 21:02:06 UTC
Fine by me. It's needed in 99% of situations when using ML.
Comment 3 Jiri Prox 2007-09-17 20:17:50 UTC
Obsolete milestone, please reevaluate
Comment 4 Miloslav Metelka 2007-09-18 08:27:02 UTC
Oops. It was reviewed a long ago but I forgot to commit it. Fixed.
Checking in manifest.mf;
/cvs/editor/mimelookup/manifest.mf,v  <--  manifest.mf
new revision: 1.11; previous revision: 1.10
done
Checking in src/org/netbeans/api/editor/mimelookup/MimeLookup.java;
/cvs/editor/mimelookup/src/org/netbeans/api/editor/mimelookup/MimeLookup.java,v  <--  MimeLookup.java
new revision: 1.10; previous revision: 1.9
done
Checking in arch/apichanges.xml;
/cvs/editor/mimelookup/arch/apichanges.xml,v  <--  apichanges.xml
new revision: 1.2; previous revision: 1.1