Java 类org.eclipse.xtext.builder.builderState.IBuilderState 实例源码

项目:dsl-devkit    文件:DirtyStateAwareResourceDescriptions2.java   
@Inject
public DirtyStateAwareResourceDescriptions2(final IBuilderState globalDescriptions, final IDirtyStateManager dirtyStateManager, final IStateChangeEventBroker stateChangeEventBroker) {
  super(globalDescriptions, dirtyStateManager, stateChangeEventBroker);
  dirtyResources = Sets.newHashSet();
  this.dirtyStateManager = dirtyStateManager;
  this.globalDescriptions = (IResourceDescriptions2) (globalDescriptions instanceof IResourceDescriptions2 ? globalDescriptions
      : new ResourceDescriptions2(globalDescriptions));
}
项目:pokemon-tcgo-deck-generator    文件:AbstractPkmntcgoUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:n4js    文件:BuilderUtil.java   
/***/
public static IBuilderState getBuilderState() {
    return Access.getIBuilderState().get();
}
项目:n4js    文件:AbstractN4JSUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:n4js    文件:ExternalLibraryBuilderHelper.java   
/**
 * Runs the operation in a blocking fashion.
 *
 * @param helper
 *            the build helper to get the injected services.
 * @param project
 *            the project to clean/build.
 * @param monitor
 *            monitor for the operation.
 */
private void run(final ExternalLibraryBuilderHelper helper, IProject project, IProgressMonitor monitor) {

    checkArgument(project instanceof ExternalProject, "Expected external project: " + project);

    final SubMonitor subMonitor = SubMonitor.convert(monitor, 2);
    final ToBeBuiltComputer computer = helper.builtComputer;
    final IProgressMonitor computeMonitor = subMonitor.newChild(1, SUPPRESS_BEGINTASK);
    monitor.setTaskName("Collecting resource for '" + project.getName() + "'...");
    final ToBeBuilt toBeBuilt = getToBeBuilt(computer, project, computeMonitor);

    if (toBeBuilt.getToBeDeleted().isEmpty() && toBeBuilt.getToBeUpdated().isEmpty()) {
        subMonitor.newChild(1, SUPPRESS_NONE).worked(1);
        return;
    }

    try {

        final IN4JSCore core = helper.core;
        final QueuedBuildData queuedBuildData = helper.queuedBuildData;
        final IBuilderState builderState = helper.builderState;

        final ExternalProject externalProject = (ExternalProject) project;
        final String path = externalProject.getExternalResource().getAbsolutePath();
        final URI uri = URI.createFileURI(path);
        final IN4JSProject n4Project = core.findProject(uri).orNull();

        ResourceSet resourceSet = null;

        try {

            resourceSet = core.createResourceSet(Optional.of(n4Project));
            if (!resourceSet.getLoadOptions().isEmpty()) {
                resourceSet.getLoadOptions().clear();
            }
            resourceSet.getLoadOptions().put(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE, Boolean.TRUE);
            if (resourceSet instanceof ResourceSetImpl) {
                ((ResourceSetImpl) resourceSet).setURIResourceMap(newHashMap());
            }

            final BuildData buildData = new BuildData(
                    project.getName(),
                    resourceSet,
                    toBeBuilt,
                    queuedBuildData,
                    true /* indexingOnly */);

            monitor.setTaskName("Building '" + project.getName() + "'...");
            final IProgressMonitor buildMonitor = subMonitor.newChild(1, SUPPRESS_BEGINTASK);
            builderState.update(buildData, buildMonitor);

        } finally {

            if (null != resourceSet) {
                resourceSet.getResources().clear();
                resourceSet.eAdapters().clear();
            }

        }

    } catch (Exception e) {
        final String message = "Error occurred while " + toString().toLowerCase() + "ing external library "
                + project.getName() + ".";
        LOGGER.error(message, e);
        throw new RuntimeException(message, e);
    }

}
项目:n4js    文件:AbstractRegularExpressionUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:n4js    文件:AbstractN4MFUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:Xtext_Xtend_HTML_Generator    文件:AbstractMyDslUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:bromium    文件:AbstractBromiumUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:gw4e.project    文件:AbstractDSLPoliciesUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:lcdsl    文件:AbstractLcDslUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:gemoc-studio    文件:AbstractDslUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:org.xtext.dsl.restaurante    文件:AbstractRestauranteUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:OCCI-Studio    文件:AbstractOCCIUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:M2Doc    文件:AbstractMyDslUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:minitl    文件:AbstractMinitlUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:Sparrow    文件:AbstractModelEditorUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:CooperateModelingEnvironment    文件:AbstractComponentUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:CooperateModelingEnvironment    文件:AbstractClsUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:CooperateModelingEnvironment    文件:AbstractUsecaseUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:cs2as    文件:AbstractASBHLangUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:cs2as    文件:AbstractMiniOCLUiModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
项目:dsl-devkit    文件:EclipseBuilderModule.java   
/**
 * Binds the ProjectAwareClusteringState to avoid getting stuck rebuilding things and improive performance.
 *
 * @return {@link ProjectAwareClusteringBuilderState}
 */
public Class<? extends IBuilderState> bindIBuilderState() {
  return ProjectAwareClusteringBuilderState.class;
}
项目:dsl-devkit    文件:ClusteringModule.java   
/**
 * Provide a default binding for the builder state.
 *
 * @return The class to instantiate for the builder state
 */
public Class<? extends IBuilderState> bindIBuilderState() {
  return MonitoredClusteringBuilderState.class;
}