當前位置: 首頁>>代碼示例>>Java>>正文


Java MultiFileLoader類代碼示例

本文整理匯總了Java中org.openide.loaders.MultiFileLoader的典型用法代碼示例。如果您正苦於以下問題:Java MultiFileLoader類的具體用法?Java MultiFileLoader怎麽用?Java MultiFileLoader使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


MultiFileLoader類屬於org.openide.loaders包,在下文中一共展示了MultiFileLoader類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: LayerDataObject

import org.openide.loaders.MultiFileLoader; //導入依賴的package包/類
public LayerDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {
    super(pf, loader);
    final CookieSet cookies = getCookieSet();
    final Lookup baseLookup = cookies.getLookup();
    lkp = new ProxyLookup(baseLookup) {
        final AtomicBoolean checked = new AtomicBoolean();
        protected @Override void beforeLookup(Template<?> template) {
            if (template.getType() == LayerHandle.class && checked.compareAndSet(false, true)) {
                FileObject xml = getPrimaryFile();
                Project p = FileOwnerQuery.getOwner(xml);
                if (p != null) {
                    setLookups(baseLookup, Lookups.singleton(new LayerHandle(p, xml)));
                }
            }
        }
    };
    registerEditor("text/x-netbeans-layer+xml", true);
    cookies.add(new ValidateXMLSupport(DataObjectAdapters.inputSource(this)));
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:20,代碼來源:LayerDataObject.java

示例2: GsfDataObject

import org.openide.loaders.MultiFileLoader; //導入依賴的package包/類
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().add(new Class[]{
            GenericEditorSupport.class, // NOI18N
            SaveAsCapable.class, Openable.class, EditorCookie.Observable.class, 
            PrintCookie.class, CloseCookie.class, Editable.class, LineCookie.class,
            DataEditorSupport.class, CloneableEditorSupport.class,
            CloneableOpenSupport.class
        }, new EditorSupportFactory());
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:23,代碼來源:GsfDataObject.java

示例3: JShellDataObject

import org.openide.loaders.MultiFileLoader; //導入依賴的package包/類
public JShellDataObject(FileObject fo, MultiFileLoader loader) throws DataObjectExistsException {
    super(fo, loader);
    CookieSet cks = getCookieSet();
    cks.add(new Class[] {
            OpenCookie.class,
            EditorCookie.Observable.class,
            CloseCookie.class,
            LineCookie.class,
            SimpleES.class,
        }, new CookieSet.Factory() {
        private CloneableEditorSupport supp;
        public <T extends Node.Cookie> T createCookie(Class<T> klass) {
            if (supp != null) {
                return klass.cast(supp);
            }
            return klass.cast(
                    /*
                    supp = DataEditorSupport.create(JShellDataObject.this, 
                            getPrimaryEntry(), getCookieSet(), 
                            () -> createPane())
                    );*/
                    supp = new SimpleES(JShellDataObject.this, getPrimaryEntry())
            );
        }
    });
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:27,代碼來源:JShellDataObject.java

示例4: TLDataObject

import org.openide.loaders.MultiFileLoader; //導入依賴的package包/類
public TLDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {
    super(pf, loader);
            getCookieSet().assign(SaveCookie.class, saveDB);
            setModified(true);

    if (pf.getSize() > 0) {
        database = getDBFromFile(pf);
    } else {
        database = new TLDatabase();
    }

    CookieSet cookies = getCookieSet();
    cookies.assign(TLDatabase.class, database);
    cookies.add(new TLOpenSupport(this.getPrimaryEntry()));


    cookies.assign(Node.class, this.getNodeDelegate());

    // Set modified if current time of db changes
    database.addDBListener(changeListener);
}
 
開發者ID:kefik,項目名稱:Pogamut3,代碼行數:22,代碼來源:TLDataObject.java

示例5: MatDefDataObject

import org.openide.loaders.MultiFileLoader; //導入依賴的package包/類
@SuppressWarnings("LeakingThisInConstructor")
public MatDefDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {
    super(pf, loader);
    registerEditor("text/jme-materialdefinition", true);
    contentLookup = new AbstractLookup(lookupContents);
    lookupContents.add(this);
    lookup = new ProxyLookup(getCookieSet().getLookup(), contentLookup);
    findAssetManager();
    final MatDefMetaData metaData = new MatDefMetaData(this);
    lookupContents.add(metaData);
    pf.addFileChangeListener(new FileChangeAdapter() {
        @Override
        public void fileChanged(FileEvent fe) {
            super.fileChanged(fe);
            metaData.save();
            if (file.isDirty()) {
                file.setLoaded(false);
                file.setDirty(false);
            }
        }
    });

}
 
開發者ID:jMonkeyEngine,項目名稱:sdk,代碼行數:24,代碼來源:MatDefDataObject.java

示例6: CinematicDataObject

import org.openide.loaders.MultiFileLoader; //導入依賴的package包/類
/**
 * Constructor
 *
 * @param pf
 * @param loader
 * @throws DataObjectExistsException
 * @throws IOException
 */
public CinematicDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {
    super(pf, loader); 
    this.modified = false;
    this.saver = new CinematicSaver(this);
    this.cinematicClip = new CinematicClip();
    this.library = new CinematicLibrary();
    cinematicClip.setName(getPrimaryFile().getName());
    Layer root = new Layer(getPrimaryFile().getName(),null,LayerType.ROOT);
    cinematicClip.setRoot(root);
    lookupContents = new InstanceContent();
    contentLookup = new AbstractLookup(lookupContents);
    findAssetManager(); 
    
    //registerEditor("application/jme3cinematic", false);
}
 
開發者ID:maany,項目名稱:jME-CinematicEditor,代碼行數:24,代碼來源:CinematicDataObject.java

示例7: DataSourceDataObject

import org.openide.loaders.MultiFileLoader; //導入依賴的package包/類
public DataSourceDataObject(FileObject fo, MultiFileLoader loader) throws DataObjectExistsException, IOException {
    super(fo, loader);
    registerEditor(MIME_TYPE, IS_MULTIVIEW);
    calculatePath();
    
    Properties props = DataSourceUtil.loadProperties(fo);
    auditId = DataSourceUtil.getLong(props, PROP_AUDIT_ID, -1);
    provider = DataSourceUtil.createProvider(this, props);
    dataType = DataSourceUtil.getDataType(fo, props);
    
    for(FileObject entry : provider.getSecondryFiles())
        super.registerEntry(entry);
    
    ic.add(new DataSourceAuditable());
    ic.add(new DataSourceImpl());
    ic.add(new DataSourceDeletable());
    ic.add(new DataSourceNamedContent());
    lkp = new ProxyLookup(super.getCookieSet().getLookup(), new AbstractLookup(ic));
}
 
開發者ID:Depter,項目名稱:JRLib,代碼行數:20,代碼來源:DataSourceDataObject.java

示例8: AntProjectDataObject

import org.openide.loaders.MultiFileLoader; //導入依賴的package包/類
public AntProjectDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {
    super(pf, loader);
    CookieSet cookies = getCookieSet();
    cookies.add (new AntProjectDataEditor (this));
    FileObject prim = getPrimaryFile ();
    AntProjectCookie proj = new AntProjectSupport (prim);
    cookies.add (proj);
    if (proj.getFile () != null) {
        cookies.add (new AntActionInstance (proj));
    }
    cookies.add(new CheckXMLSupport(DataObjectAdapters.inputSource(this)));
    addPropertyChangeListener (this);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:14,代碼來源:AntProjectDataObject.java

示例9: getAdditionalBeanInfo

import org.openide.loaders.MultiFileLoader; //導入依賴的package包/類
@Override
public BeanInfo[] getAdditionalBeanInfo() {
    try {
        return new BeanInfo[] { Introspector.getBeanInfo(MultiFileLoader.class) };
    } catch (IntrospectionException ie) {
        org.openide.ErrorManager.getDefault().notify(ie);
        return null;
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:FormDataLoaderBeanInfo.java

示例10: getAdditionalBeanInfo

import org.openide.loaders.MultiFileLoader; //導入依賴的package包/類
public BeanInfo[] getAdditionalBeanInfo() {
    try {
        return new BeanInfo[] {Introspector.getBeanInfo(MultiFileLoader.class)};
    } catch (IntrospectionException e) {
        throw new AssertionError(e);
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:8,代碼來源:LanguagesDataLoaderBeanInfo.java

示例11: getAdditionalBeanInfo

import org.openide.loaders.MultiFileLoader; //導入依賴的package包/類
public BeanInfo[] getAdditionalBeanInfo () {
    try {
        return new BeanInfo[] { Introspector.getBeanInfo (MultiFileLoader.class) };
    } catch (IntrospectionException ie) {
        ErrorManager.getDefault().notify(ie);
        return null;
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:9,代碼來源:PropertiesDataLoaderBeanInfo.java

示例12: getAdditionalBeanInfo

import org.openide.loaders.MultiFileLoader; //導入依賴的package包/類
public BeanInfo[] getAdditionalBeanInfo() {
    try {
        return new BeanInfo[] {
            java.beans.Introspector.getBeanInfo (MultiFileLoader.class)
        };
    } catch (IntrospectionException e) {
        Exceptions.printStackTrace(e);
    }
    return super.getAdditionalBeanInfo();
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:11,代碼來源:EntityDataLoaderBeanInfo.java

示例13: TestNGSuiteDataObject

import org.openide.loaders.MultiFileLoader; //導入依賴的package包/類
public TestNGSuiteDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {
    super(pf, loader);
    CookieSet cookies = getCookieSet();
    cookies.add(new CheckXMLSupport(DataObjectAdapters.inputSource(this)));
    cookies.add(new ValidateXMLSupport(DataObjectAdapters.inputSource(this)));
    registerEditor(MIME_TYPE, true);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:8,代碼來源:TestNGSuiteDataObject.java

示例14: SQLDataObject

import org.openide.loaders.MultiFileLoader; //導入依賴的package包/類
public SQLDataObject(FileObject primaryFile, MultiFileLoader loader) throws DataObjectExistsException {
    super(primaryFile, loader);
    CookieSet cookies = getCookieSet();
    final SQLEditorSupport sqlEditorSupport = new SQLEditorSupport(this);
    cookies.add(sqlEditorSupport);
    cookies.assign( SaveAsCapable.class, new SaveAsCapable() {
        @Override
        public void saveAs(FileObject folder, String fileName) throws IOException {
            sqlEditorSupport.saveAs( folder, fileName );
        }
    });
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:13,代碼來源:SQLDataObject.java

示例15: getAdditionalBeanInfo

import org.openide.loaders.MultiFileLoader; //導入依賴的package包/類
public BeanInfo[] getAdditionalBeanInfo () {
    try {
        return new BeanInfo[] { Introspector.getBeanInfo (MultiFileLoader.class) };
    } catch (IntrospectionException ie) {
        Exceptions.printStackTrace(ie);
        return null;
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:9,代碼來源:JavaDataLoaderBeanInfo.java


注:本文中的org.openide.loaders.MultiFileLoader類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。