1 package org.netbeans.modules.ruby.rhtml; 2 3 import java.io.IOException ; 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 { 16 super(pf, loader); 17 CookieSet cookies = getCookieSet(); 18 cookies.add((Node.Cookie) DataEditorSupport.create(this, getPrimaryEntry(), cookies)); 19 } 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 |