JBoss Tools SVN: r9731 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-08-14 14:36:19 -0400 (Thu, 14 Aug 2008)
New Revision: 9731
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/FontFamilyDialog.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2599
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/FontFamilyDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/FontFamilyDialog.java 2008-08-14 16:22:42 UTC (rev 9730)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/FontFamilyDialog.java 2008-08-14 18:36:19 UTC (rev 9731)
@@ -256,7 +256,8 @@
public void dragFinished(DragSourceEvent event) {
if (event.detail == DND.DROP_MOVE) {
int selectedItem = allFontFamilyList.getSelectionIndex();
- allFontFamilyList.remove(selectedItem);
+ if (allFontFamilyList.getItemCount() > selectedItem && selectedItem >=0)
+ allFontFamilyList.remove(selectedItem);
}
}
17 years, 4 months
JBoss Tools SVN: r9730 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.facelets/templates and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-08-14 12:22:42 -0400 (Thu, 14 Aug 2008)
New Revision: 9730
Added:
trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/
trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplateSchemeValidateTest.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/templates/vpe-templates-facelets.xml
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/templates/vpe-templates-myfaces.xml
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml
trunk/struts/plugins/org.jboss.tools.struts.vpe.struts/templates/vpe-templates-struts.xml
trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
trunk/vpe/plugins/org.jboss.tools.vpe.jsp/templates/vpe-templates-jsp.xml
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllTests.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1601
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2008-08-14 16:21:06 UTC (rev 9729)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2008-08-14 16:22:42 UTC (rev 9730)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<vpe:templates>
+<vpe:templates xmlns:vpe="http://www.w3.org/2001/XMLSchema-instance">
<vpe:template-taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" />
<vpe:template-taglib uri="http://richfaces.org/a4j" prefix="a4j" />
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/templates/vpe-templates-facelets.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/templates/vpe-templates-facelets.xml 2008-08-14 16:21:06 UTC (rev 9729)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/templates/vpe-templates-facelets.xml 2008-08-14 16:22:42 UTC (rev 9730)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<vpe:templates>
+<vpe:templates xmlns:vpe="http://www.w3.org/2001/XMLSchema-instance">
<vpe:template-taglib uri="http://java.sun.com/jsf/facelets" prefix="ui"/>
<vpe:tag name="ui:composition" case-sensitive="yes" >
@@ -34,14 +34,6 @@
<vpe:template class="org.jboss.tools.jsf.vpe.facelets.template.VpeInsertTemplate"/>
</vpe:tag>
- <vpe:tag name="ui:insert_" case-sensitive="yes" >
- <vpe:template children="yes" modify="yes">
- <div style="border: 1px solid gray">
- <div class="__any__tag__caption"><vpe:value expr="{@name}"/>:</div>
- </div>
- </vpe:template>
- </vpe:tag>
-
<vpe:tag name="ui.component" case-sensitive="yes">
<vpe:template children="yes" modify="yes">
<div style="border:1px dotted #FF6600;padding: 5px;" title="{tagstring()}"/>
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2008-08-14 16:21:06 UTC (rev 9729)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2008-08-14 16:22:42 UTC (rev 9730)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<vpe:templates>
+<vpe:templates xmlns:vpe="http://www.w3.org/2001/XMLSchema-instance">
<vpe:template-taglib uri="http://java.sun.com/jsf/html" prefix="h" />
<vpe:template-taglib uri="http://java.sun.com/jsf/core" prefix="f" />
@@ -786,11 +786,4 @@
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
-
- <!--
- Проблема с селектированием элемента: в мозилле селектируется заголовок а не рамка
- -->
- <vpe:template children="yes" modify="no">
- <vpe:any value="{name()}" title="{tagstring()}" />
- </vpe:template>
</vpe:templates>
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/templates/vpe-templates-myfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/templates/vpe-templates-myfaces.xml 2008-08-14 16:21:06 UTC (rev 9729)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/templates/vpe-templates-myfaces.xml 2008-08-14 16:22:42 UTC (rev 9730)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<vpe:templates>
+<vpe:templates xmlns:vpe="http://www.w3.org/2001/XMLSchema-instance">
<vpe:template-taglib uri="http://myfaces.apache.org/extensions" prefix="x" />
<vpe:tag name="x:checkbox" case-sensitive="yes">
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-08-14 16:21:06 UTC (rev 9729)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-08-14 16:22:42 UTC (rev 9730)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<vpe:templates>
+<vpe:templates xmlns:vpe="http://www.w3.org/2001/XMLSchema-instance">
<vpe:template-taglib uri="http://richfaces.org/rich" prefix="rich" />
<vpe:template-taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich" />
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml 2008-08-14 16:21:06 UTC (rev 9729)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml 2008-08-14 16:22:42 UTC (rev 9730)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<vpe:templates>
+<vpe:templates xmlns:vpe="http://www.w3.org/2001/XMLSchema-instance">
<vpe:template-taglib uri="http://jboss.com/products/seam/taglib"
prefix="s" />
Modified: trunk/struts/plugins/org.jboss.tools.struts.vpe.struts/templates/vpe-templates-struts.xml
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.vpe.struts/templates/vpe-templates-struts.xml 2008-08-14 16:21:06 UTC (rev 9729)
+++ trunk/struts/plugins/org.jboss.tools.struts.vpe.struts/templates/vpe-templates-struts.xml 2008-08-14 16:22:42 UTC (rev 9730)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<vpe:templates>
+<vpe:templates xmlns:vpe="http://www.w3.org/2001/XMLSchema-instance">
<vpe:template-taglib uri="http://struts.apache.org/tags-html"
prefix="html" />
<vpe:template-taglib
@@ -288,8 +288,7 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <textFormatting use-default-formats="yes">
- </textFormatting>
+ <textFormatting use-default-formats="yes"/>
</vpe:template>
</vpe:tag>
@@ -306,39 +305,6 @@
</vpe:template>
</vpe:tag>
- <vpe:tag name="html:reset_" case-sensitive="yes">
- <vpe:if test="@value=''">
- <vpe:template children="yes" modify="yes">
- <input type="button" value="Reset" class="{@styleClass}"
- style="{@style}" title="{tagstring()}"/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="no" />
- </vpe:dnd>
- <textFormatting use-default-formats="yes">
- </textFormatting>
- </vpe:template>
- </vpe:if>
- <vpe:template children="yes" modify="yes">
- <input type="button" value="{@value}" class="{@styleClass}"
- style="{@style}" title="{tagstring()}"/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="no" />
- </vpe:dnd>
- <textFormatting use-default-formats="yes">
- </textFormatting>
- </vpe:template>
- </vpe:tag>
-
<vpe:tag name="html:reset" case-sensitive="yes">
<vpe:if test="@value=''">
<vpe:if test="hascontent()">
@@ -353,8 +319,7 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <textFormatting use-default-formats="yes">
- </textFormatting>
+ <textFormatting use-default-formats="yes"/>
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="yes">
@@ -368,8 +333,7 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <textFormatting use-default-formats="yes">
- </textFormatting>
+ <textFormatting use-default-formats="yes"/>
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="yes">
@@ -383,8 +347,7 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <textFormatting use-default-formats="yes">
- </textFormatting>
+ <textFormatting use-default-formats="yes"/>
</vpe:template>
</vpe:tag>
@@ -401,8 +364,7 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="yes" />
</vpe:dnd>
- <textFormatting use-default-formats="yes">
- </textFormatting>
+ <textFormatting use-default-formats="yes"/>
</vpe:template>
</vpe:tag>
@@ -420,8 +382,7 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <textFormatting use-default-formats="yes">
- </textFormatting>
+ <textFormatting use-default-formats="yes"/>
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="yes">
@@ -435,8 +396,7 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <textFormatting use-default-formats="yes">
- </textFormatting>
+ <textFormatting use-default-formats="yes"/>
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="yes">
@@ -450,8 +410,7 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <textFormatting use-default-formats="yes">
- </textFormatting>
+ <textFormatting use-default-formats="yes"/>
</vpe:template>
</vpe:tag>
@@ -469,8 +428,7 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <textFormatting use-default-formats="yes">
- </textFormatting>
+ <textFormatting use-default-formats="yes"/>
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="yes">
@@ -484,8 +442,7 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <textFormatting use-default-formats="yes">
- </textFormatting>
+ <textFormatting use-default-formats="yes"/>
</vpe:template>
</vpe:tag>
@@ -504,8 +461,7 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <textFormatting use-default-formats="yes">
- </textFormatting>
+ <textFormatting use-default-formats="yes"/>
</vpe:template>
</vpe:tag>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2008-08-14 16:21:06 UTC (rev 9729)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2008-08-14 16:22:42 UTC (rev 9730)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<vpe:templates>
+<vpe:templates xmlns:vpe="http://www.w3.org/2001/XMLSchema-instance">
<vpe:tag name="a" case-sensitive="no">
<vpe:template children="yes" modify="yes">
<vpe:a class="{@class}" style="{@style}"/>
@@ -2143,8 +2143,4 @@
class="org.jboss.tools.vpe.html.template.HtmlTextTemplate">
</vpe:template>
</vpe:tag>
-
- <vpe:template children="yes" modify="yes">
- <vpe:any value="{name()}" title="{tagstring()}" />
- </vpe:template>
</vpe:templates>
\ No newline at end of file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.jsp/templates/vpe-templates-jsp.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.jsp/templates/vpe-templates-jsp.xml 2008-08-14 16:21:06 UTC (rev 9729)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.jsp/templates/vpe-templates-jsp.xml 2008-08-14 16:22:42 UTC (rev 9730)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<vpe:templates>
+<vpe:templates xmlns:vpe="http://www.w3.org/2001/XMLSchema-instance">
<vpe:tag name="jsp:declaration" case-sensitive="yes">
<vpe:template children="no" modify="no">
Added: trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd 2008-08-14 16:22:42 UTC (rev 9730)
@@ -0,0 +1,516 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.w3.org/2001/XMLSchema-instance" xmlns:vpe="http://www.w3.org/2001/XMLSchema-instance">
+ <xs:element name="templates">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="vpe:template-taglib"/>
+ <xs:element maxOccurs="unbounded" ref="vpe:tag"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="template-taglib">
+ <xs:complexType>
+ <xs:attribute name="prefix" use="required" type="xs:NCName"/>
+ <xs:attribute name="uri" use="required" type="xs:anyURI"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="tag">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:choice>
+ <xs:element ref="vpe:copy"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="vpe:if"/>
+ </xs:choice>
+ <xs:element minOccurs="0" ref="vpe:template"/>
+ </xs:sequence>
+ <xs:attribute name="case-sensetive" type="xs:NCName"/>
+ <xs:attribute name="case-sensitive" type="xs:NCName"/>
+ <xs:attribute name="haveVisualPreview" type="xs:NCName"/>
+ <xs:attribute name="name" use="required" type="xs:anyURI"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="copy">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="vpe:attribute"/>
+ </xs:sequence>
+ <xs:attribute name="attrs"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="attribute">
+ <xs:complexType>
+ <xs:attribute name="name" use="required" type="xs:NCName"/>
+ <xs:attribute name="value" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="if">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="vpe:if"/>
+ <xs:element minOccurs="0" ref="vpe:template"/>
+ <xs:element minOccurs="0" ref="vpe:textFormatting"/>
+ </xs:sequence>
+ <xs:attribute name="test" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="template">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="span" form="unqualified">
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:group ref="vpe:input"/>
+ <xs:element ref="vpe:value"/>
+ </xs:choice>
+ <xs:attribute name="class"/>
+ <xs:attribute name="dir"/>
+ <xs:attribute name="style" type="xs:anyURI"/>
+ <xs:attribute name="title"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:choice minOccurs="0">
+ <xs:element ref="vpe:jsproot"/>
+ <xs:element ref="vpe:taglib"/>
+ </xs:choice>
+ <xs:choice minOccurs="0">
+ <xs:element name="button" form="unqualified">
+ <xs:complexType mixed="true">
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="vpe:value"/>
+ </xs:sequence>
+ <xs:attribute name="class" use="required"/>
+ <xs:attribute name="style" use="required"/>
+ <xs:attribute name="title" use="required"/>
+ <xs:attribute name="value"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="label" form="unqualified">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="vpe:value"/>
+ </xs:sequence>
+ <xs:attribute name="class" use="required"/>
+ <xs:attribute name="for" use="required"/>
+ <xs:attribute name="style" use="required"/>
+ <xs:attribute name="title" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:element minOccurs="0" ref="vpe:grid"/>
+ <xs:choice minOccurs="0">
+ <xs:group ref="vpe:td"/>
+ <xs:element ref="vpe:copy"/>
+ <xs:element ref="vpe:panelgrid"/>
+ </xs:choice>
+ <xs:choice minOccurs="0">
+ <xs:group ref="vpe:option"/>
+ <xs:element ref="vpe:style"/>
+ </xs:choice>
+ <xs:choice minOccurs="0">
+ <xs:group ref="vpe:textarea"/>
+ <xs:element name="nobr" form="unqualified">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element ref="vpe:value"/>
+ <xs:group maxOccurs="unbounded" ref="vpe:input"/>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:choice minOccurs="0">
+ <xs:element ref="vpe:any"/>
+ <xs:element ref="vpe:load-bundle"/>
+ </xs:choice>
+ <xs:element minOccurs="0" name="img" form="unqualified">
+ <xs:complexType>
+ <xs:attribute name="alt"/>
+ <xs:attribute name="border"/>
+ <xs:attribute name="class"/>
+ <xs:attribute name="height"/>
+ <xs:attribute name="src" use="required"/>
+ <xs:attribute name="style"/>
+ <xs:attribute name="title"/>
+ <xs:attribute name="width"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:choice minOccurs="0">
+ <xs:element ref="vpe:column"/>
+ <xs:element ref="vpe:link"/>
+ </xs:choice>
+ <xs:group minOccurs="0" ref="vpe:select"/>
+ <xs:element minOccurs="0" ref="vpe:panellayout"/>
+ <xs:element minOccurs="0" ref="vpe:a"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:group ref="vpe:div"/>
+ <xs:group ref="vpe:input"/>
+ <xs:element ref="vpe:datatable"/>
+ <xs:element ref="vpe:dnd"/>
+ <xs:element ref="vpe:resize"/>
+ </xs:choice>
+ <xs:choice minOccurs="0">
+ <xs:group ref="vpe:table"/>
+ <xs:element name="textFormatting" form="unqualified">
+ <xs:complexType>
+ <xs:attribute name="use-default-formats" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:choice minOccurs="0">
+ <xs:element ref="vpe:breaker"/>
+ <xs:element ref="vpe:list"/>
+ <xs:sequence>
+ <xs:element ref="vpe:drag"/>
+ <xs:element ref="vpe:drop"/>
+ </xs:sequence>
+ </xs:choice>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="vpe:textFormatting"/>
+ <xs:element ref="vpe:pseudoContent"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute name="children" type="xs:NCName"/>
+ <xs:attribute name="class"/>
+ <xs:attribute name="file"/>
+ <xs:attribute name="hasImaginaryBorder" type="xs:NCName"/>
+ <xs:attribute name="modify" type="xs:NCName"/>
+ <xs:attribute name="namespaceIdentifier"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="jsproot">
+ <xs:complexType/>
+ </xs:element>
+ <xs:element name="taglib">
+ <xs:complexType/>
+ </xs:element>
+ <xs:element name="grid">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="vpe:value"/>
+ <xs:group minOccurs="0" ref="vpe:input"/>
+ </xs:sequence>
+ <xs:attribute name="border"/>
+ <xs:attribute name="class"/>
+ <xs:attribute name="disabled" type="xs:boolean"/>
+ <xs:attribute name="layout"/>
+ <xs:attribute name="style"/>
+ <xs:attribute name="title" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="panelgrid">
+ <xs:complexType>
+ <xs:attribute name="bgcolor" use="required"/>
+ <xs:attribute name="border" use="required"/>
+ <xs:attribute name="captionClass" use="required"/>
+ <xs:attribute name="captionStyle" use="required"/>
+ <xs:attribute name="cellpadding" use="required"/>
+ <xs:attribute name="cellspacing" use="required"/>
+ <xs:attribute name="class" use="required"/>
+ <xs:attribute name="columnClasses" use="required"/>
+ <xs:attribute name="dir" use="required"/>
+ <xs:attribute name="footerClass" use="required"/>
+ <xs:attribute name="frame" use="required"/>
+ <xs:attribute name="headerClass" use="required"/>
+ <xs:attribute name="rowClasses" use="required"/>
+ <xs:attribute name="rules" use="required"/>
+ <xs:attribute name="style" use="required"/>
+ <xs:attribute name="table-size" use="required"/>
+ <xs:attribute name="title" use="required"/>
+ <xs:attribute name="width" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="style">
+ <xs:complexType/>
+ </xs:element>
+ <xs:element name="any">
+ <xs:complexType>
+ <xs:attribute name="display" use="required" type="xs:NCName"/>
+ <xs:attribute name="title" use="required"/>
+ <xs:attribute name="value" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="load-bundle">
+ <xs:complexType/>
+ </xs:element>
+ <xs:element name="column">
+ <xs:complexType>
+ <xs:attribute name="title" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="link">
+ <xs:complexType>
+ <xs:attribute name="href" use="required"/>
+ <xs:attribute name="rel" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="panellayout">
+ <xs:complexType/>
+ </xs:element>
+ <xs:element name="a">
+ <xs:complexType>
+ <xs:attribute name="class" use="required"/>
+ <xs:attribute name="dir"/>
+ <xs:attribute name="style" use="required"/>
+ <xs:attribute name="title" use="optional"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="datatable">
+ <xs:complexType>
+ <xs:attribute name="bgcolor" use="required"/>
+ <xs:attribute name="border" use="required"/>
+ <xs:attribute name="cellpadding" use="required"/>
+ <xs:attribute name="cellspacing" use="required"/>
+ <xs:attribute name="class" use="required"/>
+ <xs:attribute name="columnClasses" use="required"/>
+ <xs:attribute name="dir"/>
+ <xs:attribute name="footerClass" use="required"/>
+ <xs:attribute name="frame" use="required"/>
+ <xs:attribute name="headerClass" use="required"/>
+ <xs:attribute name="height"/>
+ <xs:attribute name="rowClasses" use="required"/>
+ <xs:attribute name="rules" use="required"/>
+ <xs:attribute name="style" use="required"/>
+ <xs:attribute name="title" use="required"/>
+ <xs:attribute name="width"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="dnd">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="vpe:drag"/>
+ <xs:element minOccurs="0" ref="vpe:drop"/>
+ <xs:element minOccurs="0" ref="vpe:container-child"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="resize">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="vpe:width"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="vpe:height"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="width">
+ <xs:complexType>
+ <xs:attribute name="disable-absolute-position" type="xs:NCName"/>
+ <xs:attribute name="width-attr" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="height">
+ <xs:complexType>
+ <xs:attribute name="disable-absolute-position" type="xs:NCName"/>
+ <xs:attribute name="height-attr" use="required" type="xs:NCName"/>
+ <xs:attribute name="tag-xpath" type="xs:NCName"/>
+ <xs:attribute name="test"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="breaker">
+ <xs:complexType>
+ <xs:attribute name="type" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="list">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="vpe:value"/>
+ </xs:sequence>
+ <xs:attribute name="class" use="required"/>
+ <xs:attribute name="ordered" use="required"/>
+ <xs:attribute name="style" use="required"/>
+ <xs:attribute name="title" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="pseudoContent">
+ <xs:complexType>
+ <xs:attribute name="attrName" type="xs:NCName"/>
+ <xs:attribute name="defaultText" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="textFormatting">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="vpe:format"/>
+ </xs:sequence>
+ <xs:attribute name="use-default-formats" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="format">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="vpe:formatAttribute"/>
+ </xs:sequence>
+ <xs:attribute name="addChildren" type="xs:NCName"/>
+ <xs:attribute name="addParent" type="xs:NCName"/>
+ <xs:attribute name="handler"/>
+ <xs:attribute name="setDefault" type="xs:boolean"/>
+ <xs:attribute name="type" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="formatAttribute">
+ <xs:complexType>
+ <xs:attribute name="type" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:group name="input">
+ <xs:sequence>
+ <xs:element name="input" form="unqualified">
+ <xs:complexType>
+ <xs:attribute name="border"/>
+ <xs:attribute name="checked"/>
+ <xs:attribute name="class"/>
+ <xs:attribute name="dir"/>
+ <xs:attribute name="disabled" type="xs:NCName"/>
+ <xs:attribute name="size"/>
+ <xs:attribute name="src"/>
+ <xs:attribute name="style"/>
+ <xs:attribute name="title"/>
+ <xs:attribute name="type"/>
+ <xs:attribute name="value"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:group>
+ <xs:element name="value">
+ <xs:complexType>
+ <xs:attribute name="expr" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:group name="td">
+ <xs:sequence>
+ <xs:element name="td" form="unqualified">
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="vpe:value"/>
+ <xs:element name="a" form="unqualified">
+ <xs:complexType mixed="true">
+ <xs:attribute name="href" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:attribute name="class"/>
+ <xs:attribute name="colspan" type="xs:integer"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:group>
+ <xs:group name="option">
+ <xs:sequence>
+ <xs:element name="option" form="unqualified">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="vpe:value"/>
+ </xs:sequence>
+ <xs:attribute name="title"/>
+ <xs:attribute name="value" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:group>
+ <xs:group name="textarea">
+ <xs:sequence>
+ <xs:element name="textarea" form="unqualified">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="vpe:value"/>
+ </xs:sequence>
+ <xs:attribute name="class" use="required"/>
+ <xs:attribute name="cols"/>
+ <xs:attribute name="disabled" type="xs:boolean"/>
+ <xs:attribute name="rows" use="required"/>
+ <xs:attribute name="style" use="required"/>
+ <xs:attribute name="title" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:group>
+ <xs:group name="select">
+ <xs:sequence>
+ <xs:element name="select" form="unqualified">
+ <xs:complexType>
+ <xs:choice minOccurs="0">
+ <xs:group ref="vpe:option"/>
+ <xs:element ref="vpe:value"/>
+ </xs:choice>
+ <xs:attribute name="class"/>
+ <xs:attribute name="dir"/>
+ <xs:attribute name="disabled" type="xs:boolean"/>
+ <xs:attribute name="multiple" type="xs:NCName"/>
+ <xs:attribute name="size"/>
+ <xs:attribute name="style"/>
+ <xs:attribute name="title"/>
+ <xs:attribute name="value"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:group>
+ <xs:element name="drag">
+ <xs:complexType>
+ <xs:attribute name="start-enable" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="drop">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="vpe:container-child"/>
+ </xs:sequence>
+ <xs:attribute name="container" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="container-child">
+ <xs:complexType>
+ <xs:attribute name="tag-name" use="required" type="xs:anyURI"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:group name="div">
+ <xs:sequence>
+ <xs:element name="div" form="unqualified">
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:group ref="vpe:div"/>
+ <xs:group ref="vpe:input"/>
+ <xs:group ref="vpe:select"/>
+ <xs:group ref="vpe:table"/>
+ <xs:group ref="vpe:textarea"/>
+ <xs:element ref="vpe:value"/>
+ <xs:element name="b" form="unqualified">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="vpe:value"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:attribute name="action"/>
+ <xs:attribute name="bgcolor"/>
+ <xs:attribute name="border"/>
+ <xs:attribute name="class"/>
+ <xs:attribute name="cols"/>
+ <xs:attribute name="onclick"/>
+ <xs:attribute name="rendered"/>
+ <xs:attribute name="rows"/>
+ <xs:attribute name="size"/>
+ <xs:attribute name="style"/>
+ <xs:attribute name="title"/>
+ <xs:attribute name="width"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:group>
+ <xs:group name="table">
+ <xs:sequence>
+ <xs:element name="table" form="unqualified">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" name="tr" form="unqualified">
+ <xs:complexType>
+ <xs:group maxOccurs="unbounded" ref="vpe:td"/>
+ <xs:attribute name="class"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="cellspacing" type="xs:integer"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:group>
+</xs:schema>
Added: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplateSchemeValidateTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplateSchemeValidateTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/TemplateSchemeValidateTest.java 2008-08-14 16:22:42 UTC (rev 9730)
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.test;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.vpe.VpePlugin;
+import org.osgi.framework.Bundle;
+import org.w3c.dom.Document;
+
+/**
+ * JUnit Test for scheme validate template
+ *
+ * @author Dzmitry Sakovich
+ */
+public class TemplateSchemeValidateTest extends TestCase {
+ /**
+ * Extension point ID
+ */
+ private static final String COM_REDHAT_VPE_TEMPLATES = "org.jboss.tools.vpe.templates";
+
+ private static final String SCHEME_PATH = "/scheme/scheme.xsd";
+
+ /**
+ * Test for load all templates
+ */
+ public void testParseTemplates() {
+ //
+
+ Bundle bundle = VpeTestPlugin.getDefault().getBundle();
+ URL url = null;
+ try {
+ url = bundle == null ? null : FileLocator.resolve(bundle
+ .getEntry(SCHEME_PATH));
+ File schemeFile = new File(url.getPath());
+ if (!schemeFile.exists() || !schemeFile.isFile()) {
+ fail("scheme is not exist");
+ }
+
+ IExtensionRegistry extensionRepository = Platform
+ .getExtensionRegistry();
+
+ IExtensionPoint extensionPoint = extensionRepository
+ .getExtensionPoint(COM_REDHAT_VPE_TEMPLATES);
+ IExtension[] extensions = extensionPoint.getExtensions();
+
+ // iterate for all extensions
+ for (int i = 0; i < extensions.length; i++) {
+ IExtension extension = extensions[i];
+ IConfigurationElement[] elements = extension
+ .getConfigurationElements();
+ for (int j = 0; j < elements.length; j++) {
+ String pathAttrValue = elements[j].getAttribute("path");
+
+ IPath templateFile = getFullpathForConfigurationElement(
+ pathAttrValue, elements[j]);
+
+ File file = templateFile.toFile();
+ if (file.exists() && file.isFile()) {
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory
+ .newInstance();
+ docFactory.setNamespaceAware(true);
+ DocumentBuilder parser = docFactory
+ .newDocumentBuilder();
+
+ Document document = parser.parse(file);
+ SchemaFactory factory = SchemaFactory
+ .newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+
+ Source schemaFile = new StreamSource(schemeFile);
+ Schema schema = factory.newSchema(schemaFile);
+ Validator validator = schema.newValidator();
+ validator.validate(new DOMSource(document));
+ }
+
+ }
+ }
+
+ } catch (Exception exception) {
+ fail(exception.getMessage());
+ }
+ }
+
+ /**
+ * Get a full path for IConfigurationElement
+ *
+ * @param fileName
+ * a String contain relevant fileName
+ * @param confElement
+ * a IConfigurationElement
+ * @return full path for IConfigurationElement
+ * @throws IOException
+ * if an error occurs during the conversion
+ */
+ private static IPath getFullpathForConfigurationElement(String name,
+ IConfigurationElement confElement) throws IOException {
+ // 1. get a shared instance
+ VpePlugin plugin = VpePlugin.getDefault();
+
+ Bundle bundle = null;
+
+ if (confElement == null) {
+ bundle = plugin.getBundle();
+ } else {
+ bundle = Platform.getBundle(confElement.getNamespaceIdentifier());
+ }
+
+ URL url = bundle.getEntry("/");
+
+ IPath path = new Path(FileLocator.toFileURL(url).getFile());
+ path = path.append(name);
+ return path;
+ }
+
+}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllTests.java 2008-08-14 16:21:06 UTC (rev 9729)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/VpeAllTests.java 2008-08-14 16:22:42 UTC (rev 9730)
@@ -37,6 +37,7 @@
TestSuite suite = new TestSuite("Tests for vpe");
// $JUnit-BEGIN$
suite.addTestSuite(TemplateLoadingTest.class);
+ suite.addTestSuite(TemplateSchemeValidateTest.class);
suite.addTestSuite(TemplatesExpressionParsingTest.class);
suite.addTestSuite(VpeEditorPreferencesPageTest.class);
suite.addTestSuite(VpeTemplateManagerTest.class);
17 years, 4 months
JBoss Tools SVN: r9729 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-08-14 12:21:06 -0400 (Thu, 14 Aug 2008)
New Revision: 9729
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2637
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java 2008-08-14 15:20:30 UTC (rev 9728)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java 2008-08-14 16:21:06 UTC (rev 9729)
@@ -1430,7 +1430,8 @@
NodeData nodeData = getNodeData(lastSelectedNode, elementMapping
.getElementData(), pageContext.getDomMapping());
- if (nodeData != null && nodeData.getSourceNode() != null)
+ if (nodeData != null && nodeData.getSourceNode() != null
+ && nodeData.getSourceNode().getNodeValue() != null)
return pageContext.getBundle().openBundle(
nodeData.getSourceNode().getNodeValue(),
NodesManagingUtil.getPageLocale(pageContext, nodeData
17 years, 4 months
JBoss Tools SVN: r9728 - tags/jbosstools-3.0.0.Alpha1.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-08-14 11:20:30 -0400 (Thu, 14 Aug 2008)
New Revision: 9728
Added:
tags/jbosstools-3.0.0.Alpha1/hibernatetools/
Log:
retagging core and hibernatetools components.
Copied: tags/jbosstools-3.0.0.Alpha1/hibernatetools (from rev 9727, trunk/hibernatetools)
17 years, 4 months
JBoss Tools SVN: r9727 - tags/jbosstools-3.0.0.Alpha1.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-08-14 11:20:26 -0400 (Thu, 14 Aug 2008)
New Revision: 9727
Added:
tags/jbosstools-3.0.0.Alpha1/core/
Log:
retagging core and hibernatetools components.
Copied: tags/jbosstools-3.0.0.Alpha1/core (from rev 9726, trunk/core)
17 years, 4 months
JBoss Tools SVN: r9726 - tags/jbosstools-3.0.0.Alpha1.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-08-14 11:20:07 -0400 (Thu, 14 Aug 2008)
New Revision: 9726
Removed:
tags/jbosstools-3.0.0.Alpha1/core/
tags/jbosstools-3.0.0.Alpha1/hibernatetools/
Log:
retagging core and hibernatetools components.
17 years, 4 months
JBoss Tools SVN: r9725 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test: resources/jsfTest/WebContent/pages/JBIDE/2624 and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-08-14 09:27:22 -0400 (Thu, 14 Aug 2008)
New Revision: 9725
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2624/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2624/greeting.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2624/templates/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2624/templates/common.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2624.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
Log:
Completed JBIDE2624 and write junit.
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2624/greeting.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2624/greeting.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2624/greeting.xhtml 2008-08-14 13:27:22 UTC (rev 9725)
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <f:loadBundle basename="resources" var="msg" />
+ <ui:composition template="common.xhtml">
+ <ui:define name="pageTitle">Greeting to User</ui:define>
+ <ui:define name="pageHeader">Greeting Page</ui:define>
+ <ui:define name="body">
+ #{msg.greeting} #{person.name}!
+ </ui:define>
+ </ui:composition>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2624/greeting.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2624/templates/common.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2624/templates/common.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2624/templates/common.xhtml 2008-08-14 13:27:22 UTC (rev 9725)
@@ -0,0 +1,65 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <f:loadBundle basename="resources" var="msg" />
+ <head>
+ <title><ui:insert name="pageTitle">Page Title</ui:insert></title>
+ <style type="text/css">
+ body {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 14px;
+ }
+ .header {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 18px;
+ }
+ .bottom {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 9px;
+ text-align: center;
+ vertical-align: middle;
+ color: #8E969D;
+ }
+ </style>
+ </head>
+
+<body bgcolor="#ffffff">
+<table style="border:1px solid #CAD6E0" align="center" cellpadding="0" cellspacing="0" border="0" width="400">
+<tbody>
+
+ <tr>
+ <td class="header" height="42" align="center" valign="middle" width="100%" bgcolor="#E4EBEB">
+ <ui:insert name="pageHeader">Page Header</ui:insert>
+ </td>
+ </tr>
+ <tr>
+ <td height="1" width="100%" bgcolor="#CAD6E0"></td>
+ </tr>
+
+ <tr>
+ <td width="100%" colspan="2">
+ <table width="100%" style="height:150px" align="left" cellpadding="0" cellspacing="0" border="0">
+ <tbody>
+ <tr>
+ <td align="center" width="100%" valign="middle">
+
+ <ui:insert name="body">Page Body</ui:insert>
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2" valign="bottom" height="1" width="100%" bgcolor="#CAD6E0"></td>
+ </tr>
+</tbody>
+</table>
+</body>
+
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2624/templates/common.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-08-14 13:27:02 UTC (rev 9724)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-08-14 13:27:22 UTC (rev 9725)
@@ -35,6 +35,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2582Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2584Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2594Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2624;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE675Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE788Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE924Test;
@@ -92,6 +93,7 @@
suite.addTestSuite(JBIDE2594Test.class);
suite.addTestSuite(JBIDE924Test.class);
suite.addTestSuite(JBIDE2526Test.class);
+ suite.addTestSuite(JBIDE2624.class);
// $JUnit-END$
// added by Max Areshkau
// add here projects which should be imported for junit tests
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2624.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2624.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2624.java 2008-08-14 13:27:22 UTC (rev 9725)
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.css.AbsoluteFolderReferenceList;
+import org.jboss.tools.vpe.editor.css.RelativeFolderReferenceList;
+import org.jboss.tools.vpe.editor.css.ResourceReference;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+
+
+/**
+ * Test case for testing JBIDE-2624
+ *
+ * @author Eugene Stherbin
+ *
+ */
+public class JBIDE2624 extends VpeTest {
+
+ /**
+ * @param name
+ */
+ public JBIDE2624(String name) {
+ super(name);
+ }
+
+ public void testJBide2624() throws CoreException {
+ // get test page path
+ setException(null);
+ IFile file = (IFile) TestUtil.getComponentPath("JBIDE/2624/greeting.xhtml", //$NON-NLS-1$
+ JsfAllTests.IMPORT_PROJECT_NAME);
+ assertNotNull("Could not open specified file " + file.getFullPath(), //$NON-NLS-1$
+ file);
+
+ IEditorInput input = new FileEditorInput(file);
+
+ assertNotNull("Editor input is null", input); //$NON-NLS-1$
+
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
+
+ VpeController vpeController = getVpeController(part);
+
+ nsIDOMDocument document = getVpeVisualDocument(part);
+
+ nsIDOMElement element = document.getDocumentElement();
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ TestUtil.findAllElementsByName(element, elements, HTML.TAG_TABLE);
+
+ assertTrue("Faceletes loaded, but shouldn't", elements.size() == 0); //$NON-NLS-1$
+ ResourceReference[] resourceReference = new ResourceReference[1];
+ resourceReference[0] = new ResourceReference(file.getParent().getLocation().toString() + File.separator + "templates",
+ ResourceReference.PROJECT_SCOPE);
+ RelativeFolderReferenceList.getInstance().setAllResources(file, resourceReference);
+ TestUtil.delay(1000);
+ vpeController.visualRefresh();
+ TestUtil.delay(1000);
+ document = getVpeVisualDocument(part);
+ element = document.getDocumentElement();
+ elements = new ArrayList<nsIDOMNode>();
+ TestUtil.findAllElementsByName(element, elements, HTML.TAG_TABLE);
+
+ assertTrue("Faceletes wasn't loaded from specified path", elements.size() >= 1); //$NON-NLS-1$
+
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2624.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
17 years, 4 months
JBoss Tools SVN: r9724 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-08-14 09:27:02 -0400 (Thu, 14 Aug 2008)
New Revision: 9724
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
Log:
Completed JBIDE2624 and write junit.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2008-08-14 12:59:16 UTC (rev 9723)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2008-08-14 13:27:02 UTC (rev 9724)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.util;
+import java.io.File;
+
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
@@ -26,12 +28,14 @@
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-
-import org.jboss.tools.common.model.*;
+import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.vpe.VpeDebug;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.css.AbsoluteFolderReferenceList;
+import org.jboss.tools.vpe.editor.css.RelativeFolderReferenceList;
import org.jboss.tools.vpe.editor.css.ResourceReference;
@@ -98,12 +102,28 @@
}catch (Exception ex) {
// do nothing that means include will shown as text region with included file name
}
- } else {
- IPath currentFolder = includeFile.getParent().getFullPath();
- IPath path = currentFolder.append(fileName);
- file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- }
- return file;
+ } else {
+ try {
+ ResourceReference[] resources = RelativeFolderReferenceList.getInstance().getAllResources(includeFile);
+ if ((resources != null) && resources.length == 1) {
+ String location = resources[0].getLocation() + File.separator+fileName;
+ IPath path = new Path(location);
+ //new File(location);
+ return ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path);//ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path);
+ } else {
+
+ IPath currentFolder = includeFile.getParent().getFullPath();
+ IPath path = currentFolder.append(fileName);
+ file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ }
+ } catch (Exception e) {
+ if(VpeDebug.USE_PRINT_STACK_TRACE){
+ e.printStackTrace();
+ }
+ return null;
+ }
+ }
+ return file;
}
/**
17 years, 4 months
JBoss Tools SVN: r9723 - trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-08-14 08:59:16 -0400 (Thu, 14 Aug 2008)
New Revision: 9723
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2612
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java 2008-08-14 12:20:41 UTC (rev 9722)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java 2008-08-14 12:59:16 UTC (rev 9723)
@@ -33,6 +33,7 @@
import org.jboss.tools.common.gef.figures.xpl.CustomLocator;
import org.jboss.tools.seam.ui.pages.editor.PagesEditor;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Page;
import org.jboss.tools.seam.ui.pages.editor.figures.ConnectionFigure;
import org.jboss.tools.seam.ui.pages.editor.figures.FigureFactory;
@@ -52,6 +53,8 @@
private CustomLocator pathLocator;
private GEFLabel pathLabel;
+
+ private PageEditPart pagePart = null;
public void activate() {
if (!isActive()) {
@@ -59,6 +62,16 @@
}
super.activate();
addEditPartListener(this);
+ Page page=null;
+ if(getLinkModel().getFromElement() instanceof Page)
+ page = (Page)getLinkModel().getFromElement();
+ if(page != null){
+ //pagePart = (PageEditPart)getViewer().getEditPartRegistry().get(page);
+ if(pagePart != null){
+ getLinkFigure().setVisible(false);
+ pagePart.addEditPartListener(this);
+ }
+ }
}
public void activateFigure() {
@@ -138,6 +151,8 @@
}
public void deactivate() {
+ if(pagePart != null)
+ pagePart.removeEditPartListener(this);
removeEditPartListener(this);
//getLink().removePropertyChangeListener(this);
if (isActive()) {
@@ -235,9 +250,14 @@
}
public void selectedStateChanged(EditPart editpart) {
- if (this.getSelected() == EditPart.SELECTED_PRIMARY) {
+ if(editpart == pagePart){
+ if(pagePart.getSelected() == EditPart.SELECTED_PRIMARY){
+ getFigure().setVisible(true);
+ }else
+ getFigure().setVisible(false);
+ }
+ if (editpart == this && this.getSelected() == EditPart.SELECTED_PRIMARY) {
((GEFRootEditPart) getParent()).setToFront(this);
-
}
}
17 years, 4 months
JBoss Tools SVN: r9722 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: console/wizards and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-08-14 08:20:41 -0400 (Thu, 14 Aug 2008)
New Revision: 9722
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java
Log:
JBIDE-2608
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2008-08-14 12:19:46 UTC (rev 9721)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2008-08-14 12:20:41 UTC (rev 9722)
@@ -203,6 +203,7 @@
public static String ConsoleConfigurationWizardPage_name_must_specified;
public static String ConsoleConfigurationWizardPage_naming_strategy;
public static String ConsoleConfigurationWizardPage_need_to_specify_classpath;
+ public static String ConsoleConfigurationWizardPage_both_hibernate_properties_and_hibernate_cfg_xml;
public static String ConsoleConfigurationWizardPage_need_to_specify_project;
public static String ConsoleConfigurationWizardPage_persistence_unit;
public static String ConsoleConfigurationWizardPage_problem_while_initializing_cc;
@@ -424,6 +425,7 @@
public static String ConsoleConfigurationMainTab_choose_file_to_use_as_hibernate_properties;
public static String ConsoleConfigurationMainTab_configuration_file;
public static String ConsoleConfigurationMainTab_configuration_file_2;
+ public static String ConsoleConfigurationMainTab_both_hibernate_properties_and_hibernate_cfg_xml;
public static String ConsoleConfigurationMainTab_core;
public static String ConsoleConfigurationMainTab_create_hibernate_properties_file;
public static String ConsoleConfigurationMainTab_create_new;
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2008-08-14 12:19:46 UTC (rev 9721)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2008-08-14 12:20:41 UTC (rev 9722)
@@ -194,6 +194,7 @@
ConsoleConfigurationWizardPage_name_must_specified=A name must be specified
ConsoleConfigurationWizardPage_naming_strategy=&Naming strategy:
ConsoleConfigurationWizardPage_need_to_specify_classpath=Need to specify a classpath when not using a project classpath
+ConsoleConfigurationWizardPage_both_hibernate_properties_and_hibernate_cfg_xml=If you have both 'Property file' and 'Configuration file', the settings of 'Configuration file' will override the settings used in 'Property file'.
ConsoleConfigurationWizardPage_need_to_specify_project=Need to specify a project or setup a classpath
ConsoleConfigurationWizardPage_persistence_unit=&Persistence unit:
ConsoleConfigurationWizardPage_problem_while_initializing_cc=Problem while initializing ConsoleConfigurationWizardPage
@@ -415,6 +416,7 @@
ConsoleConfigurationMainTab_choose_file_to_use_as_hibernate_properties=Choose file to use as hibernate.properties
ConsoleConfigurationMainTab_configuration_file=Configuration file:
ConsoleConfigurationMainTab_configuration_file_2=Configuration file
+ConsoleConfigurationMainTab_both_hibernate_properties_and_hibernate_cfg_xml=If you have both 'Property file' and 'Configuration file', the settings of 'Configuration file' will override the settings used in 'Property file'.
ConsoleConfigurationMainTab_core=Core
ConsoleConfigurationMainTab_create_hibernate_properties_file=Create Hibernate Properties file (.properties)
ConsoleConfigurationMainTab_create_new=Create &new...
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2008-08-14 12:19:46 UTC (rev 9721)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2008-08-14 12:20:41 UTC (rev 9722)
@@ -682,6 +682,7 @@
private void dialogChanged() {
String propertyFilename = propertyFileText.getText();
String configurationFilename = configurationFileText.getText();
+ setMessage(null);
configurationFileText.setEnabled( !configurationFileWillBeCreated && !getConfigurationMode().equals( ConfigurationMode.JPA ) );
confbutton.setEnabled( !getConfigurationMode().equals( ConfigurationMode.JPA ) );
@@ -744,6 +745,12 @@
updateStatus( HibernateConsoleMessages.ConsoleConfigurationWizardPage_need_to_specify_classpath );
return;
}
+
+ if ((configurationFilename != null && configurationFilename.trim().length() > 0) &&
+ (propertyFilename != null && propertyFilename.trim().length() > 0)) {
+ setMessage(HibernateConsoleMessages.ConsoleConfigurationWizardPage_both_hibernate_properties_and_hibernate_cfg_xml, WARNING);
+ return;
+ }
updateStatus(null);
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java 2008-08-14 12:19:46 UTC (rev 9721)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java 2008-08-14 12:20:41 UTC (rev 9722)
@@ -384,6 +384,12 @@
}
}
+ if ((configurationFilename != null && configurationFilename.trim().length() > 0) &&
+ (propertyFilename != null && propertyFilename.trim().length() > 0)) {
+ setMessage(HibernateConsoleMessages.ConsoleConfigurationMainTab_both_hibernate_properties_and_hibernate_cfg_xml);
+ return true;
+ }
+
/*if((useProjectClassPath() && StringHelper.isEmpty( getProjectName() )) && classPathViewer.getTable().getItemCount()==0) {
setErrorMessage( "Need to specify a project or setup a classpath" );
return;
17 years, 4 months