org.eclipse.xtext.builder.builderState.IBuilderState Java Examples

The following examples show how to use org.eclipse.xtext.builder.builderState.IBuilderState. 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: N4JSClusteringBuilderConfiguration.java    From n4js with Eclipse Public License 1.0 6 votes vote down vote up
@Override
protected void configure() {
	bind(IResourceClusteringPolicy.class).to(VerboseClusteringPolicy.class);
	bind(XtextBuilder.class).to(N4JSBuildTypeTrackingBuilder.class);
	bind(IBuilderState.class).to(N4JSGenerateImmediatelyBuilderState.class).in(Scopes.SINGLETON);
	bind(IMarkerUpdater.class).to(N4JSMarkerUpdater.class);
	bind(IStorage2UriMapper.class).to(N4JSStorage2UriMapper.class);
	bind(PersistedStateProvider.class).to(ContributingResourceDescriptionPersister.class);
	bind(IBuildLogger.class).annotatedWith(BuilderState.class).to(BuilderStateLogger.class);
	bind(DirtyStateManager.class).to(PrevStateAwareDirtyStateManager.class);
	bind(IResourceLoader.class).annotatedWith(
			Names.named(ClusteringBuilderState.RESOURCELOADER_GLOBAL_INDEX)).toProvider(
					new BuildScopeAwareParallelLoaderProvider());
	bind(BuilderStateDiscarder.class);
	bind(SharedStateContributionRegistryImpl.class).to(DefaultSharedContributionOverridingRegistry.class);
	binder().install(new MyReferenceSearchResultContentProviderCustomModule());
}
 
Example #2
Source File: DirtyStateAwareResourceDescriptions2.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
@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));
}
 
Example #3
Source File: DisabledBuilderTest.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Test
public void testDisabledProject() throws CoreException {
	IBuilderState descriptions = BuilderUtil.getBuilderState();
	URI uri = URI.createURI("platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore");
	assertNull(descriptions.getResourceDescription(uri));
	
	IProject foo = createPluginProject("foo", false, null);
	foo.getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
	assertNull(descriptions.getResourceDescription(uri));

	createPluginProject("bar", true, "foo");
	foo.getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
	assertNotNull(descriptions.getResourceDescription(uri));
}
 
Example #4
Source File: DirtyStateAwareResourceDescriptions.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Inject
public DirtyStateAwareResourceDescriptions(
		IBuilderState globalDescriptions, 
		IDirtyStateManager dirtyStateManager, 
		IStateChangeEventBroker stateChangeEventBroker) {
	this.globalDescriptions = globalDescriptions;
	this.dirtyStateManager = dirtyStateManager;
	globalDescriptions.addListener(createGlobalStateListener());
	dirtyStateManager.addListener(createDirtyStateListener());
	addListener(stateChangeEventBroker);
}
 
Example #5
Source File: SharedStateModule.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * @since 2.8
 */
public void configureResourceDescriptionsProvider(Binder binder) {
	if (Activator.isJavaEnabled()) {
		binder.install(new ResourceDescriptionsProviderModule());
	} else {
		binder.bind(ResourceDescriptionsProvider.class).in(Scopes.SINGLETON);
	}
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.LIVE_SCOPE))
		.to(LiveShadowedResourceDescriptions.class);
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE))
		.to(CurrentDescriptions.ResourceSetAware.class);
	binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #6
Source File: SharedCommonTypesModule.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
public void configure(Binder binder) {
	binder.bind(IEObjectHoverProvider.class).to(JdtHoverProvider.class);
	binder.bind(IEObjectHoverDocumentationProvider.class).to(JdtHoverDocumentationProvider.class);
	binder.bind(IResourceServiceProvider.class).to(SharedCommonTypesResourceServiceProvider.class);
	binder.bind(IResourceSetProvider.class).to(XtextResourceSetProvider.class);
	binder.bindConstant().annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).to("java");

	binder.bind(IQualifiedNameProvider.class).to(JvmIdentifiableQualifiedNameProvider.class);
	binder.bind(ICopyQualifiedNameService.class).to(DefaultCopyQualifiedNameService.class);
	binder.bind(IJvmTypeProvider.Factory.class).to(JdtTypeProviderFactory.class);
	binder.bind(IRenameRefactoringProvider.class).to(DefaultRenameRefactoringProvider.class);
	binder.bind(AbstractRenameProcessor.class).to(JvmMemberRenameProcessor.class);
	binder.bind(IRenameStrategy.Provider.class).to(JvmMemberRenameStrategy.Provider.class);
	binder.bind(RefactoringResourceSetProvider.class).to(JvmRefactoringResourceSetProvider.class);
	binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("Java");

	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.LIVE_SCOPE))
			.to(LiveShadowedResourceDescriptions.class);
	binder.bind(IResourceDescriptions.class)
			.annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE))
			.to(CurrentDescriptions.ResourceSetAware.class);
	binder.bind(IResourceDescriptions.class)
			.annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS))
			.to(IBuilderState.class);

	binder.bind(IWorkspaceRoot.class).toInstance(ResourcesPlugin.getWorkspace().getRoot());
	binder.bind(ITraceForStorageProvider.class).to(TraceForStorageProvider.class);

	binder.bind(IReferenceUpdater.class).to(NullReferenceUpdater.class);
}
 
Example #7
Source File: AbstractPureXbaseUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #8
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 #9
Source File: AbstractRuleEngineUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #10
Source File: AbstractArithmeticsUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #11
Source File: AbstractBuilderTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #12
Source File: BuilderUtil.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public static IBuilderState getBuilderState() {
	return Access.getIBuilderState().get();
}
 
Example #13
Source File: ProfilerAbstractBuilderTest.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
private IBuilderState getBuilderState() {
	return Access.getIBuilderState().get();
}
 
Example #14
Source File: Access.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public static Provider<IBuilderState> getIBuilderState() {
	return provider(IBuilderState.class);
}
 
Example #15
Source File: SharedStateModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<IBuilderState> provideIBuilderState() {
	return Access.getIBuilderState();
}
 
Example #16
Source File: AbstractXbaseUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #17
Source File: AbstractXbaseWithAnnotationsUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #18
Source File: AbstractStatemachineUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #19
Source File: AbstractBug462047LangUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #20
Source File: AbstractXImportSectionTestLangUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #21
Source File: AbstractContentAssistFragmentTestLangUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #22
Source File: ProjectOpenedOrClosedListener.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public IBuilderState getBuilderState() {
	return builderState;
}
 
Example #23
Source File: BuilderDeltaConverter.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Inject
public BuilderDeltaConverter(IQualifiedNameConverter nameConverter, TypeURIHelper uriHelper, IBuilderState builderState) {
	super(nameConverter, uriHelper, builderState);
}
 
Example #24
Source File: AbstractXtendUiModule.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #25
Source File: AbstractHelloWorldUiModule.java    From dsl-devkit with Eclipse Public License 1.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #26
Source File: AbstractGamlUiModule.java    From gama with GNU General Public License v3.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #27
Source File: AbstractSARLUiModule.java    From sarl with Apache License 2.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #28
Source File: AbstractNestedRefsTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #29
Source File: AbstractN4JSUiModule.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
 
Example #30
Source File: N4JSBuildTypeTrackingBuilder.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
private IBuilderState getBuilderState() {
	return optimisticGet("builderState");
}