当前位置: 首页>>代码示例>>Java>>正文


Java RefactoringBundle.message方法代码示例

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


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

示例1: addCustomElementsToCentralPanel

import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
@Override
protected void addCustomElementsToCentralPanel(JPanel panel) {
  myJavaDocPanel = new DocCommentPanel(RefactoringBundle.message("javadoc.for.abstracts"));
  myJavaDocPanel.setPolicy(JavaRefactoringSettings.getInstance().PULL_UP_MEMBERS_JAVADOC);
  boolean hasJavadoc = false;
  for (MemberInfo info : myMemberInfos) {
    final PsiMember member = info.getMember();
    if (myMemberInfoModel.isAbstractEnabled(info)) {
      info.setToAbstract(myMemberInfoModel.isAbstractWhenDisabled(info));
      if (!hasJavadoc && 
          member instanceof PsiDocCommentOwner && 
          ((PsiDocCommentOwner)member).getDocComment() != null) {
        hasJavadoc = true;
      }
    }
  }
  UIUtil.setEnabled(myJavaDocPanel, hasJavadoc, true);
  panel.add(myJavaDocPanel, BorderLayout.EAST);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:PullUpDialog.java

示例2: getCommandName

import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
protected String getCommandName() {
  return RefactoringBundle.message("move.class.to.inner.command.name",
                                   (myClassesToMove.length > 1 ? "classes " : "class ") + StringUtil.join(myClassesToMove, new Function<PsiClass, String>() {
                                     public String fun(PsiClass psiClass) {
                                       return psiClass.getName();
                                     }
                                   }, ", "),
                                   myTargetClass.getQualifiedName());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:MoveClassToInnerProcessor.java

示例3: collectSuitableVariables

import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
@Nullable
private static String collectSuitableVariables(final PsiMethod method, final List<PsiVariable> suitableVariables) {
  final List<PsiVariable> allVariables = new ArrayList<PsiVariable>();
  ContainerUtil.addAll(allVariables, method.getParameterList().getParameters());
  ContainerUtil.addAll(allVariables, method.getContainingClass().getFields());
  boolean classTypesFound = false;
  boolean resolvableClassesFound = false;
  boolean classesInProjectFound = false;
  for (PsiVariable variable : allVariables) {
    final PsiType type = variable.getType();
    if (type instanceof PsiClassType && !((PsiClassType)type).hasParameters()) {
      classTypesFound = true;
      final PsiClass psiClass = ((PsiClassType)type).resolve();
      if (psiClass != null && !(psiClass instanceof PsiTypeParameter)) {
        resolvableClassesFound = true;
        final boolean inProject = method.getManager().isInProject(psiClass);
        if (inProject) {
          classesInProjectFound = true;
          suitableVariables.add(variable);
        }
      }
    }
  }

  if (suitableVariables.isEmpty()) {
    if (!classTypesFound) {
      return RefactoringBundle.message("there.are.no.variables.that.have.reference.type");
    }
    else if (!resolvableClassesFound) {
      return RefactoringBundle.message("all.candidate.variables.have.unknown.types");
    }
    else if (!classesInProjectFound) {
      return RefactoringBundle.message("all.candidate.variables.have.types.not.in.project");
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:38,代码来源:MoveInstanceMethodHandler.java

示例4: getColumnName

import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
public String getColumnName(int column) {
  switch (column) {
    case 0:
      return RefactoringBundle.message("column.name.type");
    default:
      throw new IllegalArgumentException();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ExceptionsTableModel.java

示例5: getConfirmDuplicatePrompt

import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
@Nullable
public String getConfirmDuplicatePrompt(Match match) {
  final boolean needToBeStatic = RefactoringUtil.isInStaticContext(match.getMatchStart(), myExtractedMethod.getContainingClass());
  final String changedSignature = MatchUtil
    .getChangedSignature(match, myExtractedMethod, needToBeStatic, VisibilityUtil.getVisibilityStringToDisplay(myExtractedMethod));
  if (changedSignature != null) {
    return RefactoringBundle.message("replace.this.code.fragment.and.change.signature", changedSignature);
  }
  if (needToBeStatic && !myExtractedMethod.hasModifierProperty(PsiModifier.STATIC)) {
    return RefactoringBundle.message("replace.this.code.fragment.and.make.method.static");
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ExtractMethodProcessor.java

示例6: getCommandName

import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
protected String getCommandName() {
  return RefactoringBundle.message("encapsulate.fields.command.name", DescriptiveNameUtil.getDescriptiveName(myClass));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:EncapsulateFieldsProcessor.java

示例7: createMemberSelectionTable

import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
@Override
protected AbstractMemberSelectionTable<PsiMember, MemberInfo> createMemberSelectionTable(List<MemberInfo> infos) {
  return new MemberSelectionTable(infos, RefactoringBundle.message("make.abstract"));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:PullUpDialog.java

示例8: entityName

import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
public String entityName() {
  return RefactoringBundle.message("entity.name.test");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:AutomaticTestRenamerFactory.java

示例9: getCodeReferencesText

import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
public String getCodeReferencesText(int usagesCount, int filesCount) {
  return RefactoringBundle.message("references.to.be.changed", UsageViewBundle.getReferencesString(usagesCount, filesCount));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:EncapsulateFieldsViewDescriptor.java

示例10: getInlineThisText

import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
protected String getInlineThisText() {
  return RefactoringBundle.message("this.reference.only.and.keep.the.field");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:InlineFieldDialog.java

示例11: createNorthPanel

import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
@Override
protected JComponent createNorthPanel() {
  myNameLabel = JBLabelDecorator.createJBLabelDecorator().setBold(true);

  myTargetDirectoryField = new TextFieldWithHistoryWithBrowseButton();
  final List<String> recentEntries = RecentsManager.getInstance(myProject).getRecentEntries(RECENT_KEYS);
  if (recentEntries != null) {
    myTargetDirectoryField.getChildComponent().setHistory(recentEntries);
  }
  final FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
  myTargetDirectoryField.addBrowseFolderListener(RefactoringBundle.message("select.target.directory"),
                                                 RefactoringBundle.message("the.file.will.be.moved.to.this.directory"),
                                                 myProject,
                                                 descriptor,
                                                 TextComponentAccessor.TEXT_FIELD_WITH_HISTORY_WHOLE_TEXT);
  final JTextField textField = myTargetDirectoryField.getChildComponent().getTextEditor();
  FileChooserFactory.getInstance().installFileCompletion(textField, descriptor, true, getDisposable());
  textField.getDocument().addDocumentListener(new DocumentAdapter() {
    @Override
    protected void textChanged(DocumentEvent e) {
      validateOKButton();
    }
  });
  myTargetDirectoryField.setTextFieldPreferredWidth(CopyFilesOrDirectoriesDialog.MAX_PATH_LENGTH);
  Disposer.register(getDisposable(), myTargetDirectoryField);

  String shortcutText = KeymapUtil.getFirstKeyboardShortcutText(ActionManager.getInstance().getAction(IdeActions.ACTION_CODE_COMPLETION));

  myCbSearchForReferences = new NonFocusableCheckBox(RefactoringBundle.message("search.for.references"));
  myCbSearchForReferences.setSelected(RefactoringSettings.getInstance().MOVE_SEARCH_FOR_REFERENCES_FOR_FILE);

  myOpenInEditorCb = new NonFocusableCheckBox("Open moved files in editor");
  myOpenInEditorCb.setSelected(isOpenInEditor());
  
  return FormBuilder.createFormBuilder().addComponent(myNameLabel)
    .addLabeledComponent(RefactoringBundle.message("move.files.to.directory.label"), myTargetDirectoryField, UIUtil.LARGE_VGAP)
    .addTooltip(RefactoringBundle.message("path.completion.shortcut", shortcutText))
    .addComponentToRightColumn(myCbSearchForReferences, UIUtil.LARGE_VGAP)
    .addComponentToRightColumn(myOpenInEditorCb, UIUtil.LARGE_VGAP)
    .getPanel();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:42,代码来源:MoveFilesOrDirectoriesDialog.java

示例12: getCommandName

import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
@Override
protected String getCommandName() {
  return RefactoringBundle.message("moving.directories.command");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:MoveDirectoryWithClassesProcessor.java

示例13: getCodeReferencesText

import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
public String getCodeReferencesText(int usagesCount, int filesCount) {
  return RefactoringBundle.message("occurences.to.be.migrated", UsageViewBundle.getReferencesString(usagesCount, filesCount));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:TypeMigrationViewDescriptor.java

示例14: getDialogDescription

import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
public String getDialogDescription() {
  return RefactoringBundle.message("rename.variables.with.the.following.names.to");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:AutomaticVariableRenamer.java

示例15: getClassNameLabelText

import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
protected String getClassNameLabelText() {
  return isExtractSuperclass()
         ? RefactoringBundle.message("superclass.name")
         : RefactoringBundle.message("extractSuper.rename.original.class.to");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ExtractSuperclassDialog.java


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