• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java RefactoringBundle类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.intellij.refactoring.RefactoringBundle的典型用法代码示例。如果您正苦于以下问题:Java RefactoringBundle类的具体用法?Java RefactoringBundle怎么用?Java RefactoringBundle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RefactoringBundle类属于com.intellij.refactoring包,在下文中一共展示了RefactoringBundle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: processDuplicates

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
public static void processDuplicates(@NotNull MatchProvider provider, @NotNull Project project, @NotNull Editor editor) {
  Boolean hasDuplicates = provider.hasDuplicates();
  if (hasDuplicates == null || hasDuplicates.booleanValue()) {
    List<Match> duplicates = provider.getDuplicates();
    if (duplicates.size() == 1) {
      previewMatch(project, duplicates.get(0), editor);
    }
    final int answer = ApplicationManager.getApplication().isUnitTestMode() || hasDuplicates == null ? Messages.YES : Messages.showYesNoDialog(project,
      RefactoringBundle.message("0.has.detected.1.code.fragments.in.this.file.that.can.be.replaced.with.a.call.to.extracted.method",
      ApplicationNamesInfo.getInstance().getProductName(), duplicates.size()),
      "Process Duplicates", Messages.getQuestionIcon());
    if (answer == Messages.YES) {
      PsiDocumentManager.getInstance(project).commitAllDocuments();
      invoke(project, editor, provider, hasDuplicates != null);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:DuplicatesImpl.java


示例2: check

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
@Nullable
private  String check(@NotNull PsiClass targetClass, @Nullable final String fieldName) {
  if (!GroovyLanguage.INSTANCE.equals(targetClass.getLanguage())) {
    return GroovyRefactoringBundle.message("class.language.is.not.groovy");
  }

  if (fieldName == null || fieldName.isEmpty()) {
    return RefactoringBundle.message("no.field.name.specified");
  }

  else if (!PsiNameHelper.getInstance(context.getProject()).isIdentifier(fieldName)) {
    return RefactoringMessageUtil.getIncorrectIdentifierMessage(fieldName);
  }

  if (targetClass instanceof GroovyScriptClass) {
    return GroovyRefactoringBundle.message("target.class.must.not.be.script");
  }

  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:GrIntroduceConstantProcessor.java


示例3: checkAccessibility

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
public static void checkAccessibility(PsiMember refMember,
                                      @NotNull PsiElement newContext,
                                      @Nullable PsiClass accessClass,
                                      PsiMember member,
                                      MultiMap<PsiElement, String> conflicts) {
  if (!PsiUtil.isAccessible(refMember, newContext, accessClass)) {
    String message = RefactoringBundle.message("0.is.1.and.will.not.be.accessible.from.2.in.the.target.class",
                                               RefactoringUIUtil.getDescription(refMember, true),
                                               VisibilityUtil.getVisibilityStringToDisplay(refMember),
                                               RefactoringUIUtil.getDescription(member, false));
    message = CommonRefactoringUtil.capitalize(message);
    conflicts.putValue(refMember, message);
  }
  else if (newContext instanceof PsiClass && refMember instanceof PsiField && refMember.getContainingClass() == member.getContainingClass()) {
    final PsiField fieldInSubClass = ((PsiClass)newContext).findFieldByName(refMember.getName(), false);
    if (fieldInSubClass != null && fieldInSubClass != refMember) {
      conflicts.putValue(refMember, CommonRefactoringUtil.capitalize(RefactoringUIUtil.getDescription(fieldInSubClass, true) +
                                                                     " would hide " + RefactoringUIUtil.getDescription(refMember, true) +
                                                                     " which is used by moved " + RefactoringUIUtil.getDescription(member, false)));
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:RefactoringConflictsUtil.java


示例4: CopyClassDialog

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
public CopyClassDialog(PsiClass aClass, PsiDirectory defaultTargetDirectory, Project project, boolean doClone) {
  super(project, true);
  myProject = project;
  myDefaultTargetDirectory = defaultTargetDirectory;
  myDoClone = doClone;
  String text = myDoClone ? RefactoringBundle.message("copy.class.clone.0.1", UsageViewUtil.getType(aClass), UsageViewUtil.getLongName(aClass)) :
                RefactoringBundle.message("copy.class.copy.0.1", UsageViewUtil.getType(aClass), UsageViewUtil.getLongName(aClass));
  myInformationLabel.setText(text);
  myInformationLabel.setFont(myInformationLabel.getFont().deriveFont(Font.BOLD));
  init();
  myDestinationCB.setData(myProject, defaultTargetDirectory,
                          new Pass<String>() {
                            @Override
                            public void pass(String s) {
                              setErrorText(s);
                            }
                          }, myTfPackage.getChildComponent());
  myNameField.setText(UsageViewUtil.getShortName(aClass));
  myNameField.selectAll();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:CopyClassDialog.java


示例5: invoke

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
private void invoke(final Project project, PsiMethod method, Editor editor) {
  if(method.isConstructor()){
    CommonRefactoringUtil.showErrorHint(project, editor, RefactorJBundle.message("cannot.perform.the.refactoring") + RefactorJBundle.message("constructor.returns.can.not.be.wrapped"), null,
                                        this.getHelpID());
    return;
  }
  final PsiType returnType = method.getReturnType();
  if(PsiType.VOID.equals(returnType)){
    CommonRefactoringUtil.showErrorHint(project, editor, RefactorJBundle.message("cannot.perform.the.refactoring") + RefactorJBundle.message("method.selected.returns.void"), null, this.getHelpID());
    return;
  }
  method = SuperMethodWarningUtil.checkSuperMethod(method, RefactoringBundle.message("to.refactor"));
  if (method == null) return;

  if(method instanceof PsiCompiledElement){
    CommonRefactoringUtil.showErrorHint(project, editor, RefactorJBundle.message("cannot.perform.the.refactoring") + RefactorJBundle.message(
        "the.selected.method.cannot.be.wrapped.because.it.is.defined.in.a.non.project.class"), null, this.getHelpID());
    return;
  }

  new WrapReturnValueDialog(method).show();


}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:WrapReturnValueHandler.java


示例6: tryToMove

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
public boolean tryToMove(final PsiElement element, final Project project, final DataContext dataContext, final PsiReference reference,
                         final Editor editor) {
  if (isNonStaticInnerClass(element) && !JavaMoveClassesOrPackagesHandler.isReferenceInAnonymousClass(reference)) {
    PsiClass aClass = (PsiClass) element;
    FeatureUsageTracker.getInstance().triggerFeatureUsed("refactoring.move.moveInner");
    final PsiClass containingClass = aClass.getContainingClass();
    if (containingClass instanceof JspClass) {
      CommonRefactoringUtil.showErrorHint(project, editor, RefactoringBundle.message("move.nonstatic.class.from.jsp.not.supported"),
                                          RefactoringBundle.message("move.title"), null);
      return true;
    }
    MoveInnerImpl.doMove(project, new PsiElement[]{aClass}, null, LangDataKeys.TARGET_PSI_ELEMENT.getData(dataContext));
    return true;
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:MoveInnerToUpperHandler.java


示例7: addInaccessibleMemberConflicts

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
public static void addInaccessibleMemberConflicts(final PsiElement element,
                                                  final UsageInfo[] usages,
                                                  final ReferencedElementsCollector collector,
                                                  final MultiMap<PsiElement, String> conflicts) {
  element.accept(collector);
  final Map<PsiMember, Set<PsiMember>> containersToReferenced = getInaccessible(collector.myReferencedMembers, usages, element);

  final Set<PsiMember> containers = containersToReferenced.keySet();
  for (PsiMember container : containers) {
    Set<PsiMember> referencedInaccessible = containersToReferenced.get(container);
    for (PsiMember referenced : referencedInaccessible) {
      final String referencedDescription = RefactoringUIUtil.getDescription(referenced, true);
      final String containerDescription = RefactoringUIUtil.getDescription(container, true);
      String message = RefactoringBundle.message("0.that.is.used.in.inlined.method.is.not.accessible.from.call.site.s.in.1",
                                                 referencedDescription, containerDescription);
      conflicts.putValue(container, CommonRefactoringUtil.capitalize(message));
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:InlineMethodProcessor.java


示例8: createNorthPanel

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
protected JComponent createNorthPanel() {
  myNameField = new JTextField(myMigrationMap.getName());
  myNameField.getDocument().addDocumentListener(new DocumentAdapter() {
    protected void textChanged(DocumentEvent e) {
      validateOKButton();
    }
  });

  myDescriptionTextArea = new JTextArea(myMigrationMap.getDescription(), 3, 40) {
    @Override
    public Dimension getMinimumSize() {
      return super.getPreferredSize();
    }
  };
  myDescriptionTextArea.setLineWrap(true);
  myDescriptionTextArea.setWrapStyleWord(true);
  myDescriptionTextArea.setFont(myNameField.getFont());
  myDescriptionTextArea.setBackground(myNameField.getBackground());
  JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myDescriptionTextArea);
  scrollPane.setBorder(myNameField.getBorder());

  return FormBuilder.createFormBuilder()
    .addLabeledComponent(new JLabel(RefactoringBundle.message("migration.map.name.prompt")), myNameField)
    .addLabeledComponent(new JLabel(RefactoringBundle.message("migration.map.description.label")), scrollPane)
    .addVerticalGap(UIUtil.LARGE_VGAP).getPanel();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:EditMigrationDialog.java


示例9: createNorthPanel

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
protected JComponent createNorthPanel() {
  JPanel panel = new JPanel(new GridBagLayout());
  GridBagConstraints gbConstraints = new GridBagConstraints();

  gbConstraints.insets = new Insets(4, 8, 4, 8);
  gbConstraints.weighty = 1;
  gbConstraints.weightx = 1;
  gbConstraints.gridy = 0;
  gbConstraints.gridwidth = GridBagConstraints.REMAINDER;
  gbConstraints.fill = GridBagConstraints.BOTH;
  gbConstraints.anchor = GridBagConstraints.WEST;
  panel.add(createDescriptionLabel(), gbConstraints);

  gbConstraints.gridy++;
  myCbReplaceUsages = new JCheckBox(RefactoringBundle.message("replace.instance.qualifiers.with.class.references"));
  panel.add(myCbReplaceUsages, gbConstraints);
  myCbReplaceUsages.setSelected(true);
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:SimpleMakeStaticDialog.java


示例10: ConflictsDialog

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
public ConflictsDialog(@NotNull Project project,
                       @NotNull MultiMap<PsiElement, String> conflictDescriptions,
                       @Nullable Runnable doRefactoringRunnable,
                       boolean alwaysShowOkButton,
                       boolean canShowConflictsInView) {
  super(project, true);
  myProject = project;
  myDoRefactoringRunnable = doRefactoringRunnable;
  myCanShowConflictsInView = canShowConflictsInView;
  final LinkedHashSet<String> conflicts = new LinkedHashSet<String>();

  for (String conflict : conflictDescriptions.values()) {
    conflicts.add(conflict);
  }
  myConflictDescriptions = ArrayUtil.toStringArray(conflicts);
  myElementConflictDescription = conflictDescriptions;
  setTitle(RefactoringBundle.message("problems.detected.title"));
  setOKButtonText(RefactoringBundle.message("continue.button"));
  setOKActionEnabled(alwaysShowOkButton || getDoRefactoringRunnable(null) != null);
  init();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:ConflictsDialog.java


示例11: invoke

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
@Override
public void invoke(@NotNull Project project, Editor editor, PsiFile file, DataContext dataContext) {
  int offset = editor.getCaretModel().getOffset();
  editor.getScrollingModel().scrollToCaret(ScrollType.MAKE_VISIBLE);
  PsiElement element = file.findElementAt(offset);

  while (true) {
    if (element == null || element instanceof PsiFile) {
      String message = RefactoringBundle
        .getCannotRefactorMessage(RefactoringBundle.message("the.caret.should.be.positioned.inside.a.class.to.pull.members.from"));
      CommonRefactoringUtil.showErrorHint(project, editor, message, REFACTORING_NAME, HelpID.MEMBERS_PULL_UP);
      return;
    }

    if (!CommonRefactoringUtil.checkReadOnlyStatus(project, element)) return;

    if (element instanceof PsiClass || element instanceof PsiField || element instanceof PsiMethod) {
      invoke(project, new PsiElement[]{element}, dataContext);
      return;
    }
    element = element.getParent();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:JavaPullUpHandler.java


示例12: invoke

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
public void invoke(@NotNull final Project project, @NotNull PsiElement[] elements, DataContext dataContext) {
  if (elements.length != 1) return;

      PsiClass subClass = (PsiClass) elements[0];

  ArrayList basesList = RefactoringHierarchyUtil.createBasesList(subClass, true, true);

  if (basesList.isEmpty()) {
    String message = RefactoringBundle.getCannotRefactorMessage(RefactoringBundle.message("interface.does.not.have.base.interfaces", subClass.getQualifiedName()));
    Editor editor = CommonDataKeys.EDITOR.getData(dataContext);
    CommonRefactoringUtil.showErrorHint(project, editor, message, REFACTORING_NAME, HelpID.TURN_REFS_TO_SUPER);
    return;
  }

  new TurnRefsToSuperDialog(project, subClass, basesList).show();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:TurnRefsToSuperHandler.java


示例13: createParametersPanel

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
@Nullable
private JPanel createParametersPanel () {
  myThisClassesMap = MoveInstanceMembersUtil.getThisClassesToMembers(myMethod);
  myOldClassParameterNameFields = new HashMap<PsiClass, EditorTextField>();
  if (myThisClassesMap.size() == 0) return null;
  JPanel panel = new JPanel(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true, true));
  for (PsiClass aClass : myThisClassesMap.keySet()) {
    final String text = RefactoringBundle.message("move.method.this.parameter.label", aClass.getName());
    panel.add(new TitledSeparator(text, null));

    String suggestedName = MoveInstanceMethodHandler.suggestParameterNameForThisClass(aClass);
    final EditorTextField field = new EditorTextField(suggestedName, getProject(), StdFileTypes.JAVA);
    field.setMinimumSize(new Dimension(field.getPreferredSize()));
    myOldClassParameterNameFields.put(aClass, field);
    panel.add(field);
  }
  panel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:MoveInstanceMethodDialog.java


示例14: invoke

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
@Override
public void invoke(@NotNull Project project, Editor editor, PsiFile file, DataContext dataContext) {
  int offset = editor.getCaretModel().getOffset();
  editor.getScrollingModel().scrollToCaret(ScrollType.MAKE_VISIBLE);
  PsiElement element = file.findElementAt(offset);

  while (true) {
    if (element == null || element instanceof PsiFile) {
      String message = RefactoringBundle
        .getCannotRefactorMessage(RefactoringBundle.message("the.caret.should.be.positioned.inside.a.class.to.pull.members.from"));
      CommonRefactoringUtil.showErrorHint(project, editor, message, REFACTORING_NAME, HelpID.MEMBERS_PULL_UP);
      return;
    }


    if (!CommonRefactoringUtil.checkReadOnlyStatus(project, element)) return;


    if (element instanceof GrTypeDefinition || element instanceof GrField || element instanceof GrMethod) {
      invoke(project, new PsiElement[]{element}, dataContext);
      return;
    }

    element = element.getParent();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:GrPullUpHandler.java


示例15: doAction

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
@Override
protected void doAction() {
  LOG.assertTrue(myElement.isValid());

  CommandProcessor.getInstance().executeCommand(myProject, new Runnable() {
    @Override
    public void run() {
      ApplicationManager.getApplication().runWriteAction(new Runnable() {
        @Override
        public void run() {
          try {
            myTag.setName(getNewName());
          }
          catch (IncorrectOperationException e) {
            LOG.error(e);
          }
        }
      });
    }
  }, RefactoringBundle.message("rename.title"), null);

  close(DialogWrapper.OK_EXIT_CODE);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:XmlTagRenameDialog.java


示例16: moveDirectoriesLibrariesSafe

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
private static void moveDirectoriesLibrariesSafe(Project project,
                                                 PsiElement targetContainer,
                                                 MoveCallback callback,
                                                 PsiDirectory[] directories,
                                                 String prompt) {
  final PsiPackage aPackage = JavaDirectoryService.getInstance().getPackage(directories[0]);
  LOG.assertTrue(aPackage != null);
  final PsiDirectory[] projectDirectories = aPackage.getDirectories(GlobalSearchScope.projectScope(project));
  if (projectDirectories.length > 1) {
    int ret = Messages
      .showYesNoCancelDialog(project, prompt + " or all directories in project?", RefactoringBundle.message("warning.title"),
                    RefactoringBundle.message("move.current.directory"),
                    RefactoringBundle.message("move.directories"),
                    CommonBundle.getCancelButtonText(), Messages.getWarningIcon());
    if (ret == Messages.YES) {
      moveAsDirectory(project, targetContainer, callback, directories);
    }
    else if (ret == Messages.NO) {
      moveAsDirectory(project, targetContainer, callback, projectDirectories);
    }
  }
  else if (Messages.showOkCancelDialog(project, prompt + "?", RefactoringBundle.message("warning.title"),
                               Messages.getWarningIcon()) == Messages.OK) {
    moveAsDirectory(project, targetContainer, callback, directories);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:JavaMoveClassesOrPackagesHandler.java


示例17: invoke

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
public void invoke(@NotNull Project project, Editor editor, PsiFile file, DataContext dataContext) {
  PsiElement element = CommonDataKeys.PSI_ELEMENT.getData(dataContext);
  editor.getScrollingModel().scrollToCaret(ScrollType.MAKE_VISIBLE);
  if (element == null) {
    element = file.findElementAt(editor.getCaretModel().getOffset());
  }

  if (element == null) return;
  if (element instanceof PsiIdentifier) element = element.getParent();

  if (!(element instanceof PsiMethod)) {
    String message = RefactoringBundle.getCannotRefactorMessage(RefactoringBundle.message("error.wrong.caret.position.method"));
    CommonRefactoringUtil.showErrorHint(project, editor, message, REFACTORING_NAME, HelpID.MOVE_INSTANCE_METHOD);
    return;
  }
  if (LOG.isDebugEnabled()) {
    LOG.debug("Move Instance Method invoked");
  }
  invoke(project, new PsiElement[]{element}, dataContext);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:MoveInstanceMethodHandler.java


示例18: allUsagesAreTailCalls

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
public static boolean allUsagesAreTailCalls(final PsiMethod method) {
  final List<PsiReference> nonTailCallUsages = Collections.synchronizedList(new ArrayList<PsiReference>());
  boolean result = ProgressManager.getInstance().runProcessWithProgressSynchronously(new Runnable() {
    @Override
    public void run() {
      ReferencesSearch.search(method).forEach(new Processor<PsiReference>() {
        @Override
        public boolean process(final PsiReference psiReference) {
          ProgressManager.checkCanceled();
          if (getTailCallType(psiReference) == TailCallType.None) {
            nonTailCallUsages.add(psiReference);
            return false;
          }
          return true;
        }
      });
    }
  }, RefactoringBundle.message("inline.method.checking.tail.calls.progress"), true, method.getProject());
  return result && nonTailCallUsages.isEmpty();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:InlineUtil.java


示例19: createCenterPanel

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
protected JComponent createCenterPanel() {
  JPanel mainPanel = new JPanel(new GridBagLayout());
  final TitledSeparator separator = new TitledSeparator();
  mainPanel.add(separator, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0,0,0,0), 0,0));

  myList = createTargetVariableChooser();
  myList.addListSelectionListener(new ListSelectionListener() {
    public void valueChanged(ListSelectionEvent e) {
      validateTextFields(e.getFirstIndex());
    }
  });

  separator.setText(RefactoringBundle.message("moveInstanceMethod.select.an.instance.parameter"));

  final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myList);
  mainPanel.add(scrollPane, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0,0,0,0), 0,0));

  myVisibilityPanel = createVisibilityPanel();
  mainPanel.add(myVisibilityPanel, new GridBagConstraints(1, GridBagConstraints.RELATIVE, 1, 1, 0.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0,0,0,0), 0,0));

  final JPanel parametersPanel = createParametersPanel();
  if (parametersPanel != null) {
    mainPanel.add(parametersPanel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0,0,0,0), 0,0));
  }

  mainPanel.add(initOpenInEditorCb(), new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(0,0,0,0), 0,0));

  separator.setLabelFor(myList);
  validateTextFields(myList.getSelectedIndex());

  updateOnChanged(myList);
  return mainPanel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:MoveInstanceMethodDialog.java


示例20: findConflicts

import com.intellij.refactoring.RefactoringBundle; //导入依赖的package包/类
@Nullable
@Override
public MultiMap<PsiElement, String> findConflicts(ChangeInfo info, Ref<UsageInfo[]> refUsages) {
  final MultiMap<PsiElement, String> conflicts = new MultiMap<PsiElement, String>();
  if (info instanceof PyChangeInfo && info.isNameChanged()) {
    final PyFunction function = ((PyChangeInfo)info).getMethod();
    final PyClass clazz = function.getContainingClass();
    if (clazz != null && clazz.findMethodByName(info.getNewName(), true) != null) {
      conflicts.putValue(function, RefactoringBundle.message("method.0.is.already.defined.in.the.1",
                                                             info.getNewName(),
                                                             "class " + clazz.getQualifiedName()));
    }
  }
  return conflicts;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:PyChangeSignatureUsageProcessor.java



注:本文中的com.intellij.refactoring.RefactoringBundle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DebugTextViewHelper类代码示例发布时间:2022-05-21
下一篇:
Java HTTPBinding类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap