Java 类org.eclipse.xtext.builder.clustering.CurrentDescriptions 实例源码

项目:dsl-devkit    文件:CurrentDescriptions2.java   
/**
 * Set the context.
 * 
 * @param ctx
 *          The context
 */
@Override
public void setContext(final Notifier ctx) {
  super.setContext(ctx);
  final ResourceSet resourceSet = EcoreUtil2.getResourceSet(ctx);
  IResourceDescriptions adapter = (IResourceDescriptions) EcoreUtil2.getAdapter(resourceSet.eAdapters(), CurrentDescriptions.class);
  if (adapter instanceof IResourceDescriptions2) {
    delegate = (IResourceDescriptions2) adapter;
  } else {
    delegate = new ResourceDescriptions2(adapter);
  }
}
项目:pokemon-tcgo-deck-generator    文件:AbstractPkmntcgoUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:n4js    文件:AbstractN4JSUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:n4js    文件:N4JSGenerateImmediatelyBuilderState.java   
/**
 * Overriding this method to make sure that resources of all affected URIs are fully re-loaded if needed, instead of
 * only loading the TModule from the corresponding resource description.
 * <p>
 * This is required in case the URIs in an affected resource contain indices of a changed resource; just loading the
 * TModule from the user data won't update these indices. For details see the example provided in IDEBUG-347.
 * <p>
 * NOTE: this should be removed once the URI scheme has been changed to use names instead of indices.
 */
@Override
protected void queueAffectedResources(
        Set<URI> allRemainingURIs,
        IResourceDescriptions oldState,
        CurrentDescriptions newState,
        Collection<Delta> changedDeltas,
        Collection<Delta> allDeltas,
        BuildData buildData,
        final IProgressMonitor monitor) {

    // don't wanna copy super-class method, so using this helper to get the set of affected URIs:
    final Set<URI> affectedURIs = new HashSet<>(allRemainingURIs);

    super.queueAffectedResources(allRemainingURIs, oldState, newState, changedDeltas, allDeltas, buildData,
            monitor);

    // affected URIs have been removed from allRemainingURIs by super class
    affectedURIs.removeAll(allRemainingURIs);

    for (URI currAffURI : affectedURIs) {
        final IResourceDescription resDesc = this.getResourceDescription(currAffURI);
        if (!N4MF_MANIFEST.equals(currAffURI.lastSegment())) {

            /*-
             * This logic here is required to get rid of the invalid serialized TModules information from the index
             * which are working with an index based approach. Consider the below example:
             *
             * -------Module A------
             *1    //class XYZ { }
             *2    function foo() { }
             *3    export public class A { }
             *
             * -------Module B------
             *1    import { A } from "A"
             *2    import { C } from "C"
             *3
             *4    var arrCC : Array<A>;
             *5    var t2 : C = new C();
             *6    t2.m(arrCC);
             *
             * -------Module C------
             *1    import { A } from "A"
             *2
             *3    export public class C {
             *4        m(param : Array<A>) { }
             *5    }
             *
             *
             * Commenting out line 1 in module A will trigger rebuild of A, and related module B and C in this order.
             * When loading module B, module C has to be resolved as it imports it, quickly jump to module C and load
             * class A from module A, class A used to have index 1 (in the serialized TModule in the Xtext index) as
             * it was the second top level element, but that is not true any more, because 'foo' was just commented out,
             * so index 1 in module A is not class A any more but 'foo'. With this, line 6 in module B will fail,
             * because it will think that the method 'm' accepts an array of 'foo' and not A any more.
             *
             * The following code will be executed after A was processed and B and C are the "affectedURIs". With this
             * code, we make sure that the cached TModule of C (in the user data of C's resource description) won't be
             * used while processing B during proxy resolution.
             */
            newState.register(new DefaultResourceDescriptionDelta(resDesc,
                    new ResourceDescriptionWithoutModuleUserData(resDesc)));
        }
    }
}
项目:n4js    文件:AbstractRegularExpressionUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:n4js    文件:AbstractN4MFUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:Xtext_Xtend_HTML_Generator    文件:AbstractMyDslUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:bromium    文件:AbstractBromiumUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:gw4e.project    文件:AbstractDSLPoliciesUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:lcdsl    文件:AbstractLcDslUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:gemoc-studio    文件:AbstractDslUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:org.xtext.dsl.restaurante    文件:AbstractRestauranteUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:OCCI-Studio    文件:AbstractOCCIUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:M2Doc    文件:AbstractMyDslUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:minitl    文件:AbstractMinitlUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:Sparrow    文件:AbstractModelEditorUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:CooperateModelingEnvironment    文件:AbstractComponentUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:CooperateModelingEnvironment    文件:AbstractClsUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:CooperateModelingEnvironment    文件:AbstractUsecaseUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:cs2as    文件:AbstractASBHLangUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
项目:cs2as    文件:AbstractMiniOCLUiModule.java   
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}