当前位置: 首页>>代码示例>>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;未经允许,请勿转载。