KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > editor > mimelookup > impl > DummyMimeLookupInitializer


1 /*
2  * DummyMimeDataProvider.java
3  *
4  * Created on June 14, 2006, 3:34 PM
5  *
6  * To change this template, choose Tools | Template Manager
7  * and open the template in the editor.
8  */

9
10 package org.netbeans.modules.editor.mimelookup.impl;
11
12 import org.netbeans.api.editor.mimelookup.MimePath;
13 import org.netbeans.spi.editor.mimelookup.MimeLookupInitializer;
14 import org.openide.util.Lookup;
15 import org.openide.util.lookup.Lookups;
16
17 /**
18  *
19  * @author vita
20  */

21 public class DummyMimeLookupInitializer implements MimeLookupInitializer {
22     
23     /** Creates a new instance of DummyMimeDataProvider */
24     public DummyMimeLookupInitializer() {
25 // System.out.println("Creating DummyMimeLookupInitializer");
26
}
27
28     public Lookup.Result child(String JavaDoc mimeType) {
29         return Lookups.singleton(this).lookupResult(MimeLookupInitializer.class);
30     }
31
32     public Lookup lookup() {
33 // System.out.println("DummyMimeLookupInitializer creating Marker");
34
return Lookups.singleton(new Marker());
35     }
36     
37     public static final class Marker {
38         
39     } // End of Marker class
40
}
41
Popular Tags