本文整理汇总了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);
}
示例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());
}
示例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;
}
示例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();
}
}
示例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;
}
示例6: getCommandName
import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
protected String getCommandName() {
return RefactoringBundle.message("encapsulate.fields.command.name", DescriptiveNameUtil.getDescriptiveName(myClass));
}
示例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"));
}
示例8: entityName
import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
public String entityName() {
return RefactoringBundle.message("entity.name.test");
}
示例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));
}
示例10: getInlineThisText
import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
protected String getInlineThisText() {
return RefactoringBundle.message("this.reference.only.and.keep.the.field");
}
示例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();
}
示例12: getCommandName
import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
@Override
protected String getCommandName() {
return RefactoringBundle.message("moving.directories.command");
}
示例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));
}
示例14: getDialogDescription
import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
public String getDialogDescription() {
return RefactoringBundle.message("rename.variables.with.the.following.names.to");
}
示例15: getClassNameLabelText
import com.intellij.refactoring.RefactoringBundle; //导入方法依赖的package包/类
protected String getClassNameLabelText() {
return isExtractSuperclass()
? RefactoringBundle.message("superclass.name")
: RefactoringBundle.message("extractSuper.rename.original.class.to");
}