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


Java Access类代码示例

本文整理汇总了Java中org.eclipse.xtext.ui.shared.Access的典型用法代码示例。如果您正苦于以下问题:Java Access类的具体用法?Java Access怎么用?Java Access使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Access类属于org.eclipse.xtext.ui.shared包,在下文中一共展示了Access类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: allGrammars

import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
/**
 * Gets all available grammars.
 * <p>
 * The result contains no null entries.
 * </p>
 *
 * @return an iterator over all grammars in the workspace followed by all those in the registry.
 */
private Iterable<Grammar> allGrammars() {
  final ResourceSet resourceSetForResolve = new ResourceSetImpl();
  final Function<IEObjectDescription, Grammar> description2GrammarTransform = new Function<IEObjectDescription, Grammar>() {
    @Override
    public Grammar apply(final IEObjectDescription desc) {
      EObject obj = desc.getEObjectOrProxy();
      if (obj != null && obj.eIsProxy()) {
        obj = EcoreUtil.resolve(obj, resourceSetForResolve);
      }
      if (obj instanceof Grammar && !obj.eIsProxy()) {
        return (Grammar) obj;
      } else {
        return null;
      }

    }
  };

  final Iterable<IEObjectDescription> grammarDescriptorsFromIndex = Access.getIResourceDescriptions().get().getExportedObjectsByType(XtextPackage.Literals.GRAMMAR);
  return Iterables.concat(Iterables.filter(Iterables.transform(grammarDescriptorsFromIndex, description2GrammarTransform), Predicates.notNull()), allGrammarsFromRegistry());
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:30,代码来源:CheckResourceUtil.java

示例2: bindIResourceSetProvider

import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
@Override
public Class<? extends IResourceSetProvider> bindIResourceSetProvider() {
	if (Access.getJdtHelper().get().isJavaCoreAvailable()) {
		return XtextResourceSetProvider.class;
	} else {
		return SimpleResourceSetProvider.class;
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:9,代码来源:SGenUiModule.java

示例3: bindIResourceForEditorInputFactory

import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
@Override
public Class<? extends IResourceForEditorInputFactory> bindIResourceForEditorInputFactory() {
	if (Access.getJdtHelper().get().isJavaCoreAvailable()) {
		return JavaClassPathResourceForIEditorInputFactory.class;
	} else {
		return ResourceForIEditorInputFactory.class;
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:9,代码来源:SGenUiModule.java

示例4: provideIAllContainersState

import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
public com.google.inject.Provider<org.eclipse.xtext.resource.containers.IAllContainersState> provideIAllContainersState() {
	if (Access.getJdtHelper().get().isJavaCoreAvailable()) {
		return Access.getJavaProjectsState();
	} else {
		return Access.getWorkspaceProjectsState();
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:8,代码来源:STextUiModule.java

示例5: bindIResourceSetProvider

import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
public Class<? extends IResourceSetProvider> bindIResourceSetProvider() {
	if (Access.getJdtHelper().get().isJavaCoreAvailable()) {
		return XtextResourceSetProvider.class;
	} else {
		return SimpleResourceSetProvider.class;
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:8,代码来源:STextUiModule.java

示例6: provideIAllContainersState

import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
开发者ID:rehne93,项目名称:pokemon-tcgo-deck-generator,代码行数:4,代码来源:AbstractPkmntcgoUiModule.java

示例7: getBuilderState

import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
/***/
public static IBuilderState getBuilderState() {
	return Access.getIBuilderState().get();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:BuilderUtil.java

示例8: provideGitCloneSupplier

import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
/**
 * Re-binds the {@link GitCloneSupplier} to the singleton instance declared in the contribution module.
 */
public Provider<GitCloneSupplier> provideGitCloneSupplier() {
	return Access.contributedProvider(GitCloneSupplier.class);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:7,代码来源:N4JSUiModule.java

示例9: provideWorkingSetManagerBroker

import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
/**
 * Binds the broker for the working set managers in a singleton scope.
 */
public Provider<WorkingSetManagerBroker> provideWorkingSetManagerBroker() {
	return Access.contributedProvider(WorkingSetManagerBroker.class);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:7,代码来源:N4JSUiModule.java

示例10: provideWorkingSetManagerBrokerImpl

import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
/**
 * Binds the broker implementation for the working set managers in a singleton scope.
 */
public Provider<WorkingSetManagerBrokerImpl> provideWorkingSetManagerBrokerImpl() {
	return Access.contributedProvider(WorkingSetManagerBrokerImpl.class);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:7,代码来源:N4JSUiModule.java

示例11: provideTypeDefinitionGitLocationProvider

import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
/**
 * Binds the type definition Git location provider.
 */
public Provider<TypeDefinitionGitLocationProvider> provideTypeDefinitionGitLocationProvider() {
	return Access.contributedProvider(TypeDefinitionGitLocationProvider.class);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:7,代码来源:N4JSUiModule.java

示例12: provideIN4JSEclipseCore

import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
/**
 * Configure the IN4JSCore instance to use the implementation that is backed by the Eclipse workspace.
 */
public Provider<IN4JSEclipseCore> provideIN4JSEclipseCore() {
	return Access.contributedProvider(IN4JSEclipseCore.class);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:7,代码来源:N4JSUiModule.java

示例13: provideEclipseBasedN4JSWorkspace

import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
/**
 * Configure the IN4JSCore instance to use the implementation that is backed by the Eclipse workspace.
 */
public Provider<EclipseBasedN4JSWorkspace> provideEclipseBasedN4JSWorkspace() {
	return Access.contributedProvider(EclipseBasedN4JSWorkspace.class);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:7,代码来源:N4JSUiModule.java

示例14: provideIAllContainersState

import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
public Provider<IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
开发者ID:fatalerrortan,项目名称:Xtext_Xtend_HTML_Generator,代码行数:4,代码来源:AbstractMyDslUiModule.java

示例15: provideIAllContainersState

import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
@Override
public com.google.inject.Provider<org.eclipse.xtext.resource.containers.IAllContainersState> provideIAllContainersState() {
	return Access.getWorkspaceProjectsState();
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:5,代码来源:SGenUiModule.java


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