Author: mareshkau
Date: 2011-02-07 08:39:49 -0500 (Mon, 07 Feb 2011)
New Revision: 29047
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFAbstractValidationComponent.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AttrTempComponent.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2CompositeTempComponent.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2URITempComponent.java
Log:
https://issues.jboss.org/browse/JBIDE-7005, message field has been moved down by class
hierarchy
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFAbstractValidationComponent.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFAbstractValidationComponent.java 2011-02-07
13:16:00 UTC (rev 29046)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFAbstractValidationComponent.java 2011-02-07
13:39:49 UTC (rev 29047)
@@ -20,6 +20,7 @@
private int startOffSet;
private int line;
private Object[] messageParams;
+ private String validationMessage;
public int getLength() {
return length;
@@ -58,5 +59,13 @@
public void createMessageParams() {
this.messageParams = new Object[] { this };
}
+
+ public String getValidationMessage() {
+ return this.validationMessage;
+ }
+
+ protected void setValidationMessage(String validationMessage) {
+ this.validationMessage = validationMessage;
+ }
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AttrTempComponent.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AttrTempComponent.java 2011-02-07
13:16:00 UTC (rev 29046)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AttrTempComponent.java 2011-02-07
13:39:49 UTC (rev 29047)
@@ -28,7 +28,6 @@
@SuppressWarnings("restriction")
public class JSF2AttrTempComponent extends JSFAbstractValidationComponent {
- private String validationMessage = ""; //$NON-NLS-1$
private String type = JSF2ValidatorConstants.JSF2_UNFIXABLE_ATTR_TYPE;
private ElementImpl parentEl;
private IDOMAttr attr;
@@ -40,19 +39,15 @@
}
public void createValidationMessage() {
- this.validationMessage = MessageFormat.format(
+ setValidationMessage(MessageFormat.format(
JSFUIMessages.Missing_JSF_2_Component_Attr, attr.getName(),
- getElementName());
+ getElementName()));
}
public String getElementName(){
return parentEl.getLocalName();
}
-
- public String getValidationMessage() {
- return validationMessage;
- }
-
+
public void setType(String type) {
this.type = type;
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2CompositeTempComponent.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2CompositeTempComponent.java 2011-02-07
13:16:00 UTC (rev 29046)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2CompositeTempComponent.java 2011-02-07
13:39:49 UTC (rev 29047)
@@ -31,7 +31,6 @@
@SuppressWarnings("restriction")
public class JSF2CompositeTempComponent extends JSFAbstractValidationComponent {
- private String validationMessage = ""; //$NON-NLS-1$
private List<String> attrNames = new ArrayList<String>(0);
private ElementImpl element;
private String componentResLoc;
@@ -42,14 +41,10 @@
public void createValidationMessage() {
String nodeName = element.getLocalName();
- this.validationMessage = MessageFormat.format(
- JSFUIMessages.Missing_JSF_2_Composite_Component, nodeName);
+ setValidationMessage(MessageFormat.format(
+ JSFUIMessages.Missing_JSF_2_Composite_Component, nodeName));
}
- public String getValidationMessage() {
- return validationMessage;
- }
-
@Override
public void createMessageParams() {
NamedNodeMap attrsMap = element.getAttributes();
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2URITempComponent.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2URITempComponent.java 2011-02-07
13:16:00 UTC (rev 29046)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2URITempComponent.java 2011-02-07
13:39:49 UTC (rev 29047)
@@ -26,7 +26,6 @@
public class JSF2URITempComponent extends JSFAbstractValidationComponent {
- private String validationMessage = ""; //$NON-NLS-1$
private String URI;
public JSF2URITempComponent(String URI) {
@@ -34,18 +33,14 @@
}
public void createValidationMessage() {
- this.validationMessage = MessageFormat.format(
- JSFUIMessages.Missing_JSF_2_Resources_Folder, getResourcesFolder());
+ setValidationMessage(MessageFormat.format(
+ JSFUIMessages.Missing_JSF_2_Resources_Folder, getResourcesFolder()));
}
public String getResourcesFolder(){
return "/resources" + URI.replaceAll(JSF2ResourceUtil.JSF2_URI_PREFIX,
""); //$NON-NLS-1$ //$NON-NLS-2$
}
- public String getValidationMessage() {
- return validationMessage;
- }
-
public String getType() {
return JSF2ValidatorConstants.JSF2_URI_TYPE;
}