Java 类org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator 实例源码

项目:pokemon-tcgo-deck-generator    文件:AbstractPkmntcgoUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:n4js    文件:AbstractN4JSUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:n4js    文件:AbstractRegularExpressionUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:n4js    文件:AbstractN4MFUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:Xtext_Xtend_HTML_Generator    文件:AbstractMyDslUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:bromium    文件:AbstractBromiumUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:gw4e.project    文件:AbstractDSLPoliciesUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return JvmModelDependentElementsCalculator.class;
}
项目:lcdsl    文件:AbstractLcDslUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:gemoc-studio    文件:AbstractDslUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:org.xtext.dsl.restaurante    文件:AbstractRestauranteUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:OCCI-Studio    文件:AbstractOCCIUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:M2Doc    文件:AbstractMyDslUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:minitl    文件:AbstractMinitlUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:Sparrow    文件:AbstractModelEditorUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:bts    文件:DefaultLinkedPositionGroupCalculator.java   
public LinkedPositionGroup getLinkedPositionGroup(IRenameElementContext renameElementContext,
        IProgressMonitor monitor) {
    SubMonitor progress = SubMonitor.convert(monitor, 100);
    XtextEditor editor = (XtextEditor) renameElementContext.getTriggeringEditor();
    IProject project = projectUtil.getProject(renameElementContext.getContextResourceURI());
    if (project == null)
        throw new IllegalStateException("Could not determine project for context resource "
                + renameElementContext.getContextResourceURI());
    ResourceSet resourceSet = resourceSetProvider.get(project);
    EObject targetElement = resourceSet.getEObject(renameElementContext.getTargetElementURI(), true);
    if (targetElement == null)
        throw new IllegalStateException("Target element could not be loaded");
    IRenameStrategy.Provider strategyProvider = globalServiceProvider.findService(targetElement,
            IRenameStrategy.Provider.class);
    IRenameStrategy renameStrategy = null;
    try {
        renameStrategy = strategyProvider.get(targetElement, renameElementContext);
    } catch(NoSuchStrategyException exc) {
        // handle in next line
    }
    if(renameStrategy == null) 
        throw new IllegalArgumentException("Cannot find a rename strategy for "
                + notNull(renameElementContext.getTargetElementURI()));
    String newName = renameStrategy.getOriginalName();
    IResourceServiceProvider resourceServiceProvider = resourceServiceProviderRegistry.getResourceServiceProvider(renameElementContext.getTargetElementURI());
    IDependentElementsCalculator dependentElementsCalculator =  resourceServiceProvider.get(IDependentElementsCalculator.class);
    Iterable<URI> dependentElementURIs = dependentElementsCalculator.getDependentElementURIs(targetElement,
            progress.newChild(10));
    LocalResourceRefactoringUpdateAcceptor updateAcceptor = updateAcceptorProvider.get();
    updateAcceptor.setLocalResourceURI(renameElementContext.getContextResourceURI());
    renameStrategy.createDeclarationUpdates(newName, resourceSet, updateAcceptor);
    Map<URI, URI> original2newEObjectURI = renamedElementTracker.renameAndTrack(
            concat(Collections.singleton(renameElementContext.getTargetElementURI()), dependentElementURIs),
            newName, resourceSet, renameStrategy, progress.newChild(10));
    ElementRenameArguments elementRenameArguments = new ElementRenameArguments(
            renameElementContext.getTargetElementURI(), newName, renameStrategy, original2newEObjectURI);
    final List<IReferenceDescription> referenceDescriptions = newArrayList();
    IAcceptor<IReferenceDescription> referenceAcceptor = new IAcceptor<IReferenceDescription>() {
        public void accept(IReferenceDescription referenceDescription) {
            referenceDescriptions.add(referenceDescription);
        }
    };
    referenceFinder.findReferences(elementRenameArguments.getRenamedElementURIs(),
            singleton(renameElementContext.getContextResourceURI()), new SimpleLocalResourceAccess(resourceSet),
            referenceAcceptor, progress.newChild(60));
    referenceUpdater.createReferenceUpdates(elementRenameArguments, referenceDescriptions, updateAcceptor,
            progress.newChild(10));
    List<ReplaceEdit> textEdits = updateAcceptor.getTextEdits();
    LinkedPositionGroup linkedGroup = createLinkedGroupFromReplaceEdits(textEdits, editor,
            renameStrategy.getOriginalName(), progress.newChild(10));
    return linkedGroup;
}
项目:CooperateModelingEnvironment    文件:AbstractComponentUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:CooperateModelingEnvironment    文件:AbstractClsUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:CooperateModelingEnvironment    文件:AbstractUsecaseUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:cs2as    文件:AbstractASBHLangUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}
项目:cs2as    文件:AbstractMiniOCLUiModule.java   
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
    return DefaultDependentElementsCalculator.class;
}