Author: dgolovin
Date: 2010-04-15 20:06:02 -0400 (Thu, 15 Apr 2010)
New Revision: 21512
Removed:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/lib/
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/.classpath
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/build.properties
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1636 Code Review
Redundant jars removed from richfaces vpe templates
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/.classpath
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/.classpath 2010-04-15 23:52:06 UTC
(rev 21511)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/.classpath 2010-04-16 00:06:02 UTC
(rev 21512)
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry exported="true" kind="lib"
path="lib/jhighlight-1.0.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF 2010-04-15
23:52:06 UTC (rev 21511)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF 2010-04-16
00:06:02 UTC (rev 21512)
@@ -18,8 +18,7 @@
org.jboss.tools.vpe.xulrunner
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
-Bundle-ClassPath: lib/jhighlight-1.0.jar,
- .
+Bundle-ClassPath: .
Export-Package: org.jboss.tools.jsf.vpe.richfaces,
org.jboss.tools.jsf.vpe.richfaces.template.util
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/build.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/build.properties 2010-04-15
23:52:06 UTC (rev 21511)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/build.properties 2010-04-16
00:06:02 UTC (rev 21512)
@@ -5,7 +5,6 @@
resources/,\
templates/,\
plugin.xml,\
- lib/jhighlight-1.0.jar,\
plugin.properties,\
about.html
src.includes = src/,\
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java 2010-04-15
23:52:06 UTC (rev 21511)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java 2010-04-16
00:06:02 UTC (rev 21512)
@@ -40,9 +40,6 @@
import org.w3c.dom.Text;
import org.xml.sax.SAXException;
-import com.uwyn.jhighlight.renderer.Renderer;
-import com.uwyn.jhighlight.renderer.XhtmlRendererFactory;
-
/**
*
* @author ezheleznyakov(a)exadel.com
@@ -141,26 +138,16 @@
}
}
- if ((highlightValue == null) || (!searchInSupportedTypes(highlightValue))){
+ if (highlightValue == null) {
// finalStr = finalStr.replace('\n', ' ');
nsIDOMText text = visualDocument.createTextNode(finalStr);
div.appendChild(text);
return vpeCreationData;
}
- Renderer renderer = XhtmlRendererFactory.getRenderer(highlightValue);
- String transformStr = null;
- try {
- transformStr = renderer.highlight("", finalStr, UTF8, false);
//$NON-NLS-1$
- transformStr = convertString(transformStr, highlightValue);
- Node node = parseTransformString(transformStr);
- buildVisualNode(node, div);
- } catch (IOException e1) {
- div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, ERROR_MESSAGE_STYLE);
- nsIDOMText text = visualDocument.createTextNode(HIGHLIGHT_ERROR_MESSAGE);
- div.appendChild(text);
- return vpeCreationData;
- }
+ div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, ERROR_MESSAGE_STYLE);
+ nsIDOMText text = visualDocument.createTextNode(HIGHLIGHT_ERROR_MESSAGE);
+ div.appendChild(text);
return vpeCreationData;
}
@@ -241,30 +228,6 @@
/**
*
- * @param highlightValue
- * value of highlight attribute
- * @return true of highlight value correct
- */
-
- private boolean searchInSupportedTypes(String highlightValue) {
-
- if (highlightValue == null)
- return true;
-
- if (highlightValue.trim().equals(EMPTY_STRING))
- return false;
-
- Set<?> set = XhtmlRendererFactory.getSupportedTypes();
-
- for (Object object : set)
- if (highlightValue.equalsIgnoreCase((String) object))
- return true;
-
- return false;
- }
-
- /**
- *
* @param node
* @param el
* @return