Author: ezheleznyakov
Date: 2007-09-10 10:37:05 -0400 (Mon, 10 Sep 2007)
New Revision: 3505
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-847
Code adjustment
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java
===================================================================
---
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java 2007-09-10
12:46:29 UTC (rev 3504)
+++
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java 2007-09-10
14:37:05 UTC (rev 3505)
@@ -55,7 +55,6 @@
private static String STYLE = "style=";
private static String OPEN_BRACKET = "{";
-
private static String CLOSE_BRACKET = "}";
private static String SPACE = " ";
@@ -64,6 +63,14 @@
private static String EMPTY_STRING = "";
+ private static String HTML = "html";
+ private static String XHTML = "xhtml";
+ private static String XML = "xml";
+ private static String JAVA = "java";
+ private static String CPP = "cpp";
+ private static String GROOVY = "groovy";
+ private static String LZX = "lzx";
+
private nsIDOMDocument visualDocument;
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
@@ -133,16 +140,14 @@
HashMap<String, String> map = new HashMap<String, String>();
- if (highlightValue.equalsIgnoreCase("html")
- || highlightValue.equalsIgnoreCase("xhtml")
- || highlightValue.equalsIgnoreCase("lzx"))
- highlightValue = "xml";
- if (highlightValue.equalsIgnoreCase("groovy")) {
- highlightValue = "java";
- }
- if (highlightValue.equalsIgnoreCase("c++")) {
- highlightValue = "cpp";
- }
+ if (highlightValue.equalsIgnoreCase(HTML)
+ || highlightValue.equalsIgnoreCase(XHTML)
+ || highlightValue.equalsIgnoreCase(LZX))
+ highlightValue = XML;
+ if (highlightValue.equalsIgnoreCase(GROOVY))
+ highlightValue = JAVA;
+ if (highlightValue.equalsIgnoreCase("c++"))
+ highlightValue = CPP;
String sym = "." + highlightValue + "_";
@@ -202,7 +207,7 @@
* value of highlight attribute
* @return true of highlight value correct
*/
-
+
private boolean serchInSupportedTypes(String highlightValue) {
if (highlightValue == null)
@@ -262,7 +267,7 @@
* @param data
* The arbitrary data, built by a method <code>create</code>
* @param name
- * Atrribute name
+ * Attribute name
* @param value
* Attribute value
* @return <code>true</code> if it is required to re-create an element at