当前位置: 首页>>代码示例>>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;未经允许,请勿转载。