Java 类org.eclipse.xtext.resource.clustering.IResourceClusteringPolicy 实例源码

项目:xtext-core    文件:IncrementalBuilder.java   
public IncrementalBuilder.Result build(final BuildRequest request, final Function1<? super URI, ? extends IResourceServiceProvider> languages, final IResourceClusteringPolicy clusteringPolicy) {
  try {
    final XtextResourceSet resourceSet = request.getResourceSet();
    ResourceDescriptionsData _copy = request.getState().getResourceDescriptions().copy();
    Source2GeneratedMapping _copy_1 = request.getState().getFileMappings().copy();
    final IndexState oldState = new IndexState(_copy, _copy_1);
    CancelIndicator _cancelIndicator = request.getCancelIndicator();
    final BuildContext context = new BuildContext(languages, resourceSet, oldState, clusteringPolicy, _cancelIndicator);
    final IncrementalBuilder.InternalStatefulIncrementalBuilder builder = this.provider.get();
    builder.context = context;
    builder.request = request;
    try {
      return builder.launch();
    } catch (final Throwable _t) {
      if (_t instanceof Throwable) {
        final Throwable t = (Throwable)_t;
        this._operationCanceledManager.propagateIfCancelException(t);
        throw t;
      } else {
        throw Exceptions.sneakyThrow(_t);
      }
    }
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
项目:n4js    文件:N4JSClusteringBuilderConfiguration.java   
@Override
protected void configure() {
    bind(IResourceClusteringPolicy.class).to(N4JSVerboseClusteringPolicy.class);
    bind(XtextBuilder.class).to(N4JSBuildTypeTrackingBuilder.class);
    bind(ClusteringBuilderState.class).to(N4JSGenerateImmediatelyBuilderState.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);
}
项目:xtext-core    文件:BuildContext.java   
public BuildContext(final Function1<? super URI, ? extends IResourceServiceProvider> resourceServiceProviderProvider, final XtextResourceSet resourceSet, final IndexState oldState, final IResourceClusteringPolicy clusteringPolicy, final CancelIndicator cancelIndicator) {
  super();
  this.resourceServiceProviderProvider = resourceServiceProviderProvider;
  this.resourceSet = resourceSet;
  this.oldState = oldState;
  this.clusteringPolicy = clusteringPolicy;
  this.cancelIndicator = cancelIndicator;
}
项目:gama    文件:GamlUiModule.java   
@Override
public void configure(final Binder binder) {

    super.configure(binder);
    binder.bind(String.class).annotatedWith(
            com.google.inject.name.Names.named(XtextContentAssistProcessor.COMPLETION_AUTO_ACTIVATION_CHARS))
            .toInstance(".");

    binder.bind(IResourceLoader.class).toProvider(ResourceLoaderProviders.getParallelLoader());
    binder.bind(IResourceClusteringPolicy.class).to(DynamicResourceClusteringPolicy.class);
    binder.bind(IModelRunner.class).to(ModelRunner.class);
    // binder.bind(XtextDocumentProvider.class).to(XtextDocumentProvider.class);
    binder.bind(IMarkerUpdater.class).to(GamlMarkerUpdater.class);
    binder.bind(IGamlLabelProvider.class).to(GamlLabelProvider.class).asEagerSingleton();
}
项目:xtext-core    文件:BuildContext.java   
@Pure
public IResourceClusteringPolicy getClusteringPolicy() {
  return this.clusteringPolicy;
}
项目:statecharts    文件:OverridingGuiceModule.java   
@Override
public void configure(Binder binder) {
    binder.bind(IResourceClusteringPolicy.class).to(DynamicResourceClusteringPolicy.class);
}
项目:statecharts    文件:STextUiModule.java   
public Class<? extends IResourceClusteringPolicy> bindIResourceClusteringPolicy() {
    return DynamicResourceClusteringPolicy.class;
}