本文整理汇总了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());
}
示例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;
}
}
示例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;
}
}
示例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();
}
}
示例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;
}
}
示例6: provideIAllContainersState
import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
public Provider<? extends IAllContainersState> provideIAllContainersState() {
return Access.getJavaProjectsState();
}
示例7: getBuilderState
import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
/***/
public static IBuilderState getBuilderState() {
return Access.getIBuilderState().get();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例14: provideIAllContainersState
import org.eclipse.xtext.ui.shared.Access; //导入依赖的package包/类
public Provider<IAllContainersState> provideIAllContainersState() {
return Access.getJavaProjectsState();
}
示例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();
}