本文整理汇总了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 );
}
示例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 );
}
示例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());
}
示例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()]);
}
示例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;
}
示例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()]);
}
示例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;
}