JBoss Tools SVN: r13008 - in trunk/jsf: plugins/org.jboss.tools.jsf.vpe.jsf/templates and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-01-13 04:42:19 -0500 (Tue, 13 Jan 2009)
New Revision: 13008
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCommandButtonTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputSecretTemplate.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextAreaTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/commandButton.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/commandButton.jsp.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputSecret.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputSecret.jsp.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputText.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputText.jsp.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputTextArea.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputTextArea.jsp.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-3512, templates updated, junit tests updated.
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCommandButtonTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCommandButtonTemplate.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCommandButtonTemplate.java 2009-01-13 09:42:19 UTC (rev 13008)
@@ -0,0 +1,80 @@
+package org.jboss.tools.jsf.vpe.jsf.template;
+
+import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class JsfCommandButtonTemplate extends AbstractOutputJsfTemplate {
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+
+ Element sourceElement = (Element) sourceNode;
+
+ nsIDOMElement contentSpan = VisualDomUtil.createBorderlessContainer(visualDocument);
+ nsIDOMElement firstSpan = VisualDomUtil.createBorderlessContainer(visualDocument);
+ nsIDOMElement lastSpan = VisualDomUtil.createBorderlessContainer(visualDocument);
+ nsIDOMElement input = visualDocument.createElement(HTML.TAG_INPUT);
+
+ VpeCreationData creationData = new VpeCreationData(contentSpan);
+
+ boolean disabled = ComponentUtil.string2boolean(ComponentUtil
+ .getAttribute(sourceElement, HTML.ATTR_DISABLED));
+ String type = sourceElement.getAttribute(HTML.ATTR_TYPE);
+ String image = sourceElement.getAttribute(HTML.VALUE_TYPE_IMAGE);
+ String value = sourceElement.getAttribute(HTML.ATTR_VALUE);
+ String style = sourceElement.getAttribute(HTML.ATTR_STYLE);
+ String clazz = sourceElement.getAttribute(HTML.ATTR_CLASS);
+ String dir = sourceElement.getAttribute(HTML.ATTR_DIR);
+
+ if (ComponentUtil.isNotBlank(image)) {
+ type = HTML.VALUE_TYPE_IMAGE;
+ String imgFullPath = VpeStyleUtil.addFullPathToImgSrc(image, pageContext, true);
+ input.setAttribute(HTML.ATTR_SRC, imgFullPath);
+ }
+
+ if (ComponentUtil.isBlank(type)) {
+ type = HTML.VALUE_TYPE_BUTTON;
+ }
+ input.setAttribute(HTML.ATTR_TYPE, type);
+
+ if (ComponentUtil.isNotBlank(value)) {
+ input.setAttribute(HTML.ATTR_VALUE, value);
+ }
+ if (ComponentUtil.isNotBlank(style)) {
+ input.setAttribute(HTML.ATTR_VALUE, style);
+ }
+ if (ComponentUtil.isNotBlank(clazz)) {
+ input.setAttribute(HTML.ATTR_VALUE, clazz);
+ }
+ if (ComponentUtil.isNotBlank(dir)) {
+ input.setAttribute(HTML.ATTR_VALUE, dir);
+ }
+
+ if (disabled) {
+ input.setAttribute(HTML.ATTR_DISABLED, HTML.ATTR_DISABLED);
+ }
+
+ VpeChildrenInfo spanInfo = new VpeChildrenInfo(firstSpan);
+ creationData.addChildrenInfo(spanInfo);
+ NodeList nodeList = sourceElement.getChildNodes();
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ Node child = nodeList.item(i);
+ spanInfo.addSourceChild(child);
+ }
+ contentSpan.appendChild(firstSpan);
+ contentSpan.appendChild(lastSpan);
+ firstSpan.appendChild(input);
+ return creationData;
+ }
+
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCommandButtonTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputSecretTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputSecretTemplate.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputSecretTemplate.java 2009-01-13 09:42:19 UTC (rev 13008)
@@ -0,0 +1,17 @@
+package org.jboss.tools.jsf.vpe.jsf.template;
+
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class JsfInputSecretTemplate extends JsfInputTextTemplate {
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ VpeCreationData creationData = createInputElement(visualDocument, (Element) sourceNode, true);
+ return creationData;
+ }
+
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputSecretTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextAreaTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextAreaTemplate.java 2009-01-13 06:03:34 UTC (rev 13007)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextAreaTemplate.java 2009-01-13 09:42:19 UTC (rev 13008)
@@ -16,8 +16,10 @@
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.AttributeData;
import org.jboss.tools.vpe.editor.mapping.VpeElementData;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMHTMLTextAreaElement;
@@ -25,6 +27,7 @@
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
public class JsfInputTextAreaTemplate extends AbstractEditableJsfTemplate {
@@ -32,16 +35,22 @@
nsIDOMDocument visualDocument) {
Element sourceElement = (Element) sourceNode;
-
- nsIDOMElement textArea = visualDocument
- .createElement(HTML.TAG_TEXTAREA);
+ /*
+ * https://jira.jboss.org/jira/browse/JBIDE-3512
+ * Container for correct children encoding was added.
+ * Author: dmaliarevich
+ */
+ nsIDOMElement contentSpan = VisualDomUtil.createBorderlessContainer(visualDocument);
+ nsIDOMElement firstSpan = VisualDomUtil.createBorderlessContainer(visualDocument);
+ nsIDOMElement lastSpan = VisualDomUtil.createBorderlessContainer(visualDocument);
+ nsIDOMElement textArea = visualDocument.createElement(HTML.TAG_TEXTAREA);
// Commented as fix for JBIDE-3012.
// ((nsIDOMHTMLTextAreaElement) textArea
// .queryInterface(nsIDOMHTMLTextAreaElement.NS_IDOMHTMLTEXTAREAELEMENT_IID))
// .setReadOnly(true);
- VpeCreationData creationData = new VpeCreationData(textArea);
+ VpeCreationData creationData = new VpeCreationData(contentSpan);
copyGeneralJsfAttributes(sourceElement, textArea);
ComponentUtil.copyDisabled(sourceElement, textArea);
@@ -68,7 +77,17 @@
}
textArea.appendChild(text);
creationData.setElementData(elementData);
-
+ VpeChildrenInfo spanInfo = new VpeChildrenInfo(firstSpan);
+ creationData.addChildrenInfo(spanInfo);
+ NodeList nodeList = sourceElement.getChildNodes();
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ Node child = nodeList.item(i);
+ spanInfo.addSourceChild(child);
+ }
+
+ contentSpan.appendChild(firstSpan);
+ contentSpan.appendChild(lastSpan);
+ lastSpan.appendChild(textArea);
return creationData;
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextTemplate.java 2009-01-13 06:03:34 UTC (rev 13007)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextTemplate.java 2009-01-13 09:42:19 UTC (rev 13008)
@@ -11,30 +11,49 @@
package org.jboss.tools.jsf.vpe.jsf.template;
+import java.util.ArrayList;
+import java.util.List;
+
import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.AttributeData;
import org.jboss.tools.vpe.editor.mapping.VpeElementData;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
public class JsfInputTextTemplate extends AbstractEditableJsfTemplate {
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
+ VpeCreationData creationData = createInputElement(visualDocument, (Element) sourceNode, false);
+ return creationData;
+ }
- Element sourceElement = (Element) sourceNode;
-
+ protected VpeCreationData createInputElement(nsIDOMDocument visualDocument,
+ Element sourceElement,
+ boolean typePassword) {
+
+ /*
+ * https://jira.jboss.org/jira/browse/JBIDE-3512
+ * Container for correct children encoding was added.
+ * Author: dmaliarevich
+ */
+ nsIDOMElement contentSpan = VisualDomUtil.createBorderlessContainer(visualDocument);
+ nsIDOMElement firstSpan = VisualDomUtil.createBorderlessContainer(visualDocument);
+ nsIDOMElement lastSpan = VisualDomUtil.createBorderlessContainer(visualDocument);
nsIDOMElement input = visualDocument.createElement(HTML.TAG_INPUT);
- VpeCreationData creationData = new VpeCreationData(input);
-
+ VpeCreationData creationData = new VpeCreationData(contentSpan);
+
copyGeneralJsfAttributes(sourceElement, input);
ComponentUtil.copyDisabled(sourceElement, input);
@@ -42,24 +61,34 @@
copyAttribute(input, sourceElement, JSF.ATTR_SIZE, HTML.ATTR_SIZE);
copyAttribute(input, sourceElement, JSF.ATTR_DIR, HTML.ATTR_DIR);
+ if (typePassword) {
+ input.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TYPE_PASSWORD);
+ }
+
VpeElementData elementData = new VpeElementData();
if (sourceElement.hasAttribute(JSF.ATTR_VALUE)) {
-
- Attr attr = sourceElement.getAttributeNode(JSF.ATTR_VALUE);
- elementData
- .addNodeData(new AttributeData(attr, input, true));
-
+ Attr attr = sourceElement.getAttributeNode(JSF.ATTR_VALUE);
+ elementData.addNodeData(new AttributeData(attr, input, true));
} else {
-
- elementData.addNodeData(new AttributeData(JSF.ATTR_VALUE,
- input, true));
-
+ elementData.addNodeData(new AttributeData(JSF.ATTR_VALUE, input,
+ true));
}
creationData.setElementData(elementData);
+ VpeChildrenInfo spanInfo = new VpeChildrenInfo(firstSpan);
+ creationData.addChildrenInfo(spanInfo);
+ NodeList nodeList = sourceElement.getChildNodes();
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ Node child = nodeList.item(i);
+ spanInfo.addSourceChild(child);
+ }
+
+ contentSpan.appendChild(firstSpan);
+ contentSpan.appendChild(lastSpan);
+ lastSpan.appendChild(input);
return creationData;
}
-
+
@Override
public Attr getOutputAttributeNode(Element element) {
// TODO Auto-generated method stub
@@ -73,4 +102,5 @@
return true;
}
+
}
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 2009-01-13 06:03:34 UTC (rev 13007)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2009-01-13 09:42:19 UTC (rev 13008)
@@ -31,7 +31,7 @@
</vpe:tag>
<vpe:tag name="h:inputText" case-sensitive="yes">
- <vpe:template children="no" modify="no" class="org.jboss.tools.jsf.vpe.jsf.template.JsfInputTextTemplate">
+ <vpe:template children="yes" modify="no" class="org.jboss.tools.jsf.vpe.jsf.template.JsfInputTextTemplate">
<!-- <input type="text" value="{jsfvalue(@value)}"
class="{@styleClass}" style="{@style}" title="{tagstring()}"
size="{@size}" dir="{@dir}" /> -->
@@ -57,7 +57,7 @@
</vpe:tag>
<vpe:tag name="h:inputTextarea" case-sensitive="yes">
- <vpe:template children="no" modify="no" class="org.jboss.tools.jsf.vpe.jsf.template.JsfInputTextAreaTemplate">
+ <vpe:template children="yes" modify="no" class="org.jboss.tools.jsf.vpe.jsf.template.JsfInputTextAreaTemplate">
<!-- <textarea class="{@styleClass}" style="{@style}"
rows="{@rows}" cols="{@cols}" title="{tagstring()}" dir="{@dir}">
<vpe:value expr="{jsfvalue(@value)}" />
@@ -75,10 +75,10 @@
</vpe:tag>
<vpe:tag name="h:inputSecret" case-sensitive="yes">
- <vpe:template children="no" modify="no">
- <input type="password" value="{jsfvalue(@value)}"
+ <vpe:template children="yes" modify="no" class="org.jboss.tools.jsf.vpe.jsf.template.JsfInputSecretTemplate">
+ <!-- <input type="password" value="{jsfvalue(@value)}"
class="{@styleClass}" style="{@style}" title="{tagstring()}"
- size="{@size}" dir="{@dir}" />
+ size="{@size}" dir="{@dir}" /> -->
<vpe:resize>
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
@@ -180,13 +180,26 @@
<!-- Проблема с адресацией от приложения (30 of 4) -->
<vpe:tag name="h:commandButton" case-sensitive="yes">
+ <vpe:template children="yes" modify="no"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfCommandButtonTemplate">
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+
<!-- This is a very big if-statement.
Its goal is to add support of 'disabled property'
DO NOT FORGET TO EDIT 'ELSE' PART IN FUTURE MODIFICATIONS -->
- <vpe:if test="(@disabled='true')">
+<!-- <vpe:if test="(@disabled='true')">
<vpe:if test="not(attrpresent('image'))">
<vpe:if test="(@type='')">
- <vpe:template children="no" modify="no">z
+ <vpe:template children="no" modify="no">
<input type="button" value="{iif(@value='',' ',jsfvalue(@value))}"
class="{@styleClass}" style="{@style}"
title="{tagstring()}" dir="{@dir}"
@@ -233,9 +246,9 @@
</vpe:textFormatting>
</vpe:template>
</vpe:if>
- </vpe:if>
+ </vpe:if> -->
<!--else-->
- <vpe:if test="not(attrpresent('image'))">
+ <!-- <vpe:if test="not(attrpresent('image'))">
<vpe:if test="(@type='')">
<vpe:template children="no" modify="no">z
<input type="button" value="{iif(@value='',' ',jsfvalue(@value))}"
@@ -280,7 +293,7 @@
<vpe:textFormatting use-default-formats="yes">
</vpe:textFormatting>
</vpe:template>
- </vpe:if>
+ </vpe:if> -->
<!--end-of-else-->
</vpe:tag>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/commandButton.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/commandButton.jsp 2009-01-13 06:03:34 UTC (rev 13007)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/commandButton.jsp 2009-01-13 09:42:19 UTC (rev 13008)
@@ -21,6 +21,10 @@
<h:commandButton value="commandButton5" id="commandButton5" image="" />
+ <h:commandButton value="Fight" id="commandButton6"><p>h:commandButton</p></h:commandButton>
+
+ <h:commandButton value="commandButton7" id="commandButton7" type="button" disabled="true"/>
+
</h:form>
</f:view>
</body>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/commandButton.jsp.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/commandButton.jsp.xml 2009-01-13 06:03:34 UTC (rev 13007)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/commandButton.jsp.xml 2009-01-13 09:42:19 UTC (rev 13008)
@@ -1,17 +1,74 @@
<tests>
<test id="commandButton1">
- <input type="button" value="commandButton"/>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="button" VALUE="commandButton" />
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ </SPAN>
</test>
<test id="commandButton2">
- <input type="button" value="commandButton1" />
+
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="button" VALUE="commandButton1" />
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ </SPAN>
</test>
<test id="commandButton3">
- <input type="reset" value="commandButton3" />
+
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="button" VALUE="commandButton3" />
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ </SPAN>
</test>
<test id="commandButton4">
- <input type="submit" value="commandButton4" />
+
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="button" VALUE="commandButton4" />
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ </SPAN>
</test>
<test id="commandButton5">
- <input type="image" SRC="/.*ve/unresolved_image.gif/" />
+
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="button" VALUE="commandButton5" />
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ </SPAN>
</test>
+ <test id="commandButton6">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="button" VALUE="Fight" />
+ <P STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ h:commandButton
+ </SPAN>
+ </P>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ </SPAN>
+ </test>
+ <test id="commandButton7">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="button" VALUE="commandButton7" DISABLED="disabled" />
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ </SPAN>
+ </test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputSecret.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputSecret.jsp 2009-01-13 06:03:34 UTC (rev 13007)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputSecret.jsp 2009-01-13 09:42:19 UTC (rev 13008)
@@ -9,8 +9,10 @@
<f:view>
<h1><h:outputText value="inputSecret" /></h1>
- <h:inputSecret value="inputSecret" id="inputSecret"/>
+ <h:inputSecret value="inputSecret" id="inputSecret1"/>
+ <h:inputSecret value="asdsfsdfsdfkmsdkfdf" id="inputSecret2">h:inputSecret </h:inputSecret>
+
</f:view>
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputSecret.jsp.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputSecret.jsp.xml 2009-01-13 06:03:34 UTC (rev 13007)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputSecret.jsp.xml 2009-01-13 09:42:19 UTC (rev 13008)
@@ -1,5 +1,24 @@
<tests>
- <test id="inputSecret">
- <input type="password" />
+ <test id="inputSecret1">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="password" VALUE="inputSecret" />
+ </SPAN>
+ </SPAN>
</test>
+ <test id="inputSecret2">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ h:inputSecret
+ </SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="password" VALUE="asdsfsdfsdfkmsdkfdf" />
+
+ </SPAN>
+ </SPAN>
+ </test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputText.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputText.jsp 2009-01-13 06:03:34 UTC (rev 13007)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputText.jsp 2009-01-13 09:42:19 UTC (rev 13008)
@@ -9,8 +9,9 @@
<f:view>
<h1><h:outputText value="inputText" /></h1>
- <h:inputText id="inputText" value="inputText"/>
+ <h:inputText id="inputText1" value="inputText"/>
+ <h:inputText id="inputText2" value="Test verbtim for h:inputSecret ">h:inputText</h:inputText>
</f:view>
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputText.jsp.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputText.jsp.xml 2009-01-13 06:03:34 UTC (rev 13007)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputText.jsp.xml 2009-01-13 09:42:19 UTC (rev 13008)
@@ -1,5 +1,23 @@
<tests>
- <test id="inputText">
- <input />
+ <test id="inputText1">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <INPUT VALUE="inputText" />
+ </SPAN>
+ </SPAN>
</test>
+ <test id="inputText2">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ h:inputText
+ </SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <INPUT VALUE="Test verbtim for h:inputSecret " />
+ </SPAN>
+ </SPAN>
+ </test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputTextArea.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputTextArea.jsp 2009-01-13 06:03:34 UTC (rev 13007)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputTextArea.jsp 2009-01-13 09:42:19 UTC (rev 13008)
@@ -9,8 +9,10 @@
<f:view>
<h1><h:outputText value="inputTextArea" /></h1>
- <h:inputTextarea value="inputTextArea" id="inputTextArea" />
+ <h:inputTextarea value="inputTextArea" id="inputTextArea1" />
+ <h:inputTextarea value="Test text for h:inputTextarea " id="inputTextArea2">h:inputTextarea</h:inputTextarea>
+
</f:view>
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputTextArea.jsp.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputTextArea.jsp.xml 2009-01-13 06:03:34 UTC (rev 13007)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/inputTextArea.jsp.xml 2009-01-13 09:42:19 UTC (rev 13008)
@@ -1,5 +1,27 @@
<tests>
- <test id="inputTextArea">
- <TEXTAREA> inputTextArea </TEXTAREA>
+ <test id="inputTextArea1">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <TEXTAREA>
+ inputTextArea
+ </TEXTAREA>
+ </SPAN>
+ </SPAN>
</test>
+ <test id="inputTextArea2">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ h:inputTextarea
+ </SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <TEXTAREA>
+ Test text for h:inputTextarea
+ </TEXTAREA>
+ </SPAN>
+ </SPAN>
+ </test>
</tests>
\ No newline at end of file
16 years
JBoss Tools SVN: r13007 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui: editor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-01-13 01:03:34 -0500 (Tue, 13 Jan 2009)
New Revision: 13007
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
Log:
JBIDE-3391 - tiny fixes but no smoking gun yet
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java 2009-01-13 03:13:11 UTC (rev 13006)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java 2009-01-13 06:03:34 UTC (rev 13007)
@@ -80,7 +80,7 @@
public static String getDeployDirectory(IServer server) {
IDeployableServer deployableServer = ServerConverter.getDeployableServer(server);
- if (deployableServer != null) {
+ if (server.getRuntime() != null && deployableServer != null) {
return deployableServer.getDeployFolder();
}
IServerWorkingCopy swc = server.createWorkingCopy();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2009-01-13 03:13:11 UTC (rev 13006)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2009-01-13 06:03:34 UTC (rev 13007)
@@ -240,10 +240,10 @@
}
private String getDeployDir() {
- return makeRelative(getServer().getDeployFolder());
+ return server.getRuntime() == null ? "" : makeRelative(getServer().getDeployFolder());
}
private String getTempDeployDir() {
- return makeRelative(getServer().getTempDeployFolder());
+ return server.getRuntime() == null ? "" : makeRelative(getServer().getTempDeployFolder());
}
private IDeployableServer getServer() {
16 years
JBoss Tools SVN: r13006 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-01-12 22:13:11 -0500 (Mon, 12 Jan 2009)
New Revision: 13006
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java
Log:
reverting last commit. It seems there was already a JIRA on that and Snjezana solved it. JBIDE-3502
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java 2009-01-13 03:05:27 UTC (rev 13005)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java 2009-01-13 03:13:11 UTC (rev 13006)
@@ -43,13 +43,12 @@
// create temp deploy folder
IRuntime rt = server.getRuntime();
IJBossServerRuntime jbsrt = (IJBossServerRuntime)rt.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
- if( jbsrt != null ) {
- String config = jbsrt.getJBossConfiguration();
- String newTemp = new Path(IJBossServerConstants.SERVER).append(config)
- .append(IJBossServerConstants.TMP)
- .append(IJBossServerConstants.JBOSSTOOLS_TMP).makeRelative().toString();
- new File(newTemp).mkdirs();
- }
+ String config = jbsrt.getJBossConfiguration();
+ String newTemp = new Path(IJBossServerConstants.SERVER).append(config)
+ .append(IJBossServerConstants.TMP)
+ .append(IJBossServerConstants.JBOSSTOOLS_TMP).makeRelative().toString();
+ new File(newTemp).mkdirs();
+
}
public void serverRemoved(IServer server) {
16 years
JBoss Tools SVN: r13005 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-01-12 22:05:27 -0500 (Mon, 12 Jan 2009)
New Revision: 13005
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java
Log:
added a null check because it is appropriate here. no guarantee.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java 2009-01-12 21:46:08 UTC (rev 13004)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java 2009-01-13 03:05:27 UTC (rev 13005)
@@ -43,12 +43,13 @@
// create temp deploy folder
IRuntime rt = server.getRuntime();
IJBossServerRuntime jbsrt = (IJBossServerRuntime)rt.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
- String config = jbsrt.getJBossConfiguration();
- String newTemp = new Path(IJBossServerConstants.SERVER).append(config)
- .append(IJBossServerConstants.TMP)
- .append(IJBossServerConstants.JBOSSTOOLS_TMP).makeRelative().toString();
- new File(newTemp).mkdirs();
-
+ if( jbsrt != null ) {
+ String config = jbsrt.getJBossConfiguration();
+ String newTemp = new Path(IJBossServerConstants.SERVER).append(config)
+ .append(IJBossServerConstants.TMP)
+ .append(IJBossServerConstants.JBOSSTOOLS_TMP).makeRelative().toString();
+ new File(newTemp).mkdirs();
+ }
}
public void serverRemoved(IServer server) {
16 years
JBoss Tools SVN: r13004 - trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-01-12 16:46:08 -0500 (Mon, 12 Jan 2009)
New Revision: 13004
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/ArchiveInfoWizardPage.java
Log:
JBIDE-3533 Editting an Exploded Project Archive results in a compressed one when no changes are made.
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/ArchiveInfoWizardPage.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/ArchiveInfoWizardPage.java 2009-01-12 20:22:51 UTC (rev 13003)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/ArchiveInfoWizardPage.java 2009-01-12 21:46:08 UTC (rev 13004)
@@ -131,7 +131,11 @@
packageTypeGroup.setText(ArchivesUIMessages.PackageInfoWizardPage_packageTypeGroup_label);
expand(packageTypeGroup);
- packageExploded = false;
+ if (archive != null) {
+ packageExploded = archive.isExploded();
+ } else {
+ packageExploded = false;
+ }
compressedButton = new Button(packageTypeGroup, SWT.RADIO);
compressedButton.setText(ArchivesUIMessages.PackageInfoWizardPage_compressedButton_label);
compressedButton.addSelectionListener(new SelectionAdapter() {
@@ -139,7 +143,7 @@
packageExploded = false;
}
});
- compressedButton.setSelection(true);
+ compressedButton.setSelection(!packageExploded);
explodedButton = new Button(packageTypeGroup, SWT.RADIO);
explodedButton.addSelectionListener(new SelectionAdapter () {
public void widgetSelected(SelectionEvent e) {
16 years
JBoss Tools SVN: r13003 - in trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test: res/project/test/annotated/getters and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-01-12 15:22:51 -0500 (Mon, 12 Jan 2009)
New Revision: 13003
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/FotoXPerson.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/PersonXFoto.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/FotoXPerson.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/PersonXFoto.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/FotoXPerson.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/PersonXFoto.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/FotoXPerson.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/PersonXFoto.java
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
Log:
JBIDE-3426
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/FotoXPerson.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/FotoXPerson.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/FotoXPerson.java 2009-01-12 20:22:51 UTC (rev 13003)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.fields;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class FotoXPerson {
+
+ protected Integer ffotoId;
+
+ protected PersonXFoto person;
+
+ protected Set<PersonXFoto> persons = new HashSet<PersonXFoto>(0);
+
+}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/PersonXFoto.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/PersonXFoto.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/PersonXFoto.java 2009-01-12 20:22:51 UTC (rev 13003)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.fields;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class PersonXFoto {
+
+ protected Integer ppersonId;
+
+ protected FotoXPerson foto;
+
+ protected Set<FotoXPerson> fotos = new HashSet<FotoXPerson>(0);
+
+}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/FotoXPerson.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/FotoXPerson.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/FotoXPerson.java 2009-01-12 20:22:51 UTC (rev 13003)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.fields;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class FotoXPerson {
+
+ protected Integer ffotoId;
+
+ protected PersonXFoto person;
+
+ protected Set<PersonXFoto> persons = new HashSet<PersonXFoto>(0);
+
+ public Integer getFfotoId() {
+ return this.ffotoId;
+ }
+
+ public void setFfotoId(Integer ffotoId) {
+ this.ffotoId = ffotoId;
+ }
+
+ public PersonXFoto getPerson() {
+ return person;
+ }
+
+ public void setPerson(PersonXFoto person) {
+ this.person = person;
+ }
+
+ public Set<PersonXFoto> getPersons() {
+ return this.persons;
+ }
+
+ public void setPersons(Set<PersonXFoto> persons) {
+ this.persons = persons;
+ }
+}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/PersonXFoto.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/PersonXFoto.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/PersonXFoto.java 2009-01-12 20:22:51 UTC (rev 13003)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.fields;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class PersonXFoto {
+
+ protected Integer ppersonId;
+
+ protected FotoXPerson foto;
+
+ protected Set<FotoXPerson> fotos = new HashSet<FotoXPerson>(0);
+
+ public Integer getPpersonId() {
+ return this.ppersonId;
+ }
+
+ public void setPpersonId(Integer ppersonId) {
+ this.ppersonId = ppersonId;
+ }
+
+ public FotoXPerson getFoto() {
+ return this.foto;
+ }
+
+ public void setFoto(FotoXPerson foto) {
+ this.foto = foto;
+ }
+
+ public Set<FotoXPerson> getFotos() {
+ return fotos;
+ }
+
+ public void setFotos(Set<FotoXPerson> fotos) {
+ this.fotos = fotos;
+ }
+}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/FotoXPerson.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/FotoXPerson.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/FotoXPerson.java 2009-01-12 20:22:51 UTC (rev 13003)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.fields;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+
+@Entity
+public class FotoXPerson {
+
+ @Id @GeneratedValue
+ protected Integer ffotoId;
+
+ @ManyToOne
+ protected PersonXFoto person;
+
+ @OneToMany(mappedBy="foto")
+ protected Set<PersonXFoto> persons = new HashSet<PersonXFoto>(0);
+
+}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/PersonXFoto.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/PersonXFoto.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/PersonXFoto.java 2009-01-12 20:22:51 UTC (rev 13003)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.fields;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+
+@Entity
+public class PersonXFoto {
+
+ @Id @GeneratedValue
+ protected Integer ppersonId;
+
+ @ManyToOne
+ protected FotoXPerson foto;
+
+ @OneToMany(mappedBy="person")
+ protected Set<FotoXPerson> fotos = new HashSet<FotoXPerson>(0);
+
+}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/FotoXPerson.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/FotoXPerson.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/FotoXPerson.java 2009-01-12 20:22:51 UTC (rev 13003)
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.fields;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+
+@Entity
+public class FotoXPerson {
+
+ protected Integer ffotoId;
+
+ protected PersonXFoto person;
+
+ protected Set<PersonXFoto> persons = new HashSet<PersonXFoto>(0);
+
+ @Id @GeneratedValue
+ public Integer getFfotoId() {
+ return this.ffotoId;
+ }
+
+ public void setFfotoId(Integer ffotoId) {
+ this.ffotoId = ffotoId;
+ }
+
+ @ManyToOne
+ public PersonXFoto getPerson() {
+ return person;
+ }
+
+ public void setPerson(PersonXFoto person) {
+ this.person = person;
+ }
+
+ @OneToMany(mappedBy = "foto")
+ public Set<PersonXFoto> getPersons() {
+ return this.persons;
+ }
+
+ public void setPersons(Set<PersonXFoto> persons) {
+ this.persons = persons;
+ }
+}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/PersonXFoto.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/PersonXFoto.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/PersonXFoto.java 2009-01-12 20:22:51 UTC (rev 13003)
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.fields;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+
+@Entity
+public class PersonXFoto {
+
+ protected Integer ppersonId;
+
+ protected FotoXPerson foto;
+
+ protected Set<FotoXPerson> fotos = new HashSet<FotoXPerson>(0);
+
+ @Id @GeneratedValue
+ public Integer getPpersonId() {
+ return this.ppersonId;
+ }
+
+ public void setPpersonId(Integer ppersonId) {
+ this.ppersonId = ppersonId;
+ }
+
+ @ManyToOne
+ public FotoXPerson getFoto() {
+ return this.foto;
+ }
+
+ public void setFoto(FotoXPerson foto) {
+ this.foto = foto;
+ }
+
+ @OneToMany(mappedBy = "person")
+ public Set<FotoXPerson> getFotos() {
+ return fotos;
+ }
+
+ public void setFotos(Set<FotoXPerson> fotos) {
+ this.fotos = fotos;
+ }
+}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2009-01-12 20:22:25 UTC (rev 13002)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2009-01-12 20:22:51 UTC (rev 13003)
@@ -120,15 +120,19 @@
"test.annotated." + testSelection + ".Passport"); //$NON-NLS-1$ //$NON-NLS-2$
ICompilationUnit icu2 = Utils.findCompilationUnit(javaProject,
"test.annotated." + testSelection + ".Staff"); //$NON-NLS-1$ //$NON-NLS-2$
+ ICompilationUnit icu3 = Utils.findCompilationUnit(javaProject,
+ "test.annotated." + testSelection + ".FotoXPerson"); //$NON-NLS-1$ //$NON-NLS-2$
//ICompilationUnit icu = Utils.findCompilationUnit(javaProject,
// "test.annotated." + testSelection + ".Foto"); //$NON-NLS-1$ //$NON-NLS-2$
//ICompilationUnit icu2 = Utils.findCompilationUnit(javaProject,
// "test.annotated." + testSelection + ".Person"); //$NON-NLS-1$ //$NON-NLS-2$
assertNotNull(icu);
assertNotNull(icu2);
+ assertNotNull(icu3);
collector.initCollector(javaProject);
collector.collect(icu);
collector.collect(icu2);
+ collector.collect(icu3);
collector.resolveRelations();
processor.modify(javaProject, collector.getMapCUs_Info(), false);
//
@@ -137,6 +141,8 @@
checkItem("Passport"); //$NON-NLS-1$
checkItem("Person"); //$NON-NLS-1$
checkItem("Staff"); //$NON-NLS-1$
+ checkItem("FotoXPerson"); //$NON-NLS-1$
+ checkItem("PersonXFoto"); //$NON-NLS-1$
}
protected void checkItem(String strCheckItem) {
16 years
JBoss Tools SVN: r13002 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal: jpa/collect and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-01-12 15:22:25 -0500 (Mon, 12 Jan 2009)
New Revision: 13002
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/OwnerType.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/ChangeStructure.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesList.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPARefactoring.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizard.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardData.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardParams.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/ResolveAmbiguous.java
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/EntityInfo.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/JPAConst.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefEntityInfo.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/AllEntitiesProcessor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/AnnotStyle.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/ProcessEntityInfo.java
Log:
JBIDE-3426
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.java 2009-01-12 19:37:40 UTC (rev 13001)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -28,6 +28,13 @@
public static String SaveQueryEditorListener_errormessage;
public static String JPAMapToolActor_message_title;
public static String JPAMapToolActor_message;
+ public static String ResolveAmbiguous_column_Class;
+ public static String ResolveAmbiguous_column_Association;
+ public static String ResolveAmbiguous_column_Type;
+ public static String ResolveAmbiguous_column_Related;
+ public static String ResolveAmbiguous_column_Owner;
+ public static String ResolveAmbiguous_empty;
+ public static String ResolveAmbiguous_message;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, JdtUiMessages.class);
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.properties 2009-01-12 19:37:40 UTC (rev 13001)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/JdtUiMessages.properties 2009-01-12 20:22:25 UTC (rev 13002)
@@ -32,3 +32,10 @@
SaveQueryEditorListener_errormessage=Error while query refactoring
JPAMapToolActor_message_title=Hibernate/JPA
JPAMapToolActor_message=Cannot generate annotations for an interface or enumeration
+ResolveAmbiguous_column_Class=Class
+ResolveAmbiguous_column_Association=Association
+ResolveAmbiguous_column_Type=Type
+ResolveAmbiguous_column_Related=Related
+ResolveAmbiguous_column_Owner=Owner
+ResolveAmbiguous_empty=<empty>
+ResolveAmbiguous_message=Edit entities relations.
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2009-01-12 19:37:40 UTC (rev 13001)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -20,6 +20,7 @@
import org.eclipse.jdt.core.dom.TypeDeclaration;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.JPAConst;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.common.OwnerType;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.RefEntityInfo;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.RefFieldInfo;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.RefType;
@@ -148,8 +149,109 @@
}
}
}
+
+ public void updateOwner(ProcessItem pi) {
+ if (pi.refEntityInfo.refType == RefType.ONE2ONE) {
+ pi.refEntityInfo.owner = OwnerType.UNDEF;
+ pi.refEntityInfo2.owner = OwnerType.UNDEF;
+ }
+ else if (pi.refEntityInfo.refType == RefType.ONE2MANY) {
+ pi.refEntityInfo.owner = OwnerType.YES;
+ pi.refEntityInfo2.owner = OwnerType.NO;
+ }
+ else if (pi.refEntityInfo.refType == RefType.MANY2ONE) {
+ pi.refEntityInfo.owner = OwnerType.NO;
+ pi.refEntityInfo2.owner = OwnerType.YES;
+ }
+ else if (pi.refEntityInfo.refType == RefType.MANY2MANY) {
+ pi.refEntityInfo.owner = OwnerType.UNDEF;
+ pi.refEntityInfo2.owner = OwnerType.UNDEF;
+ }
+ }
/**
+ * responsible for enumeration all entities pairs and
+ * setup relations between single candidate for several items case
+ */
+ protected class EntitySingleCandidateResolver {
+
+ /**
+ * enumerate function
+ */
+ public void enumEntityPairs() {
+ Iterator<Map.Entry<String, EntityInfo>> it = mapCUs_Info.entrySet().iterator();
+ ProcessItem pi = new ProcessItem();
+ while (it.hasNext()) {
+ Map.Entry<String, EntityInfo> entry = it.next();
+ // entry.getKey() - fully qualified name
+ // entry.getValue() - EntityInfo
+ EntityInfo entryInfo = entry.getValue();
+ assert(entry.getKey().equals(entryInfo.getFullyQualifiedName()));
+ String fullyQualifiedName = entryInfo.getFullyQualifiedName();
+ // get references map:
+ // * field id -> RefEntityInfo
+ Iterator<Map.Entry<String, RefEntityInfo>> referencesIt =
+ entryInfo.getReferences().entrySet().iterator();
+ while (referencesIt.hasNext()) {
+ Map.Entry<String, RefEntityInfo> entry2 = referencesIt.next();
+ // entry2.getKey() - field id
+ // entry2.getValue() - RefEntityInfo
+ pi.fieldId = entry2.getKey();
+ pi.refEntityInfo = entry2.getValue();
+ String fullyQualifiedName2 = pi.refEntityInfo.fullyQualifiedName;
+ EntityInfo entryInfo2 = mapCUs_Info.get(fullyQualifiedName2);
+ assert(fullyQualifiedName2.equals(entryInfo2.getFullyQualifiedName()));
+ if (entryInfo2 != null && pi.refEntityInfo != null) {
+ pi.refEntityInfo2 = null;
+ pi.fieldId2 = null;
+ Set<RefFieldInfo> setRefEntityInfo = entryInfo2.getRefFieldInfoSet(fullyQualifiedName);
+ if (setRefEntityInfo != null && setRefEntityInfo.size() > 1) {
+ // this case of complex decision - but if there is 1 candidate
+ // it is possible to select this candidate automatically
+ // in case of no solution - user should define this himself
+ // try to find 1 suitable candidate
+ RefType suitableRefType = RefType.UNDEF;
+ if (pi.refEntityInfo.refType == RefType.ONE2ONE) {
+ suitableRefType = RefType.ONE2ONE;
+ }
+ else if (pi.refEntityInfo.refType == RefType.ONE2MANY) {
+ suitableRefType = RefType.MANY2ONE;
+ }
+ else if (pi.refEntityInfo.refType == RefType.MANY2ONE) {
+ suitableRefType = RefType.ONE2MANY;
+ }
+ else if (pi.refEntityInfo.refType == RefType.MANY2MANY) {
+ suitableRefType = RefType.MANY2MANY;
+ }
+ RefFieldInfo rfiSingleCandidat = null;
+ Iterator<RefFieldInfo> itTmp = setRefEntityInfo.iterator();
+ while (itTmp.hasNext()) {
+ RefFieldInfo rfi = itTmp.next();
+ if (rfi.refType == suitableRefType) {
+ if (rfiSingleCandidat == null) {
+ rfiSingleCandidat = rfi;
+ }
+ else {
+ // there are a least 2 candidates
+ break;
+ }
+ }
+ }
+ if (!itTmp.hasNext() && rfiSingleCandidat != null) {
+ pi.fieldId2 = rfiSingleCandidat.fieldId;
+ pi.refEntityInfo2 = entryInfo2.getFieldIdRefEntityInfo(pi.fieldId2);
+ pi.refEntityInfo.mappedBy = pi.fieldId2;
+ pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
* process all entities pairs iteratively:
* firstly process pairs with more information about and
* pairs with small information about - process in last order
@@ -201,24 +303,28 @@
pi.refEntityInfo.mappedBy = pi.fieldId2;
pi.refEntityInfo2.refType = RefType.ONE2ONE;
pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
}
else if (pi.refEntityInfo2.refType == RefType.ONE2MANY) {
pi.refEntityInfo.refType = RefType.MANY2ONE;
pi.refEntityInfo.mappedBy = pi.fieldId2;
pi.refEntityInfo2.refType = RefType.ONE2MANY;
pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
}
else if (pi.refEntityInfo2.refType == RefType.MANY2ONE) {
pi.refEntityInfo.refType = RefType.ONE2MANY;
pi.refEntityInfo.mappedBy = pi.fieldId2;
pi.refEntityInfo2.refType = RefType.MANY2ONE;
pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
}
else if (pi.refEntityInfo2.refType == RefType.MANY2MANY) {
pi.refEntityInfo.refType = RefType.MANY2MANY;
pi.refEntityInfo.mappedBy = pi.fieldId2;
pi.refEntityInfo2.refType = RefType.MANY2MANY;
pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
}
}
else if (hasPrompt == 2) {
@@ -227,24 +333,28 @@
pi.refEntityInfo.mappedBy = pi.fieldId;
pi.refEntityInfo2.refType = RefType.ONE2ONE;
pi.refEntityInfo2.mappedBy = pi.fieldId2;
+ updateOwner(pi);
}
else if (pi.refEntityInfo.refType == RefType.ONE2MANY) {
pi.refEntityInfo.refType = RefType.ONE2MANY;
pi.refEntityInfo.mappedBy = pi.fieldId;
pi.refEntityInfo2.refType = RefType.MANY2ONE;
pi.refEntityInfo2.mappedBy = pi.fieldId2;
+ updateOwner(pi);
}
else if (pi.refEntityInfo.refType == RefType.MANY2ONE) {
pi.refEntityInfo.refType = RefType.MANY2ONE;
pi.refEntityInfo.mappedBy = pi.fieldId;
pi.refEntityInfo2.refType = RefType.ONE2MANY;
pi.refEntityInfo2.mappedBy = pi.fieldId2;
+ updateOwner(pi);
}
else if (pi.refEntityInfo.refType == RefType.MANY2MANY) {
pi.refEntityInfo.refType = RefType.MANY2MANY;
pi.refEntityInfo.mappedBy = pi.fieldId;
pi.refEntityInfo2.refType = RefType.MANY2MANY;
pi.refEntityInfo2.mappedBy = pi.fieldId2;
+ updateOwner(pi);
}
}
//if (hasPrompt == 3) - this is case where we get prompt from both sides -
@@ -255,12 +365,14 @@
pi.refEntityInfo.mappedBy = pi.fieldId2;
pi.refEntityInfo2.refType = RefType.ONE2ONE;
pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
}
else if (pi.refEntityInfo2.refType == RefType.ONE2MANY) {
pi.refEntityInfo.refType = RefType.MANY2ONE;
pi.refEntityInfo.mappedBy = pi.fieldId2;
pi.refEntityInfo2.refType = RefType.ONE2MANY;
pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
}
}
else if (pi.refEntityInfo.refType == RefType.ONE2MANY) {
@@ -269,12 +381,14 @@
pi.refEntityInfo.mappedBy = pi.fieldId2;
pi.refEntityInfo2.refType = RefType.MANY2ONE;
pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
}
else if (pi.refEntityInfo2.refType == RefType.ONE2MANY) {
pi.refEntityInfo.refType = RefType.MANY2MANY;
pi.refEntityInfo.mappedBy = pi.fieldId2;
pi.refEntityInfo2.refType = RefType.MANY2MANY;
pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
}
}
}
@@ -301,12 +415,14 @@
pi.refEntityInfo.mappedBy = pi.fieldId2;
pi.refEntityInfo2.refType = RefType.ONE2ONE;
pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
}
else if (pi.refEntityInfo2.refType == RefType.ONE2MANY) {
pi.refEntityInfo.refType = RefType.MANY2ONE;
pi.refEntityInfo.mappedBy = pi.fieldId2;
pi.refEntityInfo2.refType = RefType.ONE2MANY;
pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
}
}
else if (pi.refEntityInfo.refType == RefType.ONE2MANY) {
@@ -315,6 +431,7 @@
pi.refEntityInfo.mappedBy = pi.fieldId2;
pi.refEntityInfo2.refType = RefType.MANY2ONE;
pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
}
}
else if (pi.refEntityInfo.refType == RefType.MANY2ONE) {
@@ -323,6 +440,7 @@
pi.refEntityInfo.mappedBy = pi.fieldId2;
pi.refEntityInfo2.refType = RefType.ONE2ONE;
pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
}
}
}
@@ -350,6 +468,7 @@
pi.refEntityInfo.mappedBy = pi.fieldId2;
pi.refEntityInfo2.refType = RefType.MANY2MANY;
pi.refEntityInfo2.mappedBy = pi.fieldId;
+ updateOwner(pi);
}
}
}
@@ -359,6 +478,10 @@
};
ep.setConnector(m2mRelConnector);
ep.enumEntityPairs();
+ // 3)
+ // third - try to assign - "single candidates"
+ EntitySingleCandidateResolver escr = new EntitySingleCandidateResolver();
+ escr.enumEntityPairs();
// update import flags
it = mapCUs_Info.entrySet().iterator();
while (it.hasNext()) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java 2009-01-12 19:37:40 UTC (rev 13001)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -20,6 +20,7 @@
import org.eclipse.jdt.core.dom.ASTVisitor;
import org.eclipse.jdt.core.dom.ArrayType;
import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.FieldAccess;
import org.eclipse.jdt.core.dom.FieldDeclaration;
import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.ImportDeclaration;
@@ -276,7 +277,7 @@
return true;
}
- public String getReturnIdentifier(MethodDeclaration node) {
+ public static String getReturnIdentifier(MethodDeclaration node) {
String res = null;
List bodyStatemants = node.getBody().statements();
Iterator it = bodyStatemants.iterator();
@@ -289,6 +290,11 @@
SimpleName sn = (SimpleName)obj;
res = sn.getIdentifier();
}
+ else if (obj instanceof FieldAccess) {
+ FieldAccess fa = (FieldAccess)obj;
+ SimpleName sn = fa.getName();
+ res = sn.getIdentifier();
+ }
break;
}
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/EntityInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/EntityInfo.java 2009-01-12 19:37:40 UTC (rev 13001)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/EntityInfo.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -188,6 +188,15 @@
if (isAddEntityFlag()) {
addRequiredImport(JPAConst.IMPORT_ENTITY);
}
+ Iterator<Map.Entry<String, RefEntityInfo>> referencesIt =
+ getReferences().entrySet().iterator();
+ while (referencesIt.hasNext()) {
+ Map.Entry<String, RefEntityInfo> entry = referencesIt.next();
+ RefEntityInfo refEntityInfo = entry.getValue();
+ if (refEntityInfo.owner == OwnerType.NO) {
+ addRequiredImport(JPAConst.IMPORT_JOINCOLUMN);
+ }
+ }
// try to intellectually get primary id
primaryIdName = null;
String entityName = getName().toLowerCase();
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/JPAConst.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/JPAConst.java 2009-01-12 19:37:40 UTC (rev 13001)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/JPAConst.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -14,6 +14,7 @@
static public String IMPORT_ENTITY = "javax.persistence.Entity"; //$NON-NLS-1$
static public String IMPORT_GENERATED_VALUE = "javax.persistence.GeneratedValue"; //$NON-NLS-1$
static public String IMPORT_ID = "javax.persistence.Id"; //$NON-NLS-1$
+ static public String IMPORT_JOINCOLUMN = "javax.persistence.JoinColumn"; //$NON-NLS-1$
static public String IMPORT_ONE2ONE = "javax.persistence.OneToOne"; //$NON-NLS-1$
static public String IMPORT_ONE2MANY = "javax.persistence.OneToMany"; //$NON-NLS-1$
static public String IMPORT_MANY2ONE = "javax.persistence.ManyToOne"; //$NON-NLS-1$
@@ -23,6 +24,7 @@
static public String ANNOTATION_ENTITY = "Entity"; //$NON-NLS-1$
static public String ANNOTATION_GENERATED_VALUE = "GeneratedValue"; //$NON-NLS-1$
static public String ANNOTATION_ID = "Id"; //$NON-NLS-1$
+ static public String ANNOTATION_JOINCOLUMN = "JoinColumn"; //$NON-NLS-1$
static public String ANNOTATION_ONE2ONE = "OneToOne"; //$NON-NLS-1$
static public String ANNOTATION_ONE2MANY = "OneToMany"; //$NON-NLS-1$
static public String ANNOTATION_MANY2ONE = "ManyToOne"; //$NON-NLS-1$
@@ -35,6 +37,7 @@
ALL_IMPORTS.add(IMPORT_ENTITY);
ALL_IMPORTS.add(IMPORT_GENERATED_VALUE);
ALL_IMPORTS.add(IMPORT_ID);
+ ALL_IMPORTS.add(IMPORT_JOINCOLUMN);
ALL_IMPORTS.add(IMPORT_ONE2ONE);
ALL_IMPORTS.add(IMPORT_ONE2MANY);
ALL_IMPORTS.add(IMPORT_MANY2ONE);
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/OwnerType.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/OwnerType.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/OwnerType.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.jdt.ui.internal.jpa.common;
+
+/**
+ * possible owner definition
+ *
+ * @author Vitali
+ */
+public enum OwnerType {
+ UNDEF,
+ YES,
+ NO,
+}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefEntityInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefEntityInfo.java 2009-01-12 19:37:40 UTC (rev 13001)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/RefEntityInfo.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -33,6 +33,8 @@
*/
public String mappedBy = null;
//
+ public OwnerType owner = OwnerType.UNDEF;
+ //
public boolean annotated = false;
//
public boolean resolvedAnnotationName = false;
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/AllEntitiesProcessor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/AllEntitiesProcessor.java 2009-01-12 19:37:40 UTC (rev 13001)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/AllEntitiesProcessor.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -15,65 +15,33 @@
import java.util.Map;
import org.eclipse.core.filebuffers.FileBuffers;
-import org.eclipse.core.filebuffers.ITextFileBuffer;
import org.eclipse.core.filebuffers.ITextFileBufferManager;
import org.eclipse.core.filebuffers.LocationKind;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Status;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
-import org.eclipse.jdt.internal.ui.refactoring.RefactoringSaveHelper;
-import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter;
-import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.ltk.core.refactoring.DocumentChange;
-import org.eclipse.ltk.core.refactoring.Refactoring;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
-import org.eclipse.ltk.ui.refactoring.UserInputWizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.TextEdit;
import org.eclipse.text.edits.UndoEdit;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.jdt.ui.Activator;
-import org.hibernate.eclipse.jdt.ui.internal.JdtUiMessages;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.Utils;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard.HibernateJPAWizard;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard.IHibernateJPAWizardData;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard.IHibernateJPAWizardParams;
/**
* Modify entity classes
*
* @author Vitali
*/
-public class AllEntitiesProcessor {
+public class AllEntitiesProcessor implements IHibernateJPAWizardParams {
/**
* place to search compilation units
@@ -89,17 +57,6 @@
protected AnnotStyle annotationStylePreference = AnnotStyle.FIELDS;
/**
- * group all information about changes of document in one structure
- */
- protected class ChangeStructure {
- public String fullyQualifiedName;
- public IPath path;
- public IDocument document;
- public TextEdit textEdit;
- public ITextFileBuffer textFileBuffer;
- public Change change;
- };
- /**
* change info storage
*/
protected ArrayList<ChangeStructure> changes = new ArrayList<ChangeStructure>();
@@ -255,7 +212,7 @@
if (entry.getValue().isAbstractFlag()) {
continue;
}
- collectModification(bufferManager, entry.getKey(), entry.getValue());
+ collectModification(bufferManager, entry.getKey(), entry.getValue(), entities);
}
} catch (CoreException e) {
HibernateConsolePlugin.getDefault().logErrorMessage("CoreException: ", e); //$NON-NLS-1$
@@ -263,7 +220,7 @@
}
public void collectModification(ITextFileBufferManager bufferManager, String fullyQualifiedName,
- EntityInfo entityInfo) throws CoreException {
+ EntityInfo entityInfo, Map<String, EntityInfo> entities) throws CoreException {
ChangeStructure cs = new ChangeStructure();
cs.fullyQualifiedName = fullyQualifiedName;
@@ -281,6 +238,7 @@
ProcessEntityInfo processor = new ProcessEntityInfo();
processor.setAnnotationStyle(annotationStyle);
processor.setEntityInfo(entityInfo);
+ processor.setEntities(entities);
processor.setASTRewrite(rewriter);
cu.accept(processor);
//
@@ -297,171 +255,23 @@
public boolean showRefactoringDialog(final Map<String, EntityInfo> entities,
final ITextFileBufferManager bufferManager) {
- final String wizard_title = JdtUiMessages.AllEntitiesProcessor_header;
+ IHibernateJPAWizardData data = new IHibernateJPAWizardData() {
- Refactoring ref = new Refactoring(){
-
- @Override
- public RefactoringStatus checkFinalConditions(IProgressMonitor pm){
- return RefactoringStatus.create(Status.OK_STATUS);
+ public ITextFileBufferManager getBufferManager() {
+ return bufferManager;
}
- @Override
- public RefactoringStatus checkInitialConditions(IProgressMonitor pm) {
- return RefactoringStatus.create(Status.OK_STATUS);
+ public Map<String, EntityInfo> getEntities() {
+ return entities;
}
- @Override
- public Change createChange(IProgressMonitor pm){
-
- final CompositeChange cc = new CompositeChange(""); //$NON-NLS-1$
- for (int i = 0; i < changes.size(); i++) {
- ChangeStructure cs = changes.get(i);
- String change_name = cs.fullyQualifiedName;
- DocumentChange change = new DocumentChange(change_name, cs.document);
- change.setEdit(cs.textEdit);
- cs.change = change;
- cc.add(change);
- }
- cc.markAsSynthetic();
- return cc;
+ public ArrayList<ChangeStructure> getChanges() {
+ return changes;
}
-
- @Override
- public String getName() {
- return JdtUiMessages.SaveQueryEditorListener_composite_change_name;
- }
- };
-
- final ModifyListener ml = new ModifyListener() {
-
- public void modifyText(ModifyEvent e) {
- int idx = ((Combo)e.getSource()).getSelectionIndex();
- if (idx == 0 && !getAnnotationStyle().equals(AnnotStyle.FIELDS)) {
- setAnnotationStyle(AnnotStyle.FIELDS);
- reCollectModification(bufferManager, entities);
- }
- else if (idx == 1 && !getAnnotationStyle().equals(AnnotStyle.GETTERS)) {
- setAnnotationStyle(AnnotStyle.GETTERS);
- reCollectModification(bufferManager, entities);
- }
- else if (idx == 2 && !getAnnotationStyle().equals(AnnotStyle.AUTO)) {
- setAnnotationStyle(getAnnotationStylePreference());
- reCollectModification(bufferManager, entities);
- setAnnotationStyle(AnnotStyle.AUTO);
- }
- }
};
-
- RefactoringWizard wizard = new RefactoringWizard(ref, RefactoringWizard.DIALOG_BASED_USER_INTERFACE) {
-
- @Override
- protected void addUserInputPages() {
- UserInputWizardPage page = new UserInputWizardPage(wizard_title) {
- public void createControl(Composite parent) {
- initializeDialogUnits(parent);
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- layout.numColumns = 1;
- Label label = new Label(container, SWT.NULL);
- label.setText(JdtUiMessages.AllEntitiesProcessor_message);
-
- TableViewer listViewer = new TableViewer(container, SWT.SINGLE | SWT.H_SCROLL
- | SWT.V_SCROLL | SWT.BORDER);
- //listViewer.setComparator(getViewerComparator());
- Control control = listViewer.getControl();
- GridData data = new GridData(GridData.FILL_BOTH
- | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
- data.heightHint = convertHeightInCharsToPixels(10);
- control.setLayoutData(data);
- listViewer.setContentProvider(new IStructuredContentProvider() {
- public Object[] getElements(Object inputElement) {
- return entities.values().toArray();
- }
-
- public void dispose() {
-
- }
-
- public void inputChanged(Viewer viewer, Object oldInput,
- Object newInput) {
-
- }
- });
-
- listViewer.setLabelProvider(new LabelProvider() {
-
- private Image classImage;
-
- {
- classImage = JavaElementImageProvider.getTypeImageDescriptor(false, false, 0, false).createImage();
-
- }
- @Override
- public String getText(Object element) {
- EntityInfo info = (EntityInfo) element;
- return info.getFullyQualifiedName();
- }
-
- @Override
- public Image getImage(Object element) {
- return classImage;
- }
-
- @Override
- public void dispose() {
- classImage.dispose();
- super.dispose();
- }
- });
-
- listViewer.setInput(entities);
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL)
- .grab(true, true)
- .hint(convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH),
- convertHorizontalDLUsToPixels(2 * IDialogConstants.BUTTON_BAR_HEIGHT)).applyTo(listViewer.getControl());
- //Button generateChoice = new Button(container, SWT.CHECK);
- //generateChoice.setText("fdwsdfv");
- Composite combolabel = new Composite(container, SWT.NULL);
- layout = new GridLayout();
- combolabel.setLayout(layout);
- layout.numColumns = 2;
- Label labelChoice = new Label(combolabel, SWT.NULL);
- labelChoice.setText(JdtUiMessages.AllEntitiesProcessor_setup_annotation_generation_preference);
- Combo generateChoice = new Combo(combolabel, SWT.READ_ONLY);
- generateChoice.add(JdtUiMessages.AllEntitiesProcessor_annotate_fields);
- generateChoice.add(JdtUiMessages.AllEntitiesProcessor_annotate_getters);
- generateChoice.add(JdtUiMessages.AllEntitiesProcessor_auto_select_from_class_preference);
- int idx = 0;
- if (getAnnotationStyle().equals(AnnotStyle.FIELDS)) {
- idx = 0;
- }
- else if (getAnnotationStyle().equals(AnnotStyle.GETTERS)) {
- idx = 1;
- }
- else if (getAnnotationStyle().equals(AnnotStyle.AUTO)) {
- idx = 2;
- }
- generateChoice.select(idx);
- generateChoice.addModifyListener(ml);
- setControl(container);
- }
- };
- addPage(page);
- }
-
- };
-
- wizard.setWindowTitle(wizard_title);
- wizard.setDefaultPageTitle(wizard_title);
-
- IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- RefactoringStarter rStarter = new RefactoringStarter();
- boolean res = rStarter.activate(wizard, win.getShell(), wizard_title, RefactoringSaveHelper.SAVE_ALL);
- RefactoringStatus rs = rStarter.getInitialConditionCheckingStatus();
- return res;
+ HibernateJPAWizard wizard = new HibernateJPAWizard(data, this);
+ return wizard.showWizard();
}
protected void setJavaProject(IJavaProject project) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/AnnotStyle.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/AnnotStyle.java 2009-01-12 19:37:40 UTC (rev 13001)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/AnnotStyle.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -1,5 +1,8 @@
package org.hibernate.eclipse.jdt.ui.internal.jpa.process;
+/**
+ * preferable annotation style enum type
+ */
public enum AnnotStyle {
FIELDS,
GETTERS,
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/ChangeStructure.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/ChangeStructure.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/ChangeStructure.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -0,0 +1,19 @@
+package org.hibernate.eclipse.jdt.ui.internal.jpa.process;
+
+import org.eclipse.core.filebuffers.ITextFileBuffer;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.text.edits.TextEdit;
+
+/**
+ * group all information about changes of document in one structure
+ */
+public class ChangeStructure {
+ public String fullyQualifiedName;
+ public IPath path;
+ public IDocument document;
+ public TextEdit textEdit;
+ public ITextFileBuffer textFileBuffer;
+ public Change change;
+}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/ProcessEntityInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/ProcessEntityInfo.java 2009-01-12 19:37:40 UTC (rev 13001)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/ProcessEntityInfo.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -12,11 +12,13 @@
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.ASTVisitor;
import org.eclipse.jdt.core.dom.Block;
+import org.eclipse.jdt.core.dom.BodyDeclaration;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.FieldDeclaration;
import org.eclipse.jdt.core.dom.ImportDeclaration;
@@ -28,15 +30,16 @@
import org.eclipse.jdt.core.dom.QualifiedName;
import org.eclipse.jdt.core.dom.ReturnStatement;
import org.eclipse.jdt.core.dom.SimpleName;
-import org.eclipse.jdt.core.dom.SimpleType;
import org.eclipse.jdt.core.dom.StringLiteral;
import org.eclipse.jdt.core.dom.Type;
import org.eclipse.jdt.core.dom.TypeDeclaration;
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.collect.CollectEntityInfo;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.JPAConst;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.common.OwnerType;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.RefEntityInfo;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.RefFieldInfo;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.RefType;
@@ -54,6 +57,10 @@
*/
protected EntityInfo entityInfo;
/**
+ * information about all entities
+ */
+ protected Map<String, EntityInfo> entities;
+ /**
* rewriter to generate new AST blocks
*/
protected ASTRewrite rewriter;
@@ -65,6 +72,10 @@
public void setEntityInfo(EntityInfo entityInfo) {
this.entityInfo = entityInfo;
}
+
+ public void setEntities(Map<String, EntityInfo> entities) {
+ this.entities = entities;
+ }
public void setASTRewrite(ASTRewrite rewriter) {
this.rewriter = rewriter;
@@ -283,7 +294,7 @@
if (type == null) {
return true;
}
- String returnIdentifier = getReturnIdentifier(node);
+ String returnIdentifier = CollectEntityInfo.getReturnIdentifier(node);
if (type.isSimpleType() || type.isPrimitiveType()) {
if (entityInfo.isAddGeneratedValueFlag()) {
String primaryIdName = entityInfo.getPrimaryIdName();
@@ -353,45 +364,34 @@
}
return true;
}
-
- // duplicate method from CollectEntityInfo
- public String getReturnIdentifier(MethodDeclaration node) {
- String res = null;
- List bodyStatemants = node.getBody().statements();
- Iterator it = bodyStatemants.iterator();
- for ( ; it.hasNext(); ) {
- Object obj = it.next();
- if (obj instanceof ReturnStatement) {
- ReturnStatement ret_statement = (ReturnStatement)obj;
- obj = ret_statement.getExpression();
- if (obj instanceof SimpleName) {
- SimpleName sn = (SimpleName)obj;
- res = sn.getIdentifier();
- }
- break;
- }
- }
- return res;
- }
- public boolean addSimpleMarkerAnnotation(FieldDeclaration node, String name) {
+ public boolean addSimpleMarkerAnnotation(BodyDeclaration node, String name) {
if (name == null || name.length() == 0) {
return false;
}
MarkerAnnotation matd = rewriter.getAST().newMarkerAnnotation();
matd.setTypeName(rewriter.getAST().newSimpleName(name));
- ListRewrite lrw = rewriter.getListRewrite(node, FieldDeclaration.MODIFIERS2_PROPERTY);
- lrw.insertFirst(matd, null);
+ ListRewrite lrw = null;
+ if (node instanceof FieldDeclaration) {
+ lrw = rewriter.getListRewrite(node, FieldDeclaration.MODIFIERS2_PROPERTY);
+ }
+ else if (node instanceof MethodDeclaration) {
+ lrw = rewriter.getListRewrite(node, MethodDeclaration.MODIFIERS2_PROPERTY);
+ }
+ if (lrw != null) {
+ lrw.insertFirst(matd, null);
+ }
return true;
}
- public boolean addComplexNormalAnnotation(FieldDeclaration node, String name, RefEntityInfo rei) {
+ public boolean addComplexNormalAnnotation(BodyDeclaration node, String name, RefEntityInfo rei) {
if (name == null || name.length() == 0) {
return false;
}
NormalAnnotation natd = rewriter.getAST().newNormalAnnotation();
MemberValuePair mvp = null;
- if (rei.mappedBy != null) {
+ if (rei.mappedBy != null && (rei.owner == OwnerType.YES ||
+ rei.owner == OwnerType.UNDEF)) {
mvp = rewriter.getAST().newMemberValuePair();
mvp.setName(rewriter.getAST().newSimpleName("mappedBy")); //$NON-NLS-1$
StringLiteral sl = rewriter.getAST().newStringLiteral();
@@ -402,41 +402,39 @@
if (mvp != null) {
natd.values().add(mvp);
}
- ListRewrite lrw = rewriter.getListRewrite(node, FieldDeclaration.MODIFIERS2_PROPERTY);
- lrw.insertFirst(natd, null);
- return true;
- }
-
- public boolean addSimpleMarkerAnnotation(MethodDeclaration node, String name) {
- if (name == null || name.length() == 0) {
- return false;
+ NormalAnnotation natd2 = null;
+ /** /
+ if (rei.owner == OwnerType.NO) {
+ natd2 = rewriter.getAST().newNormalAnnotation();
+ natd2.setTypeName(rewriter.getAST().newSimpleName(JPAConst.ANNOTATION_JOINCOLUMN));
+ mvp = null;
+ String fullyQualifiedName2 = rei.fullyQualifiedName;
+ EntityInfo entryInfo2 = entities.get(fullyQualifiedName2);
+ if (entryInfo2 != null) {
+ mvp = rewriter.getAST().newMemberValuePair();
+ mvp.setName(rewriter.getAST().newSimpleName("name")); //$NON-NLS-1$
+ StringLiteral sl = rewriter.getAST().newStringLiteral();
+ sl.setLiteralValue(entryInfo2.getPrimaryIdName());
+ mvp.setValue(sl);
+ }
+ if (mvp != null) {
+ natd2.values().add(mvp);
+ }
}
- MarkerAnnotation matd = rewriter.getAST().newMarkerAnnotation();
- matd.setTypeName(rewriter.getAST().newSimpleName(name));
- ListRewrite lrw = rewriter.getListRewrite(node, MethodDeclaration.MODIFIERS2_PROPERTY);
- lrw.insertFirst(matd, null);
- return true;
- }
-
- public boolean addComplexNormalAnnotation(MethodDeclaration node, String name, RefEntityInfo rei) {
- if (name == null || name.length() == 0) {
- return false;
+ /**/
+ ListRewrite lrw = null;
+ if (node instanceof FieldDeclaration) {
+ lrw = rewriter.getListRewrite(node, FieldDeclaration.MODIFIERS2_PROPERTY);
}
- NormalAnnotation natd = rewriter.getAST().newNormalAnnotation();
- MemberValuePair mvp = null;
- if (rei.mappedBy != null) {
- mvp = rewriter.getAST().newMemberValuePair();
- mvp.setName(rewriter.getAST().newSimpleName("mappedBy")); //$NON-NLS-1$
- StringLiteral sl = rewriter.getAST().newStringLiteral();
- sl.setLiteralValue(rei.mappedBy);
- mvp.setValue(sl);
+ else if (node instanceof MethodDeclaration) {
+ lrw = rewriter.getListRewrite(node, MethodDeclaration.MODIFIERS2_PROPERTY);
}
- natd.setTypeName(rewriter.getAST().newSimpleName(name));
- if (mvp != null) {
- natd.values().add(mvp);
+ if (lrw != null) {
+ if (natd2 != null) {
+ lrw.insertFirst(natd2, null);
+ }
+ lrw.insertFirst(natd, null);
}
- ListRewrite lrw = rewriter.getListRewrite(node, MethodDeclaration.MODIFIERS2_PROPERTY);
- lrw.insertFirst(natd, null);
return true;
}
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesList.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesList.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesList.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard;
+
+import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.ltk.ui.refactoring.UserInputWizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.hibernate.eclipse.jdt.ui.internal.JdtUiMessages;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.process.AnnotStyle;
+
+/**
+ * Entities list wizard page
+ *
+ * @author Vitali
+ */
+public class EntitiesList extends UserInputWizardPage {
+
+ protected IHibernateJPAWizardData data;
+
+ protected IHibernateJPAWizardParams params;
+
+ public EntitiesList(String name, IHibernateJPAWizardData data, IHibernateJPAWizardParams params) {
+ super(name);
+ this.data = data;
+ this.params = params;
+ }
+
+ public void createControl(Composite parent) {
+ initializeDialogUnits(parent);
+ Composite container = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ container.setLayout(layout);
+ layout.numColumns = 1;
+ Label label = new Label(container, SWT.NULL);
+ label.setText(JdtUiMessages.AllEntitiesProcessor_message);
+
+ TableViewer listViewer = new TableViewer(container, SWT.SINGLE | SWT.H_SCROLL
+ | SWT.V_SCROLL | SWT.BORDER);
+ //listViewer.setComparator(getViewerComparator());
+ Control control = listViewer.getControl();
+ GridData gridData = new GridData(GridData.FILL_BOTH
+ | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
+ gridData.heightHint = convertHeightInCharsToPixels(10);
+ control.setLayoutData(gridData);
+ listViewer.setContentProvider(new IStructuredContentProvider() {
+ public Object[] getElements(Object inputElement) {
+ return data.getEntities().values().toArray();
+ }
+
+ public void dispose() {
+
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput,
+ Object newInput) {
+
+ }
+ });
+
+ listViewer.setLabelProvider(new LabelProvider() {
+
+ private Image classImage;
+
+ {
+ classImage = JavaElementImageProvider.getTypeImageDescriptor(false, false, 0, false).createImage();
+
+ }
+ @Override
+ public String getText(Object element) {
+ EntityInfo info = (EntityInfo) element;
+ return info.getFullyQualifiedName();
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ return classImage;
+ }
+
+ @Override
+ public void dispose() {
+ classImage.dispose();
+ super.dispose();
+ }
+ });
+
+ listViewer.setInput(data.getEntities());
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL)
+ .grab(true, true)
+ .hint(convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH),
+ convertHorizontalDLUsToPixels(2 * IDialogConstants.BUTTON_BAR_HEIGHT)).applyTo(listViewer.getControl());
+ //Button generateChoice = new Button(container, SWT.CHECK);
+ //generateChoice.setText("fdwsdfv");
+ Composite combolabel = new Composite(container, SWT.NULL);
+ layout = new GridLayout();
+ combolabel.setLayout(layout);
+ layout.numColumns = 2;
+ Label labelChoice = new Label(combolabel, SWT.NULL);
+ labelChoice.setText(JdtUiMessages.AllEntitiesProcessor_setup_annotation_generation_preference);
+ Combo generateChoice = new Combo(combolabel, SWT.READ_ONLY);
+ generateChoice.add(JdtUiMessages.AllEntitiesProcessor_annotate_fields);
+ generateChoice.add(JdtUiMessages.AllEntitiesProcessor_annotate_getters);
+ generateChoice.add(JdtUiMessages.AllEntitiesProcessor_auto_select_from_class_preference);
+ int idx = 0;
+ if (params.getAnnotationStyle().equals(AnnotStyle.FIELDS)) {
+ idx = 0;
+ }
+ else if (params.getAnnotationStyle().equals(AnnotStyle.GETTERS)) {
+ idx = 1;
+ }
+ else if (params.getAnnotationStyle().equals(AnnotStyle.AUTO)) {
+ idx = 2;
+ }
+ generateChoice.select(idx);
+ final ModifyListener ml = new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ int idx = ((Combo)e.getSource()).getSelectionIndex();
+ if (idx == 0 && !params.getAnnotationStyle().equals(AnnotStyle.FIELDS)) {
+ params.setAnnotationStyle(AnnotStyle.FIELDS);
+ params.reCollectModification(data.getBufferManager(), data.getEntities());
+ }
+ else if (idx == 1 && !params.getAnnotationStyle().equals(AnnotStyle.GETTERS)) {
+ params.setAnnotationStyle(AnnotStyle.GETTERS);
+ params.reCollectModification(data.getBufferManager(), data.getEntities());
+ }
+ else if (idx == 2 && !params.getAnnotationStyle().equals(AnnotStyle.AUTO)) {
+ params.setAnnotationStyle(params.getAnnotationStylePreference());
+ params.reCollectModification(data.getBufferManager(), data.getEntities());
+ params.setAnnotationStyle(AnnotStyle.AUTO);
+ }
+ }
+
+ };
+ generateChoice.addModifyListener(ml);
+ setControl(container);
+ }
+}
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPARefactoring.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPARefactoring.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPARefactoring.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.CompositeChange;
+import org.eclipse.ltk.core.refactoring.DocumentChange;
+import org.eclipse.ltk.core.refactoring.Refactoring;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.hibernate.eclipse.jdt.ui.internal.JdtUiMessages;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.process.ChangeStructure;
+
+/**
+ * Hibernate JPA refactoring
+ *
+ * @author Vitali
+ */
+public class HibernateJPARefactoring extends Refactoring {
+
+ /**
+ * change info storage
+ */
+ protected ArrayList<ChangeStructure> changes;
+
+ public HibernateJPARefactoring(ArrayList<ChangeStructure> changes) {
+ this.changes = changes;
+ }
+
+ @Override
+ public RefactoringStatus checkFinalConditions(IProgressMonitor pm){
+ return RefactoringStatus.create(Status.OK_STATUS);
+ }
+
+ @Override
+ public RefactoringStatus checkInitialConditions(IProgressMonitor pm) {
+ return RefactoringStatus.create(Status.OK_STATUS);
+ }
+
+ @Override
+ public Change createChange(IProgressMonitor pm){
+
+ final CompositeChange cc = new CompositeChange(""); //$NON-NLS-1$
+ for (int i = 0; i < changes.size(); i++) {
+ ChangeStructure cs = changes.get(i);
+ String change_name = cs.fullyQualifiedName;
+ DocumentChange change = new DocumentChange(change_name, cs.document);
+ change.setEdit(cs.textEdit);
+ cs.change = change;
+ cc.add(change);
+ }
+ cc.markAsSynthetic();
+ return cc;
+ }
+
+ @Override
+ public String getName() {
+ return JdtUiMessages.SaveQueryEditorListener_composite_change_name;
+ }
+}
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizard.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizard.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard;
+
+import org.eclipse.jdt.internal.ui.refactoring.RefactoringSaveHelper;
+import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
+import org.eclipse.ltk.ui.refactoring.UserInputWizardPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.hibernate.eclipse.jdt.ui.internal.JdtUiMessages;
+
+/**
+ * Hibernate JPA refactoring wizard dialog
+ *
+ * @author Vitali
+ */
+public class HibernateJPAWizard extends RefactoringWizard {
+
+ protected final String wizard_title = JdtUiMessages.AllEntitiesProcessor_header;
+
+ protected IHibernateJPAWizardData data;
+
+ protected IHibernateJPAWizardParams params;
+
+ public HibernateJPAWizard(IHibernateJPAWizardData data, IHibernateJPAWizardParams params) {
+ super(new HibernateJPARefactoring(data.getChanges()), RefactoringWizard.WIZARD_BASED_USER_INTERFACE);
+ this.data = data;
+ this.params = params;
+ setWindowTitle(wizard_title);
+ setDefaultPageTitle(wizard_title);
+ }
+
+ @Override
+ protected void addUserInputPages() {
+ UserInputWizardPage page = new EntitiesList(wizard_title, data, params);
+ addPage(page);
+ UserInputWizardPage page2 = new ResolveAmbiguous(wizard_title, data, params);
+ addPage(page2);
+ }
+
+ public HibernateJPARefactoring getHibernateJPARefactoring() {
+ return (HibernateJPARefactoring)getRefactoring();
+ }
+
+ public boolean showWizard() {
+ IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ RefactoringStarter refactoringStarter = new RefactoringStarter();
+ boolean res = refactoringStarter.activate(this, win.getShell(), wizard_title, RefactoringSaveHelper.SAVE_ALL);
+ RefactoringStatus rs = refactoringStarter.getInitialConditionCheckingStatus();
+ return res;
+ }
+
+}
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardData.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardData.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardData.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard;
+
+import java.util.ArrayList;
+import java.util.Map;
+
+import org.eclipse.core.filebuffers.ITextFileBufferManager;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.process.ChangeStructure;
+
+/**
+ * Hibernate JPA wizard data for modification provide interface
+ *
+ * @author Vitali
+ */
+public interface IHibernateJPAWizardData {
+
+ public Map<String, EntityInfo> getEntities();
+
+ public ITextFileBufferManager getBufferManager();
+
+ public ArrayList<ChangeStructure> getChanges();
+}
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardParams.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardParams.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/IHibernateJPAWizardParams.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard;
+
+import java.util.Map;
+
+import org.eclipse.core.filebuffers.ITextFileBufferManager;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.process.AnnotStyle;
+
+/**
+ * Hibernate JPA wizard input parameters interface
+ *
+ * @author Vitali
+ */
+public interface IHibernateJPAWizardParams {
+
+ public AnnotStyle getAnnotationStyle();
+
+ public void setAnnotationStyle(AnnotStyle annotationStyle);
+
+ public AnnotStyle getAnnotationStylePreference();
+
+ public void reCollectModification(ITextFileBufferManager bufferManager,
+ Map<String, EntityInfo> entities);
+}
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/ResolveAmbiguous.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/ResolveAmbiguous.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/ResolveAmbiguous.java 2009-01-12 20:22:25 UTC (rev 13002)
@@ -0,0 +1,480 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.jdt.ui.internal.jpa.process.wizard;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.ltk.ui.refactoring.UserInputWizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.custom.TableEditor;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.hibernate.eclipse.jdt.ui.internal.JdtUiMessages;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.common.OwnerType;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.common.RefEntityInfo;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.common.RefFieldInfo;
+import org.hibernate.eclipse.jdt.ui.internal.jpa.common.RefType;
+
+/**
+ * Resolve ambiguous list wizard page
+ *
+ * @author Vitali
+ */
+public class ResolveAmbiguous extends UserInputWizardPage {
+
+ protected IHibernateJPAWizardData data;
+
+ protected IHibernateJPAWizardParams params;
+
+ protected final int COLUMN_CLASS = 0;
+ protected final int COLUMN_ASSOCIATION = 1;
+ protected final int COLUMN_TYPE = 2;
+ protected final int COLUMN_RELATED = 3;
+ protected final int COLUMN_OWNER = 4;
+
+ protected Table table;
+ protected TableEditor editorType;
+ protected TableEditor editorRel;
+ protected TableEditor editorOwner;
+
+ protected EditorTypeModifyListener editorTypeModifyListener = new EditorTypeModifyListener();
+ protected EditorRelModifyListener editorRelModifyListener = new EditorRelModifyListener();
+ protected EditorOwnerModifyListener editorOwnerModifyListener = new EditorOwnerModifyListener();
+
+ public ResolveAmbiguous(String name, IHibernateJPAWizardData data, IHibernateJPAWizardParams params) {
+ super(name);
+ this.data = data;
+ this.params = params;
+ }
+
+ public void createControl(Composite parent) {
+ Composite container = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ container.setLayout(layout);
+ layout.numColumns = 1;
+ Label label = new Label(container, SWT.NULL);
+ label.setText(JdtUiMessages.ResolveAmbiguous_message);
+ table = new Table(container, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION );
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+ createTableColumns(table);
+ TableItem ti = null;
+ Iterator<Map.Entry<String, EntityInfo>> it = data.getEntities().entrySet().iterator();
+ while (it.hasNext()) {
+ Map.Entry<String, EntityInfo> entry = it.next();
+ if (entry.getValue().isAbstractFlag()) {
+ continue;
+ }
+ //collectModification(bufferManager, entry.getKey(), entry.getValue());
+ Iterator<Map.Entry<String, RefEntityInfo>> referencesIt =
+ entry.getValue().getReferences().entrySet().iterator();
+ while (referencesIt.hasNext()) {
+ Map.Entry<String, RefEntityInfo> entryRef = referencesIt.next();
+ RefEntityInfo rei = entryRef.getValue();
+ ti = new TableItem(table, SWT.NONE);
+ ti.setData(rei);
+ ti.setText(COLUMN_CLASS, entry.getKey());
+ String shortName = getShortName(rei.fullyQualifiedName);
+ ti.setText(COLUMN_ASSOCIATION, shortName + " " + entryRef.getKey()); //$NON-NLS-1$
+ ti.setText(COLUMN_TYPE, rei.refType.toString());
+ if (null != rei.mappedBy) {
+ ti.setText(COLUMN_RELATED, rei.mappedBy);
+ }
+ else {
+ ti.setText(COLUMN_RELATED, JdtUiMessages.ResolveAmbiguous_empty);
+ }
+ ti.setText(COLUMN_OWNER, rei.owner.toString());
+ }
+ }
+ //
+ editorType = new TableEditor(table);
+ //The editor must have the same size as the cell and must
+ //not be any smaller than 50 pixels.
+ editorType.horizontalAlignment = SWT.LEFT;
+ editorType.grabHorizontal = true;
+ editorType.minimumWidth = 50;
+ //
+ editorRel = new TableEditor(table);
+ //The editor must have the same size as the cell and must
+ //not be any smaller than 50 pixels.
+ editorRel.horizontalAlignment = SWT.LEFT;
+ editorRel.grabHorizontal = true;
+ editorRel.minimumWidth = 50;
+ //
+ editorOwner = new TableEditor(table);
+ //The editor must have the same size as the cell and must
+ //not be any smaller than 50 pixels.
+ editorOwner.horizontalAlignment = SWT.LEFT;
+ editorOwner.grabHorizontal = true;
+ editorOwner.minimumWidth = 50;
+ // editing the second column
+ table.addSelectionListener(new TableSelectionListener());
+ GridData data = new GridData(GridData.FILL_BOTH
+ | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
+ data.heightHint = convertHeightInCharsToPixels(10);
+ table.setLayoutData(data);
+ setControl(container);
+ }
+
+ protected class EditorTypeModifyListener implements ModifyListener {
+ public void modifyText(ModifyEvent e) {
+ CCombo text = (CCombo)editorType.getEditor();
+ String str = text.getText();
+ //editorType.getItem().setText(COLUMN_TYPE, str);
+ TableItem ti = editorType.getItem();
+ RefEntityInfo rei = (RefEntityInfo)ti.getData();
+ RefType oldVal = rei.refType;
+ OwnerType oldVal2 = rei.owner;
+ if (str.equalsIgnoreCase(RefType.ONE2ONE.toString())) {
+ rei.refType = RefType.ONE2ONE;
+ }
+ else if (str.equalsIgnoreCase(RefType.ONE2MANY.toString())) {
+ rei.refType = RefType.ONE2MANY;
+ rei.owner = OwnerType.YES;
+ }
+ else if (str.equalsIgnoreCase(RefType.MANY2ONE.toString())) {
+ rei.refType = RefType.MANY2ONE;
+ rei.owner = OwnerType.NO;
+ }
+ else if (str.equalsIgnoreCase(RefType.MANY2MANY.toString())) {
+ rei.refType = RefType.MANY2MANY;
+ }
+ else if (str.equalsIgnoreCase(RefType.UNDEF.toString())) {
+ rei.refType = RefType.UNDEF;
+ }
+ if (oldVal != rei.refType || oldVal2 != rei.owner) {
+ RefEntityInfo rei2 = findMappedRefEntityInfo(rei);
+ // firstly search
+ TableItem ti2 = findTableItem(rei2, rei);
+ // then - update
+ updateDependentRefEntityInfoType(rei, rei2);
+ updateEditorOwner(ti);
+ updateTI(ti);
+ updateTI(ti2);
+ params.reCollectModification(data.getBufferManager(), data.getEntities());
+ }
+ }
+ }
+
+ public void updateDependentRefEntityInfoType(RefEntityInfo rei, RefEntityInfo rei2) {
+ if (rei == null) {
+ return;
+ }
+ if (rei.refType == RefType.MANY2ONE) {
+ rei.owner = OwnerType.NO;
+ if (rei2 != null) {
+ rei2.refType = RefType.ONE2MANY;
+ rei2.owner = OwnerType.YES;
+ }
+ }
+ if (rei.refType == RefType.ONE2MANY) {
+ rei.owner = OwnerType.YES;
+ if (rei2 != null) {
+ rei2.refType = RefType.MANY2ONE;
+ rei2.owner = OwnerType.NO;
+ }
+ }
+ }
+
+ public void updateEditorType(TableItem item) {
+ // Clean up any previous editor control
+ Control oldEditorType = editorType.getEditor();
+ if (oldEditorType != null) {
+ oldEditorType.dispose();
+ }
+ // The control that will be the editor must be a child of the Table
+ CCombo comboType = new CCombo(table, SWT.NONE);
+ comboType.setEditable(false);
+ Color bkgnd = table.getBackground();
+ comboType.setBackground(bkgnd);
+ RefEntityInfo rei = (RefEntityInfo)item.getData();
+ comboType.add(RefType.ONE2ONE.toString());
+ comboType.add(RefType.ONE2MANY.toString());
+ comboType.add(RefType.MANY2ONE.toString());
+ comboType.add(RefType.MANY2MANY.toString());
+ comboType.add(RefType.UNDEF.toString());
+ comboType.setText(rei.refType.toString());
+ comboType.addModifyListener(editorTypeModifyListener);
+ //comboType.selectAll();
+ comboType.setFocus();
+ editorType.setEditor(comboType, item, COLUMN_TYPE);
+ }
+
+ protected class EditorRelModifyListener implements ModifyListener {
+ public void modifyText(ModifyEvent e) {
+ CCombo text = (CCombo)editorRel.getEditor();
+ String str = text.getText();
+ //editorRel.getItem().setText(COLUMN_RELATED, str);
+ TableItem ti = editorRel.getItem();
+ RefEntityInfo rei = (RefEntityInfo)ti.getData();
+ String oldVal = rei.mappedBy;
+ if (JdtUiMessages.ResolveAmbiguous_empty.equals(str)) {
+ rei.mappedBy = null;
+ }
+ else {
+ rei.mappedBy = str;
+ }
+ if (oldVal != rei.mappedBy) {
+ rei.refType = RefType.UNDEF;
+ rei.owner = OwnerType.UNDEF;
+ //RefEntityInfo rei2 = findMappedRefEntityInfo(rei);
+ // firstly search
+ //TableItem ti2 = findTableItem(rei2, rei);
+ // then - update
+ updateEditorType(ti);
+ updateEditorOwner(ti);
+ updateTI(ti);
+ params.reCollectModification(data.getBufferManager(), data.getEntities());
+ }
+ }
+ }
+
+ public void updateEditorRel(TableItem item) {
+ // Clean up any previous editor control
+ Control oldEditorRel = editorRel.getEditor();
+ if (oldEditorRel != null) {
+ oldEditorRel.dispose();
+ }
+ CCombo comboRel = new CCombo(table, SWT.NONE);
+ comboRel.setEditable(false);
+ Color bkgnd = table.getBackground();
+ comboRel.setBackground(bkgnd);
+ comboRel.add(JdtUiMessages.ResolveAmbiguous_empty);
+ String fullyQualifiedName = item.getText(0);
+ RefEntityInfo rei = (RefEntityInfo)item.getData();
+ Set<RefFieldInfo> setRefEntityInfo = findRelatedRefFieldInfos(fullyQualifiedName, rei);
+ Iterator<RefFieldInfo> itTmp = setRefEntityInfo.iterator();
+ while (itTmp.hasNext()) {
+ RefFieldInfo rfi = itTmp.next();
+ comboRel.add(rfi.fieldId);
+ }
+ if (null != rei.mappedBy) {
+ comboRel.setText(rei.mappedBy);
+ }
+ else {
+ comboRel.setText(JdtUiMessages.ResolveAmbiguous_empty);
+ }
+ comboRel.addModifyListener(editorRelModifyListener);
+ //comboRel.selectAll();
+ //comboRel.setFocus();
+ editorRel.setEditor(comboRel, item, COLUMN_RELATED);
+ }
+
+ protected class EditorOwnerModifyListener implements ModifyListener {
+ public void modifyText(ModifyEvent e) {
+ CCombo text = (CCombo)editorOwner.getEditor();
+ String str = text.getText();
+ //editorOwner.getItem().setText(COLUMN_OWNER, str);
+ TableItem ti = editorOwner.getItem();
+ RefEntityInfo rei = (RefEntityInfo)ti.getData();
+ OwnerType oldVal = rei.owner;
+ if (str.equalsIgnoreCase(OwnerType.YES.toString())) {
+ rei.owner = OwnerType.YES;
+ }
+ else if (str.equalsIgnoreCase(OwnerType.NO.toString())) {
+ rei.owner = OwnerType.NO;
+ }
+ else if (str.equalsIgnoreCase(OwnerType.UNDEF.toString())) {
+ rei.owner = OwnerType.UNDEF;
+ }
+ if (oldVal != rei.owner) {
+ RefEntityInfo rei2 = findMappedRefEntityInfo(rei);
+ // firstly search
+ TableItem ti2 = findTableItem(rei2, rei);
+ // then - update
+ updateDependentRefEntityInfoOwner(rei, rei2);
+ updateEditorType(ti);
+ updateTI(ti);
+ updateTI(ti2);
+ params.reCollectModification(data.getBufferManager(), data.getEntities());
+ }
+ }
+ }
+
+ public void updateDependentRefEntityInfoOwner(RefEntityInfo rei, RefEntityInfo rei2) {
+ if (rei == null) {
+ return;
+ }
+ if (rei2 != null) {
+ if (rei.refType == RefType.ONE2ONE || rei.refType == RefType.MANY2MANY) {
+ if (rei.owner == OwnerType.YES) {
+ rei2.owner = OwnerType.NO;
+ } else if (rei.owner == OwnerType.NO) {
+ rei2.owner = OwnerType.YES;
+ }
+ }
+ }
+ if (rei.refType == RefType.MANY2ONE) {
+ if (rei.owner == OwnerType.YES) {
+ rei.refType = RefType.UNDEF;
+ if (rei2 != null) {
+ rei2.refType = RefType.UNDEF;
+ rei2.owner = OwnerType.NO;
+ }
+ }
+ else if (rei2 != null) {
+ rei2.owner = OwnerType.YES;
+ }
+ }
+ if (rei.refType == RefType.ONE2MANY) {
+ if (rei.owner == OwnerType.NO) {
+ rei.refType = RefType.UNDEF;
+ if (rei2 != null) {
+ rei2.refType = RefType.UNDEF;
+ rei2.owner = OwnerType.YES;
+ }
+ }
+ else if (rei2 != null) {
+ rei2.owner = OwnerType.NO;
+ }
+ }
+ }
+
+ public void updateEditorOwner(TableItem item) {
+ // Clean up any previous editor control
+ Control oldEditorOwner = editorOwner.getEditor();
+ if (oldEditorOwner != null) {
+ oldEditorOwner.dispose();
+ }
+ RefEntityInfo rei = (RefEntityInfo)item.getData();
+ CCombo comboOwner = new CCombo(table, SWT.NONE);
+ comboOwner.setEditable(false);
+ Color bkgnd = table.getBackground();
+ comboOwner.setBackground(bkgnd);
+ comboOwner.add(OwnerType.YES.toString());
+ comboOwner.add(OwnerType.NO.toString());
+ comboOwner.setText(rei.owner.toString());
+ comboOwner.addModifyListener(editorOwnerModifyListener);
+ editorOwner.setEditor(comboOwner, item, COLUMN_OWNER);
+ }
+
+ protected class TableSelectionListener extends SelectionAdapter {
+ public void widgetSelected(SelectionEvent e) {
+ // Identify the selected row
+ TableItem item = (TableItem)e.item;
+ if (item == null) {
+ return;
+ }
+ updateEditorType(item);
+ updateEditorRel(item);
+ updateEditorOwner(item);
+ }
+ }
+
+ public void updateTI(TableItem ti) {
+ if (ti == null) {
+ return;
+ }
+ RefEntityInfo rei = (RefEntityInfo)ti.getData();
+ ti.setText(COLUMN_TYPE, rei.refType.toString());
+ if (null != rei.mappedBy) {
+ ti.setText(COLUMN_RELATED, rei.mappedBy);
+ }
+ else {
+ ti.setText(COLUMN_RELATED, JdtUiMessages.ResolveAmbiguous_empty);
+ }
+ ti.setText(COLUMN_OWNER, rei.owner.toString());
+ }
+
+ protected void createTableColumns(Table table) {
+ TableColumn column = null;
+
+ column = new TableColumn(table, SWT.LEFT, COLUMN_CLASS);
+ column.setText(JdtUiMessages.ResolveAmbiguous_column_Class);
+ column.setWidth(200);
+
+ column = new TableColumn(table, SWT.LEFT, COLUMN_ASSOCIATION);
+ column.setText(JdtUiMessages.ResolveAmbiguous_column_Association);
+ column.setWidth(100);
+
+ column = new TableColumn(table, SWT.LEFT, COLUMN_TYPE);
+ column.setText(JdtUiMessages.ResolveAmbiguous_column_Type);
+ column.setWidth(80);
+
+ column = new TableColumn(table, SWT.LEFT, COLUMN_RELATED);
+ column.setText(JdtUiMessages.ResolveAmbiguous_column_Related);
+ column.setWidth(70);
+
+ column = new TableColumn(table, SWT.LEFT, COLUMN_OWNER);
+ column.setText(JdtUiMessages.ResolveAmbiguous_column_Owner);
+ column.setWidth(50);
+ }
+
+ public String getShortName(String fullyQualifiedName) {
+ int idx = fullyQualifiedName.lastIndexOf('.');
+ if (idx == -1) {
+ return fullyQualifiedName;
+ }
+ return fullyQualifiedName.substring(idx + 1);
+ }
+
+ protected Set<RefFieldInfo> findRelatedRefFieldInfos(
+ String fullyQualifiedName, RefEntityInfo rei) {
+ String fullyQualifiedName2 = rei.fullyQualifiedName;
+ EntityInfo entryInfo2 = data.getEntities().get(fullyQualifiedName2);
+ Set<RefFieldInfo> setRefEntityInfo = entryInfo2.getRefFieldInfoSet(fullyQualifiedName);
+ return setRefEntityInfo;
+ }
+
+ protected RefEntityInfo findMappedRefEntityInfo(RefEntityInfo rei) {
+ if (rei.mappedBy == null) {
+ return null;
+ }
+ String fullyQualifiedName2 = rei.fullyQualifiedName;
+ EntityInfo entryInfo2 = data.getEntities().get(fullyQualifiedName2);
+ RefEntityInfo refEntityInfo = entryInfo2.getFieldIdRefEntityInfo(rei.mappedBy);
+ return refEntityInfo;
+ }
+
+ public String getFieldId(String fieldId) {
+ int idx = fieldId.lastIndexOf(' ');
+ if (idx == -1) {
+ return fieldId;
+ }
+ return fieldId.substring(idx + 1);
+ }
+
+ protected TableItem findTableItem(RefEntityInfo rei1, RefEntityInfo rei2) {
+ if (rei1 == null || rei2 == null ) {
+ return null;
+ }
+ TableItem ti = null, tiRes = null;
+ TableItem[] tis = table.getItems();
+ for (int i = 0; i < tis.length; i++) {
+ ti = tis[i];
+ if (!ti.getText(COLUMN_CLASS).equals(rei2.fullyQualifiedName)) {
+ continue;
+ }
+ String fieldId1 = getFieldId(ti.getText(COLUMN_ASSOCIATION));
+ String fieldId2 = ti.getText(COLUMN_RELATED);
+ if (fieldId2.equals(rei1.mappedBy) && fieldId1.equals(rei2.mappedBy)) {
+ tiRes = ti;
+ break;
+ }
+ }
+ return tiRes;
+ }
+}
16 years
JBoss Tools SVN: r13001 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-01-12 14:37:40 -0500 (Mon, 12 Jan 2009)
New Revision: 13001
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataGrid.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dropDownMenu.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/menuGroup.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/menuItem.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/tree.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/treeNode.xhtml.xml
Log:
CODING IN PROGRESS - issue JBIDE-3511: Text body of h:outputText and h:outputFormat is rendered in incorrect sequence.
https://jira.jboss.org/jira/browse/JBIDE-3511
- JUnit tests in richfaces package have been fixed completely.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataGrid.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataGrid.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataGrid.xhtml.xml 2009-01-12 19:37:40 UTC (rev 13001)
@@ -1,5 +1,6 @@
<tests>
<test id="dataGrid">
+
<TABLE VALUE="#{bean.dtList}" VAR="data" COLUMNS="2" ELEMENTS="4"
ID="dataGrid" CLASS="dr-table rich-table">
<COLGROUP SPAN="2">
@@ -7,48 +8,96 @@
<TBODY>
<TR CLASS="dr-table-row rich-table-row">
<TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel" >
+ <DIV CLASS="dr-pnl rich-panel">
<DIV CLASS="dr-pnl-h rich-panel-header"
STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN> #{data.number}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{data.number}
+</SPAN>
+ </SPAN>
</DIV>
<DIV CLASS="dr-pnl-b rich-panel-body">
- <SPAN> #{data.field1}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{data.field1}
+</SPAN>
+ </SPAN>
</DIV>
</DIV>
</TD>
<TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel" >
+ <DIV CLASS="dr-pnl rich-panel">
<DIV CLASS="dr-pnl-h rich-panel-header"
STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN> #{data.number}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{data.number}
+</SPAN>
+ </SPAN>
</DIV>
<DIV CLASS="dr-pnl-b rich-panel-body">
- <SPAN> #{data.field1}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{data.field1}
+</SPAN>
+ </SPAN>
</DIV>
</DIV>
</TD>
</TR>
<TR CLASS="dr-table-row rich-table-row">
<TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel" >
+ <DIV CLASS="dr-pnl rich-panel">
<DIV CLASS="dr-pnl-h rich-panel-header"
STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN> #{data.number}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{data.number}
+</SPAN>
+ </SPAN>
</DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body" >
- <SPAN> #{data.field1}</SPAN>
+ <DIV CLASS="dr-pnl-b rich-panel-body">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{data.field1}
+</SPAN>
+ </SPAN>
</DIV>
</DIV>
</TD>
<TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel" >
+ <DIV CLASS="dr-pnl rich-panel">
<DIV CLASS="dr-pnl-h rich-panel-header"
STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN> #{data.number}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{data.number}
+</SPAN>
+ </SPAN>
</DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body" >
- <SPAN> #{data.field1}</SPAN>
+ <DIV CLASS="dr-pnl-b rich-panel-body">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{data.field1}
+</SPAN>
+ </SPAN>
</DIV>
</DIV>
</TD>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml 2009-01-12 19:37:40 UTC (rev 13001)
@@ -1,28 +1,57 @@
<tests>
<test id="dataTable">
+
<TABLE WIDTH="700" CELLSPACING="0" CELLPADDING="0" BORDER="0"
- VAR="row" VALUE="#{bean.dtList}" ROWKEYVAR="rowKey" CLASS="dr-table rich-table">
+ VAR="row" VALUE="#{bean.dtList}" ROWKEYVAR="rowKey" ID="dataTable"
+ CLASS="dr-table rich-table">
<COLGROUP SPAN="1">
</COLGROUP>
<THEAD>
<TR CLASS="dr-table-header rich-table-header"
STYLE="/background-image: url\(.*resources/common/background.gif\);/">
<TD ROWSPAN="2" CLASS="dr-table-headercell rich-table-headercell">
- <IMG WIDTH="1" HEIGHT="1" SRC="/.*resources/spacer/spacer.gif/"/>
+ <IMG WIDTH="1" HEIGHT="1"
+ SRC="/.*resources/spacer/spacer.gif/"
+ CLASS="rich-spacer" />
+
</TD>
<TD COLSPAN="3" CLASS="dr-table-headercell rich-table-headercell">
- <SPAN> FIELDS</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ FIELDS
+</SPAN>
+ </SPAN>
</TD>
</TR>
<TR CLASS="dr-table-header-continue rich-table-header-continue">
<TD BREAKBEFORE="true" CLASS="dr-table-headercell rich-table-headercell">
- <SPAN> field1</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ field1
+</SPAN>
+ </SPAN>
</TD>
<TD CLASS="dr-table-headercell rich-table-headercell">
- <SPAN> field2</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ field2
+</SPAN>
+ </SPAN>
</TD>
<TD CLASS="dr-table-headercell rich-table-headercell">
- <SPAN> field3</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ field3
+</SPAN>
+ </SPAN>
</TD>
</TR>
</THEAD>
@@ -30,31 +59,74 @@
<TR CLASS="dr-table-footer rich-table-footer">
<TD CLASS="dr-table-footercell rich-table-footercell">
<BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD CLASS="dr-table-footercell rich-table-footercell">
- <SPAN> footer1</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ footer1
+</SPAN>
+ </SPAN>
</TD>
<TD CLASS="dr-table-footercell rich-table-footercell">
- <SPAN> footer2</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ footer2
+</SPAN>
+ </SPAN>
</TD>
<TD CLASS="dr-table-footercell rich-table-footercell">
- <SPAN> footer3</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ footer3
+</SPAN>
+ </SPAN>
</TD>
</TR>
</TFOOT>
<TBODY>
<TR CLASS="dr-subtable-cell rich-subtable-cell">
<TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> #{rowKey}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{rowKey}
+</SPAN>
+ </SPAN>
</TD>
<TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> #{row.field1}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{row.field1}
+</SPAN>
+ </SPAN>
</TD>
<TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> #{row.field2}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{row.field2}
+</SPAN>
+ </SPAN>
</TD>
<TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> #{row.field3}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{row.field3}
+</SPAN>
+ </SPAN>
</TD>
</TR>
</TBODY>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dropDownMenu.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dropDownMenu.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dropDownMenu.xhtml.xml 2009-01-12 19:37:40 UTC (rev 13001)
@@ -1,72 +1,100 @@
<tests>
- <test id="dropDownMenu">
-
-<UL VPE-DDM-MENU-TITLE-UL="" >
-<LI VPE-DDM-MENU-TITLE-LI="" CLASS="rich-ddmenu-label rich-ddmenu-label-unselect" STYLE="" >
-<DIV CLASS="dr-menu-top-div" >
-<SPAN CLASS="rich-label-text-decor" >
-Menu 1
+ <test id="dropDownMenu">
+
+ <UL VPE-DDM-MENU-TITLE-UL="">
+ <LI VPE-DDM-MENU-TITLE-LI=""
+ CLASS="rich-ddmenu-label rich-ddmenu-label-unselect" STYLE="">
+ <DIV CLASS="dr-menu-top-div">
+ <SPAN CLASS="rich-label-text-decor">
+ Menu 1
</SPAN>
-</DIV>
-<UL VPE-DDM-MENU-CHILDREN-UL="" CLASS="rich-menu-list-border rich-menu-list-bg" STYLE="" >
-<LI VPE-DDM-MENU-LI="" CLASS="rich-menu-item" STYLE="" >
-<DIV CLASS="dr-menu-item-top-div" >
-<SPAN CLASS="rich-menu-item-icon" >
-<IMG SRC="/.*resources/menuItem/spacer.gif/" />
+ </DIV>
+ <UL VPE-DDM-MENU-CHILDREN-UL=""
+ CLASS="rich-menu-list-border rich-menu-list-bg" STYLE="">
+ <LI VPE-DDM-MENU-LI="" CLASS="rich-menu-item" STYLE="">
+ <DIV CLASS="dr-menu-item-top-div">
+ <SPAN CLASS="rich-menu-item-icon">
+ <IMG
+ SRC="/.*resources/menuItem/spacer.gif/" />
+ </SPAN>
+ <SPAN CLASS="rich-menu-item-label">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Item 1
</SPAN>
-<SPAN CLASS="rich-menu-item-label" >
-<SPAN >
-Item 1
-</SPAN>
-</SPAN>
-</DIV>
-</LI>
-<LI VPE-DDM-MENU-LI="" CLASS="rich-menu-group" STYLE="" >
-<DIV CLASS="dr-menu-group-top-div" >
-<SPAN CLASS="rich-menu-item-icon-enabled" >
-<IMG SRC="/.*resources/menuGroup/spacer.gif/" />
+ </SPAN>
+ </SPAN>
+ </DIV>
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+ </LI>
+ <LI VPE-DDM-MENU-LI="" CLASS="rich-menu-group" STYLE="">
+ <DIV CLASS="dr-menu-group-top-div">
+ <SPAN CLASS="rich-menu-item-icon-enabled">
+ <IMG
+ SRC="/.*resources/menuGroup/spacer.gif/" />
+
+ </SPAN>
+ <SPAN CLASS="rich-menu-item-label rich-menu-group-label">
+ Group 2
</SPAN>
-<SPAN CLASS="rich-menu-item-label rich-menu-group-label" >
-Group 2
-</SPAN>
-<SPAN CLASS="rich-menu-item-folder rich-menu-group-folder" STYLE="" >
-<IMG SRC="/.*resources/menuGroup/arrow.gif/" />
-</SPAN>
-</DIV>
-<UL VPE-DDM-MENU-UL="" CLASS="rich-menu-list-border rich-menu-list-bg" >
-<LI VPE-DDM-MENU-LI="" CLASS="rich-menu-item" STYLE="" >
-<DIV CLASS="dr-menu-item-top-div" >
-<SPAN CLASS="rich-menu-item-icon" >
-<IMG SRC="/.*resources/menuItem/spacer.gif/" />
+ <SPAN CLASS="rich-menu-item-folder rich-menu-group-folder"
+ STYLE="">
+ <IMG
+ SRC="/.*resources/menuGroup/arrow.gif/" />
+ </SPAN>
+ </DIV>
+ <UL VPE-DDM-MENU-UL="" CLASS="rich-menu-list-border rich-menu-list-bg">
+ <LI VPE-DDM-MENU-LI="" CLASS="rich-menu-item" STYLE="">
+ <DIV CLASS="dr-menu-item-top-div">
+ <SPAN CLASS="rich-menu-item-icon">
+ <IMG
+ SRC="/.*resources/menuItem/spacer.gif/" />
+
+ </SPAN>
+ <SPAN CLASS="rich-menu-item-label">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Item 2
</SPAN>
-<SPAN CLASS="rich-menu-item-label" >
-<SPAN>
-Item 2
-</SPAN>
-</SPAN>
-</DIV>
-</LI>
-</UL>
-</LI>
-<LI VPE-DDM-MENU-LI="" CLASS="rich-menu-item" STYLE="" >
-<DIV CLASS="dr-menu-item-top-div" >
-<SPAN CLASS="rich-menu-item-icon" >
-<IMG SRC="/.*resources/menuItem/spacer.gif/" />
+ </SPAN>
+ </SPAN>
+ </DIV>
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+ </LI>
+ </UL>
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+
+ </LI>
+ <LI VPE-DDM-MENU-LI="" CLASS="rich-menu-item" STYLE="">
+ <DIV CLASS="dr-menu-item-top-div">
+ <SPAN CLASS="rich-menu-item-icon">
+ <IMG
+ SRC="/.*resources/menuItem/spacer.gif/" />
+
+ </SPAN>
+ <SPAN CLASS="rich-menu-item-label">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Item 3
</SPAN>
-<SPAN CLASS="rich-menu-item-label" >
-<SPAN>
-Item 3
-</SPAN>
-</SPAN>
-</DIV>
-</LI>
-</UL>
-</LI>
-</UL>
+ </SPAN>
+ </SPAN>
+ </DIV>
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
- </test>
+ </LI>
+ </UL>
+ </LI>
+ </UL>
+ </test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml 2009-01-12 19:37:40 UTC (rev 13001)
@@ -4,67 +4,103 @@
BORDER="0" STYLE="table-layout: fixed;">
<COLGROUP>
<COL WIDTH="100" />
+
<COL WIDTH="100" />
+
<COL WIDTH="100" />
+
<COL WIDTH="100" />
+
</COLGROUP>
<THEAD>
<TR CLASS="dr-table-subheader rich-table-subheader">
<TH CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
<SPAN>
- <SPAN> Flag</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Flag
+</SPAN>
+ </SPAN>
</SPAN>
</TH>
<TH CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
<SPAN>
- <SPAN> State Name</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ State Name
+</SPAN>
+ </SPAN>
</SPAN>
<IMG STYLE="vertical-align: middle;"
SRC="/.*resources/extendedDataTable/sortable.gif/" />
+
</TH>
<TH CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
<SPAN>
- <SPAN> State Capital</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ State Capital
+</SPAN>
+ </SPAN>
</SPAN>
<IMG STYLE="vertical-align: middle;"
SRC="/.*resources/extendedDataTable/sortable.gif/" />
+
</TH>
<TH CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
<SPAN>
- <SPAN> Time Zone</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Time Zone
+</SPAN>
+ </SPAN>
</SPAN>
</TH>
<TH CLASS="dr-table-subheadercell rich-table-subheadercell">
<BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TH>
</TR>
<TR CLASS="dr-table-subheader rich-table-subheader">
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
<BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
<DIV STYLE="padding: 4px;">
<INPUT TYPE="text" CLASS="extendedTable-input" />
+
</DIV>
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
<DIV STYLE="padding: 4px;">
<INPUT TYPE="text" CLASS="extendedTable-input" />
+
</DIV>
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
<BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell">
<BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</THEAD>
@@ -74,25 +110,30 @@
CLASS="dr-table-subfootercell rich-table-subfootercell dr-table-subfooter rich-table-subfooter"
SCOP="col">
<BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="dr-table-subfootercell rich-table-subfootercell dr-table-subfooter rich-table-subfooter"
SCOP="col">
<BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="dr-table-subfootercell rich-table-subfootercell dr-table-subfooter rich-table-subfooter"
SCOP="col">
<BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="dr-table-subfootercell rich-table-subfootercell dr-table-subfooter rich-table-subfooter"
SCOP="col">
<BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="dr-table-subfootercell rich-table-subfootercell dr-table-subfooter rich-table-subfooter">
<BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TFOOT>
@@ -102,10 +143,15 @@
<TABLE WIDTH="100%" STYLE="table-layout: fixed;">
<COLGROUP>
<COL WIDTH="100" />
+
<COL WIDTH="100" />
+
<COL WIDTH="100" />
+
<COL WIDTH="100" />
+
<COL />
+
</COLGROUP>
<TBODY>
<TR CLASS="dr-body-table-tr">
@@ -113,19 +159,38 @@
<IMG
SRC="/.*ve/unresolved_image.gif/"
STYLE="-moz-user-modify: read-write;" />
+
</TD>
<TD WIDTH="170" SORTABLE="true" SORTBY="#{cap.state}"
FILTERBY="#{cap.state}" FILTEREVENT="onkeyup"
CLASS="dr-table-cell rich-table-cell">
- <SPAN> #{cap.state}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{cap.state}
+</SPAN>
+ </SPAN>
</TD>
<TD WIDTH="170" SORTABLE="true" SORTBY="#{cap.name}"
FILTERBY="#{cap.state}" FILTEREVENT="onkeyup"
CLASS="dr-table-cell rich-table-cell">
- <SPAN> #{cap.name}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{cap.name}
+</SPAN>
+ </SPAN>
</TD>
<TD SORTABLE="false" CLASS="dr-table-cell rich-table-cell">
- <SPAN> #{cap.timeZone}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{cap.timeZone}
+</SPAN>
+ </SPAN>
</TD>
</TR>
</TBODY>
@@ -135,6 +200,7 @@
<DIV STYLE="overflow: scroll; width: 17px; height: 100%;">
</DIV>
<BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TBODY>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml 2009-01-12 19:37:40 UTC (rev 13001)
@@ -2,26 +2,42 @@
<test id="listShuttle">
<TABLE CLASS="rich-list-shuttle" STYLE="">
<TR>
- <TD COLSPAN="2" CLASS="rich-shuttle-source-caption"> source label</TD>
- <TD COLSPAN="2" CLASS="rich-shuttle-target-caption"> target label</TD>
+ <TD COLSPAN="2" CLASS="rich-shuttle-source-caption">
+ source label
+ </TD>
+ <TD COLSPAN="2" CLASS="rich-shuttle-target-caption">
+ target label
+ </TD>
</TR>
<TR>
<TD>
<DIV CLASS="rich-shuttle-list-content" STYLE="width: 234px; height: 245px;">
<TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
- <TR CLASS="">
+ <TR>
<TH
BACKGROUND="/.*resources/shuttle/header.gif/"
CLASS="rich-shuttle-header-tab-cell">
<DIV>
- <SPAN> Song Name</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Song Name
+ </SPAN>
+ </SPAN>
</DIV>
</TH>
<TH
BACKGROUND="/.*resources/shuttle/header.gif/"
CLASS="rich-shuttle-header-tab-cell">
<DIV>
- <SPAN> Artist Name</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Artist Name
+ </SPAN>
+ </SPAN>
</DIV>
</TH>
</TR>
@@ -30,7 +46,13 @@
<TABLE>
<TR>
<TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> You must be evil</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ You must be evil
+ </SPAN>
+ </SPAN>
</TD>
</TR>
</TABLE>
@@ -39,7 +61,13 @@
<TABLE>
<TR>
<TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> Chris Rea</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Chris Rea
+ </SPAN>
+ </SPAN>
</TD>
</TR>
</TABLE>
@@ -57,7 +85,9 @@
<DIV CLASS="rich-shuttle-button rich-shuttle-copyAll">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_copy_all.gif/"/> Copy all
+ SRC="/.*resources/shuttle/arrow_copy_all.gif/" />
+
+ Copy all
</DIV>
</DIV>
</DIV>
@@ -69,7 +99,9 @@
<DIV CLASS="rich-shuttle-button rich-shuttle-copy">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_copy.gif/"/> Copy
+ SRC="/.*resources/shuttle/arrow_copy.gif/" />
+
+ Copy
</DIV>
</DIV>
</DIV>
@@ -81,7 +113,9 @@
<DIV CLASS="rich-shuttle-button rich-shuttle-remove">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_remove.gif/"/> Remove
+ SRC="/.*resources/shuttle/arrow_remove.gif/" />
+
+ Remove
</DIV>
</DIV>
</DIV>
@@ -93,7 +127,9 @@
<DIV CLASS="rich-shuttle-button rich-shuttle-removeAll">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_remove_all.gif/"/> Remove All
+ SRC="/.*resources/shuttle/arrow_remove_all.gif/" />
+
+ Remove All
</DIV>
</DIV>
</DIV>
@@ -103,19 +139,31 @@
<TD>
<DIV CLASS="rich-shuttle-list-content" STYLE="width: 278px; height: 245px;">
<TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
- <TR CLASS="">
+ <TR>
<TH
BACKGROUND="/.*resources/shuttle/header.gif/"
CLASS="rich-shuttle-header-tab-cell">
<DIV>
- <SPAN> Song Name</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Song Name
+ </SPAN>
+ </SPAN>
</DIV>
</TH>
<TH
BACKGROUND="/.*resources/shuttle/header.gif/"
CLASS="rich-shuttle-header-tab-cell">
<DIV>
- <SPAN> Artist Name</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Artist Name
+ </SPAN>
+ </SPAN>
</DIV>
</TH>
</TR>
@@ -124,7 +172,13 @@
<TABLE>
<TR>
<TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> You must be evil</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ You must be evil
+ </SPAN>
+ </SPAN>
</TD>
</TR>
</TABLE>
@@ -133,7 +187,13 @@
<TABLE>
<TR>
<TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> Chris Rea</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Chris Rea
+ </SPAN>
+ </SPAN>
</TD>
</TR>
</TABLE>
@@ -151,7 +211,9 @@
<DIV CLASS="rich-shuttle-button rich-shuttle-top">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_first.gif/"/> First
+ SRC="/.*resources/shuttle/arrow_first.gif/" />
+
+ First
</DIV>
</DIV>
</DIV>
@@ -163,7 +225,9 @@
<DIV CLASS="rich-shuttle-button rich-shuttle-up">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_up.gif/"/> Up
+ SRC="/.*resources/shuttle/arrow_up.gif/" />
+
+ Up
</DIV>
</DIV>
</DIV>
@@ -175,7 +239,9 @@
<DIV CLASS="rich-shuttle-button rich-shuttle-down">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_down.gif/"/> Down
+ SRC="/.*resources/shuttle/arrow_down.gif/" />
+
+ Down
</DIV>
</DIV>
</DIV>
@@ -187,7 +253,9 @@
<DIV CLASS="rich-shuttle-button rich-shuttle-bottom">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_last.gif/"/> Last
+ SRC="/.*resources/shuttle/arrow_last.gif/" />
+
+ Last
</DIV>
</DIV>
</DIV>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/menuGroup.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/menuGroup.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/menuGroup.xhtml.xml 2009-01-12 19:37:40 UTC (rev 13001)
@@ -1,35 +1,45 @@
<tests>
- <test id="menuGroup">
+ <test id="menuGroup">
+ <LI VPE-DDM-MENU-LI="" CLASS="rich-menu-group" STYLE="">
+ <DIV CLASS="dr-menu-group-top-div">
+ <SPAN CLASS="rich-menu-item-icon-enabled">
+ <IMG
+ SRC="/.*resources/menuGroup/spacer.gif/" />
-<LI VPE-DDM-MENU-LI="" CLASS="rich-menu-group" STYLE="" >
-<DIV CLASS="dr-menu-group-top-div" >
-<SPAN CLASS="rich-menu-item-icon-enabled" >
-<IMG SRC="/.*resources/menuGroup/spacer.gif/" />
-
+ </SPAN>
+ <SPAN CLASS="rich-menu-item-label rich-menu-group-label">
+ Group 2
</SPAN>
-<SPAN CLASS="rich-menu-item-label rich-menu-group-label" >
-Group 2
-</SPAN>
-<SPAN CLASS="rich-menu-item-folder rich-menu-group-folder" STYLE="" >
-<IMG SRC="/.*resources/menuGroup/arrow.gif/" />
-</SPAN>
-</DIV>
-<UL VPE-DDM-MENU-UL="" CLASS="rich-menu-list-border rich-menu-list-bg" >
-<LI VPE-DDM-MENU-LI="" CLASS="rich-menu-item" STYLE="" >
-<DIV CLASS="dr-menu-item-top-div" >
-<SPAN CLASS="rich-menu-item-icon" >
-<IMG SRC="/.*resources/menuItem/spacer.gif/" />
+ <SPAN CLASS="rich-menu-item-folder rich-menu-group-folder"
+ STYLE="">
+ <IMG
+ SRC="/.*resources/menuGroup/arrow.gif/" />
+ </SPAN>
+ </DIV>
+ <UL VPE-DDM-MENU-UL="" CLASS="rich-menu-list-border rich-menu-list-bg">
+ <LI VPE-DDM-MENU-LI="" CLASS="rich-menu-item" STYLE="">
+ <DIV CLASS="dr-menu-item-top-div">
+ <SPAN CLASS="rich-menu-item-icon">
+ <IMG
+ SRC="/.*resources/menuItem/spacer.gif/" />
+
+ </SPAN>
+ <SPAN CLASS="rich-menu-item-label">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Item 2
</SPAN>
-<SPAN CLASS="rich-menu-item-label" >
-<SPAN>
-Item 2
-</SPAN>
-</SPAN>
-</DIV>
-</LI>
-</UL>
-</LI>
+ </SPAN>
+ </SPAN>
+ </DIV>
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
- </test>
+ </LI>
+ </UL>
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+ </LI>
+ </test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/menuItem.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/menuItem.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/menuItem.xhtml.xml 2009-01-12 19:37:40 UTC (rev 13001)
@@ -1,19 +1,25 @@
<tests>
- <test id="menuItem">
+ <test id="menuItem">
-<LI VPE-DDM-MENU-LI="" CLASS="rich-menu-item" STYLE="" >
-<DIV CLASS="dr-menu-item-top-div" >
-<SPAN CLASS="rich-menu-item-icon" >
-<IMG SRC="/.*resources/menuItem/spacer.gif/" />
+ <LI VPE-DDM-MENU-LI="" CLASS="rich-menu-item" STYLE="">
+ <DIV CLASS="dr-menu-item-top-div">
+ <SPAN CLASS="rich-menu-item-icon">
+ <IMG
+ SRC="/.*resources/menuItem/spacer.gif/" />
-</SPAN>
-<SPAN CLASS="rich-menu-item-label" >
-<SPAN >
-Item 1
-</SPAN>
-</SPAN>
-</DIV>
-</LI>
+ </SPAN>
+ <SPAN CLASS="rich-menu-item-label">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Item 1
+ </SPAN>
+ </SPAN>
+ </SPAN>
+ </DIV>
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
- </test>
+ </LI>
+ </test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml 2009-01-12 19:37:40 UTC (rev 13001)
@@ -1,5 +1,6 @@
<tests>
<test id="orderingList">
+
<TABLE WIDTH="300" HEIGHT="200" CLASS="rich-ordering-list-body">
<TR>
<TD>
@@ -19,21 +20,45 @@
<TD
BACKGROUND="/.*resources/orderingList/table_header_cell_bg.gif/"
CLASS="rich-ordering-list-table-header-cell" SCOP="col">
- <SPAN> Song Name</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Song Name
+</SPAN>
+ </SPAN>
</TD>
<TD
BACKGROUND="/.*resources/orderingList/table_header_cell_bg.gif/"
CLASS="rich-ordering-list-table-header-cell" SCOP="col">
- <SPAN> Artist Name</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Artist Name
+</SPAN>
+ </SPAN>
</TD>
</TR>
</THEAD>
<TR CLASS="rich-ordering-list-row">
<TD WIDTH="180" CLASS="dr-table-cell rich-table-cell">
- <SPAN> You must be evil</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ You must be evil
+</SPAN>
+ </SPAN>
</TD>
<TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> Chris Rea</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Chris Rea
+</SPAN>
+ </SPAN>
</TD>
</TR>
</TABLE>
@@ -42,14 +67,16 @@
<TD>
<DIV STYLE="overflow: scroll; width: 17px; height: 100%;">
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
<TR>
<TD>
<DIV STYLE="overflow: scroll; width: 100%; height: 17px;">
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TABLE>
@@ -63,7 +90,8 @@
<A CLASS="rich-ordering-list-button-selection">
<DIV CLASS="rich-ordering-list-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/orderingList/top.gif/"/>First
+ SRC="/.*resources/orderingList/top.gif/"/>
+ First
</DIV>
</A>
</DIV>
@@ -74,7 +102,8 @@
<A CLASS="rich-ordering-list-button-selection">
<DIV CLASS="rich-ordering-list-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/orderingList/up.gif/"/>Up
+ SRC="/.*resources/orderingList/up.gif/"/>
+ Up
</DIV>
</A>
</DIV>
@@ -85,7 +114,8 @@
<A CLASS="rich-ordering-list-button-selection">
<DIV CLASS="rich-ordering-list-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/orderingList/down.gif/"/>Down
+ SRC="/.*resources/orderingList/down.gif/"/>
+ Down
</DIV>
</A>
</DIV>
@@ -96,7 +126,8 @@
<A CLASS="rich-ordering-list-button-selection">
<DIV CLASS="rich-ordering-list-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/orderingList/bottom.gif/"/>Last
+ SRC="/.*resources/orderingList/bottom.gif/"/>
+ Last
</DIV>
</A>
</DIV>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/tree.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/tree.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/tree.xhtml.xml 2009-01-12 19:37:40 UTC (rev 13001)
@@ -8,16 +8,26 @@
<TR>
<TD
STYLE="/background-image: url\(.*resources//tree/rightLine.gif\); background-position: center; background-repeat: repeat-y;/">
- <IMG CLASS="treePictureStyle" SRC="/.*resources/tree/iconCollapsedWithLines.gif/"
+ <IMG CLASS="treePictureStyle"
+ SRC="/.*resources/tree/iconCollapsedWithLines.gif/"
RICHFACESTREENODEPARAM="DEFAULT_ICON_EXPANDED_PARAM" />
+
</TD>
<TD
STYLE="/background-image: url\(.*resources//tree/leftLine.gif\); background-position: center; background-repeat: repeat-y;/">
- <IMG CLASS="treePictureStyle" SRC="/.*resources/tree/iconNodeWithLines.gif/"
+ <IMG CLASS="treePictureStyle"
+ SRC="/.*resources/tree/iconNodeWithLines.gif/"
RICHFACESTREENODEPARAM="DEFAULT_ICON_PARAM" />
+
</TD>
<TD CLASS="treeNodeNameStyle">
- <SPAN> #{item.name}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{item.name}
+</SPAN>
+ </SPAN>
</TD>
</TR>
</TBODY>
@@ -31,16 +41,26 @@
<TR>
<TD
STYLE="/background-image: url\(.*resources//tree/rightLine.gif\); background-position: center; background-repeat: repeat-y;/">
- <IMG CLASS="treePictureStyle" SRC="/.*resources/tree/iconCollapsedWithLines.gif/"
+ <IMG CLASS="treePictureStyle"
+ SRC="/.*resources/tree/iconCollapsedWithLines.gif/"
RICHFACESTREENODEPARAM="DEFAULT_ICON_EXPANDED_PARAM" />
+
</TD>
<TD
STYLE="/background-image: url\(.*resources//tree/leftLine.gif\); background-position: center; background-repeat: repeat-y;/">
- <IMG CLASS="treePictureStyle" SRC="/.*resources/tree/iconNodeWithLines.gif/"
+ <IMG CLASS="treePictureStyle"
+ SRC="/.*resources/tree/iconNodeWithLines.gif/"
RICHFACESTREENODEPARAM="DEFAULT_ICON_PARAM" />
+
</TD>
<TD CLASS="treeNodeNameStyle">
- <SPAN> #{item.title}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{item.title}
+</SPAN>
+ </SPAN>
</TD>
</TR>
</TBODY>
@@ -57,13 +77,22 @@
<IMG CLASS="treePictureStyle"
SRC="/.*resources/tree/iconNotCollapsedWithLines.gif/"
RICHFACESTREENODEPARAM="DEFAULT_ICON_EXPANDED_PARAM" />
+
</TD>
<TD>
- <IMG CLASS="treePictureStyle" SRC="/.*resources/tree/iconLeafWithLines.gif/"
+ <IMG CLASS="treePictureStyle"
+ SRC="/.*resources/tree/iconLeafWithLines.gif/"
RICHFACESTREENODEPARAM="iconLeaf" />
+
</TD>
<TD CLASS="treeNodeNameStyle">
- <SPAN> #{item.title}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{item.title}
+</SPAN>
+ </SPAN>
</TD>
</TR>
</TBODY>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/treeNode.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/treeNode.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/treeNode.xhtml.xml 2009-01-12 19:37:40 UTC (rev 13001)
@@ -1,28 +1,36 @@
<tests>
<test id="treeNode">
- <DIV>
- <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"
- CLASS="dr-tree-full-width">
- <TBODY>
- <TR>
- <TD
- STYLE="/background-image: url\(.*resources//tree/rightLine.gif\); background-position: center; background-repeat: repeat-y;/">
- <IMG CLASS="treePictureStyle"
- SRC="/.*resources/tree/iconCollapsedWithLines.gif/"
- RICHFACESTREENODEPARAM="DEFAULT_ICON_EXPANDED_PARAM"/>
- </TD>
- <TD
- STYLE="/background-image: url\(.*resources//tree/leftLine.gif\); background-position: center; background-repeat: repeat-y;/">
- <IMG CLASS="treePictureStyle"
- SRC="/.*resources/tree/iconNodeWithLines.gif/"
- RICHFACESTREENODEPARAM="DEFAULT_ICON_PARAM"/>
- </TD>
- <TD CLASS="treeNodeNameStyle">
- <SPAN> #{item.name}</SPAN>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
+ <DIV>
+ <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"
+ CLASS="dr-tree-full-width">
+ <TBODY>
+ <TR>
+ <TD
+ STYLE="/background-image: url\(.*resources//tree/rightLine.gif\); background-position: center; background-repeat: repeat-y;/">
+ <IMG CLASS="treePictureStyle"
+ SRC="/.*resources/tree/iconCollapsedWithLines.gif/"
+ RICHFACESTREENODEPARAM="DEFAULT_ICON_EXPANDED_PARAM" />
+
+ </TD>
+ <TD
+ STYLE="/background-image: url\(.*resources//tree/leftLine.gif\); background-position: center; background-repeat: repeat-y;/">
+ <IMG CLASS="treePictureStyle"
+ SRC="/.*resources/tree/iconNodeWithLines.gif/"
+ RICHFACESTREENODEPARAM="DEFAULT_ICON_PARAM" />
+
+ </TD>
+ <TD CLASS="treeNodeNameStyle">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{item.name}
+ </SPAN>
+ </SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </DIV>
</test>
</tests>
\ No newline at end of file
16 years
JBoss Tools SVN: r13000 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-01-12 13:47:26 -0500 (Mon, 12 Jan 2009)
New Revision: 13000
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataOrderedList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toggleControl.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/togglePanel.xhtml.xml
Log:
CODING IN PROGRESS - issue JBIDE-3511: Text body of h:outputText and h:outputFormat is rendered in incorrect sequence.
https://jira.jboss.org/jira/browse/JBIDE-3511
- JUnit tests in richfaces package have been fixed partially.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml 2009-01-12 18:16:11 UTC (rev 12999)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
@@ -1,22 +1,47 @@
<tests>
<test id="column1">
- <TD COLSPAN="3" CLASS="dr-table-headercell rich-table-headercell">
- <SPAN> FIELDS</SPAN>
+ <TD COLSPAN="3" ID="column1" CLASS="dr-table-headercell rich-table-headercell">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ FIELDS
+ </SPAN>
+ </SPAN>
</TD>
</test>
<test id="column2">
- <TD BREAKBEFORE="true" CLASS="dr-table-headercell rich-table-headercell">
- <SPAN> field1</SPAN>
+ <TD BREAKBEFORE="true" ID="column2"
+ CLASS="dr-table-headercell rich-table-headercell">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ field1
+ </SPAN>
+ </SPAN>
</TD>
</test>
<test id="column3">
- <TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> #{row.field1}</SPAN>
+ <TD ID="column3" CLASS="dr-table-cell rich-table-cell">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{row.field1}
+ </SPAN>
+ </SPAN>
</TD>
</test>
<test id="column4">
- <TD CLASS="dr-table-footercell rich-table-footercell">
- <SPAN> footer1</SPAN>
+ <TD ID="column4" CLASS="dr-table-footercell rich-table-footercell">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ footer1
+ </SPAN>
+ </SPAN>
</TD>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml 2009-01-12 18:16:11 UTC (rev 12999)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml 2009-01-12 18:47:26 UTC (rev 13000)
@@ -5,7 +5,6 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
-
<head>
</head>
<body>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml 2009-01-12 18:16:11 UTC (rev 12999)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
@@ -1,7 +1,14 @@
<tests>
<test id="columns">
- <TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> #{book.price}</SPAN>
+ <TD VALUE="#{bookList.books}" VAR="label" ID="columns"
+ CLASS="dr-table-cell rich-table-cell">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{book.price}
+ </SPAN>
+ </SPAN>
</TD>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml 2009-01-12 18:16:11 UTC (rev 12999)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
@@ -1,111 +1,212 @@
<tests>
<test id="dataDefinitionList">
+
<DL CLASS="yellow-background">
<DT CLASS="headerClass">
<DIV>
- <SPAN>
- TERM-VISIBLE
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ TERM-VISIBLE
</SPAN>
+ </SPAN>
</DIV>
</DT>
<DD CLASS="columnClass red-text">
- <SPAN>
- col1
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col1
</SPAN>
- <SPAN>
- col2
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col2
</SPAN>
- <SPAN>
- col3
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col3
</SPAN>
- <SPAN>
- col4
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col4
</SPAN>
+ </SPAN>
</DD>
<DT CLASS="headerClass">
<DIV>
- <SPAN>
- TERM-VISIBLE
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ TERM-VISIBLE
</SPAN>
+ </SPAN>
</DIV>
</DT>
<DD CLASS="columnClass blue-text">
- <SPAN>
- col1
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col1
</SPAN>
- <SPAN>
- col2
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col2
</SPAN>
- <SPAN>
- col3
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col3
</SPAN>
- <SPAN>
- col4
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col4
</SPAN>
+ </SPAN>
</DD>
<DT CLASS="headerClass">
<DIV>
- <SPAN>
- TERM-VISIBLE
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ TERM-VISIBLE
</SPAN>
+ </SPAN>
</DIV>
</DT>
<DD CLASS="columnClass red-text">
- <SPAN>
- col1
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col1
</SPAN>
- <SPAN>
- col2
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col2
</SPAN>
- <SPAN>
- col3
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col3
</SPAN>
- <SPAN>
- col4
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col4
</SPAN>
+ </SPAN>
</DD>
<DT CLASS="headerClass">
<DIV>
- <SPAN>
- TERM-VISIBLE
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ TERM-VISIBLE
</SPAN>
+ </SPAN>
</DIV>
</DT>
<DD CLASS="columnClass blue-text">
- <SPAN>
- col1
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col1
</SPAN>
- <SPAN>
- col2
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col2
</SPAN>
- <SPAN>
- col3
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col3
</SPAN>
- <SPAN>
- col4
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col4
</SPAN>
+ </SPAN>
</DD>
<DT CLASS="headerClass">
<DIV>
- <SPAN>
- TERM-VISIBLE
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ TERM-VISIBLE
</SPAN>
+ </SPAN>
</DIV>
</DT>
<DD CLASS="columnClass red-text">
- <SPAN>
- col1
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col1
</SPAN>
- <SPAN>
- col2
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col2
</SPAN>
- <SPAN>
- col3
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col3
</SPAN>
- <SPAN>
- col4
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ col4
</SPAN>
+ </SPAN>
</DD>
</DL>
</test>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataList.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataList.xhtml.xml 2009-01-12 18:16:11 UTC (rev 12999)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataList.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
@@ -1,16 +1,65 @@
<tests>
<test id="dataList">
+
<UL VAR="data" VALUE="#{bean.dtList}" ROWS="4" ID="dataList"
CLASS="dr-list rich-datalist">
<LI CLASS="dr-list-item rich-list-item">
- <SPAN> field1:</SPAN>
- <SPAN > #{data.field1}</SPAN>
- <SPAN> field2:</SPAN>
- <SPAN> #{data.field2}</SPAN>
- <SPAN> field3:</SPAN>
- <SPAN> #{data.field3}</SPAN>
- <SPAN> number:</SPAN>
- <SPAN> #{data.number}</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ field1:
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{data.field1}
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ field2:
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{data.field2}
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ field3:
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{data.field3}
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ number:
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{data.number}
+</SPAN>
+ </SPAN>
</LI>
</UL>
</test>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataOrderedList.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataOrderedList.xhtml.xml 2009-01-12 18:16:11 UTC (rev 12999)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataOrderedList.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
@@ -1,30 +1,228 @@
<tests>
<test id="dataOrderedList">
- <OL TYPE="A" VALUE="" ROWS="5" CLASS="dr-list rich-orderedlist">
+
+ <OL TYPE="A" ID="dataOrderedList" VALUE="" ROWS="5"
+ CLASS="dr-list rich-orderedlist">
<LI CLASS="dr-list-item rich-list-item">
- <SPAN> row=1 </SPAN>
- <SPAN> row=2 </SPAN>
- <SPAN> row=3 </SPAN>
- <SPAN> row=4 </SPAN>
- <SPAN> row=5 </SPAN>
- <SPAN> row=6 </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=1
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=2
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=3
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=4
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=5
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=6
+</SPAN>
+ </SPAN>
</LI>
<LI CLASS="dr-list-item rich-list-item">
- <SPAN> row=1 </SPAN>
- <SPAN> row=2 </SPAN>
- <SPAN> row=3 </SPAN>
- <SPAN> row=4 </SPAN>
- <SPAN> row=5 </SPAN>
- <SPAN> row=6 </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=1
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=2
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=3
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=4
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=5
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=6
+</SPAN>
+ </SPAN>
</LI>
<LI CLASS="dr-list-item rich-list-item">
- <SPAN> row=1 </SPAN>
- <SPAN> row=2 </SPAN>
- <SPAN> row=3 </SPAN>
- <SPAN> row=4 </SPAN>
- <SPAN> row=5 </SPAN>
- <SPAN> row=6 </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=1
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=2
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=3
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=4
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=5
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=6
+</SPAN>
+ </SPAN>
</LI>
+ <LI CLASS="dr-list-item rich-list-item">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=1
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=2
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=3
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=4
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=5
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=6
+</SPAN>
+ </SPAN>
+ </LI>
+ <LI CLASS="dr-list-item rich-list-item">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=1
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=2
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=3
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=4
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=5
+</SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ row=6
+</SPAN>
+ </SPAN>
+ </LI>
</OL>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml 2009-01-12 18:16:11 UTC (rev 12999)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
@@ -1,5 +1,6 @@
<tests>
<test id="messages">
+
<TABLE CELLSPACING="0" CELLPADDING="0"
STYLE="border-style: dotted; color: Turquoise; text-align: center; font-size: small; font-style: italic; background-color: Orchid; font-family: Arial CE,Arial Narrow; text-decoration: line-through; font-weight: bolder;"
CLASS="rich-messages infoClass">
@@ -7,50 +8,90 @@
<TD>
<SPAN CLASS="rich-messages-marker">
<DIV>
- <SPAN> Passed </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Passed
+</SPAN>
+ </SPAN>
</DIV>
</SPAN>
- <SPAN CLASS="rich-messages-label"> No Error </SPAN>
+ <SPAN CLASS="rich-messages-label">
+ No Error
+</SPAN>
</TD>
</TR>
<TR>
<TD CLASS="errorClass">
<SPAN CLASS="rich-messages-marker markerError">
<DIV>
- <SPAN> Error </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Error
+</SPAN>
+ </SPAN>
</DIV>
</SPAN>
- <SPAN CLASS="rich-messages-label errorLabel"> Error message </SPAN>
+ <SPAN CLASS="rich-messages-label errorLabel">
+ Error message
+</SPAN>
</TD>
</TR>
<TR>
<TD CLASS="fatalClass">
<SPAN CLASS="rich-messages-marker markerFatal">
<DIV>
- <SPAN> Fatal </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Fatal
+</SPAN>
+ </SPAN>
</DIV>
</SPAN>
- <SPAN CLASS="rich-messages-label fatalLabel"> Fatal message </SPAN>
+ <SPAN CLASS="rich-messages-label fatalLabel">
+ Fatal message
+</SPAN>
</TD>
</TR>
<TR>
<TD CLASS="infoClass">
<SPAN CLASS="rich-messages-marker markerInfo">
<DIV>
- <SPAN> Info </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Info
+</SPAN>
+ </SPAN>
</DIV>
</SPAN>
- <SPAN CLASS="rich-messages-label infoLabel"> Info message </SPAN>
+ <SPAN CLASS="rich-messages-label infoLabel">
+ Info message
+</SPAN>
</TD>
</TR>
<TR>
<TD CLASS="warnClass">
<SPAN CLASS="rich-messages-marker markerWarn">
<DIV>
- <SPAN> Warning </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Warning
+</SPAN>
+ </SPAN>
</DIV>
</SPAN>
- <SPAN CLASS="rich-messages-label warnLabel"> Warning message </SPAN>
+ <SPAN CLASS="rich-messages-label warnLabel">
+ Warning message
+</SPAN>
</TD>
</TR>
</TABLE>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml 2009-01-12 18:16:11 UTC (rev 12999)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
@@ -1,5 +1,6 @@
<tests>
<test id="scrollableDataTable">
+
<DIV CLASS="dr-table-hidden" STYLE="overflow: auto; width: 500px; height: 100px;">
<TABLE CLASS="dr-table rich-sdt">
<COLGROUP SPAN="6">
@@ -8,39 +9,63 @@
<TR CLASS="dr-table-subheader dr-sdt-hr">
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
- <SPAN CLASS="headerText">
- Make
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="headerText">
+ Make
+</SPAN>
+ </SPAN>
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
- <SPAN CLASS="headerText">
- Model
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="headerText">
+ Model
+</SPAN>
+ </SPAN>
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
- <SPAN CLASS="headerText">
- Price
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="headerText">
+ Price
+</SPAN>
+ </SPAN>
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
- <SPAN CLASS="headerText">
- Mileage
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="headerText">
+ Mileage
+</SPAN>
+ </SPAN>
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
- <SPAN CLASS="headerText">
- VIN
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="headerText">
+ VIN
+</SPAN>
+ </SPAN>
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
- <SPAN CLASS="headerText">
- Stock
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="headerText">
+ Stock
+</SPAN>
+ </SPAN>
</TD>
</TR>
</THEAD>
@@ -52,162 +77,282 @@
</TBODY>
<TR CLASS="dr-table-firstrow rich-table-firstrow">
<TD ID="make" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.make}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.make}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="model" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.model}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.model}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="price" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.price}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.price}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="mileage" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.mileage}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.mileage}
+</SPAN>
+ </SPAN>
</TD>
<TD WIDTH="200" ID="vin" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.vin}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.vin}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="stock" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.stock}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.stock}
+</SPAN>
+ </SPAN>
</TD>
</TR>
<TR CLASS="dr-table-firstrow rich-table-firstrow">
<TD ID="make" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.make}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.make}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="model" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.model}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.model}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="price" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.price}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.price}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="mileage" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.mileage}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.mileage}
+</SPAN>
+ </SPAN>
</TD>
<TD WIDTH="200" ID="vin" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.vin}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.vin}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="stock" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.stock}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.stock}
+</SPAN>
+ </SPAN>
</TD>
</TR>
<TR CLASS="dr-table-firstrow rich-table-firstrow">
<TD ID="make" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.make}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.make}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="model" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.model}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.model}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="price" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.price}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.price}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="mileage" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.mileage}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.mileage}
+</SPAN>
+ </SPAN>
</TD>
<TD WIDTH="200" ID="vin" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.vin}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.vin}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="stock" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.stock}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.stock}
+</SPAN>
+ </SPAN>
</TD>
</TR>
<TR CLASS="dr-table-firstrow rich-table-firstrow">
<TD ID="make" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.make}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.make}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="model" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.model}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.model}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="price" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.price}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.price}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="mileage" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.mileage}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.mileage}
+</SPAN>
+ </SPAN>
</TD>
<TD WIDTH="200" ID="vin" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.vin}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.vin}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="stock" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.stock}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.stock}
+</SPAN>
+ </SPAN>
</TD>
</TR>
<TR CLASS="dr-table-firstrow rich-table-firstrow">
<TD ID="make" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.make}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.make}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="model" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.model}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.model}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="price" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.price}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.price}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="mileage" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.mileage}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.mileage}
+</SPAN>
+ </SPAN>
</TD>
<TD WIDTH="200" ID="vin" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.vin}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.vin}
+</SPAN>
+ </SPAN>
</TD>
<TD ID="stock" CLASS="dr-table-cell rich-table-cell col">
- <SPAN>
- #{category.stock}
- </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{category.stock}
+</SPAN>
+ </SPAN>
</TD>
</TR>
</TABLE>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toggleControl.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toggleControl.xhtml.xml 2009-01-12 18:16:11 UTC (rev 12999)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toggleControl.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
@@ -2,7 +2,13 @@
<test id="toggleControl">
<SPAN STYLE="color: blue; text-decoration: underline;"
VPE-USER-TOGGLE-ID="">
- <SPAN> CLOSED </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ CLOSED
+ </SPAN>
+ </SPAN>
</SPAN>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/togglePanel.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/togglePanel.xhtml.xml 2009-01-12 18:16:11 UTC (rev 12999)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/togglePanel.xhtml.xml 2009-01-12 18:47:26 UTC (rev 13000)
@@ -3,7 +3,13 @@
<DIV>
<SPAN STYLE="color: blue; text-decoration: underline;"
VPE-USER-TOGGLE-ID="">
- <SPAN> CLOSED </SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ CLOSED
+ </SPAN>
+ </SPAN>
</SPAN>
</DIV>
</test>
16 years
JBoss Tools SVN: r12999 - trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-01-12 13:16:11 -0500 (Mon, 12 Jan 2009)
New Revision: 12999
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
Log:
JBIDE-3529 Fix org.jboss.tools.seam.ui.test.SeamUiAllTests@testSeamELContentAssist
Testing algorithm is fixed
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java 2009-01-12 17:08:23 UTC (rev 12998)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java 2009-01-12 18:16:11 UTC (rev 12999)
@@ -335,12 +335,14 @@
protected Set<String> getFilteredProposals(Set<String> proposals, String filter) {
TreeSet<String> fSet = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
- int dotIndex = getDotIndex(filter);
- for (String proposal : proposals) {
- if (getValidDotIndex(proposal) <= dotIndex) {
- proposal = proposal.replace(':', '.');
- if (proposal.startsWith(filter) ) {
- fSet.add(proposal);
+ if (filter != null) {
+ int dotIndex = getDotIndex(filter);
+ for (String proposal : proposals) {
+ if (getValidDotIndex(proposal) <= dotIndex) {
+ proposal = proposal.replace(':', '.');
+ if (proposal.startsWith(filter) ) {
+ fSet.add(proposal);
+ }
}
}
}
@@ -526,21 +528,12 @@
String clearedFilter = filter;
if (filter.startsWith("#{")) {
clearedFilter = filter.substring(2);
- } else if (filter.startsWith("#")) {
- clearedFilter = filter.substring(1);
} else {
- clearedFilter = "";
+ clearedFilter = null;
}
Set<String> filteredValidProposals = getFilteredProposals(getPageValidProposals(), clearedFilter);
- if (filter.indexOf("#") == -1) {
- filteredValidProposals = renewWithPrefixAndPostfix(filteredValidProposals, "#{", "}");
- } else if (filter.indexOf("#{") == -1) {
- filteredValidProposals = renewWithPrefixAndPostfix(filteredValidProposals, "{", /*"}"*/"");
- }
-
-
ICompletionProposal[] result= null;
String errorMessage = null;
16 years