Author: dazarov
Date: 2012-06-22 17:35:57 -0400 (Fri, 22 Jun 2012)
New Revision: 42181
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityResolutionGenerator.java
Log:
Make Quick fix for problem markers "Unknown tag" work on temporary WTP
annotations
https://issues.jboss.org/browse/JBIDE-10958
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityResolutionGenerator.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityResolutionGenerator.java 2012-06-22
21:19:02 UTC (rev 42180)
+++
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityResolutionGenerator.java 2012-06-22
21:35:57 UTC (rev 42181)
@@ -12,7 +12,6 @@
import java.util.ArrayList;
import java.util.List;
-import java.util.Map;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
@@ -35,6 +34,7 @@
/**
* @author Daniel Azarov
*/
+@SuppressWarnings("restriction")
public class ConfigureProblemSeverityResolutionGenerator implements
IMarkerResolutionGenerator2, IQuickFixGenerator {
@@ -115,13 +115,19 @@
}
private String getPreferenceKey(TemporaryAnnotation annotation){
- String attribute =
(String)annotation.getAttributes().get(ValidationErrorManager.PREFERENCE_KEY_ATTRIBUTE_NAME);
- return attribute;
+ if(annotation.getAttributes() != null){
+ String attribute =
(String)annotation.getAttributes().get(ValidationErrorManager.PREFERENCE_KEY_ATTRIBUTE_NAME);
+ return attribute;
+ }
+ return null;
}
private String getPreferencePageId(TemporaryAnnotation annotation){
- String attribute =
(String)annotation.getAttributes().get(ValidationErrorManager.PREFERENCE_PAGE_ID_NAME);
- return attribute;
+ if(annotation.getAttributes() != null){
+ String attribute =
(String)annotation.getAttributes().get(ValidationErrorManager.PREFERENCE_PAGE_ID_NAME);
+ return attribute;
+ }
+ return null;
}
@Override