Author: dazarov
Date: 2011-12-13 12:14:52 -0500 (Tue, 13 Dec 2011)
New Revision: 37273
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIMessages.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties
Log:
Add @SuppressWarnings quick fix
https://issues.jboss.org/browse/JBIDE-10187
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIMessages.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIMessages.java 2011-12-13
16:17:16 UTC (rev 37272)
+++
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/CommonUIMessages.java 2011-12-13
17:14:52 UTC (rev 37273)
@@ -75,7 +75,10 @@
public static String MANDATORYSTRING_VALIDATOR_MUST_PROVIDE_VALUE;
public static String CONFIGURE_PROBLEM_SEVERITY;
- public static String ADD_SUPPRESS_WARNINGS;
+ public static String ADD_SUPPRESS_WARNINGS_TITLE;
+ public static String ADD_SUPPRESS_WARNINGS_MESSAGE;
+ public static String ADD_SUPPRESS_WARNINGS_QUESTION1;
+ public static String ADD_SUPPRESS_WARNINGS_QUESTION2;
static {
NLS.initializeMessages(BUNDLE_NAME, CommonUIMessages.class);
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java 2011-12-13
16:17:16 UTC (rev 37272)
+++
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java 2011-12-13
17:14:52 UTC (rev 37273)
@@ -63,7 +63,7 @@
this.file = file;
this.element = getAnnatatableElement(element);
this.preferenceKey = preferenceKey;
- label = NLS.bind(CommonUIMessages.ADD_SUPPRESS_WARNINGS, element.getElementName());
+ label = NLS.bind(CommonUIMessages.ADD_SUPPRESS_WARNINGS_TITLE,
element.getElementName());
}
private IAnnotatable getAnnatatableElement(IJavaElement element){
@@ -133,8 +133,8 @@
if(projectValue != null){
MessageDialog dialog = new MessageDialog(getShell(), label, null,
- "This quick fix uses warning names that are not supported by Java Validator
and will cause \"Unsupported @SuppressWarning\" problem message\n\n"+
- "Do you want to disable 'Unsupported @SuppressWarnings'
validation",
+ CommonUIMessages.ADD_SUPPRESS_WARNINGS_MESSAGE+
+ CommonUIMessages.ADD_SUPPRESS_WARNINGS_QUESTION1,
MessageDialog.QUESTION_WITH_CANCEL,
new String[]{"Cancel", "Disable"},
0);
@@ -150,8 +150,8 @@
}
}else{
MessageDialog dialog = new MessageDialog(getShell(), label, null,
- "This quick fix uses warning names that are not supported by Java Validator
and will cause \"Unsupported @SuppressWarning\" problem message\n\n"+
- "Do you want to disable 'Unsupported @SuppressWarnings' validation on
the Workspace or only on the project
'"+file.getProject().getName()+"'",
+ CommonUIMessages.ADD_SUPPRESS_WARNINGS_MESSAGE+
+ NLS.bind(CommonUIMessages.ADD_SUPPRESS_WARNINGS_QUESTION2,
file.getProject().getName()),
MessageDialog.QUESTION_WITH_CANCEL,
new String[]{"Cancel", "Workspace",
file.getProject().getName()},
0);
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties 2011-12-13
16:17:16 UTC (rev 37272)
+++
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties 2011-12-13
17:14:52 UTC (rev 37273)
@@ -34,4 +34,7 @@
MANDATORYSTRING_VALIDATOR_MUST_PROVIDE_VALUE=You have to provide a {0}.
CONFIGURE_PROBLEM_SEVERITY=Configure Problem Severity
-ADD_SUPPRESS_WARNINGS=Add @SuppressWarnings to ''{0}''
\ No newline at end of file
+ADD_SUPPRESS_WARNINGS_TITLE=Add @SuppressWarnings to ''{0}''
+ADD_SUPPRESS_WARNINGS_MESSAGE=This quick fix uses warning names that are not supported by
Java Validator and will cause \"Unsupported @SuppressWarning\" problem
message\n\n
+ADD_SUPPRESS_WARNINGS_QUESTION1=Do you want to disable 'Unsupported
@SuppressWarnings' validation
+ADD_SUPPRESS_WARNINGS_QUESTION2=Do you want to disable 'Unsupported
@SuppressWarnings' validation on the Workspace or only on the project
''{0}''
\ No newline at end of file