微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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);
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。