Author: mareshkau
Date: 2007-11-02 15:58:52 -0400 (Fri, 02 Nov 2007)
New Revision: 4676
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1213, rich:dataTable was adjusted(was added
support of h:column, not only rich:column, and was added possability to show text, from
it's node)
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2007-11-02
19:58:46 UTC (rev 4675)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2007-11-02
19:58:52 UTC (rev 4676)
@@ -168,6 +168,14 @@
private Set<String> withoutWhitespaceContainerSet = new HashSet<String>();
private Set<String> withoutPseudoElementContainerSet = new
HashSet<String>();
+ /**
+ * Added by Max Areshkau(mareshkau(a)exadel.com)
+ * This property identify namespace which should be used to load some specific class.
+ * For example in rich:dataTable can be h:column, but rich:dataTable is separate
plugin,
+ * so to render h:column we should load the specific class for h:column from richfaces
template
+ */
+ private static final String
NAMESPACE_IDENTIFIER_ATTRIBUTE="namespaceIdentifier";
+
static {
// withoutWhitespaceContainer.
}
@@ -747,9 +755,17 @@
private VpeTemplate createTemplate(Element templateElement,IConfigurationElement
confElement, boolean caseSensitive) {
VpeTemplate template = null;
String templateClassName =
templateElement.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_CLASS);
+ String nameSpaceIdentifyer =
templateElement.getAttribute(VpeTemplateManager.NAMESPACE_IDENTIFIER_ATTRIBUTE);
if (templateClassName != null && templateClassName.length() > 0) {
try {
- Bundle bundle = Platform.getBundle(confElement.getNamespaceIdentifier());
+ Bundle bundle;
+ if(nameSpaceIdentifyer==null||nameSpaceIdentifyer.length()==0) {
+
+ bundle = Platform.getBundle(confElement.getNamespaceIdentifier());
+ } else {
+
+ bundle = Platform.getBundle(nameSpaceIdentifyer);
+ }
Class templateClass = bundle.loadClass(templateClassName);
template = (VpeTemplate)templateClass.newInstance();
} catch (Exception e) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml 2007-11-02
19:58:46 UTC (rev 4675)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml 2007-11-02
19:58:52 UTC (rev 4676)
@@ -1037,6 +1037,10 @@
<vpe:column title="{tagstring()}"/>
</vpe:template>
</vpe:if>
+ <vpe:if test="parentname()='rich:dataTable'">
+ <vpe:template children="yes" modify="yes"
namespaceIdentifier="org.jboss.tools.jsf.vpe.richfaces"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesColumnTemplate">
+ </vpe:template>
+ </vpe:if>
</vpe:tag>
<vpe:tag name="f:facet" case-sensitive="yes">