Author: dmaliarevich
Date: 2009-05-25 13:25:50 -0400 (Mon, 25 May 2009)
New Revision: 15495
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDefineContainerTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4311, html tags and attribute names and values
were changed into lowercase, null value check was added to ui:params value replacement.
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2009-05-25
16:42:06 UTC (rev 15494)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2009-05-25
17:25:50 UTC (rev 15495)
@@ -145,7 +145,11 @@
initClasses(sourceNode, pageContext);
nsIDOMNode visualNode = creationData.getNode();
- if (visualNode != null && visualNode.getNodeName().equals(HTML.TAG_TBODY)) {
+ /*
+ *
https://jira.jboss.org/jira/browse/JBIDE-4311
+ * Tag name can be in any case.
+ */
+ if (visualNode != null &&
visualNode.getNodeName().equalsIgnoreCase(HTML.TAG_TBODY)) {
// we are called by VpeVisualDomBuilder
addStylesToCells(visualDocument, visualNode);
} else {
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDefineContainerTemplate.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDefineContainerTemplate.java 2009-05-25
16:42:06 UTC (rev 15494)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDefineContainerTemplate.java 2009-05-25
17:25:50 UTC (rev 15495)
@@ -100,6 +100,15 @@
private String replacePattern(String origStr, String target,
String replacement) {
+
+ /*
+ *
https://jira.jboss.org/jira/browse/JBIDE-4311
+ * target string could be null in some case.
+ */
+ if (null == origStr || null == target) {
+ return origStr;
+ }
+
StringBuilder sb = new StringBuilder();
String word = "((\\w+)([\\.\\[\\]]*))";
Matcher m;
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2009-05-25
16:42:06 UTC (rev 15494)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2009-05-25
17:25:50 UTC (rev 15495)
@@ -20,47 +20,47 @@
private HTML() {
}
- public static final String TAG_HTML = "HTML"; //$NON-NLS-1$
- public static final String TAG_HEAD = "HEAD"; //$NON-NLS-1$
- public static final String TAG_BODY = "BODY"; //$NON-NLS-1$
- public static final String TAG_IMG = "IMG"; //$NON-NLS-1$
- public static final String TAG_LINK = "LINK"; //$NON-NLS-1$
- public static final String TAG_SELECT = "SELECT"; //$NON-NLS-1$
- public static final String TAG_OPTION = "OPTION"; //$NON-NLS-1$
- public static final String TAG_STYLE = "STYLE"; //$NON-NLS-1$
- public static final String TAG_TABLE = "TABLE"; //$NON-NLS-1$
- public static final String TAG_TBODY = "TBODY"; //$NON-NLS-1$
- public static final String TAG_THEAD = "THEAD"; //$NON-NLS-1$
- public static final String TAG_TFOOT = "TFOOT"; //$NON-NLS-1$
- public static final String TAG_CAPTION = "CAPTION"; //$NON-NLS-1$
- public static final String TAG_TH = "TH"; //$NON-NLS-1$
- public static final String TAG_TR = "TR"; //$NON-NLS-1$
- public static final String TAG_TD = "TD"; //$NON-NLS-1$
- public static final String TAG_DL = "DL"; //$NON-NLS-1$
- public static final String TAG_DT = "DT"; //$NON-NLS-1$
- public static final String TAG_DD = "DD"; //$NON-NLS-1$
- public static final String TAG_COL = "COL"; //$NON-NLS-1$
- public static final String TAG_COLS = "COLS"; //$NON-NLS-1$
- public static final String TAG_COLGROUP = "COLGROUP"; //$NON-NLS-1$
- public static final String TAG_BR = "BR"; //$NON-NLS-1$
- public static final String TAG_LI = "LI"; //$NON-NLS-1$
- public static final String TAG_DIV = "DIV"; //$NON-NLS-1$
- public static final String TAG_SPAN = "SPAN"; //$NON-NLS-1$
- public static final String TAG_P = "P"; //$NON-NLS-1$
- public static final String TAG_TEXTAREA = "TEXTAREA"; //$NON-NLS-1$
- public static final String TAG_INPUT = "INPUT"; //$NON-NLS-1$
- public static final String TAG_BUTTON = "BUTTON"; //$NON-NLS-1$
- public static final String TAG_OL = "OL"; //$NON-NLS-1$
- public static final String TAG_UL = "UL"; //$NON-NLS-1$
- public static final String TAG_CODE = "CODE"; //$NON-NLS-1$
- public static final String TAG_PRE = "PRE"; //$NON-NLS-1$
- public static final String TAG_B = "B"; //$NON-NLS-1$
- public static final String TAG_I = "I"; //$NON-NLS-1$
- public static final String TAG_U = "U"; //$NON-NLS-1$
- public static final String TAG_LABEL = "LABEL"; //$NON-NLS-1$
- public static final String TAG_A = "A"; //$NON-NLS-1$
- public static final String TAG_H1 = "H1"; //$NON-NLS-1$
- public static final String TAG_FORM = "FORM"; //$NON-NLS-1$
+ public static final String TAG_HTML = "html"; //$NON-NLS-1$
+ public static final String TAG_HEAD = "head"; //$NON-NLS-1$
+ public static final String TAG_BODY = "body"; //$NON-NLS-1$
+ public static final String TAG_IMG = "img"; //$NON-NLS-1$
+ public static final String TAG_LINK = "link"; //$NON-NLS-1$
+ public static final String TAG_SELECT = "select"; //$NON-NLS-1$
+ public static final String TAG_OPTION = "option"; //$NON-NLS-1$
+ public static final String TAG_STYLE = "style"; //$NON-NLS-1$
+ public static final String TAG_TABLE = "table"; //$NON-NLS-1$
+ public static final String TAG_TBODY = "tbody"; //$NON-NLS-1$
+ public static final String TAG_THEAD = "thead"; //$NON-NLS-1$
+ public static final String TAG_TFOOT = "tfoot"; //$NON-NLS-1$
+ public static final String TAG_CAPTION = "caption"; //$NON-NLS-1$
+ public static final String TAG_TH = "th"; //$NON-NLS-1$
+ public static final String TAG_TR = "tr"; //$NON-NLS-1$
+ public static final String TAG_TD = "td"; //$NON-NLS-1$
+ public static final String TAG_DL = "dl"; //$NON-NLS-1$
+ public static final String TAG_DT = "dt"; //$NON-NLS-1$
+ public static final String TAG_DD = "dd"; //$NON-NLS-1$
+ public static final String TAG_COL = "col"; //$NON-NLS-1$
+ public static final String TAG_COLS = "cols"; //$NON-NLS-1$
+ public static final String TAG_COLGROUP = "colgroup"; //$NON-NLS-1$
+ public static final String TAG_BR = "br"; //$NON-NLS-1$
+ public static final String TAG_LI = "li"; //$NON-NLS-1$
+ public static final String TAG_DIV = "div"; //$NON-NLS-1$
+ public static final String TAG_SPAN = "span"; //$NON-NLS-1$
+ public static final String TAG_P = "p"; //$NON-NLS-1$
+ public static final String TAG_TEXTAREA = "textarea"; //$NON-NLS-1$
+ public static final String TAG_INPUT = "input"; //$NON-NLS-1$
+ public static final String TAG_BUTTON = "button"; //$NON-NLS-1$
+ public static final String TAG_OL = "ol"; //$NON-NLS-1$
+ public static final String TAG_UL = "ul"; //$NON-NLS-1$
+ public static final String TAG_CODE = "code"; //$NON-NLS-1$
+ public static final String TAG_PRE = "pre"; //$NON-NLS-1$
+ public static final String TAG_B = "b"; //$NON-NLS-1$
+ public static final String TAG_I = "i"; //$NON-NLS-1$
+ public static final String TAG_U = "u"; //$NON-NLS-1$
+ public static final String TAG_LABEL = "label"; //$NON-NLS-1$
+ public static final String TAG_A = "a"; //$NON-NLS-1$
+ public static final String TAG_H1 = "h1"; //$NON-NLS-1$
+ public static final String TAG_FORM = "form"; //$NON-NLS-1$
/**Use this class if you want to wrap a text node in a span that
* must not affect visual representation of the text node.
@@ -68,16 +68,16 @@
* See also EditorOverride.css .*/
public static final String CLASS_VPE_TEXT = "vpe-text"; //$NON-NLS-1$
- public static final String ATTR_ID = "ID"; //$NON-NLS-1$
- public static final String ATTR_TYPE = "TYPE"; //$NON-NLS-1$
- public static final String ATTR_TEXT = "TEXT"; //$NON-NLS-1$
+ public static final String ATTR_ID = "id"; //$NON-NLS-1$
+ public static final String ATTR_TYPE = "type"; //$NON-NLS-1$
+ public static final String ATTR_TEXT = "text"; //$NON-NLS-1$
public static final String ATTR_CLASS = "class"; //$NON-NLS-1$
- public static final String ATTR_TITLE = "TITLE"; //$NON-NLS-1$
- public static final String ATTR_NAME = "NAME"; //$NON-NLS-1$
+ public static final String ATTR_TITLE = "title"; //$NON-NLS-1$
+ public static final String ATTR_NAME = "name"; //$NON-NLS-1$
public static final String ATTR_VALUE = "value"; //$NON-NLS-1$
public static final String ATTR_STYLE = "style"; //$NON-NLS-1$
public static final String ATTR_SIZE = "size"; //$NON-NLS-1$
- public static final String ATTR_MULTIPLE = "MULTIPLE"; //$NON-NLS-1$
+ public static final String ATTR_MULTIPLE = "multiple"; //$NON-NLS-1$
public static final String ATTR_COLSPAN = "colspan"; //$NON-NLS-1$
public static final String ATTR_CELLSPACING = "cellspacing"; //$NON-NLS-1$
public static final String ATTR_CELLPADDING = "cellpadding"; //$NON-NLS-1$
@@ -86,7 +86,7 @@
public static final String ATTR_HSPACE = "hspace"; //$NON-NLS-1$
public static final String ATTR_VSPACE = "vspace"; //$NON-NLS-1$
public static final String ATTR_BORDER = "border"; //$NON-NLS-1$
- public static final String ATTR_FOR = "FOR"; //$NON-NLS-1$
+ public static final String ATTR_FOR = "for"; //$NON-NLS-1$
public static final String ATTR_DIR = "dir"; //$NON-NLS-1$
public static final String ATTR_DISABLED = "disabled"; //$NON-NLS-1$
public static final String ATTR_FRAME = "frame"; //$NON-NLS-1$