KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > ruby > rhtml > RhtmlDataObject


1 package org.netbeans.modules.ruby.rhtml;
2
3 import java.io.IOException JavaDoc;
4 import org.openide.filesystems.FileObject;
5 import org.openide.loaders.DataObjectExistsException;
6 import org.openide.loaders.MultiDataObject;
7 import org.openide.nodes.CookieSet;
8 import org.openide.nodes.Node;
9 import org.openide.util.Lookup;
10 import org.openide.text.DataEditorSupport;
11
12 public class RhtmlDataObject extends MultiDataObject
13         implements Lookup.Provider {
14     
15     public RhtmlDataObject(FileObject pf, RhtmlDataLoader loader) throws DataObjectExistsException, IOException JavaDoc {
16         super(pf, loader);
17         CookieSet cookies = getCookieSet();
18         cookies.add((Node.Cookie) DataEditorSupport.create(this, getPrimaryEntry(), cookies));
19         //CookieSet set = getCookieSet();
20
//set.add(HtmlEditorSupport.class, this);
21
//set.add(ViewSupport.class, this);
22
}
23     
24     protected Node createNodeDelegate() {
25         return new RhtmlDataNode(this, getLookup());
26     }
27     
28     public Lookup getLookup() {
29         return getCookieSet().getLookup();
30     }
31 }
32
Popular Tags