org.eclipse.xtext.ui.shared.Access Java Examples

The following examples show how to use org.eclipse.xtext.ui.shared.Access. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CheckResourceUtil.java    From dsl-devkit with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * 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());
}
 
Example #2
Source File: IgnoreBuildDirExecutableExtensionFactory.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public Object create() throws CoreException {
	if (!clazzName.equals(IgnoreBuildDirContribution.class.getName())) {
		throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.xtext.buildship",
				"Cannot create an instance of type " + clazzName));
	}
	ISharedStateContributionRegistry registry = Access.getSharedStateContributionRegistry().get();
	return registry.getSingleContributedInstance(IgnoreBuildDirContribution.class);
}
 
Example #3
Source File: ArithmeticsUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public Provider<IAllContainersState> provideIAllContainersState() {
	return Access.getWorkspaceProjectsState();
}
 
Example #4
Source File: AbstractBug360834TestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #5
Source File: AbstractBug309949TestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #6
Source File: BuilderUtil.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
/***/
public static IBuilderState getBuilderState() {
	return Access.getIBuilderState().get();
}
 
Example #7
Source File: AbstractCrossReferenceProposalTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #8
Source File: AbstractGH341TestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #9
Source File: AbstractBacktrackingContentAssistTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #10
Source File: AbstractTwoContextsTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #11
Source File: AbstractDomainModelTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #12
Source File: AbstractBmTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #13
Source File: AbstractKeywordsUiTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #14
Source File: AbstractXbaseWithAnnotationsUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #15
Source File: NoJdtTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public Provider<IAllContainersState> provideIAllContainersState() {
	return Access.getWorkspaceProjectsState();
}
 
Example #16
Source File: AbstractRuleEngineUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #17
Source File: AbstractContentAssistCustomizingTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #18
Source File: AbstractXtextGrammarTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #19
Source File: AbstractBeeLangTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #20
Source File: AbstractSingleCodetemplateUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #21
Source File: AbstractExBeeLangTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #22
Source File: AbstractFileAwareTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #23
Source File: AbstractMyDslUiModule.java    From M2Doc with Eclipse Public License 1.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #24
Source File: AbstractBromiumUiModule.java    From bromium with MIT License 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #25
Source File: AbstractTypesUiModule.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #26
Source File: AbstractTypeExpressionsUiModule.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #27
Source File: AbstractBug348199TestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #28
Source File: AbstractBug462047LangUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}
 
Example #29
Source File: N4JSUiModule.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
/** Delegate to shared injector */
public Provider<? extends ProcessExecutor> provideProcessExecutor() {
	return Access.contributedProvider(ProcessExecutor.class);
}
 
Example #30
Source File: AbstractGamlUiModule.java    From gama with GNU General Public License v3.0 4 votes vote down vote up
public Provider<? extends IAllContainersState> provideIAllContainersState() {
	return Access.getJavaProjectsState();
}