本文整理汇总了Java中com.intellij.refactoring.changeSignature.MethodNodeBase类的典型用法代码示例。如果您正苦于以下问题:Java MethodNodeBase类的具体用法?Java MethodNodeBase怎么用?Java MethodNodeBase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MethodNodeBase类属于com.intellij.refactoring.changeSignature包,在下文中一共展示了MethodNodeBase类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doOKAction
import com.intellij.refactoring.changeSignature.MethodNodeBase; //导入依赖的package包/类
@Override
protected void doOKAction() {
final List<UsageInfo> foreignMethodUsages = new ArrayList<UsageInfo>();
final Runnable runnable = new Runnable() {
public void run() {
final Set<MethodNodeBase<PsiMethod>> nodes = getSelectedNodes();
for (MethodNodeBase<PsiMethod> node : nodes) {
final SafeDeleteJavaMethodNode methodNode = (SafeDeleteJavaMethodNode)node;
final PsiMethod nodeMethod = methodNode.getMethod();
if (nodeMethod.equals(myMethod)) continue;
final PsiParameter parameter = nodeMethod.getParameterList().getParameters()[methodNode.myParameterIdx];
foreignMethodUsages.add(new SafeDeleteParameterCallHierarchyUsageInfo(nodeMethod, parameter, nodeMethod));
ReferencesSearch.search(nodeMethod).forEach(new Processor<PsiReference>() {
public boolean process(final PsiReference reference) {
final PsiElement element = reference.getElement();
if (element != null) {
JavaSafeDeleteDelegate.EP.forLanguage(element.getLanguage())
.createUsageInfoForParameter(reference, foreignMethodUsages, parameter, nodeMethod);
}
return true;
}
});
}
}
};
if (ProgressManager.getInstance().runProcessWithProgressSynchronously(new Runnable() {
@Override
public void run() {
ApplicationManager.getApplication().runReadAction(runnable);
}
}, "Search for Caller Method Usages...", true, myProject)) {
myResult.addAll(foreignMethodUsages);
}
super.doOKAction();
}
示例2: createNode
import com.intellij.refactoring.changeSignature.MethodNodeBase; //导入依赖的package包/类
@Override
protected MethodNodeBase<PsiMethod> createNode(PsiMethod caller, HashSet<PsiMethod> called) {
return new JavaMethodNode(caller, called, myProject, myCancelCallback);
}
示例3: createNode
import com.intellij.refactoring.changeSignature.MethodNodeBase; //导入依赖的package包/类
@Override
protected MethodNodeBase<PsiMethod> createNode(PsiMethod caller, HashSet<PsiMethod> called) {
return new MakeStaticJavaMethodNode(caller, called, myCancelCallback, myProject);
}
示例4: createNode
import com.intellij.refactoring.changeSignature.MethodNodeBase; //导入依赖的package包/类
@Override
protected MethodNodeBase<PsiMethod> createNode(PsiMethod caller, HashSet<PsiMethod> called) {
return new SafeDeleteJavaMethodNode(caller, called, myCancelCallback, getParameterIndex(caller), myProject);
}
示例5: getCalleeNode
import com.intellij.refactoring.changeSignature.MethodNodeBase; //导入依赖的package包/类
@Override
protected MethodNodeBase<PsiMethod> getCalleeNode(MethodNodeBase<PsiMethod> node) {
return node;
}
示例6: getCallerNode
import com.intellij.refactoring.changeSignature.MethodNodeBase; //导入依赖的package包/类
@Override
protected MethodNodeBase<PsiMethod> getCallerNode(MethodNodeBase<PsiMethod> node) {
return (MethodNodeBase<PsiMethod>)node.getParent();
}
示例7: createNode
import com.intellij.refactoring.changeSignature.MethodNodeBase; //导入依赖的package包/类
@Override
protected MethodNodeBase<PsiMethod> createNode(PsiMethod caller, HashSet<PsiMethod> callees) {
return new SafeDeleteJavaMethodNode(caller, callees, myCancelCallback, myProject);
}