Java 类org.eclipse.xtext.resource.containers.IAllContainersState 实例源码

项目:xtext-extras    文件:BuilderIntegrationFragment.java   
@Override
public Set<Binding> getGuiceBindingsRt(Grammar grammar) {
    return new BindFactory()
    .addTypeToType(IContainer.Manager.class.getName(), StateBasedContainerManager.class.getName())
    .addTypeToType(IAllContainersState.Provider.class.getName(),
            org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.class.getName())
    .addConfiguredBinding(
                IResourceDescriptions.class.getName(),
                "binder.bind(" + IResourceDescriptions.class.getName() + ".class"
                        + ").to("
                        + ResourceSetBasedResourceDescriptions.class.getName() + ".class)")
        .addConfiguredBinding(
                IResourceDescriptions.class.getName() + "Persisted",
                "binder.bind("+ IResourceDescriptions.class.getName() + ".class"
                        + ").annotatedWith(com.google.inject.name.Names.named("
                        + "org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to("
                        + ResourceSetBasedResourceDescriptions.class.getName() + ".class)")
        .getBindings();
}
项目:xtext-core    文件:Reader.java   
@Override
protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, Issues issues) {
    ResourceSet resourceSet = getResourceSet();
    Multimap<String, URI> uris = getPathTraverser().resolvePathes(pathes, new Predicate<URI>() {
        @Override
        public boolean apply(URI input) {
            boolean result = true;
            if (getUriFilter() != null)
                result = getUriFilter().matches(input);
            if (result)
                result = getRegistry().getResourceServiceProvider(input) != null;
            return result;
        }
    });
    IAllContainersState containersState = containersStateFactory.getContainersState(pathes, uris);
    installAsAdapter(resourceSet, containersState);
    populateResourceSet(resourceSet, uris);
    getValidator().validate(resourceSet, getRegistry(), issues);
    addModelElementsToContext(ctx, resourceSet);
}
项目:n4js    文件:XcoreReader.java   
@Override
protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor,
        Issues issues) {
    ResourceSet resourceSet = getResourceSet();

    // due to some Xcore peculiarity we have to access the IAllContainerState here
    // to trigger some lazy init logic
    IAllContainersState allContainerState = (IAllContainersState) EcoreUtil.getAdapter(resourceSet.eAdapters(),
            IAllContainersState.class);
    allContainerState.isEmpty("");

    Multimap<String, URI> uris = getPathTraverser().resolvePathes(pathes,
            new Predicate<URI>() {
        @Override
        public boolean apply(URI input) {
            return input.fileExtension().equals(XCORE_FILE_EXT);
        }
    });
    List<Resource> resources = new ArrayList<>();
    for (URI uri : uris.values()) {
        LOGGER.info(uri);
        try {
            resources.add(parse(uri, resourceSet));
        } catch (Exception e) {
            LOGGER.error("Problem during loading of resource @ " + uri, e);
        }
    }
    installIndex(resourceSet);
    for (Resource r : resources) {
        EcoreUtil.resolveAll(r);
        for (Diagnostic x : r.getErrors()) {
            issues.addError(x.getMessage(), x);
        }

    }
    ctx.set(slot, resources);
}
项目:xtext-extras    文件:ImplicitUiFragment.java   
@Override
public Set<Binding> getGuiceBindingsUi(Grammar grammar) {
    BindFactory bindFactory = new BindFactory()
        .addTypeToProviderInstance(
                IAllContainersState.class.getName(),
                "org.eclipse.xtext.ui.shared.Access.getJavaProjectsState()");
    if (XbaseGeneratorFragment.doesUseXbase(grammar)) {
        bindFactory = bindFactory.addTypeToType("org.eclipse.xtext.ui.editor.XtextEditor", "org.eclipse.xtext.xbase.ui.editor.XbaseEditor");
        bindFactory = bindFactory.addTypeToType("org.eclipse.xtext.ui.editor.model.XtextDocumentProvider", "org.eclipse.xtext.xbase.ui.editor.XbaseDocumentProvider");
        bindFactory = bindFactory.addTypeToType("org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler", "org.eclipse.xtext.xbase.ui.generator.trace.XbaseOpenGeneratedFileHandler");
    }
    return bindFactory.getBindings();
}
项目:xtext-core    文件:RuntimeResourceSetInitializer.java   
public ResourceSet getInitializedResourceSet(List<String> pathes, UriFilter filter) {
    ResourceSet resourceSet = resourceSetProvider.get();
    Multimap<String, URI> pathToUriMap = getPathToUriMap(pathes, filter);
    IAllContainersState containersState = factory.getContainersState(pathes, pathToUriMap);
    resourceSet.eAdapters().add(new DelegatingIAllContainerAdapter(containersState));
    for (URI uri : pathToUriMap.values()) {
        resourceSet.createResource(uri);
    }
    return resourceSet;
}
项目:pokemon-tcgo-deck-generator    文件:AbstractPkmntcgoRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:pokemon-tcgo-deck-generator    文件:AbstractPkmntcgoUiModule.java   
public Provider<? extends IAllContainersState> provideIAllContainersState() {
    return Access.getJavaProjectsState();
}
项目:n4js    文件:N4JSStandaloneTestsModule.java   
/**
 * Bind a custom IAllContainerState in a testing context. See {@link N4JSTestsAllContainerState} for an explanation.
 */
public Class<? extends IAllContainersState.Provider> bindAllContainerState() {
    return N4JSTestsAllContainerState.Provider.class;
}
项目:n4js    文件:N4JSTestsAllContainerState.java   
@Override
public IAllContainersState get(IResourceDescriptions context) {
    return new N4JSTestsAllContainerState(this.getResourceSet(context));
}
项目:n4js    文件:AbstractRegularExpressionRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:n4js    文件:AbstractN4JSUiModule.java   
public Provider<? extends IAllContainersState> provideIAllContainersState() {
    return Access.getJavaProjectsState();
}
项目:n4js    文件:N4JSAllContainersStateProvider.java   
@Override
public IAllContainersState get() {
    return instance;
}
项目:n4js    文件:N4JSUiModule.java   
@Override
public Provider<IAllContainersState> provideIAllContainersState() {
    return new N4JSAllContainersStateProvider();
}
项目:n4js    文件:AbstractRegularExpressionUiModule.java   
public Provider<? extends IAllContainersState> provideIAllContainersState() {
    return Access.getJavaProjectsState();
}
项目:n4js    文件:AbstractN4JSRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:n4js    文件:AbstractN4MFUiModule.java   
public Provider<? extends IAllContainersState> provideIAllContainersState() {
    return Access.getJavaProjectsState();
}
项目:n4js    文件:AbstractN4MFRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:n4js    文件:AbstractTypeExpressionsUiModule.java   
public Provider<? extends IAllContainersState> provideIAllContainersState() {
    return Access.getJavaProjectsState();
}
项目:n4js    文件:AbstractTypesUiModule.java   
public Provider<? extends IAllContainersState> provideIAllContainersState() {
    return Access.getJavaProjectsState();
}
项目:Xtext_Xtend_HTML_Generator    文件:AbstractMyDslUiModule.java   
public Provider<IAllContainersState> provideIAllContainersState() {
    return Access.getJavaProjectsState();
}
项目:Xtext_Xtend_HTML_Generator    文件:AbstractMyDslRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:bromium    文件:AbstractBromiumUiModule.java   
public Provider<? extends IAllContainersState> provideIAllContainersState() {
    return Access.getJavaProjectsState();
}
项目:bromium    文件:AbstractBromiumRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:gw4e.project    文件:AbstractDSLPoliciesUiModule.java   
public Provider<? extends IAllContainersState> provideIAllContainersState() {
    return Access.getJavaProjectsState();
}
项目:gw4e.project    文件:AbstractDSLPoliciesRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:lcdsl    文件:AbstractLcDslUiModule.java   
public Provider<? extends IAllContainersState> provideIAllContainersState() {
    return Access.getJavaProjectsState();
}
项目:lcdsl    文件:AbstractLcDslRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:gemoc-studio    文件:AbstractDslRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:gemoc-studio    文件:AbstractDslUiModule.java   
public Provider<? extends IAllContainersState> provideIAllContainersState() {
    return Access.getJavaProjectsState();
}
项目:org.xtext.dsl.restaurante    文件:AbstractRestauranteRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:org.xtext.dsl.restaurante    文件:AbstractRestauranteUiModule.java   
public Provider<? extends IAllContainersState> provideIAllContainersState() {
    return Access.getJavaProjectsState();
}
项目:OCCI-Studio    文件:AbstractOCCIRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:OCCI-Studio    文件:AbstractOCCIUiModule.java   
public Provider<? extends IAllContainersState> provideIAllContainersState() {
    return Access.getJavaProjectsState();
}
项目:xtext-extras    文件:AbstractPureXbaseRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:xtext-extras    文件:AbstractXbaseRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:xtext-extras    文件:AbstractXbaseWithAnnotationsRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:xtext-extras    文件:AbstractBuilderTestLanguageRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:xtext-extras    文件:AbstractBug462047LangRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:xtext-extras    文件:AbstractXImportSectionTestLangRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}
项目:xtext-extras    文件:AbstractContentAssistFragmentTestLangRuntimeModule.java   
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
    return ResourceSetBasedAllContainersStateProvider.class;
}