當前位置: 首頁>>代碼示例>>Java>>正文


Java MethodNodeBase類代碼示例

本文整理匯總了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();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:37,代碼來源:SafeDeleteJavaCallerChooser.java

示例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);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:JavaMethodNode.java

示例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);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:MakeStaticJavaCallerChooser.java

示例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);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:SafeDeleteJavaCallerChooser.java

示例5: getCalleeNode

import com.intellij.refactoring.changeSignature.MethodNodeBase; //導入依賴的package包/類
@Override
protected MethodNodeBase<PsiMethod> getCalleeNode(MethodNodeBase<PsiMethod> node) {
  return node;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:SafeDeleteJavaCalleeChooser.java

示例6: getCallerNode

import com.intellij.refactoring.changeSignature.MethodNodeBase; //導入依賴的package包/類
@Override
protected MethodNodeBase<PsiMethod> getCallerNode(MethodNodeBase<PsiMethod> node) {
  return (MethodNodeBase<PsiMethod>)node.getParent();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:SafeDeleteJavaCalleeChooser.java

示例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);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:SafeDeleteJavaCalleeChooser.java


注:本文中的com.intellij.refactoring.changeSignature.MethodNodeBase類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。