Java源码示例:org.eclipse.xtext.builder.builderState.IBuilderState
示例1
@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());
}
示例2
@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));
}
示例3
/**
* @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);
}
示例4
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);
}
示例5
@Inject
public DirtyStateAwareResourceDescriptions(
IBuilderState globalDescriptions,
IDirtyStateManager dirtyStateManager,
IStateChangeEventBroker stateChangeEventBroker) {
this.globalDescriptions = globalDescriptions;
this.dirtyStateManager = dirtyStateManager;
globalDescriptions.addListener(createGlobalStateListener());
dirtyStateManager.addListener(createDirtyStateListener());
addListener(stateChangeEventBroker);
}
示例6
@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));
}
示例7
/***/
public static IBuilderState getBuilderState() {
return Access.getIBuilderState().get();
}
示例8
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例9
private IBuilderState getBuilderState() {
return optimisticGet("builderState");
}
示例10
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例11
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例12
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例13
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例14
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例15
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例16
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例17
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例18
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例19
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例20
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例21
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例22
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例23
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例24
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例25
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例26
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例27
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例28
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例29
public void configureIResourceDescriptionsPersisted(com.google.inject.Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
示例30
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}