本文整理汇总了Java中org.eclipse.ltk.core.refactoring.participants.RenameProcessor类的典型用法代码示例。如果您正苦于以下问题:Java RenameProcessor类的具体用法?Java RenameProcessor怎么用?Java RenameProcessor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RenameProcessor类属于org.eclipse.ltk.core.refactoring.participants包,在下文中一共展示了RenameProcessor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: checkConditions
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor; //导入依赖的package包/类
@Override
public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context)
throws OperationCanceledException {
SubMonitor progress = SubMonitor.convert(pm).setWorkRemaining(100);
try {
for (RenameProcessor wrappedProcessor : wrappedProcessors) {
List<Object> targetElements = Arrays.asList(wrappedProcessor.getElements());
if (!disabledTargets.containsAll(targetElements)) {
setNewName(wrappedProcessor, getNewName());
status.merge(wrappedProcessor.checkInitialConditions(progress.newChild(20)));
if(!status.getRefactoringStatus().hasFatalError())
status.merge(wrappedProcessor.checkFinalConditions(progress.newChild(80), context));
}
}
} catch (Exception ce) {
status.add(ERROR, "Error checking conditions in refactoring participant: {0}. See log for details", ce, LOG);
}
return status.getRefactoringStatus();
}
开发者ID:cplutte,项目名称:bts,代码行数:20,代码来源:AbstractProcessorBasedRenameParticipant.java
示例2: createSelectionState
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor; //导入依赖的package包/类
private RenameSelectionState createSelectionState() {
RenameProcessor processor = (RenameProcessor) fRefactoring.getAdapter(RenameProcessor.class);
Object[] elements = processor.getElements();
RenameSelectionState state = null;// elements.length == 1 ? new
// RenameSelectionState(elements[0])
// : null;
return state;
}
开发者ID:angelozerr,项目名称:typescript.java,代码行数:9,代码来源:RenameSupport.java
示例3: activate
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor; //导入依赖的package包/类
public boolean activate(Refactoring refactoring, Shell parent, int saveMode) throws CoreException {
RenameProcessor processor = (RenameProcessor) refactoring.getAdapter(RenameProcessor.class);
Object[] elements = processor.getElements();
RenameSelectionState state = null;//elements.length == 1 ? new RenameSelectionState(elements[0]) : null;
boolean executed = super.activate(refactoring, parent, saveMode);
TypeScriptRenameProcessor nameUpdating = (TypeScriptRenameProcessor) refactoring
.getAdapter(TypeScriptRenameProcessor.class);
if (executed && nameUpdating != null && state != null) {
// Object newElement = nameUpdating.getNewElement();
// if (newElement != null) {
// state.restore(newElement);
// }
}
return executed;
}
开发者ID:angelozerr,项目名称:typescript.java,代码行数:16,代码来源:RenameUserInterfaceStarter.java
示例4: getRenameRefactoring
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor; //导入依赖的package包/类
public ProcessorBasedRefactoring getRenameRefactoring(IRenameElementContext renameElementContext) {
RenameProcessor processor = getRenameProcessor(renameElementContext);
if (processor != null) {
return new RenameRefactoring(processor);
}
return null;
}
开发者ID:cplutte,项目名称:bts,代码行数:8,代码来源:DefaultRenameRefactoringProvider.java
示例5: getRenameProcessor
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor; //导入依赖的package包/类
public RenameProcessor getRenameProcessor(IRenameElementContext renameElementContext) {
AbstractRenameProcessor processor = processorProvider.get();
if (processor != null && processor.initialize(renameElementContext)) {
return processor;
}
return null;
}
开发者ID:cplutte,项目名称:bts,代码行数:8,代码来源:DefaultRenameRefactoringProvider.java
示例6: getRenameProcessors
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor; //导入依赖的package包/类
protected List<RenameProcessor> getRenameProcessors(Object originalTargetElement) {
List<? extends IRenameElementContext> participantContexts = createRenameElementContexts(originalTargetElement);
if (participantContexts != null) {
List<RenameProcessor> processors = newArrayList();
for (IRenameElementContext participantContext : participantContexts) {
RenameProcessor renameProcessor = getRenameProcessor(participantContext);
if (renameProcessor != null) {
processors.add(renameProcessor);
}
}
return processors;
}
return null;
}
开发者ID:cplutte,项目名称:bts,代码行数:15,代码来源:AbstractProcessorBasedRenameParticipant.java
示例7: getRenameProcessor
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor; //导入依赖的package包/类
protected RenameProcessor getRenameProcessor(IRenameElementContext participantContext) {
IRenameRefactoringProvider renameRefactoringProvider = getRenameRefactoringProvider(participantContext);
if (renameRefactoringProvider != null)
return renameRefactoringProvider.getRenameProcessor(participantContext);
else
return null;
}
开发者ID:cplutte,项目名称:bts,代码行数:8,代码来源:AbstractProcessorBasedRenameParticipant.java
示例8: getElements
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor; //导入依赖的package包/类
public Object[] getElements() {
List<Object> elements = newArrayList();
for (RenameProcessor wrappedProcessor : wrappedProcessors) {
elements.addAll(Arrays.asList(wrappedProcessor.getElements()));
}
return toArray(elements, Object.class);
}
开发者ID:cplutte,项目名称:bts,代码行数:8,代码来源:AbstractProcessorBasedRenameParticipant.java
示例9: helper1_not_available
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor; //导入依赖的package包/类
private void helper1_not_available(String methodName, String[] signatures) throws Exception {
ICompilationUnit cu = createCUfromTestFile(getPackageP(), "A");
IType interfaceI = getType(cu, "I");
RenameProcessor processor =
new RenameVirtualMethodProcessor(interfaceI.getMethod(methodName, signatures));
RenameRefactoring ref = new RenameRefactoring(processor);
assertTrue(!ref.isApplicable());
}
开发者ID:eclipse,项目名称:che,代码行数:10,代码来源:RenameMethodInInterfaceTest.java
示例10: activate
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor; //导入依赖的package包/类
@Override
public boolean activate(Refactoring refactoring, Shell parent, int saveMode) throws CoreException {
RenameProcessor processor= (RenameProcessor)refactoring.getAdapter(RenameProcessor.class);
Object[] elements= processor.getElements();
RenameSelectionState state= elements.length == 1 ? new RenameSelectionState(elements[0]) : null;
boolean executed= super.activate(refactoring, parent, saveMode);
INameUpdating nameUpdating= (INameUpdating)refactoring.getAdapter(INameUpdating.class);
if (executed && nameUpdating != null && state != null) {
Object newElement= nameUpdating.getNewElement();
if (newElement != null) {
state.restore(newElement);
}
}
return executed;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:16,代码来源:RenameUserInterfaceStarter.java
示例11: RenameRefactoring
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor; //导入依赖的package包/类
public RenameRefactoring(RenameProcessor processor) {
super(processor);
Assert.isNotNull(processor);
fProcessor= processor;
}
开发者ID:cplutte,项目名称:bts,代码行数:6,代码来源:DefaultRenameRefactoringProvider.java
示例12: setNewName
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor; //导入依赖的package包/类
protected void setNewName(RenameProcessor processor, String newName) {
((AbstractRenameProcessor) processor).setNewName(newName);
}
开发者ID:cplutte,项目名称:bts,代码行数:4,代码来源:AbstractProcessorBasedRenameParticipant.java
示例13: createSelectionState
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor; //导入依赖的package包/类
private RenameSelectionState createSelectionState() {
RenameProcessor processor= (RenameProcessor) fRefactoring.getProcessor();
Object[] elements= processor.getElements();
RenameSelectionState state= elements.length == 1 ? new RenameSelectionState(elements[0]) : null;
return state;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:7,代码来源:RenameSupport.java
示例14: TypeScriptRenameRefactoring
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor; //导入依赖的package包/类
/**
* Creates a new java rename refactoring.
*
* @param processor
* the rename processor to use
*/
public TypeScriptRenameRefactoring(final RenameProcessor processor) {
super(processor);
}
开发者ID:angelozerr,项目名称:typescript.java,代码行数:10,代码来源:TypeScriptRenameRefactoring.java
示例15: getRenameProcessor
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor; //导入依赖的package包/类
RenameProcessor getRenameProcessor(IRenameElementContext renameElementContext);
开发者ID:cplutte,项目名称:bts,代码行数:2,代码来源:IRenameRefactoringProvider.java
注:本文中的org.eclipse.ltk.core.refactoring.participants.RenameProcessor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论