本文整理匯總了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);
}