Author: dazarov
Date: 2011-11-29 12:11:29 -0500 (Tue, 29 Nov 2011)
New Revision: 36739
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/marker/DisableFaceletHTMLValidatorResolutionGenerator.java
Log:
"Disable Facelet HTML Validator" quick fix
https://issues.jboss.org/browse/JBIDE-9366
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/marker/DisableFaceletHTMLValidatorResolutionGenerator.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/marker/DisableFaceletHTMLValidatorResolutionGenerator.java 2011-11-29
16:52:56 UTC (rev 36738)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/marker/DisableFaceletHTMLValidatorResolutionGenerator.java 2011-11-29
17:11:29 UTC (rev 36739)
@@ -29,6 +29,7 @@
IMarkerResolutionGenerator2 {
private static final String ATTRIBUTE_NAME = "ValidationId";
public static final String VALIDATOR_ID =
"org.eclipse.jst.jsf.facelet.ui.FaceletHTMLValidator";
+ private static final String MESSAGE = "converter id is not registered.";
public IMarkerResolution[] getResolutions(IMarker marker) {
if(isNeedToCreate(marker)){
@@ -55,8 +56,9 @@
}
private boolean isNeedToCreate(IMarker marker){
+ String message = marker.getAttribute(IMarker.MESSAGE, "");
String attribute = marker.getAttribute(ATTRIBUTE_NAME, "");
- if(attribute.equals(VALIDATOR_ID) && marker.getResource() instanceof IFile){
+ if(attribute.equals(VALIDATOR_ID) && marker.getResource() instanceof IFile
&& message.endsWith(MESSAGE)){
return true;
}
return false;