当前位置: 首页>>代码示例>>Java>>正文


Java Repository.getDefault方法代码示例

本文整理汇总了Java中org.openide.filesystems.Repository.getDefault方法的典型用法代码示例。如果您正苦于以下问题:Java Repository.getDefault方法的具体用法?Java Repository.getDefault怎么用?Java Repository.getDefault使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openide.filesystems.Repository的用法示例。


在下文中一共展示了Repository.getDefault方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import org.openide.filesystems.Repository; //导入方法依赖的package包/类
/** Initialize shared state.
 * Should use {@link #putProperty} to set up variables.
 * Subclasses should always call the super method.
 * <p>This method need <em>not</em> be called explicitly; it will be called once
 * the first time a given shared class is used (not for each instance!).
 */
@Override
protected void initialize() {
    super.initialize();
    
    setAnalyzerInnerClasses( Boolean.FALSE );
    
    final String[] filterPackages = new String[] { "java.*", "javax.*"};
    setFilterPackages( filterPackages );
    setDefaultFilterPackages( filterPackages );
    
    final String DEFAULT_XSLT_FILE_OBJECT_NAME = ConstantsHelper.getStandardXsltFileObjectName();
    final Repository repo = Repository.getDefault();
    final FileSystem fs = repo.getDefaultFileSystem();
    
    final FileObject fo = fs.findResource(  DEFAULT_XSLT_FILE_OBJECT_NAME );
    setXsltFileObject( fo );
}
 
开发者ID:bernhardhuber,项目名称:netbeansplugins,代码行数:24,代码来源:JDependSettings.java

示例2: initialize

import org.openide.filesystems.Repository; //导入方法依赖的package包/类
/** Initialize shared state.
 * Should use {@link #putProperty} to set up variables.
 * Subclasses should always call the super method.
 * <p>This method need <em>not</em> be called explicitly; it will be called once
 * the first time a given shared class is used (not for each instance!).
 */
protected void initialize() {
    super.initialize();
    
    final String[] filterPackages = new String[] { "java.", "javax."};
    setFilterPackages( filterPackages );
    setDefaultFilterPackages( filterPackages );
    
    final String[] filterJars = new String[] {};
    setFilterJars( filterJars );
    setDefaultFilterJars( filterJars );
    
    final String DEFAULT_XSLT_FILE_OBJECT_NAME = ConstantsHelper.getStandardXsltFileObjectName();
    final Repository repo = Repository.getDefault();
    final FileSystem fs = repo.getDefaultFileSystem();
    
    final FileObject fo = fs.findResource(  DEFAULT_XSLT_FILE_OBJECT_NAME );
    setXsltFileObject( fo );
}
 
开发者ID:bernhardhuber,项目名称:netbeansplugins,代码行数:25,代码来源:NbjaranalyzerSettings.java

示例3: testUsingNbRepositoryAndInit

import org.openide.filesystems.Repository; //导入方法依赖的package包/类
public void testUsingNbRepositoryAndInit() {
    if (Repository.getDefault() instanceof NbRepository) {
        MainLookup.register(new MyProvider());
        return;
    }
    fail("Wrong repository: " + Repository.getDefault());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:ContentProviderTest.java

示例4: populateModel

import org.openide.filesystems.Repository; //导入方法依赖的package包/类
protected LabelFileObjectBean[] populateModel() {
    final List<LabelFileObjectBean> foList = new ArrayList<>();
    final String FOLDER_NAME = ConstantsHelper.getXsltFolderName();
    
    final Repository repo = Repository.getDefault();
    final FileSystem fs = repo.getDefaultFileSystem();
    
    final FileObject xsltFolder = fs.findResource( FOLDER_NAME );
    for (Enumeration children = xsltFolder.getData(false); children.hasMoreElements() ; ) {
        final FileObject foChild = (FileObject)children.nextElement();
        final LabelFileObjectBean lfob = new LabelFileObjectBean(foChild);
        foList.add( lfob );
    }
    return foList.toArray(new LabelFileObjectBean[foList.size()]);
}
 
开发者ID:bernhardhuber,项目名称:netbeansplugins,代码行数:16,代码来源:XsltFileObjectComboBoxModel.java

示例5: getXsltFileObject

import org.openide.filesystems.Repository; //导入方法依赖的package包/类
protected FileObject getXsltFileObject() {
    
    FileObject fo = JDependSettings.getDefault().getXsltFileObject();
    if (fo == null) {
        final Repository repo = Repository.getDefault();
        final String standardResourceName = ConstantsHelper.getStandardXsltFileObjectName();
        fo = repo.getDefaultFileSystem().findResource(standardResourceName);
    }
    return fo;
}
 
开发者ID:bernhardhuber,项目名称:netbeansplugins,代码行数:11,代码来源:TransformHelper.java

示例6: populateModel

import org.openide.filesystems.Repository; //导入方法依赖的package包/类
protected LabelFileObjectBean[] populateModel() {
    final List<LabelFileObjectBean> foList = new ArrayList<LabelFileObjectBean>();
    final String FOLDER_NAME = ConstantsHelper.getXsltFolderName();
    
    final Repository repo = Repository.getDefault();
    final FileSystem fs = repo.getDefaultFileSystem();
    
    final FileObject xsltFolder = fs.findResource( FOLDER_NAME );
    for (Enumeration children = xsltFolder.getData(false); children.hasMoreElements() ; ) {
        final FileObject foChild = (FileObject)children.nextElement();
        final LabelFileObjectBean lfob = new LabelFileObjectBean(foChild);
        foList.add( lfob );
    }
    return foList.toArray(new LabelFileObjectBean[foList.size()]);
}
 
开发者ID:bernhardhuber,项目名称:netbeansplugins,代码行数:16,代码来源:XsltFileObjectComboBoxModel.java

示例7: getXsltFileObject

import org.openide.filesystems.Repository; //导入方法依赖的package包/类
protected FileObject getXsltFileObject() {
   
    FileObject fo = NbjaranalyzerSettings.getDefault().getXsltFileObject();
    if (fo == null) {
        final Repository repo = Repository.getDefault();
        final String standardResourceName = ConstantsHelper.getStandardXsltFileObjectName();
        fo = repo.getDefaultFileSystem().findResource(standardResourceName);
    }
    return fo;
}
 
开发者ID:bernhardhuber,项目名称:netbeansplugins,代码行数:11,代码来源:TransformHelper.java


注:本文中的org.openide.filesystems.Repository.getDefault方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。