1 19 20 package org.netbeans.modules.javawebstart; 21 22 import java.io.IOException ; 23 24 import org.netbeans.spi.xml.cookies.CheckXMLSupport; 25 import org.netbeans.spi.xml.cookies.DataObjectAdapters; 26 27 import org.openide.filesystems.FileObject; 28 import org.openide.loaders.DataObjectExistsException; 29 import org.openide.loaders.MultiDataObject; 30 import org.openide.nodes.CookieSet; 31 import org.openide.nodes.Node; 32 import org.openide.text.DataEditorSupport; 33 34 import org.xml.sax.InputSource ; 35 36 public class JnlpDataObject extends MultiDataObject { 37 38 public JnlpDataObject(FileObject pf, JnlpDataLoader loader) throws DataObjectExistsException, IOException { 39 super(pf, loader); 40 CookieSet cookies = getCookieSet(); 41 cookies.add((Node.Cookie) DataEditorSupport.create(this, getPrimaryEntry(), cookies)); 42 InputSource in = DataObjectAdapters.inputSource(this); 43 CheckXMLSupport cookieImpl = new CheckXMLSupport(in); 44 cookies.add(cookieImpl); 45 } 46 47 protected Node createNodeDelegate() { 48 return new JnlpDataNode(this); 49 } 50 51 } 52 | Popular Tags |