/** * 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()); }
@Override public Class<? extends IResourceSetProvider> bindIResourceSetProvider() { if (Access.getJdtHelper().get().isJavaCoreAvailable()) { return XtextResourceSetProvider.class; } else { return SimpleResourceSetProvider.class; } }
@Override public Class<? extends IResourceForEditorInputFactory> bindIResourceForEditorInputFactory() { if (Access.getJdtHelper().get().isJavaCoreAvailable()) { return JavaClassPathResourceForIEditorInputFactory.class; } else { return ResourceForIEditorInputFactory.class; } }
public com.google.inject.Provider<org.eclipse.xtext.resource.containers.IAllContainersState> provideIAllContainersState() { if (Access.getJdtHelper().get().isJavaCoreAvailable()) { return Access.getJavaProjectsState(); } else { return Access.getWorkspaceProjectsState(); } }
public Class<? extends IResourceSetProvider> bindIResourceSetProvider() { if (Access.getJdtHelper().get().isJavaCoreAvailable()) { return XtextResourceSetProvider.class; } else { return SimpleResourceSetProvider.class; } }
public Provider<? extends IAllContainersState> provideIAllContainersState() { return Access.getJavaProjectsState(); }
/***/ public static IBuilderState getBuilderState() { return Access.getIBuilderState().get(); }
/** * Re-binds the {@link GitCloneSupplier} to the singleton instance declared in the contribution module. */ public Provider<GitCloneSupplier> provideGitCloneSupplier() { return Access.contributedProvider(GitCloneSupplier.class); }
/** * Binds the broker for the working set managers in a singleton scope. */ public Provider<WorkingSetManagerBroker> provideWorkingSetManagerBroker() { return Access.contributedProvider(WorkingSetManagerBroker.class); }
/** * Binds the broker implementation for the working set managers in a singleton scope. */ public Provider<WorkingSetManagerBrokerImpl> provideWorkingSetManagerBrokerImpl() { return Access.contributedProvider(WorkingSetManagerBrokerImpl.class); }
/** * Binds the type definition Git location provider. */ public Provider<TypeDefinitionGitLocationProvider> provideTypeDefinitionGitLocationProvider() { return Access.contributedProvider(TypeDefinitionGitLocationProvider.class); }
/** * Configure the IN4JSCore instance to use the implementation that is backed by the Eclipse workspace. */ public Provider<IN4JSEclipseCore> provideIN4JSEclipseCore() { return Access.contributedProvider(IN4JSEclipseCore.class); }
/** * Configure the IN4JSCore instance to use the implementation that is backed by the Eclipse workspace. */ public Provider<EclipseBasedN4JSWorkspace> provideEclipseBasedN4JSWorkspace() { return Access.contributedProvider(EclipseBasedN4JSWorkspace.class); }
public Provider<IAllContainersState> provideIAllContainersState() { return Access.getJavaProjectsState(); }
@Override public com.google.inject.Provider<org.eclipse.xtext.resource.containers.IAllContainersState> provideIAllContainersState() { return Access.getWorkspaceProjectsState(); }
public DirtyStateListener() { dirtyStateManager = Access.getIDirtyStateManager().get(); uri2dirtyResource = Maps.newHashMap(); }
public DirtyStateAwareDiagramDocumentEditor(boolean hasFlyoutPalette) { super(hasFlyoutPalette); dirtyStateManager = Access.getIDirtyStateManager().get(); uri2dirtyResource = Maps.newHashMap(); }