capitalize dialog names & some cleanup

This commit is contained in:
Maxim.Medvedev
2011-12-03 16:21:22 +04:00
parent 6628d52974
commit 62f2dfa5f8
11 changed files with 33 additions and 34 deletions
@@ -260,7 +260,7 @@ class.is.not.expected.here=Class is not expected here
fix.package.name=Fix package name
#dynamic properties
add.dynamic.property=Add dynamic property ''{0}''
add.dynamic.property=Add Dynamic Property ''{0}''
duplicate.element.in.the.map=Duplicate element in the map
dynamic.toolwindow.search.elements=Search dynamic element
dynamic.toolwindow.property.filter=Property Filter
@@ -271,16 +271,16 @@ create.field.from.usage=Create Field ''{0}''
create.method.from.usage=Create Method ''{0}''
create.variable.from.usage=Create Variable ''{0}''
add.dynamic.element=Add dynamic element
add.dynamic.method=Add dynamic method
add.dynamic.method=Add Dynamic Method
dynamic.type=Type
dynamic.name=Name
dynamic.properties.table.name=Method arguments
dynamic.method.return.type=Return type
dynamic.method.property.type=Property type
are.you.sure.to.delete.dynamic.property=Are you sure to delete ''{0}''?
dynamic.property.deletion=Deletion dynamic property
dynamic.property.deletion=Deletion Dynamic Property
are.you.sure.to.delete.elements=Are you sure to delete ''{0}'' elements?
dynamic.element.deletion=Dynamic element deletion
dynamic.element.deletion=Dynamic Element Deletion
dynamic.window=Dynamic window
dynamic.properties.table.no.arguments=Arguments list is empty.
assignment.expected='=' expected
@@ -304,7 +304,7 @@ break.outside.loop=The break statement with named labels is only allowed inside
Constructor=Constructor
Getter=Getter
Setter=Setter
groovy.like.library.found=Groovy library found
groovy.like.library.found=Groovy Library Found
groovy.like.library.found.text=Do you want to set up Groovy for module ''{0}'' \n\
with found library ''{1}'' (Groovy version {2})?
compile.groovy.files=&Compile Groovy files
@@ -1,5 +1,5 @@
generate.equals.and.hashcode.already.defined.warning.anonymous=equals() and hashCode() already defined
generate.equals.and.hashcode.already.defined.warning=equals() and hashCode() already defined
generate.equals.and.hashcode.already.defined.title=equals() and hashCode() already defined
generate.equals.and.hashcode.already.defined.title=equals() and hashCode() Already Defined
generate.equals.compare.nested.arrays.comment= // Compare nested arrays - values of {0} here
generate.equals.compare.arrays.comment= // Probably incorrect - comparing Object[] arrays with Arrays.equals
@@ -40,14 +40,15 @@ import com.intellij.ui.treeStructure.treetable.ListTreeTableModelOnColumns;
import com.intellij.ui.treeStructure.treetable.TreeTable;
import com.intellij.ui.treeStructure.treetable.TreeTableModel;
import com.intellij.ui.treeStructure.treetable.TreeTableTree;
import com.intellij.util.Function;
import com.intellij.util.IncorrectOperationException;
import com.intellij.util.NullableFunction;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.ui.AbstractTableCellEditor;
import com.intellij.util.ui.ColumnInfo;
import com.intellij.util.ui.UIUtil;
import com.intellij.util.ui.tree.TreeUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.groovy.GroovyBundle;
import org.jetbrains.plugins.groovy.GroovyFileType;
@@ -66,6 +67,7 @@ import javax.swing.tree.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.Collection;
@@ -247,7 +249,7 @@ public class DynamicToolWindowWrapper {
myTreeTable.setTreeCellRenderer(treeCellRenderer);
myTreeTable.setRootVisible(false);
myTreeTable.setSelectionMode(DefaultTreeSelectionModel.CONTIGUOUS_TREE_SELECTION);
myTreeTable.setSelectionMode(TreeSelectionModel.CONTIGUOUS_TREE_SELECTION);
final MyPropertyTypeCellEditor typeCellEditor = new MyPropertyTypeCellEditor();
@@ -318,11 +320,11 @@ public class DynamicToolWindowWrapper {
final String qualifiedName = ((PsiClass)element).getQualifiedName();
return new RefactoringElementListener() {
public void elementMoved(PsiElement newElement) {
public void elementMoved(@NotNull PsiElement newElement) {
renameElement(qualifiedName, newElement);
}
public void elementRenamed(PsiElement newElement) {
public void elementRenamed(@NotNull PsiElement newElement) {
renameElement(qualifiedName, newElement);
}
@@ -358,7 +360,7 @@ public class DynamicToolWindowWrapper {
final int selectionRow = myTreeTable.getTree().getLeadSelectionRow();
myTreeTable.editCellAt(selectionRow, TYPE_COLUMN, event);
}
}, KeyStroke.getKeyStroke(KeyEvent.VK_F2, KeyEvent.CTRL_MASK), JComponent.WHEN_FOCUSED);
}, KeyStroke.getKeyStroke(KeyEvent.VK_F2, InputEvent.CTRL_MASK), JComponent.WHEN_FOCUSED);
// todo use "myTreeTable.setAutoCreateRowSorter(true);" since 1.6
@@ -510,7 +512,7 @@ public class DynamicToolWindowWrapper {
}
}
class ClassColumnInfo extends ColumnInfo<DefaultMutableTreeNode, DNamedElement> {
static class ClassColumnInfo extends ColumnInfo<DefaultMutableTreeNode, DNamedElement> {
public ClassColumnInfo(String name) {
super(name);
}
@@ -565,7 +567,7 @@ public class DynamicToolWindowWrapper {
if (!(childObject instanceof DItemElement)) break;
filterText = getFilter();
if (filterText == null || "".equals(filterText)) {
if (filterText == null || filterText.isEmpty()) {
((DItemElement)childObject).setHightlightedText("");
dynamicNodes.add(dynamicNode);
@@ -689,7 +691,8 @@ public class DynamicToolWindowWrapper {
}
private static String[] mapToUnqualified(final String[] argumentsNames) {
return ContainerUtil.map2Array(argumentsNames, String.class, new Function<String, String>() {
return ContainerUtil.map2Array(argumentsNames, String.class, new NullableFunction<String, String>() {
@Nullable
public String fun(final String s) {
if (s == null) return null;
int index = s.lastIndexOf(".");
@@ -741,7 +744,7 @@ public class DynamicToolWindowWrapper {
if (element == null) return null;
return element.getContainingFile();
} else if (LangDataKeys.DELETE_ELEMENT_PROVIDER.is(dataId)) {
} else if (PlatformDataKeys.DELETE_ELEMENT_PROVIDER.is(dataId)) {
return new DeleteProvider() {
@Override
public void deleteElement(DataContext dataContext) {
@@ -148,7 +148,7 @@ public abstract class DynamicDialog extends DialogWrapper {
setStatusTextAndIcon(null, "");
}
private void setStatusTextAndIcon(final Icon icon, final String text) {
private void setStatusTextAndIcon(@Nullable final Icon icon, final String text) {
myTypeStatusLabel.setIcon(icon);
myTypeStatusLabel.setText(text);
pack();
@@ -177,7 +177,7 @@ public abstract class DynamicDialog extends DialogWrapper {
public void actionPerformed(ActionEvent e) {
myClassComboBox.requestFocus();
}
}, KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.ALT_MASK), JComponent.WHEN_IN_FOCUSED_WINDOW);
}, KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.ALT_MASK), JComponent.WHEN_IN_FOCUSED_WINDOW);
}
@Nullable
@@ -191,7 +191,7 @@ public abstract class DynamicDialog extends DialogWrapper {
final EditorComboBoxEditor comboEditor = new EditorComboBoxEditor(myProject, GroovyFileType.GROOVY_FILE_TYPE);
final Document document = createDocument("");
assert document != null;
LOG.assertTrue(document != null);
comboEditor.setItem(document);
@@ -213,7 +213,7 @@ public abstract class DynamicDialog extends DialogWrapper {
public void actionPerformed(ActionEvent e) {
myTypeComboBox.requestFocus();
}
}, KeyStroke.getKeyStroke(KeyEvent.VK_T, KeyEvent.ALT_MASK), JComponent.WHEN_IN_FOCUSED_WINDOW);
}, KeyStroke.getKeyStroke(KeyEvent.VK_T, InputEvent.ALT_MASK), JComponent.WHEN_IN_FOCUSED_WINDOW);
final EditorTextField editorTextField = (EditorTextField) myTypeComboBox.getEditor().getEditorComponent();
@@ -228,9 +228,6 @@ public abstract class DynamicDialog extends DialogWrapper {
});
PsiType type = typeConstraints.length == 1 ? typeConstraints[0].getDefaultType() : TypesUtil.getJavaLangObject(myContext);
if (type == null) {
type = TypesUtil.getJavaLangObject(myContext);
}
myTypeComboBox.getEditor().setItem(createDocument(type.getCanonicalText()));
}
@@ -95,9 +95,6 @@ public abstract class BaseInspection extends GroovySuppressableInspectionTool {
final BaseInspectionVisitor visitor = buildGroovyVisitor(problemsHolder, isOnTheFly);
groovyFile.accept(visitor);
final List<ProblemDescriptor> problems = problemsHolder.getResults();
if (problems == null) {
return null;
}
return problems.toArray(new ProblemDescriptor[problems.size()]);
}
@@ -46,7 +46,7 @@ dynamic.property=Dynamic property
unresolved.type.status=Type ''{0}'' is not resolved
resolved.type.status=Type ''{0}'' is resolved
no.type.specified=No type specified
dynamic.element=Dynamic element
dynamic.element=Dynamic Element
########################################################################################################################
# InpectorGroovy properties
@@ -57,7 +57,7 @@ pointless.boolean.display.name=Pointless boolean expression
pointless.boolean.quickfix=Simplify
Cannot.perform.undo.operation=Cannot perform undo operation
Undo.disable=Undo disabled
Undo.disable=Undo Disabled
field.already.defined=Variables with field names
access.to.inaccessible.element=Access to inaccessible element
@@ -138,7 +138,8 @@ public class GroovyCompiler extends GroovyCompilerBase {
"You seem to have global Groovy AST transformations defined in your project,\n" +
"but they won't be applied to your code because they are not marked as compiler resources.\n" +
"Do you want to add them to compiler resource list?\n" +
"(you can do it yourself later in Settings | Compiler | Resource patterns)", "AST Transformations found",
"(you can do it yourself later in Settings | Compiler | Resource patterns)",
"AST Transformations Found",
GroovyIcons.GROOVY_ICON_32x32);
if (result == 0) {
CompilerConfiguration.getInstance(myProject).addResourceFilePattern(AST_TRANSFORM_FILE_NAME);
@@ -103,7 +103,8 @@ public class GrabDependencies implements IntentionAction {
assert vfile != null;
if (JavaPsiFacade.getInstance(project).findClass("org.apache.ivy.core.report.ResolveReport", file.getResolveScope()) == null) {
Messages.showErrorDialog("Sorry, but IDEA cannot @Grab the dependencies without Ivy. Please add Ivy to your module dependencies and re-run the action.", "Ivy missing");
Messages.showErrorDialog("Sorry, but IDEA cannot @Grab the dependencies without Ivy. Please add Ivy to your module dependencies and re-run the action.",
"Ivy Missing");
return;
}
@@ -90,7 +90,7 @@ do.not.create.first.new=Use &existing first parameter as map for named arguments
convert.cannot.itself=Refactoring is not available for map parameter itself
perform.refactoring=Performing refactoring
map.param.name=Map parameter &name:
convert.param.to.map.entry=Convert parameter to map entry
convert.param.to.map.entry=Convert Parameter to Map Entry
convert.java.style.array.intention.name=Convert java-style array creation
convert.java.style.array.intention.family.name=Convert Java-Style Array Creation to Groovy Syntax
@@ -102,7 +102,7 @@ create.parameter.for.field=Add parameter for field ''{0}''
create.parameter.for.fields=Add parameter for field...
closure.used.as.variable=Closure is passed as argument. Refactoring can break semantic.
convert.map.to.class.intention.name=Convert to class
convert.map.to.class.intention.name=Convert to Class
convert.map.to.class.intention.family.name=Convert Groovy native map to class instances
do.you.want.to.change.method.return.type=Do you want to change return type of ''{0}'' method
do.you.want.to.change.variable.type=Do you want to change type of ''{0}''
@@ -161,7 +161,7 @@ public class GroovyMapParameterDialog extends DialogWrapper {
public void actionPerformed(ActionEvent e) {
myNameComboBox.requestFocus();
}
}, KeyStroke.getKeyStroke(KeyEvent.VK_N, KeyEvent.ALT_MASK), JComponent.WHEN_IN_FOCUSED_WINDOW);
}, KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.ALT_MASK), JComponent.WHEN_IN_FOCUSED_WINDOW);
for (String possibleName : possibleNames) {
myNameComboBox.addItem(possibleName);
@@ -294,7 +294,7 @@ public class MvcConsole implements Disposable {
catch (final IOException e) {
ApplicationManager.getApplication().invokeLater(new Runnable() {
public void run() {
Messages.showErrorDialog(e.getMessage(), "Cannot start process");
Messages.showErrorDialog(e.getMessage(), "Cannot Start Process");
try {
if (onDone != null && !module.isDisposed()) onDone.run();
@@ -359,7 +359,7 @@ public class MvcConsole implements Disposable {
super("Kill process", "Kill process", KILL_PROCESS_ICON);
}
public void setHandler(OSProcessHandler handler) {
public void setHandler(@Nullable OSProcessHandler handler) {
myHandler = handler;
}