JBoss Tools SVN: r23877 - in trunk/vpe/tests/org.jboss.tools.vpe.spring.test: resources/SpringTest/src/main/webapp/WEB-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-08-03 10:50:37 -0400 (Tue, 03 Aug 2010)
New Revision: 23877
Added:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/select.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/select.jsp.xml
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java
Log:
https://jira.jboss.org/browse/JBIDE-6711 :
Spring templates for VPE
- form:select - JUnit is created
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/select.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/select.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/select.jsp 2010-08-03 14:50:37 UTC (rev 23877)
@@ -0,0 +1,31 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<html>
+<head>
+ <style>
+ .yellow-text {
+ color: yellow
+ }
+ </style>
+</head>
+<body>
+ <h1>Test of form:select</h1>
+
+ <form:form modelAttribute="formBean">
+ <form:select id="select1"
+ path="selectedCategories1"
+ items="${formBean.availableCategories}" cssClass="yellow-text"
+ cssStyle="background-color:black" multiple="false"/>
+ <br/>
+ <form:select id="select2" size="2"
+ path="selectedCategory">
+ <form:option id="booksOption2" value="books"
+ label="books selected"/>
+ <form:option id="sportOption2" value="sport"
+ label="sport selected"/>
+ <form:option id="fishingOption2" value="fishing"
+ label="fishing selected"/>
+ </form:select>
+ </form:form>
+</body>
+</html>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/select.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/select.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/select.jsp.xml 2010-08-03 14:50:37 UTC (rev 23877)
@@ -0,0 +1,14 @@
+<tests>
+ <test id="select1">
+ <SELECT ID="select1" STYLE="background-color: black;" CLASS="yellow-text">
+ <OPTION>${formBean.availableCategories}</OPTION>
+ </SELECT>
+ </test>
+ <test id="select2">
+ <SELECT ID="select2" SIZE="2" MULTIPLE="multiple">
+ <OPTION ID="booksOption2">books selected</OPTION>
+ <OPTION ID="sportOption2">sport selected</OPTION>
+ <OPTION ID="fishingOption2">fishing selected</OPTION>
+ </SELECT>
+ </test>
+</tests>
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml 2010-08-03 14:10:27 UTC (rev 23876)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml 2010-08-03 14:50:37 UTC (rev 23877)
@@ -17,6 +17,7 @@
<bean name="/errors.htm" class="org.jboss.tools.vpe.spring.test.springtest.controller.ErrorsController">
<property name="validator" ref="fieldValidator"/>
</bean>
+ <bean name="/select.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean id="fieldValidator" class="org.jboss.tools.vpe.spring.test.springtest.validator.FieldValidator"/>
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp 2010-08-03 14:10:27 UTC (rev 23876)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp 2010-08-03 14:50:37 UTC (rev 23877)
@@ -14,4 +14,6 @@
<br/>
<a href="errors.htm">errors.htm</a>
<br/>
+<a href="select.htm">errors.htm</a>
+<br/>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java 2010-08-03 14:10:27 UTC (rev 23876)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java 2010-08-03 14:50:37 UTC (rev 23877)
@@ -10,9 +10,7 @@
******************************************************************************/
package org.jboss.tools.vpe.spring.test;
-import org.eclipse.core.resources.IFile;
import org.jboss.tools.vpe.ui.test.ComponentContentTest;
-import org.jboss.tools.vpe.ui.test.TestUtil;
/**
* Tests for the context that was generated by Spring templates
@@ -59,6 +57,10 @@
performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/errors.jsp"); //$NON-NLS-1$
}
+ public void testSelect() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/select.jsp"); //$NON-NLS-1$
+ }
+
public void testHidden() throws Throwable {
performInvisibleTagTestByFullPath("src/main/webapp/WEB-INF/jsp/hidden.jsp", "hidden"); //$NON-NLS-1$ //$NON-NLS-2$
}
14 years, 5 months
JBoss Tools SVN: r23876 - in trunk/vpe/plugins/org.jboss.tools.vpe.spring/src/org/jboss/tools/vpe/spring/template: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-08-03 10:10:27 -0400 (Tue, 03 Aug 2010)
New Revision: 23876
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.spring/src/org/jboss/tools/vpe/spring/template/SpringFormSelectTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe.spring/src/org/jboss/tools/vpe/spring/template/util/Spring.java
Log:
https://jira.jboss.org/browse/JBIDE-6711 :
Spring templates for VPE
- form:select - 'multiple' attribute processing is changed
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.spring/src/org/jboss/tools/vpe/spring/template/SpringFormSelectTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.spring/src/org/jboss/tools/vpe/spring/template/SpringFormSelectTemplate.java 2010-08-03 14:04:22 UTC (rev 23875)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/src/org/jboss/tools/vpe/spring/template/SpringFormSelectTemplate.java 2010-08-03 14:10:27 UTC (rev 23876)
@@ -41,16 +41,14 @@
VpeSpringUtil.copyAttribute(sourceElement, HTML.ATTR_SIZE,
select, HTML.ATTR_SIZE);
- if (sourceElement.hasAttribute(HTML.ATTR_MULTIPLE) &&
- sourceElement.getAttribute(HTML.ATTR_MULTIPLE).equalsIgnoreCase(Boolean.TRUE.toString())) {
- VpeSpringUtil.copyAttribute(sourceElement, HTML.ATTR_MULTIPLE,
- select, HTML.ATTR_MULTIPLE);
- }
-
if (Spring.VALUE_TRUE.equals(sourceElement.getAttribute(Spring.ATTR_DISABLED))) {
select.setAttribute(HTML.ATTR_DISABLED, HTML.ATTR_DISABLED);
}
+ if (!Spring.VALUE_FALSE.equals(sourceElement.getAttribute(Spring.ATTR_MULTIPLE))) {
+ select.setAttribute(HTML.ATTR_MULTIPLE, HTML.ATTR_MULTIPLE);
+ }
+
if (sourceElement.hasAttribute(Spring.ATTR_ITEMS)) {
// an inner 'option' tag has to be generated
String optionBody = sourceElement.getAttribute(Spring.ATTR_ITEMS);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.spring/src/org/jboss/tools/vpe/spring/template/util/Spring.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.spring/src/org/jboss/tools/vpe/spring/template/util/Spring.java 2010-08-03 14:04:22 UTC (rev 23875)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/src/org/jboss/tools/vpe/spring/template/util/Spring.java 2010-08-03 14:10:27 UTC (rev 23876)
@@ -22,6 +22,8 @@
public static final String ATTR_ID = "id"; //$NON-NLS-1$
public static final String ATTR_ITEMS = "items"; //$NON-NLS-1$
public static final String ATTR_ITEM_LABEL = "itemLabel"; //$NON-NLS-1$
+ public static final String ATTR_MULTIPLE = "multiple"; //$NON-NLS-1$
public static final String VALUE_TRUE = "true"; //$NON-NLS-1$
+ public static final String VALUE_FALSE = "false"; //$NON-NLS-1$
}
14 years, 5 months
JBoss Tools SVN: r23875 - in trunk/vpe: tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-08-03 10:04:22 -0400 (Tue, 03 Aug 2010)
New Revision: 23875
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/password.jsp
Log:
https://jira.jboss.org/browse/JBIDE-6711 , form:password was updated.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml 2010-08-03 13:49:44 UTC (rev 23874)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml 2010-08-03 14:04:22 UTC (rev 23875)
@@ -161,7 +161,7 @@
<!-- showPassword(+) and disabled(+) -->
<vpe:template children="no" modify="no">
<input type="text" id="{@id}" class="{@cssClass}" style="{@cssStyle}"
- size="{@size}" dir="{@dir}" value="{@value}" disabled="disabled" />
+ size="{@size}" dir="{@dir}" value="{@path}" disabled="disabled" />
<vpe:resize>
<vpe:width width-attr="cssStyle.width" />
<vpe:height height-attr="cssStyle.height" />
@@ -176,7 +176,7 @@
<!-- showPassword(+) and disabled(-) -->
<vpe:template children="no" modify="no">
<input type="text" id="{@id}" class="{@cssClass}" style="{@cssStyle}"
- size="{@size}" dir="{@dir}" value="{@value}" />
+ size="{@size}" dir="{@dir}" value="{@path}" />
<vpe:resize>
<vpe:width width-attr="cssStyle.width" />
<vpe:height height-attr="cssStyle.height" />
@@ -192,7 +192,7 @@
<!-- showPassword(-) and disabled(+) -->
<vpe:template children="no" modify="no">
<input type="password" id="{@id}" class="{@cssClass}" style="{@cssStyle}"
- size="{@size}" dir="{@dir}" value="{@value}" disabled="disabled" />
+ size="{@size}" dir="{@dir}" value="{@path}" disabled="disabled" />
<vpe:resize>
<vpe:width width-attr="cssStyle.width" />
<vpe:height height-attr="cssStyle.height" />
@@ -207,7 +207,7 @@
<!-- showPassword(-) and disabled(-) -->
<vpe:template children="no" modify="no">
<input type="password" id="{@id}" class="{@cssClass}" style="{@cssStyle}"
- size="{@size}" dir="{@dir}" value="{@value}" />
+ size="{@size}" dir="{@dir}" value="{@path}" />
<vpe:resize>
<vpe:width width-attr="cssStyle.width" />
<vpe:height height-attr="cssStyle.height" />
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/password.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/password.jsp 2010-08-03 13:49:44 UTC (rev 23874)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/password.jsp 2010-08-03 14:04:22 UTC (rev 23875)
@@ -2,10 +2,10 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<html>
<body>
-<form:password id="password1" value="password"/>
-<form:password id="password2" value="password" disabled="true"/>
-<form:password id="password3" value="password" showPassword="true"/>
-<form:password id="password4" value="password" showPassword="true" disabled="true"/>
-<form:password id="password5" value="password" showPassword="no"/>
+<form:password id="password1" path="password"/>
+<form:password id="password2" path="password" disabled="true"/>
+<form:password id="password3" path="password" showPassword="true"/>
+<form:password id="password4" path="password" showPassword="true" disabled="true"/>
+<form:password id="password5" path="password" showPassword="no"/>
</body>
</html>
14 years, 5 months
JBoss Tools SVN: r23874 - trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2010-08-03 09:49:44 -0400 (Tue, 03 Aug 2010)
New Revision: 23874
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
Log:
JBIDE-6706: StackOverflowError in KB Project Validator
Exception is fixed
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2010-08-03 11:53:15 UTC (rev 23873)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2010-08-03 13:49:44 UTC (rev 23874)
@@ -145,7 +145,7 @@
fTypeOfArrayElement = type.getTypeOfArrayElement();
}
for (int i = 0; i < fParameters.length; i++) {
- if (type != fParameters[i])
+ if (fName == null || !fName.equals(fParameters[i].getName()))
fParameters[i].initializeParameters(parameters);
}
}
14 years, 5 months
JBoss Tools SVN: r23873 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-08-03 07:53:15 -0400 (Tue, 03 Aug 2010)
New Revision: 23873
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenXMLFactory.java
Log:
https://jira.jboss.org/browse/JBIDE-6518 - adjust after code review
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenXMLFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenXMLFactory.java 2010-08-03 11:00:49 UTC (rev 23872)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenXMLFactory.java 2010-08-03 11:53:15 UTC (rev 23873)
@@ -50,8 +50,11 @@
public class CodeGenXMLFactory {
public static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
+ /**
+ * UUID to make a stub for propFileContentPreSave,
+ * before formatting
+ */
public static final long versionUID4PropFile = 1841714864553304000L;
-
/**
* presave generated Hibernate Properties file content,
* this is necessary to proper content formating
14 years, 5 months
JBoss Tools SVN: r23872 - in trunk/vpe: tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-08-03 07:00:49 -0400 (Tue, 03 Aug 2010)
New Revision: 23872
Added:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/hidden.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/input.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/input.jsp.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/label.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/label.jsp.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/message.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/message.jsp.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/password.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/password.jsp.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/textarea.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/textarea.jsp.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/theme.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/theme.jsp.xml
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java
Log:
https://jira.jboss.org/browse/JBIDE-6711 , JUnits for some Spring templates were added.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml 2010-08-02 23:40:08 UTC (rev 23871)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml 2010-08-03 11:00:49 UTC (rev 23872)
@@ -127,7 +127,8 @@
<vpe:if test="@disabled='true'">
<vpe:template children="no" modify="no">
<input type="text" id="{@id}" class="{@cssClass}" style="{@cssStyle}"
- size="{@size}" dir="{@dir}" disabled="disabled" />
+ size="{@size}" dir="{@dir}" value="{@value}"
+ disabled="disabled" />
<vpe:resize>
<vpe:width width-attr="cssStyle.width" />
<vpe:height height-attr="cssStyle.height" />
@@ -141,7 +142,7 @@
</vpe:if>
<vpe:template children="no" modify="no">
<input type="text" id="{@id}" class="{@cssClass}" style="{@cssStyle}"
- size="{@size}" dir="{@dir}" />
+ size="{@size}" dir="{@dir}" value="{@value}"/>
<vpe:resize>
<vpe:width width-attr="cssStyle.width" />
<vpe:height height-attr="cssStyle.height" />
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/hidden.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/hidden.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/hidden.jsp 2010-08-03 11:00:49 UTC (rev 23872)
@@ -0,0 +1,6 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<html>
+<body>
+<form:hidden id="hidden" value="hidden"/>
+</body>
+</html>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/input.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/input.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/input.jsp 2010-08-03 11:00:49 UTC (rev 23872)
@@ -0,0 +1,7 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<html>
+<body>
+<form:input id="input1" value="input"/>
+<form:input id="input2" value="input" disabled="true"/>
+</body>
+</html>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/input.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/input.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/input.jsp.xml 2010-08-03 11:00:49 UTC (rev 23872)
@@ -0,0 +1,8 @@
+<tests>
+ <test id="input1">
+ <INPUT TYPE="text" ID="input1" VALUE="input"/>
+ </test>
+ <test id="input2">
+ <INPUT TYPE="text" DISABLED="disabled" ID="input2" VALUE="input"/>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/label.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/label.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/label.jsp 2010-08-03 11:00:49 UTC (rev 23872)
@@ -0,0 +1,27 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
+<html>
+<head>
+<style type="text/css">
+.green {
+ background-color: green;
+}
+.yellow {
+ background-color: yellow;
+ font-weight: bold;
+ font-style: italic;
+}
+.blue {
+ background-color: blue;
+}
+</style>
+</head>
+<body>
+<form:label id="label1" cssClass="green" cssStyle="font-weight: bold;">
+Label 1
+</form:label>
+<form:label id="label2" for="text" cssClass="blue" cssStyle="font-style: italic;">
+Label 2
+</form:label>
+<input type="text" id="text" />
+</body>
+</html>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/label.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/label.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/label.jsp.xml 2010-08-03 11:00:49 UTC (rev 23872)
@@ -0,0 +1,17 @@
+<tests>
+ <test id="label1">
+ <LABEL CLASS="green" ID="label1" STYLE="font-weight: bold;">
+ <SPAN CLASS="vpe-text">
+ Label 1
+ </SPAN>
+ </LABEL>
+ </test>
+ <test id="label2">
+ <LABEL CLASS="blue" FOR="text" ID="label2" STYLE="font-style: italic;">
+ <SPAN CLASS="vpe-text">
+ Label 2
+ </SPAN>
+ </LABEL>
+ </test>
+
+</tests>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/message.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/message.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/message.jsp 2010-08-03 11:00:49 UTC (rev 23872)
@@ -0,0 +1,9 @@
+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
+<html>
+<body>
+ <spring:message id="message1" code="some.id.in.bundle"/>
+ <spring:message id="message2" code="someId1, someId2, someId3" htmlEscape="true"/>
+ <spring:message id="message3" code="someId1 someId2 someId3" htmlEscape="true"/>
+ <spring:message id="message4" code="someId1 someId2 someId3" argumentSeparator=" "/>
+</body>
+</html>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/message.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/message.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/message.jsp.xml 2010-08-03 11:00:49 UTC (rev 23872)
@@ -0,0 +1,22 @@
+<tests>
+ <test id="message1">
+ <SPAN CLASS="vpe-text" >
+ some.id.in.bundle
+ </SPAN>
+ </test>
+ <test id="message2">
+ <SPAN CLASS="vpe-text" >
+ someId1, someId2, someId3
+ </SPAN>
+ </test>
+ <test id="message3">
+ <SPAN CLASS="vpe-text" >
+ someId1 someId2 someId3
+ </SPAN>
+ </test>
+ <test id="message4">
+ <SPAN CLASS="vpe-text" >
+ someId1 someId2 someId3
+ </SPAN>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/password.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/password.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/password.jsp 2010-08-03 11:00:49 UTC (rev 23872)
@@ -0,0 +1,11 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<html>
+<body>
+<form:password id="password1" value="password"/>
+<form:password id="password2" value="password" disabled="true"/>
+<form:password id="password3" value="password" showPassword="true"/>
+<form:password id="password4" value="password" showPassword="true" disabled="true"/>
+<form:password id="password5" value="password" showPassword="no"/>
+</body>
+</html>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/password.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/password.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/password.jsp.xml 2010-08-03 11:00:49 UTC (rev 23872)
@@ -0,0 +1,17 @@
+<tests>
+ <test id="password1">
+ <INPUT TYPE="password" ID="password1" VALUE="password" />
+ </test>
+ <test id="password2">
+ <INPUT TYPE="password" DISABLED="disabled" ID="password2" VALUE="password"/>
+ </test>
+ <test id="password3">
+ <INPUT TYPE="text" ID="password3" VALUE="password" />
+ </test>
+ <test id="password4">
+ <INPUT TYPE="text" DISABLED="disabled" ID="password4" VALUE="password" />
+ </test>
+ <test id="password5">
+ <INPUT TYPE="password" ID="password5" VALUE="password" />
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/textarea.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/textarea.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/textarea.jsp 2010-08-03 11:00:49 UTC (rev 23872)
@@ -0,0 +1,23 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
+<html>
+<head>
+<style type="text/css">
+.green {
+ background-color: green;
+}
+.yellow {
+ background-color: yellow;
+}
+.blue {
+ background-color: blue;
+}
+</style>
+</head>
+<body>
+<form:textarea id="textArea1" cssClass="green" cssStyle="font-weight: bold;">
+textArea 1
+</form:textarea>
+<form:textarea id="textArea2" value="textArea 2" cssClass="blue" cssStyle="font-style: italic;"/>
+</body>
+</html>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/textarea.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/textarea.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/textarea.jsp.xml 2010-08-03 11:00:49 UTC (rev 23872)
@@ -0,0 +1,17 @@
+<tests>
+ <test id="textArea1">
+ <TEXTAREA ID="textArea1" CSSCLASS="green" CSSSTYLE="font-weight: bold;"
+ CLASS="green" STYLE="font-weight: bold;">
+ textArea 1
+ <SPAN CLASS="vpe-text">
+ textArea 1
+ </SPAN>
+ </TEXTAREA>
+ </test>
+ <test id="textArea2">
+ <TEXTAREA ID="textArea2" VALUE="textArea 2" CSSCLASS="blue"
+ CSSSTYLE="font-style: italic;" CLASS="blue" STYLE="font-style: italic;">
+ </TEXTAREA>
+ </test>
+
+</tests>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/theme.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/theme.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/theme.jsp 2010-08-03 11:00:49 UTC (rev 23872)
@@ -0,0 +1,9 @@
+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
+<html>
+<body>
+ <spring:theme id="theme1" code="some.id.in.bundle"/>
+ <spring:theme id="theme2" code="someId1, someId2, someId3" htmlEscape="true"/>
+ <spring:theme id="theme3" code="someId1 someId2 someId3" htmlEscape="true"/>
+ <spring:theme id="theme4" code="someId1 someId2 someId3" argumentSeparator=" "/>
+</body>
+</html>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/theme.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/theme.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/theme.jsp.xml 2010-08-03 11:00:49 UTC (rev 23872)
@@ -0,0 +1,22 @@
+<tests>
+ <test id="theme1">
+ <SPAN CLASS="vpe-text" >
+ some.id.in.bundle
+ </SPAN>
+ </test>
+ <test id="theme2">
+ <SPAN CLASS="vpe-text" >
+ someId1, someId2, someId3
+ </SPAN>
+ </test>
+ <test id="theme3">
+ <SPAN CLASS="vpe-text" >
+ someId1 someId2 someId3
+ </SPAN>
+ </test>
+ <test id="theme4">
+ <SPAN CLASS="vpe-text" >
+ someId1 someId2 someId3
+ </SPAN>
+ </test>
+</tests>
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java 2010-08-02 23:40:08 UTC (rev 23871)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java 2010-08-03 11:00:49 UTC (rev 23872)
@@ -59,6 +59,34 @@
performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/errors.jsp"); //$NON-NLS-1$
}
+ public void testHidden() throws Throwable {
+ performInvisibleTagTestByFullPath("src/main/webapp/WEB-INF/jsp/hidden.jsp", "hidden"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testInput() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/input.jsp"); //$NON-NLS-1$
+ }
+
+ public void testPassword() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/password.jsp"); //$NON-NLS-1$
+ }
+
+ public void testLabel() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/label.jsp"); //$NON-NLS-1$
+ }
+
+ public void testTextarea() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/textarea.jsp"); //$NON-NLS-1$
+ }
+
+ public void testMessage() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/message.jsp"); //$NON-NLS-1$
+ }
+
+ public void testTheme() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/theme.jsp"); //$NON-NLS-1$
+ }
+
@Override
protected String getTestProjectName() {
return SpringAllTests.IMPORT_PROJECT_NAME;
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java 2010-08-02 23:40:08 UTC (rev 23871)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java 2010-08-03 11:00:49 UTC (rev 23872)
@@ -78,7 +78,7 @@
assertNotNull("Could not find component file '"+elementPagePath+"'", elementPageFile); //$NON-NLS-1$ //$NON-NLS-2$
IEditorPart editor = WorkbenchUtils.openEditor(elementPageFile,EDITOR_ID);
- assertNotNull(editor);
+ assertNotNull("Editor should be opened.", editor); //$NON-NLS-1$
VpeController controller = TestUtil.getVpeController((JSPMultiPageEditor) editor);
/*
* Get xml test file
@@ -159,56 +159,85 @@
*/
protected void performInvisibleTagTest(String elementPagePath,
String elementId) throws Throwable {
+ performInvisibleTagTestByFullPath(TestUtil.COMPONENTS_PATH
+ + elementPagePath, elementId);
+ }
+
+ /**
+ * test for invisible tags
+ *
+ * @param elementPagePath
+ * - path to test page
+ * @param elementId
+ * - id of element on page
+ * @throws Throwable
+ */
+ protected void performInvisibleTagTestByFullPath(String elementPagePath,
+ String elementId) throws Throwable {
setException(null);
-
- IFile elementPageFile = (IFile) TestUtil.getComponentPath(
+
+ IFile elementPageFile = (IFile) TestUtil.getComponentFileByFullPath(
elementPagePath, getTestProjectName());
-
+ /*
+ * Test that test file was found and exists
+ */
+ assertNotNull("Could not find component file '"+elementPagePath+"'", elementPageFile); //$NON-NLS-1$ //$NON-NLS-2$
+ /*
+ * Open the editor
+ */
IEditorInput input = new FileEditorInput(elementPageFile);
-
TestUtil.waitForJobs();
-
IEditorPart editor = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage().openEditor(input,
- EDITOR_ID, true);
-
- assertNotNull(editor);
-
+ .getActiveWorkbenchWindow().getActivePage().openEditor(input,
+ EDITOR_ID, true);
+ assertNotNull("Editor should be opened.", editor); //$NON-NLS-1$
TestUtil.waitForJobs();
-
+ /*
+ * Get the controller
+ */
VpeController controller = TestUtil.getVpeController((JSPMultiPageEditor) editor);
-
- // find source element and check if it is not null
- Element sourceELement = findSourceElementById(controller, elementId);
- assertNotNull(sourceELement);
-
- // find visual element and check if it is null
+ /*
+ * Find source element and check if it is not null
+ */
+ Element sourceElement = findSourceElementById(controller, elementId);
+ assertNotNull("Source node with id '" + elementId + "' was not found.", sourceElement); //$NON-NLS-1$ //$NON-NLS-2$
+ /*
+ * Find visual element and check if it is null
+ */
nsIDOMElement visualElement = findElementById(controller, elementId);
- assertNull(visualElement);
-
- // set show invisible tag's flag to true
+ assertNull("Source node with id '" + elementId + "' has visual representation.", visualElement); //$NON-NLS-1$ //$NON-NLS-2$
+
+ /*
+ * Set show invisible tag's flag to true
+ */
controller.getVisualBuilder().setShowInvisibleTags(true);
controller.visualRefresh();
-
- // find visual element and check if it is not null
+
+ /*
+ * Find visual element and check if it is not null
+ */
visualElement = findElementById(controller, elementId,TestUtil.MAX_IDLE);
assertNotNull(visualElement);
-
- // generate text for invisible tag
- String modelInvisibleTagText = generateInvisibleTagText(sourceELement
+
+ /*
+ * Generate text for invisible tag
+ */
+ String modelInvisibleTagText = generateInvisibleTagText(sourceElement
.getNodeName());
-
- // generate dom document and get root element
+
+ /*
+ * Generate dom document and get root element
+ */
Element modelElement = TestDomUtil.getDocument(modelInvisibleTagText)
- .getDocumentElement();
+ .getDocumentElement();
assertNotNull(modelElement);
-
+
TestDomUtil.compareNodes(visualElement, modelElement);
-
+
if (getException() != null) {
throw getException();
}
-
+
}
/**
14 years, 5 months
JBoss Tools SVN: r23871 - workspace/dgolovin/experimental-build.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-08-02 19:40:08 -0400 (Mon, 02 Aug 2010)
New Revision: 23871
Added:
workspace/dgolovin/experimental-build/e36-wtp32-src.target
Log:
target platorm with sources
Added: workspace/dgolovin/experimental-build/e36-wtp32-src.target
===================================================================
--- workspace/dgolovin/experimental-build/e36-wtp32-src.target (rev 0)
+++ workspace/dgolovin/experimental-build/e36-wtp32-src.target 2010-08-02 23:40:08 UTC (rev 23871)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde version="3.6"?>
+
+<target includeMode="feature" name="e36-wtp32-src">
+<locations>
+<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
+<unit id="org.maven.ide.eclipse.feature.feature.group" version="0.10.2.20100623-1649"/>
+<repository location="http://m2eclipse.sonatype.org/sites/m2e/"/>
+</location>
+<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
+<unit id="org.eclipse.birt.feature.group" version="2.6.0.v20100617-9gF727DGKb0yl9AwWxpmbo35PwQ_"/>
+<unit id="org.eclipse.datatools.enablement.sdk.feature.feature.group" version="1.8.0.v201005280400-7I97-FE9JfhXjGyyrcS_FeiNlq43"/>
+<unit id="org.eclipse.zest.sdk.feature.group" version="1.2.0.v20100519-2050-679-8COKLDAKOXIEU_VWSfZdM9XR"/>
+<unit id="org.eclipse.jdt.feature.group" version="3.6.0.v20100526-0800-7z8XFUJFMTfCWGoVuHImpms9H155"/>
+<unit id="org.eclipse.wst.xml_ui.feature.feature.group" version="3.2.0.v201005241510-7H7AFUIDxumQGOb7ocjUR2Pvz-28"/>
+<unit id="org.eclipse.tptp.monitoring.runtime.feature.group" version="4.5.0.v201005271900-7T7X-7r1WNos_vYhsZicqkbMM"/>
+<unit id="org.eclipse.tptp.platform.runtime.feature.group" version="4.7.0.v201005032111-7u84-8ksiNsksbQ6UTB7dcy3RUlT"/>
+<unit id="org.eclipse.tptp.wtp.feature.group" version="4.5.0.v201005032111-54-78I8G0BlG8C88S8WCW88"/>
+<unit id="org.eclipse.tptp.test.runtime.feature.group" version="4.5.0.v201005032111-7H7I-7VtKAvYv6f6qonS7y600vRQ"/>
+<unit id="org.eclipse.tptp.trace.runtime.feature.group" version="4.4.0.v201005032111-7H7C-7XbK_J3E9NJPSTgdcXb94"/>
+<unit id="org.eclipse.jpt.feature.feature.group" version="2.3.0.v201005260000-7N7UEwFD3wTgbU_dxVnWV"/>
+<unit id="org.eclipse.wst.common.fproj.feature.group" version="3.2.0.v201005290030-377A78s73533D5L355B"/>
+<unit id="org.eclipse.jst.common.fproj.enablement.jdt.feature.group" version="3.2.0.v201005241600-377A78s73533C6A6B39"/>
+<unit id="org.eclipse.jst.enterprise_ui.feature.feature.group" version="3.2.0.v201005241530-7b7GHTYFSK2W9kPaFClvz0O_NQmN"/>
+<unit id="org.eclipse.wst.web_ui.feature.feature.group" version="3.2.0.v201005241510-7O7CFb3EMf84nP-FHuc10NTz--M3"/>
+<unit id="org.eclipse.wst.xsl.feature.feature.group" version="1.1.0.v201005241600-7S7WFAKFIpS---NRIS1pbfYBUIQ"/>
+<unit id="org.eclipse.jsf.feature.feature.group" version="3.2.0.v20100526-7E7I-F9JgLWLMBYy3114"/>
+<unit id="org.eclipse.jst.ws.jaxws.dom.feature.feature.group" version="1.0.0.v201005241530-5--AkF7B77NBZBgBg"/>
+<unit id="org.eclipse.jst.ws.jaxws.feature.feature.group" version="1.0.0.v201005241530-7E777BF8NcJSSJxUETx_l"/>
+<unit id="org.eclipse.jst.server_adapters.ext.feature.feature.group" version="3.2.0.v201005241530-777HFGPCcNBDiBgIc4BA8"/>
+<unit id="org.eclipse.jst.server_adapters.feature.feature.group" version="3.2.0.v201005241530-208Z7w31211419"/>
+<unit id="org.eclipse.jst.server_ui.feature.feature.group" version="3.2.0.v201005241530-7A5FEh9xFc7RCGLRBAIOJC43A"/>
+<unit id="org.eclipse.jst.web_ui.feature.feature.group" version="3.2.0.v201005250611-7F77FJJC25Skdw1pheuO_q6p-Idh"/>
+<unit id="org.eclipse.wst.server_adapters.feature.feature.group" version="3.2.0.v201005241510-51EoAkF77g8HBSc"/>
+<repository location="http://download.eclipse.org/releases/helios/"/>
+</location>
+<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
+<unit id="org.eclipse.birt.chart.feature.group" version="2.6.0.v20100617-7f9T0FQCnv7wz02TTZ0LE1"/>
+<unit id="org.eclipse.birt.osgi.runtime.sdk.feature.group" version="2.6.0.v20100617-57B-85wFdAHP-Cf8kRo1_ft1IUwD"/>
+<unit id="org.eclipse.birt.chart.integration.wtp.feature.group" version="2.6.0.v20100617-1315-35-7w3121172802426"/>
+<unit id="org.eclipse.birt.integration.wtp.feature.group" version="2.6.0.v20100617-1315-35-7w3121172802426"/>
+<repository location="http://download.eclipse.org/birt/update-site/2.6/"/>
+</location>
+<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
+<unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.0.0.568-dev-e36"/>
+<unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="2.0.0.568-dev-e36"/>
+<unit id="org.eclipse.swtbot.ide.feature.group" version="2.0.0.568-dev-e36"/>
+<unit id="org.eclipse.swtbot.eclipse.test.junit4.feature.group" version="2.0.0.568-dev-e36"/>
+<unit id="org.eclipse.swtbot.feature.group" version="2.0.0.568-dev-e36"/>
+<repository location="http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/"/>
+</location>
+<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
+<unit id="com.ibm.icu.base.feature.group" version="1.1.0.v20090119-79318s73533B57"/>
+<unit id="org.eclipse.equinox.server.core.feature.group" version="1.0.0.v20100510-7K7QEoF7RZHQHHz-Jr"/>
+<unit id="org.eclipse.help.feature.group" version="1.2.0.v20100427-7e7jEKFEx2XlnZinYPtgz03"/>
+<unit id="org.eclipse.jdt.feature.group" version="3.6.0.v20100526-0800-7z8XFUJFMTfCWGoVuHImpms9H155"/>
+<unit id="org.eclipse.platform.feature.group" version="3.6.0.v20100602-9gF78GpqFt6trOGhL60z0oEx3fz-JKNwxPY"/>
+<unit id="org.eclipse.platform.ide" version="3.6.0.I20100608-0911"/>
+<unit id="org.eclipse.equinox.executable.feature.group" version="3.4.0.v20100524-7M7K-FIhIez-egBko15H73"/>
+<unit id="org.eclipse.equinox.executable" version="3.4.0.v20100524-7M7K-FIhIez-egBko15H73"/>
+<unit id="org.eclipse.pde.feature.group" version="3.6.0.v20100525-7b7mFKtFEx2XmfZ4_B7NUJA"/>
+<unit id="org.eclipse.sdk.feature.group" version="3.6.0.v20100427-7Q7m-DPY2dP0s7TnP1vxqsprbrvrHJwHMVz0mb8mhRXmu"/>
+<unit id="org.eclipse.rcp.feature.group" version="3.6.0.v20100519-9OArFKvFtsd7WLUKh-DcYTS"/>
+<unit id="org.eclipse.equinox.core.sdk.feature.group" version="3.6.0.v20100603-7sF99FsFFUu63a35g6s"/>
+<unit id="org.eclipse.equinox.sdk.feature.group" version="3.6.0.v20100601-7H7R-7v8rtGVR34XkO3kfH3DUO07"/>
+<repository location="http://download.eclipse.org/eclipse/updates/3.6"/>
+</location>
+<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
+<unit id="org.eclipse.jst.jsf.apache.trinidad.tagsupport.feature.feature.group" version="2.2.100.v20100526-208Z7w312114252964"/>
+<unit id="org.eclipse.jst.jsf.apache.trinidad.tagsupport_sdk.feature.feature.group" version="2.2.100.v20100526-53A78-5BcAz-B6B367DgD6C83225"/>
+<unit id="org.eclipse.jst.ws.cxf.feature.source.feature.group" version="1.0.0.v201005241530-7H777BFAKlOiOX8lGdLp-67BD"/>
+<unit id="org.eclipse.jst.ws.cxf_sdk.feature.feature.group" version="1.0.0.v201005241530-3--84MABAENFRpWoRZJ3QnW1HJUz"/>
+<unit id="org.eclipse.jpt_sdk.feature.feature.group" version="2.3.0.v201005260000-678-90WCaK-ULO-YlgWk2603TmE4"/>
+<unit id="org.eclipse.jst.common.fproj.enablement.jdt.sdk.feature.group" version="3.2.0.v201005241600-777DBg9tKEJNGDINGQAP7B7C4A"/>
+<unit id="org.eclipse.wst.common.fproj.sdk.feature.group" version="3.2.0.v201005241600-787HDFApOGLYINKfGUEU6M466C"/>
+<unit id="org.eclipse.wst.xml_sdk.feature.feature.group" version="3.2.0.v201005241420-7A5-8DXHQSiNjJGP0ISCWpelz-nt"/>
+<unit id="org.eclipse.jsf_sdk.feature.feature.group" version="3.2.0.v20100529-773-84JAM2IHOpNfbWWaEFNkSXMN"/>
+<unit id="org.eclipse.jst.ws.jaxws.dom.feature.source.feature.group" version="1.0.0.v201005241530-5--AkF7B77NBZBgBg"/>
+<unit id="org.eclipse.jst.ws.jaxws.dom_sdk.feature.feature.group" version="1.0.0.v201005241530-4--8z84HpKLJNEfKmDoDiBlG8C88"/>
+<unit id="org.eclipse.jst.ws.jaxws.feature.source.feature.group" version="1.0.0.v201005241530-7E777BF8NcJSSJxUETx_l"/>
+<unit id="org.eclipse.jst.ws.jaxws_sdk.feature.feature.group" version="1.0.0.v201005241530-4--90NCECGTGcjbafM5kOd5o19Od"/>
+<unit id="org.eclipse.jst.enterprise_core.feature.source.feature.group" version="3.2.0.v201005241530-52FMRAkF7B77PDV8V97"/>
+<unit id="org.eclipse.jst.enterprise_sdk.feature.feature.group" version="3.2.0.v201005241530-773-84gAKKWfKZOAbCm_DPW4QYIs"/>
+<unit id="org.eclipse.jst.enterprise_ui.feature.source.feature.group" version="3.2.0.v201005241530-7b7GHTYFSK2W9kPaFClvz0O_NQmN"/>
+<unit id="org.eclipse.jst.server_adapters.ext.sdk.feature.feature.group" version="3.2.0.v201005241530-773-84CALIJXHjRJJlDqSmOTT_Dd"/>
+<unit id="org.eclipse.jst.server_adapters.sdk.feature.feature.group" version="3.2.0.v201005241530-773-8-5BcAz-B6959A4B319_8x42"/>
+<unit id="org.eclipse.jst.server_adapters.ext.feature.source.feature.group" version="3.2.0.v201005241530-777HFGPCcNBDiBgIc4BA8"/>
+<unit id="org.eclipse.jst.server_adapters.feature.source.feature.group" version="3.2.0.v201005241530-208Z7w31211419"/>
+<unit id="org.eclipse.jst.server_core.feature.source.feature.group" version="3.2.0.v201005241530-31FA28s73533C66"/>
+<unit id="org.eclipse.jst.server_sdk.feature.feature.group" version="3.2.0.v201005241530-773-84F8JHkI0MgFXFIVdJS_6WAM"/>
+<unit id="org.eclipse.jst.server_ui.feature.source.feature.group" version="3.2.0.v201005241530-7A5FEh9xFc7RCGLRBAIOJC43A"/>
+<unit id="org.eclipse.jst.web_core.feature.source.feature.group" version="3.2.0.v201005250611-7Q7BG6sFE9Le9BCa4yX-Tpohw0z0"/>
+<unit id="org.eclipse.jst.web_sdk.feature.feature.group" version="3.2.0.v201005241530-7B77-99ZHQV_WpWSz-TdQHX2LLOz"/>
+<unit id="org.eclipse.jst.web_ui.feature.source.feature.group" version="3.2.0.v201005250611-7F77FJJC25Skdw1pheuO_q6p-Idh"/>
+<unit id="org.eclipse.wst.common_core.feature.source.feature.group" version="3.2.0.v201005241600-7B7DFEdF7RZHOZIvUqM4NJ"/>
+<unit id="org.eclipse.wst.common_sdk.feature.feature.group" version="3.2.0.v201005241600-795A89xPEHUWz-R2qojz0ZYvRuq6"/>
+<unit id="org.eclipse.wst.server_adapters.feature.source.feature.group" version="3.2.0.v201005241510-51EoAkF77g8HBSc"/>
+<unit id="org.eclipse.wst.server_core.feature.source.feature.group" version="3.2.0.v201005241510-30F8T8s734C3E4K"/>
+<unit id="org.eclipse.wst.server_sdk.feature.feature.group" version="3.2.0.v201005241510-7838Z90K9LPrP-Wf9pHQUqJaW8VK"/>
+<unit id="org.eclipse.wst.server_ui.feature.source.feature.group" version="3.2.0.v201005241510-7B4FBmAtJb1lEOKcCJHLHQ347"/>
+<unit id="org.eclipse.wst.web_core.feature.source.feature.group" version="3.2.0.v201005241510-7E7AFHkAJrn5NL_6wTQDqKL5RwiQ"/>
+<unit id="org.eclipse.wst.web_sdk.feature.feature.group" version="3.2.0.v201005241510-7E79-8SxYVC57ALumtNGOg802rb1"/>
+<unit id="org.eclipse.wst.ws_sdk.feature.feature.group" version="3.2.0.v201005241450-793A99xVEIMdvS3PAW8e1X1UNDue"/>
+<unit id="org.eclipse.wst.web_ui.feature.source.feature.group" version="3.2.0.v201005241510-7O7CFb3EMf84nP-FHuc10NTz--M3"/>
+<unit id="org.eclipse.wst.ws_core.feature.source.feature.group" version="3.2.0.v201005241510-7L7RFexFGtGd-ngv-z0mFld4852"/>
+<unit id="org.eclipse.wst.ws_ui.feature.source.feature.group" version="3.2.0.v201005241510-7I78FXbEtEoKvbtBtJ4fGNrH2oBH"/>
+<unit id="org.eclipse.wst.xml_core.feature.source.feature.group" version="3.2.0.v201005241510-7C7OFXTF7RZHQHHxO4IuKe"/>
+<unit id="org.eclipse.wst.xml_ui.feature.source.feature.group" version="3.2.0.v201005241510-7H7AFUIDxumQGOb7ocjUR2Pvz-28"/>
+<unit id="org.eclipse.jst.ws.axis2tools.feature.source.feature.group" version="1.1.100.v201005241530-78-FF0DZRDKDDePSKwHj"/>
+<unit id="org.eclipse.wst.xsl.feature.source.feature.group" version="1.1.0.v201005241600-7S7WFAKFIpS---NRIS1pbfYBUIQ"/>
+<unit id="org.eclipse.wst.xsl_sdk.feature.feature.group" version="1.1.0.v201005241600-528b98jYeXxuXhFoZP_jOlPK0yxt"/>
+<repository location="http://download.eclipse.org/webtools/repository/helios"/>
+</location>
+<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
+<unit id="org.maven.ide.eclipse.sdk.feature.feature.group" version="0.10.0.20100209-0800"/>
+<unit id="org.maven.ide.eclipse.wtp.feature.feature.group" version="0.10.0.20100209-0800"/>
+<repository location="http://m2eclipse.sonatype.org/sites/m2e-extras/"/>
+</location>
+</locations>
+</target>
14 years, 5 months
JBoss Tools SVN: r23870 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: console/utils and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-08-02 13:16:22 -0400 (Mon, 02 Aug 2010)
New Revision: 23870
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/codegen/ExportAntCodeGenWizardPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/LaunchHelper.java
Log:
https://jira.jboss.org/browse/JBIDE-6762 - fixed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/codegen/ExportAntCodeGenWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/codegen/ExportAntCodeGenWizardPage.java 2010-08-02 16:29:10 UTC (rev 23869)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/codegen/ExportAntCodeGenWizardPage.java 2010-08-02 17:16:22 UTC (rev 23870)
@@ -86,7 +86,7 @@
.setLabelText(HibernateConsoleMessages.ExportAntCodeGenWizardPage_hibernate_code_generation_configurations);
ILaunchConfiguration[] launchCfgs;
try {
- launchCfgs = LaunchHelper.findFilteredCodeGenerationConfigs();
+ launchCfgs = LaunchHelper.findFilteredCodeGenerationConfigsSorted();
} catch (CoreException e) {
launchCfgs = new ILaunchConfiguration[0];
}
@@ -122,7 +122,7 @@
public ILaunchConfiguration getSelectedLaunchConfig() {
ILaunchConfiguration[] launchCfgs;
try {
- launchCfgs = LaunchHelper.findFilteredCodeGenerationConfigs();
+ launchCfgs = LaunchHelper.findFilteredCodeGenerationConfigsSorted();
} catch (CoreException e) {
launchCfgs = new ILaunchConfiguration[0];
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/LaunchHelper.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/LaunchHelper.java 2010-08-02 16:29:10 UTC (rev 23869)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/LaunchHelper.java 2010-08-02 17:16:22 UTC (rev 23870)
@@ -1,6 +1,8 @@
package org.hibernate.eclipse.console.utils;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
import java.util.List;
import org.eclipse.core.runtime.Assert;
@@ -160,20 +162,40 @@
//***************************** Hibernate Code Generation Launch Configurations ************
- public static ILaunchConfiguration[] findFilteredCodeGenerationConfigs() throws CoreException{
- ILaunchConfiguration[] allHibernateLaunchConfigurations = findCodeGenerationConfigs();
- List<ILaunchConfiguration> launchConfigurations = new ArrayList<ILaunchConfiguration>();
- for (ILaunchConfiguration config : allHibernateLaunchConfigurations) {
- if (DebugUIPlugin.doLaunchConfigurationFiltering(config)) launchConfigurations.add(config);
+ public static ILaunchConfiguration[] filterCodeGenerationConfigs(ILaunchConfiguration[] launchConfigs) throws CoreException{
+ List<ILaunchConfiguration> res = new ArrayList<ILaunchConfiguration>();
+ for (ILaunchConfiguration config : launchConfigs) {
+ if (DebugUIPlugin.doLaunchConfigurationFiltering(config)) {
+ res.add(config);
+ }
}
- return launchConfigurations.toArray(new ILaunchConfiguration[launchConfigurations.size()]);
+ return res.toArray(new ILaunchConfiguration[res.size()]);
}
+ public static ILaunchConfiguration[] findFilteredCodeGenerationConfigs() throws CoreException{
+ return filterCodeGenerationConfigs(findCodeGenerationConfigs());
+ }
+
+ public static ILaunchConfiguration[] findFilteredCodeGenerationConfigsSorted() throws CoreException{
+ return filterCodeGenerationConfigs(findCodeGenerationConfigsSortedByName());
+ }
+
public static ILaunchConfiguration[] findCodeGenerationConfigs() throws CoreException {
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
return launchManager.getLaunchConfigurations(getCodeGenerationType());
}
+ public static ILaunchConfiguration[] findCodeGenerationConfigsSortedByName() throws CoreException {
+ ILaunchConfiguration[] launchConfigs = findCodeGenerationConfigs();
+ Comparator<ILaunchConfiguration> comparator = new Comparator<ILaunchConfiguration>() {
+ public int compare(ILaunchConfiguration o1, ILaunchConfiguration o2) {
+ return o1.getName().compareToIgnoreCase(o2.getName());
+ }
+ };
+ Arrays.sort(launchConfigs, comparator);
+ return launchConfigs;
+ }
+
public static ILaunchConfigurationType getCodeGenerationType(){
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
return launchManager.getLaunchConfigurationType(
14 years, 5 months
JBoss Tools SVN: r23869 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: launch and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-08-02 12:29:10 -0400 (Mon, 02 Aug 2010)
New Revision: 23869
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/codegen/ExportAntCodeGenWizard.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/codegen/ExportAntCodeGenWizardPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenXMLFactory.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationStrings.java
Log:
https://jira.jboss.org/browse/JBIDE-6518 - adjust after code review - simplify factories methods use
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/codegen/ExportAntCodeGenWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/codegen/ExportAntCodeGenWizard.java 2010-08-02 16:28:53 UTC (rev 23868)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/codegen/ExportAntCodeGenWizard.java 2010-08-02 16:29:10 UTC (rev 23869)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Copyright (c) 2010 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,
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/codegen/ExportAntCodeGenWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/codegen/ExportAntCodeGenWizardPage.java 2010-08-02 16:28:53 UTC (rev 23868)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/codegen/ExportAntCodeGenWizardPage.java 2010-08-02 16:29:10 UTC (rev 23869)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Copyright (c) 2010 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,
@@ -11,11 +11,8 @@
package org.hibernate.eclipse.codegen;
import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import org.dom4j.Element;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ComboDialogField;
@@ -29,9 +26,7 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-import org.hibernate.console.ConfigurationXMLFactory;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
-import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.console.utils.LaunchHelper;
import org.hibernate.eclipse.launch.CodeGenXMLFactory;
@@ -144,19 +139,7 @@
return null;
}
final CodeGenXMLFactory codeGenXMLFactory = new CodeGenXMLFactory(lc);
- Element rootBuildXml = codeGenXMLFactory.createRoot();
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ConfigurationXMLFactory.dump(baos, rootBuildXml);
- String baosResult = baos.toString().replace(
- codeGenXMLFactory.getPropFileContentStubUID(), codeGenXMLFactory.getPropFileContentPreSave());
- ByteArrayInputStream bais = null;
- try {
- bais = new ByteArrayInputStream(baosResult.getBytes("UTF-8")); //$NON-NLS-1$
- } catch (UnsupportedEncodingException uec) {
- HibernateConsolePlugin.getDefault()
- .logErrorMessage("Problems converting to UTF-8", uec); //$NON-NLS-1$
- bais = new ByteArrayInputStream(baos.toString().getBytes());
- }
- return bais;
+ String buildXml = codeGenXMLFactory.createCodeGenXML();
+ return new ByteArrayInputStream(buildXml.getBytes());
}
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenXMLFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenXMLFactory.java 2010-08-02 16:28:53 UTC (rev 23868)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenXMLFactory.java 2010-08-02 16:29:10 UTC (rev 23869)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Copyright (c) 2010 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,
@@ -10,6 +10,7 @@
******************************************************************************/
package org.hibernate.eclipse.launch;
+import java.io.ByteArrayOutputStream;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Iterator;
@@ -51,7 +52,11 @@
public static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
public static final long versionUID4PropFile = 1841714864553304000L;
- protected String propFileContentPreSave = null;
+ /**
+ * presave generated Hibernate Properties file content,
+ * this is necessary to proper content formating
+ */
+ protected String propFileContentPreSave = ""; //$NON-NLS-1$
protected ILaunchConfiguration lc = null;
@@ -60,7 +65,7 @@
}
@SuppressWarnings("unchecked")
- public Element createRoot() {
+ protected Element createRoot() {
ExporterAttributes attributes = null;
try {
attributes = new ExporterAttributes(lc);
@@ -304,6 +309,15 @@
}
public String getPropFileContentPreSave() {
- return propFileContentPreSave;
+ return propFileContentPreSave == null ? "" : propFileContentPreSave; //$NON-NLS-1$
}
+
+ public String createCodeGenXML() {
+ Element rootBuildXml = createRoot();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ConfigurationXMLFactory.dump(baos, rootBuildXml);
+ String res = baos.toString().replace(
+ getPropFileContentStubUID(), getPropFileContentPreSave()).trim();
+ return res;
+ }
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationStrings.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationStrings.java 2010-08-02 16:28:53 UTC (rev 23868)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationStrings.java 2010-08-02 16:29:10 UTC (rev 23869)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Copyright (c) 2010 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,
14 years, 5 months
JBoss Tools SVN: r23868 - in trunk/hibernatetools: tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-08-02 12:28:53 -0400 (Mon, 02 Aug 2010)
New Revision: 23868
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConfigurationXMLFactory.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConfigurationXMLStrings.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java
Log:
https://jira.jboss.org/browse/JBIDE-6518 - adjust after code review - simplify factories methods use
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConfigurationXMLFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConfigurationXMLFactory.java 2010-08-02 15:49:40 UTC (rev 23867)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConfigurationXMLFactory.java 2010-08-02 16:28:53 UTC (rev 23868)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Copyright (c) 2010 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,
@@ -10,6 +10,7 @@
******************************************************************************/
package org.hibernate.console;
+import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
@@ -113,6 +114,13 @@
el.addAttribute(prName, val);
}
}
+
+ public String createConfigurationXML() {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ Element element = createRoot();
+ dump(baos, element);
+ return baos.toString();
+ }
public static void dump(OutputStream os, Element element) {
// try to "pretty print" it
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConfigurationXMLStrings.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConfigurationXMLStrings.java 2010-08-02 15:49:40 UTC (rev 23867)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConfigurationXMLStrings.java 2010-08-02 16:28:53 UTC (rev 23868)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Copyright (c) 2010 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,
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java 2010-08-02 15:49:40 UTC (rev 23867)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java 2010-08-02 16:28:53 UTC (rev 23868)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Copyright (c) 2010 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,
@@ -11,7 +11,6 @@
package org.hibernate.eclipse.console.test;
import java.io.BufferedReader;
-import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
@@ -24,12 +23,10 @@
import java.util.List;
import java.util.Map;
-import org.dom4j.Element;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.debug.core.ILaunchConfiguration;
-import org.hibernate.console.ConfigurationXMLFactory;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
import org.hibernate.eclipse.console.ExtensionManager;
import org.hibernate.eclipse.console.model.impl.ExporterDefinition;
@@ -139,40 +136,40 @@
public void testCodeGenXMLFactoryRevengAll() {
String codeGen = codeGenXMLFactory(true, true, false);
- String specimen = getSpecimen("AntCodeGenReveng_test1.xml"); //$NON-NLS-1$
- assertEquals(specimen.trim(), codeGen.trim().replaceAll("\n", "\r\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ String specimen = getSample("AntCodeGenReveng_test1.xml"); //$NON-NLS-1$
+ assertEquals(specimen.trim(), codeGen.replaceAll("\n", "\r\n")); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testCodeGenXMLFactoryRevengOne() {
String codeGen = codeGenXMLFactory(true, false, false);
- String specimen = getSpecimen("AntCodeGenReveng_test2.xml"); //$NON-NLS-1$
- assertEquals(specimen.trim(), codeGen.trim().replaceAll("\n", "\r\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ String sample = getSample("AntCodeGenReveng_test2.xml"); //$NON-NLS-1$
+ assertEquals(sample.trim(), codeGen.replaceAll("\n", "\r\n")); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testCodeGenXMLFactoryAll() {
String codeGen = codeGenXMLFactory(false, true, false);
- String specimen = getSpecimen("AntCodeGen_test1.xml"); //$NON-NLS-1$
- assertEquals(specimen.trim(), codeGen.trim().replaceAll("\n", "\r\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ String sample = getSample("AntCodeGen_test1.xml"); //$NON-NLS-1$
+ assertEquals(sample.trim(), codeGen.replaceAll("\n", "\r\n")); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testCodeGenXMLFactoryOne() {
String codeGen = codeGenXMLFactory(false, false, false);
- String specimen = getSpecimen("AntCodeGen_test2.xml"); //$NON-NLS-1$
- assertEquals(specimen.trim(), codeGen.trim().replaceAll("\n", "\r\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ String sample = getSample("AntCodeGen_test2.xml"); //$NON-NLS-1$
+ assertEquals(sample.trim(), codeGen.replaceAll("\n", "\r\n")); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testCodeGenXMLFactoryJpaAll() {
String codeGen = codeGenXMLFactory(false, true, true);
codeGen = updatePaths(codeGen);
- String specimen = getSpecimen("AntCodeGenJpa_test1.xml"); //$NON-NLS-1$
- assertEquals(specimen.trim(), codeGen.trim().replaceAll("\n", "\r\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ String sample = getSample("AntCodeGenJpa_test1.xml"); //$NON-NLS-1$
+ assertEquals(sample.trim(), codeGen.replaceAll("\n", "\r\n")); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testCodeGenXMLFactoryJpaOne() {
String codeGen = codeGenXMLFactory(false, false, true);
codeGen = updatePaths(codeGen);
- String specimen = getSpecimen("AntCodeGenJpa_test2.xml"); //$NON-NLS-1$
- assertEquals(specimen.trim(), codeGen.trim().replaceAll("\n", "\r\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ String sample = getSample("AntCodeGenJpa_test2.xml"); //$NON-NLS-1$
+ assertEquals(sample.trim(), codeGen.replaceAll("\n", "\r\n")); //$NON-NLS-1$ //$NON-NLS-2$
}
public String updatePaths(String codeGen) {
@@ -219,15 +216,11 @@
testLCAttr.put(HBMTEMPLATE0_PROPERTIES, expProps2);
testLCAttr.put(HibernateLaunchConstants.ATTR_REVERSE_ENGINEER, reveng);
TestLaunchConfig testLC = new TestLaunchConfig(testLCAttr);
- CodeGenXMLFactory cgfXML = new CodeGenXMLFactory4Test(testLC, jpa);
- Element rootBuildXml = cgfXML.createRoot();
- ConfigurationXMLFactory.dump(System.out, rootBuildXml);
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ConfigurationXMLFactory.dump(baos, rootBuildXml);
- return baos.toString();
+ CodeGenXMLFactory codeGenFactory = new CodeGenXMLFactory4Test(testLC, jpa);
+ return codeGenFactory.createCodeGenXML();
}
- public String getSpecimen(String fileName) {
+ public String getSample(String fileName) {
File resourceFile = null;
try {
resourceFile = getResourceItem(SAMPLE_PATH + fileName);
14 years, 5 months