public J2MEDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException { super(pf, loader); getCookieSet().assign(SaveAsCapable.class, new SaveAsCapable() { @Override public void saveAs(FileObject folder, String fileName) throws IOException { createJavaEditorSupport().saveAs(folder, fileName); } }); // registerEditor(MIME_TYPE, true); }
public GsfDataObject(FileObject pf, MultiFileLoader loader, Language language) throws DataObjectExistsException { super(pf, loader); // If the user creates a file with a filename where we can't figure out the language // (e.g. the PHP New File wizard doesn't enforce a file extension, so if you create // a file named "pie.class" (issue 124044) the data loader doesn't know which language // to associate this with since it isn't a GSF file extension or mimetype). However // during template creation we know the language anyway so we can use it. On subsequent // IDE restarts the file won't be recognized so the user will have to rename or // add a new file extension to file type mapping. if (language == null) { language = templateLanguage; } this.language = language; getCookieSet().assign( SaveAsCapable.class, new SaveAsCapable() { public void saveAs( FileObject folder, String fileName ) throws IOException { createEditorSupport().saveAs( folder, fileName ); } }); getCookieSet().add(GenericEditorSupport.class, new CookieSet.Factory() { public <T extends Cookie> T createCookie(Class<T> klass) { return klass.cast(createEditorSupport ()); } }); }
private void init() { CookieSet cookies = getCookieSet(); cookies.add(JSFConfigEditorSupport.class, this); //Lookup JSFConfigEditorContext for Page Flow Editor multiview cookies.assign(JSFConfigEditorContext.class, new JSFConfigEditorContextImpl((JSFConfigDataObject)this)); // Creates Check XML and Validate XML context actions InputSource in = DataObjectAdapters.inputSource(this); cookies.add(new CheckXMLSupport(in)); cookies.add(new ValidateXMLSupport(in)); cookies.assign(FileEncodingQueryImplementation.class, XmlFileEncodingQueryImpl.singleton()); }
public SpringXMLConfigDataObject(FileObject pf, SpringXMLConfigDataLoader loader) throws DataObjectExistsException { super(pf, loader); CookieSet cookies = getCookieSet(); InputSource in = DataObjectAdapters.inputSource(this); cookies.add(new CheckXMLSupport(in)); cookies.add(new ValidateXMLSupport(in)); cookies.assign(FileEncodingQueryImplementation.class, XmlFileEncodingQueryImpl.singleton()); registerEditor(SpringConstants.CONFIG_MIME_TYPE, true); }
ValidateXMLCookie validateCookie = new ValidateXMLSupport(in); getCookieSet().add(validateCookie); getCookieSet().assign(FileEncodingQueryImplementation.class, XmlFileEncodingQueryImpl.singleton()); if (debug) System.out.println("====> TLDDataObject(FileObject, loader):constructor()"); // NOI18N
public SVGDataObject(FileObject pf, SVGDataLoader loader) throws DataObjectExistsException, IOException { super(pf, loader); org.xml.sax.InputSource in = DataObjectAdapters.inputSource(this); CheckXMLCookie checkCookie = new CheckXMLSupport(in); getCookieSet().add(checkCookie); ValidateXMLCookie validateCookie = new ValidateXMLSupport(in); getCookieSet().add(validateCookie); XmlMultiViewEditorSupport edSup = getEditorSupport(); edSup.setSuppressXmlView(true); setLastOpenView( SVG_VIEW_INDEX); //call the method getMultiViewDescriptions() to //recalculate the xmlMultiViewIndex member after default //XML view has been suppressed. edSup.getMultiViewDescriptions(); getCookieSet().assign( SaveAsCapable.class, new SaveAsCapable() { public void saveAs(FileObject folder, String fileName) throws IOException { getEditorSupport().saveAs( folder, fileName ); } }); SceneManager.log(Level.INFO, "SVGDataObject created for " + pf.getPath()); //NOI18N }