JBoss Tools SVN: r23867 - in trunk/vpe: plugins/org.jboss.tools.vpe.spring/templates and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-08-02 11:49:40 -0400 (Mon, 02 Aug 2010)
New Revision: 23867
Added:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/option.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/option.jsp.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/options.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/options.jsp.xml
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/templates/vpe-templates-spring.xml
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:
add tests for form:option and form:options
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-02 12:59:50 UTC (rev 23866)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/src/org/jboss/tools/vpe/spring/template/SpringFormSelectTemplate.java 2010-08-02 15:49:40 UTC (rev 23867)
@@ -40,9 +40,13 @@
VpeSpringUtil.copyCommonAttributes(sourceElement, select);
VpeSpringUtil.copyAttribute(sourceElement, HTML.ATTR_SIZE,
select, HTML.ATTR_SIZE);
- VpeSpringUtil.copyAttribute(sourceElement, HTML.ATTR_MULTIPLE,
- select, HTML.ATTR_MULTIPLE);
+ 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);
}
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 12:59:50 UTC (rev 23866)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml 2010-08-02 15:49:40 UTC (rev 23867)
@@ -276,14 +276,14 @@
<vpe:if test="@disabled='true'">
<vpe:if test="attrpresent('itemLabel')">
<vpe:template children="yes" modify="yes">
- <option id="{@id}" class="{@cssClass}" style="{@cssStyle}"
+ <option id="{@id}1" class="{@cssClass}" style="{@cssStyle}"
dir="{@dir}" disabled="disabled">
<vpe:value expr="{@items}.{(a)itemLabel}" />
</option>
</vpe:template>
</vpe:if>
<vpe:template children="yes" modify="yes">
- <option id="{@id}" class="{@cssClass}" style="{@cssStyle}"
+ <option id="{@id}1" class="{@cssClass}" style="{@cssStyle}"
dir="{@dir}" disabled="disabled">
<vpe:value expr="{@items}" />
</option>
@@ -291,14 +291,14 @@
</vpe:if>
<vpe:if test="attrpresent('itemLabel')">
<vpe:template children="yes" modify="yes">
- <option id="{@id}" class="{@cssClass}" style="{@cssStyle}"
+ <option id="{@id}1" class="{@cssClass}" style="{@cssStyle}"
dir="{@dir}">
<vpe:value expr="{@items}.{(a)itemLabel}" />
</option>
</vpe:template>
</vpe:if>
<vpe:template children="yes" modify="yes">
- <option id="{@id}" class="{@cssClass}" style="{@cssStyle}"
+ <option id="{@id}1" class="{@cssClass}" style="{@cssStyle}"
dir="{@dir}">
<vpe:value expr="{@items}" />
</option>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/option.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/option.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/option.jsp 2010-08-02 15:49:40 UTC (rev 23867)
@@ -0,0 +1,45 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<html>
+<head>
+ <style>
+ .tall-option{
+ -moz-appearance: none;
+ height: 30px;
+ }
+ </style>
+</head>
+<body>
+ <h1>Test of form:option</h1>
+
+ <form:form modelAttribute="formBean">
+ <form:select path="selectedCategory">
+ <form:option id="booksOption1" value="books"/>
+ <form:option id="sportOption1" value="sport"/>
+ <form:option id="fishingOption1" value="fishing"/>
+ </form:select>
+ form:option with id attribute
+ <br/><br/>
+ <form:select path="selectedCategory">
+ <form:option id="booksOption2" value="books"
+ label="books selected"
+ cssStyle="width: 30px;" cssClass="tall-option"/>
+ <form:option id="sportOption2" value="sport"
+ label="sport selected"
+ cssStyle="width: 30px;" cssClass="tall-option"/>
+ <form:option id="fishingOption2" value="fishing"
+ label="fishing selected"
+ cssStyle="width: 30px;" cssClass="tall-option"/>
+ </form:select>
+ form:option with id, cssStyle, cssClass and label attributes.
+ <br/><br/>
+ <form:select path="selectedCategory">
+ <form:option id="booksOption3" value="books" disabled="true"/>
+ <form:option id="sportOption3" value="sport" disabled="true"/>
+ <form:option id="fishingOption3" value="fishing"/>
+ </form:select>
+ form:option with id and disabled='true' attributes.
+ </form:form>
+</body>
+</html>
+
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/option.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/option.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/option.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/option.jsp.xml 2010-08-02 15:49:40 UTC (rev 23867)
@@ -0,0 +1,11 @@
+<tests>
+ <test id="booksOption1">
+ <option id="booksOption1"></option>
+ </test>
+ <test id="booksOption2">
+ <option id="booksOption2" class="tall-option" style="width: 30px;">books selected</option>
+ </test>
+ <test id="booksOption3">
+ <option id="booksOption3" disabled="disabled"></option>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/option.jsp.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/options.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/options.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/options.jsp 2010-08-02 15:49:40 UTC (rev 23867)
@@ -0,0 +1,40 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<html>
+<head>
+ <style>
+ .tall-options {
+ -moz-appearance: none;
+ height: 30px;
+ }
+ </style>
+</head>
+<body>
+ <h1>Test of form:options</h1>
+
+ <form:form modelAttribute="formBean">
+
+ <form:select path="selectedCategories1">
+ <form:options id="options1" items="${formBean.availableCategories}"/>
+ </form:select>
+ form:options with id and items attribute
+ <br/><br/>
+
+ <form:select path="selectedCategories2">
+ <form:options id="options2" disabled="true"
+ cssStyle="width: 30px;" cssClass="tall-options"
+ items="${formBean.availableCategories}"/>
+ </form:select>
+ form:options with id, cssStyle, cssClass and disabled='true' attributes.
+ <br/><br/>
+
+ <form:select path="selectedCategories3">
+ <form:options id="options3"
+ itemLabel="id" itemValue="id"
+ items="${formBean.favoriteCategories}"/>
+ </form:select>
+ form:options with id and itemLabel attributes.
+ <br/><br/>
+ </form:form>
+</body>
+</html>
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/options.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/options.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/options.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/options.jsp.xml 2010-08-02 15:49:40 UTC (rev 23867)
@@ -0,0 +1,11 @@
+<tests>
+ <test id="options1">
+ <option id="options11">${formBean.availableCategories}</option>
+ </test>
+ <test id="options2">
+ <option id="options21" class="tall-options" style="width: 30px;" disabled="disabled"></option>
+ </test>
+ <test id="options3">
+ <option id="options31">${formBean.favoriteCategories}.id</option>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/options.jsp.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
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-02 12:59:50 UTC (rev 23866)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml 2010-08-02 15:49:40 UTC (rev 23867)
@@ -12,6 +12,8 @@
<bean name="/checkboxes.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/radiobutton.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/radiobuttons.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
+ <bean name="/option.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
+ <bean name="/options.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/errors.htm" class="org.jboss.tools.vpe.spring.test.springtest.controller.ErrorsController">
<property name="validator" ref="fieldValidator"/>
</bean>
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-02 12:59:50 UTC (rev 23866)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp 2010-08-02 15:49:40 UTC (rev 23867)
@@ -6,6 +6,10 @@
<br/>
<a href="radiobuttons.htm">radiobuttons.htm</a>
<br/>
+<a href="option.htm">option.htm</a>
+<br/>
+<a href="options.htm">options.htm</a>
+<br/>
<a href="form.htm">form.htm</a>
<br/>
<a href="errors.htm">errors.htm</a>
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 12:59:50 UTC (rev 23866)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java 2010-08-02 15:49:40 UTC (rev 23867)
@@ -46,6 +46,14 @@
public void testRadiobuttons() throws Throwable {
performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/radiobuttons.jsp"); //$NON-NLS-1$
}
+
+ public void testOption() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/option.jsp"); //$NON-NLS-1$
+ }
+
+ public void testOptions() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/options.jsp"); //$NON-NLS-1$
+ }
public void testErrors() throws Throwable {
performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/errors.jsp"); //$NON-NLS-1$
14 years, 5 months
JBoss Tools SVN: r23866 - in workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as: core/server/xpl and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-08-02 08:59:50 -0400 (Mon, 02 Aug 2010)
New Revision: 23866
Modified:
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/AbstractServerToolsPublisher.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java
Log:
JBIDE-6761 - RSE progress monitors
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java 2010-08-02 12:55:27 UTC (rev 23865)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java 2010-08-02 12:59:50 UTC (rev 23866)
@@ -17,12 +17,14 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.jst.server.core.IEnterpriseApplication;
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
+import org.eclipse.wst.common.project.facet.core.util.internal.ProgressMonitorUtil;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.internal.DeletedModule;
import org.eclipse.wst.server.core.model.IModuleFile;
@@ -213,11 +215,19 @@
return ServerModelUtilities.isBinaryModule(lastMod);
}
+ @Deprecated
public static IModuleResource[] getResources(IModule module) throws CoreException {
- ModuleDelegate md = (ModuleDelegate)module.loadAdapter(ModuleDelegate.class, new NullProgressMonitor());
+ return getResources(module, new NullProgressMonitor());
+ }
+
+ public static IModuleResource[] getResources(IModule module, IProgressMonitor monitor) throws CoreException {
+ monitor.beginTask("Fetching Module Resources", 100); //$NON-NLS-1$
+ ModuleDelegate md = (ModuleDelegate)module.loadAdapter(ModuleDelegate.class, ProgressMonitorUtil.submon(monitor, 100));
IModuleResource[] members = md.members();
+ monitor.done();
return members;
}
+
public static IModuleResource[] getResources(IModule[] tree) throws CoreException {
return getResources(tree[tree.length-1]);
}
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java 2010-08-02 12:55:27 UTC (rev 23865)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java 2010-08-02 12:59:50 UTC (rev 23866)
@@ -26,9 +26,11 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.common.project.facet.core.util.internal.ProgressMonitorUtil;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.internal.Messages;
import org.eclipse.wst.server.core.internal.ProgressUtil;
@@ -524,8 +526,11 @@
* @return a possibly-empty array of error and warning status
*/
public IStatus[] publishFull(IModuleResource[] resources, IProgressMonitor monitor) throws CoreException {
- handler.makeDirectoryIfRequired(new Path("/"), monitor); //$NON-NLS-1$
- return publishFull(resources, new Path("/"), monitor); //$NON-NLS-1$
+ monitor.beginTask("Publishing " + resources.length + " resources", 100 * (resources.length) + 100); //$NON-NLS-1$ //$NON-NLS-2$
+ handler.makeDirectoryIfRequired(new Path("/"), ProgressMonitorUtil.submon(monitor, 100)); //$NON-NLS-1$
+ IStatus[] results = publishFull(resources, new Path("/"), ProgressMonitorUtil.submon(monitor, 100*resources.length)); //$NON-NLS-1$
+ monitor.done();
+ return results;
}
public IStatus[] publishFull(IModuleResource[] resources, IPath relative, IProgressMonitor monitor) throws CoreException {
@@ -533,14 +538,14 @@
return EMPTY_STATUS;
monitor = ProgressUtil.getMonitorFor(monitor);
-
+ monitor.beginTask("Publishing " + resources.length + " resources", 100 * (resources.length)); //$NON-NLS-1$ //$NON-NLS-2$
List status = new ArrayList(2);
int size = resources.length;
for (int i = 0; i < size; i++) {
- IStatus[] stat = copy(resources[i], relative, monitor);
+ IStatus[] stat = copy(resources[i], relative, ProgressMonitorUtil.submon(monitor, 100));
addArrayToList(status, stat);
}
-
+ monitor.done();
IStatus[] stat = new IStatus[status.size()];
status.toArray(stat);
return stat;
@@ -554,7 +559,7 @@
IModuleFolder folder = (IModuleFolder) resource;
IModuleResource[] children = folder.members();
if( children.length == 0 )
- handler.makeDirectoryIfRequired(folder.getModuleRelativePath().append(folder.getName()), monitor);
+ handler.makeDirectoryIfRequired(folder.getModuleRelativePath().append(folder.getName()), monitor);
else {
IStatus[] stat = publishFull(children, path, monitor);
addArrayToList(status, stat);
@@ -562,7 +567,7 @@
} else {
IModuleFile mf = (IModuleFile) resource;
path = path.append(mf.getModuleRelativePath()).append(name);
- IStatus[] stats = handler.makeDirectoryIfRequired(path.removeLastSegments(1), monitor);
+ IStatus[] stats = handler.makeDirectoryIfRequired(path.removeLastSegments(1), new NullProgressMonitor());
if( stats != null && stats.length > 0 && !stats[0].isOK())
addArrayToList(status, stats);
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/AbstractServerToolsPublisher.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/AbstractServerToolsPublisher.java 2010-08-02 12:55:27 UTC (rev 23865)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/AbstractServerToolsPublisher.java 2010-08-02 12:59:50 UTC (rev 23866)
@@ -25,6 +25,7 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.common.project.facet.core.util.internal.ProgressMonitorUtil;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.model.IModuleResource;
@@ -79,17 +80,19 @@
if( module[i].isExternal() )
deleted = true;
}
-
+
+ // Monitor at this point has been begun with 1000 monitor
+ IProgressMonitor subMon = ProgressMonitorUtil.submon(monitor, 1000);
if (publishType == REMOVE_PUBLISH ) {
- status = unpublish(this.server, module, monitor);
+ status = unpublish(this.server, module, subMon);
} else {
if( deleted ) {
publishState = IServer.PUBLISH_STATE_UNKNOWN;
} else {
if (publishType == FULL_PUBLISH ) {
- status = fullPublish(module, module[module.length-1], monitor);
+ status = fullPublish(module, module[module.length-1], subMon);
} else if (publishType == INCREMENTAL_PUBLISH) {
- status = incrementalPublish(module, module[module.length-1], monitor);
+ status = incrementalPublish(module, module[module.length-1], subMon);
}
}
}
@@ -141,24 +144,27 @@
}
protected IStatus fullPublish(IModule[] moduleTree, IModule module, IProgressMonitor monitor) throws CoreException {
+ monitor.beginTask("Full Publish", 1000); //$NON-NLS-1$
+
IPath deployPath = getDeployPath(moduleTree, server);
IPublishCopyCallbackHandler callback = getCallbackHandler(deployPath);
- IModuleResource[] members = PublishUtil.getResources(module);
+ IModuleResource[] members = PublishUtil.getResources(module, ProgressMonitorUtil.submon(monitor, 200));
// First delete it
// if the module we're publishing is a project, not a binary, clean it's folder
if( !(new Path(module.getName()).segmentCount() > 1 ))
- callback.deleteResource(new Path("/"), monitor); //$NON-NLS-1$
+ callback.deleteResource(new Path("/"), ProgressMonitorUtil.submon(monitor, 100)); //$NON-NLS-1$
ArrayList<IStatus> list = new ArrayList<IStatus>();
boolean isBinaryObject = ServerModelUtilities.isBinaryModule(module);
boolean forceZip = forceZipModule(moduleTree);
+
if( !forceZip && !isBinaryObject) {
PublishCopyUtil util = new PublishCopyUtil(callback);
- list.addAll(Arrays.asList(util.publishFull(members, monitor)));
+ list.addAll(Arrays.asList(util.publishFull(members, ProgressMonitorUtil.submon(monitor, 700))));
} else if( isBinaryObject )
- list.addAll(Arrays.asList(copyBinaryModule(moduleTree, monitor)));
+ list.addAll(Arrays.asList(copyBinaryModule(moduleTree, ProgressMonitorUtil.submon(monitor, 700))));
else {
// A child that must be zipped, forceZip is true
IPath deployRoot = JBossServerCorePlugin.getServerStateLocation(server.getServer()).
@@ -170,30 +176,32 @@
list.addAll(Arrays.asList(PublishUtil.packModuleIntoJar(moduleTree[moduleTree.length-1], tempFile)));
IPublishCopyCallbackHandler handler = getCallbackHandler(new Path("/")); //$NON-NLS-1$
String parentFolder = deployPath.removeLastSegments(1).toString();
- handler.makeDirectoryIfRequired(new Path(parentFolder), new NullProgressMonitor());
+ handler.makeDirectoryIfRequired(new Path(parentFolder), ProgressMonitorUtil.submon(monitor, 200));
ModuleFile mf = new ModuleFile(tempFile.toFile(), tempFile.lastSegment(), tempFile);
- handler.copyFile(mf, deployPath, new NullProgressMonitor());
+ handler.copyFile(mf, deployPath, ProgressMonitorUtil.submon(monitor, 500));
} catch( IOException ioe) {
list.add(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, ioe.getMessage(), ioe));
}
}
+ monitor.done();
if( list.size() > 0 )
return createMultiStatus(list, module);
return Status.OK_STATUS;
}
protected IStatus incrementalPublish(IModule[] moduleTree, IModule module, IProgressMonitor monitor) throws CoreException {
+ monitor.beginTask("Incremental Publish", 100); //$NON-NLS-1$
IStatus[] results = new IStatus[] {};
IPath deployPath = getDeployPath(moduleTree, server);
boolean isBinaryObject = ServerModelUtilities.isBinaryModule(module);
boolean forceZip = forceZipModule(moduleTree);
if( !forceZip && !isBinaryObject) {
IPublishCopyCallbackHandler handler = getCallbackHandler(deployPath);
- results = new PublishCopyUtil(handler).publishDelta(delta, monitor);
+ results = new PublishCopyUtil(handler).publishDelta(delta, ProgressMonitorUtil.submon(monitor, 100));
} else if( delta.length > 0 ) {
if( isBinaryObject)
- results = copyBinaryModule(moduleTree, monitor);
+ results = copyBinaryModule(moduleTree, ProgressMonitorUtil.submon(monitor, 100));
else {
// forceZip a child module
IPath localDeployRoot = JBossServerCorePlugin.getServerStateLocation(server.getServer()).
@@ -204,9 +212,9 @@
PublishUtil.packModuleIntoJar(moduleTree[moduleTree.length-1], tempFile);
IPublishCopyCallbackHandler handler = getCallbackHandler(new Path("/")); //$NON-NLS-1$
String parentFolder = deployPath.removeLastSegments(1).toString();
- handler.makeDirectoryIfRequired(new Path(parentFolder), new NullProgressMonitor());
+ handler.makeDirectoryIfRequired(new Path(parentFolder), ProgressMonitorUtil.submon(monitor, 50));
ModuleFile mf = new ModuleFile(tempFile.toFile(), tempFile.lastSegment(), tempFile);
- handler.copyFile(mf, deployPath, new NullProgressMonitor());
+ handler.copyFile(mf, deployPath, ProgressMonitorUtil.submon(monitor, 50));
} catch( IOException ioe) {
IStatus s = new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, ioe.getMessage(), ioe);
results = new IStatus[] { s };
@@ -214,6 +222,7 @@
}
}
+ monitor.done();
if( results != null && results.length > 0 ) {
MultiStatus ms = new MultiStatus(JBossServerCorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_INC_FAIL,
NLS.bind(Messages.IncrementalPublishFail, module.getName()), null);
@@ -236,6 +245,7 @@
}
protected IStatus[] copyBinaryModule(IModule[] moduleTree, IProgressMonitor monitor) {
+ monitor.beginTask("Copy Binary Module", 100); //$NON-NLS-1$
try {
IPath destinationPath = getDeployPath(moduleTree, server);
IModuleResource[] members = PublishUtil.getResources(moduleTree);
@@ -255,14 +265,17 @@
} catch( CoreException ce ) {
return new IStatus[] {ce.getStatus()};
}
+ monitor.done();
return new IStatus[]{Status.OK_STATUS};
}
protected IStatus unpublish(IDeployableServer jbServer, IModule[] module,
IProgressMonitor monitor) throws CoreException {
+ monitor.beginTask("Begin Unpublish", 100); //$NON-NLS-1$
IPath remotePath = getDeployPath(module, server);
IPublishCopyCallbackHandler handler = getCallbackHandler(new Path("/")); //$NON-NLS-1$
- handler.deleteResource(remotePath, monitor);
+ handler.deleteResource(remotePath, ProgressMonitorUtil.submon(monitor, 100));
+ monitor.done();
return Status.OK_STATUS;
}
}
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java 2010-08-02 12:55:27 UTC (rev 23865)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java 2010-08-02 12:59:50 UTC (rev 23866)
@@ -21,6 +21,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
+import org.eclipse.wst.common.project.facet.core.util.internal.ProgressMonitorUtil;
import org.eclipse.wst.server.core.model.IModuleFile;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.IPublishCopyCallbackHandler;
@@ -59,17 +60,20 @@
public IStatus[] makeDirectoryIfRequired(IPath dir,
IProgressMonitor monitor) throws CoreException {
+ monitor.beginTask("Make directory " + dir.toString(), 100); //$NON-NLS-1$
if( dir.segmentCount() > 0 )
- makeDirectoryIfRequired(dir.removeLastSegments(1), monitor);
+ makeDirectoryIfRequired(dir.removeLastSegments(1), ProgressMonitorUtil.submon(monitor, 70));
IPath toMake = root.append(dir);
if( createdFolders.contains(toMake))
return new IStatus[]{Status.OK_STATUS};
try {
- method.getFileService().createFolder(toMake.removeLastSegments(1).toString(), toMake.lastSegment(), monitor);
+ method.getFileService().createFolder(toMake.removeLastSegments(1).toString(),
+ toMake.lastSegment(), ProgressMonitorUtil.submon(monitor, 30));
} catch( SystemMessageException sme ) {
System.err.println("failed to make folder " + toMake.toString()); //$NON-NLS-1$
}
createdFolders.add(toMake);
+ monitor.done();
return null;
}
}
14 years, 5 months
JBoss Tools SVN: r23865 - in trunk/vpe: tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-08-02 08:55:27 -0400 (Mon, 02 Aug 2010)
New Revision: 23865
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/checkbox.jsp.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/errors.jsp.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java
Log:
add component content tests for form:checkboxes, form:radiobutton, form:radiobuttons and form:errors
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 12:03:20 UTC (rev 23864)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml 2010-08-02 12:55:27 UTC (rev 23865)
@@ -339,7 +339,7 @@
<vpe:if test="attrpresent('itemLabel')">
<vpe:template children="no" modify="no">
<span class="vpe-text">
- <input type="radio" id="{@id}" style="{@cssStyle}" class="{@cssClass}"
+ <input type="radio" id="{@id}1" style="{@cssStyle}" class="{@cssClass}"
disabled="disabled" name="{@path}"/>
<label>
<vpe:value expr="{@items}.{(a)itemLabel}" />
@@ -352,7 +352,7 @@
</vpe:if>
<vpe:template children="no" modify="no">
<span class="vpe-text">
- <input type="radio" id="{@id}" style="{@cssStyle}" class="{@cssClass}"
+ <input type="radio" id="{@id}1" style="{@cssStyle}" class="{@cssClass}"
disabled="disabled" name="{@path}"/>
<label>
<vpe:value expr="{@items}" />
@@ -366,7 +366,7 @@
<vpe:if test="attrpresent('itemLabel')">
<vpe:template children="no" modify="no">
<span class="vpe-text">
- <input type="radio" id="{@id}" style="{@cssStyle}" class="{@cssClass}"
+ <input type="radio" id="{@id}1" style="{@cssStyle}" class="{@cssClass}"
name="{@path}"/>
<label>
<vpe:value expr="{@items}.{(a)itemLabel}" />
@@ -379,7 +379,7 @@
</vpe:if>
<vpe:template children="no" modify="no">
<span class="vpe-text">
- <input type="radio" id="{@id}" style="{@cssStyle}" class="{@cssClass}"
+ <input type="radio" id="{@id}1" style="{@cssStyle}" class="{@cssClass}"
name="{@path}"/>
<label>
<vpe:value expr="{@items}" />
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkbox.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkbox.jsp.xml 2010-08-02 12:03:20 UTC (rev 23864)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkbox.jsp.xml 2010-08-02 12:55:27 UTC (rev 23865)
@@ -11,8 +11,7 @@
<INPUT TYPE="checkbox" CLASS="tall-checkbox" ID="checkbox2"
STYLE="width: 30px;" />
<LABEL>
- form:checkbox with id, path, cssStyle, cssClass and label
- attributes. (Must be big square.)
+ form:checkbox with id, path, cssStyle, cssClass and label attributes. (Must look as a big square.)
</LABEL>
</SPAN>
</test>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp.xml 2010-08-02 12:03:20 UTC (rev 23864)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp.xml 2010-08-02 12:55:27 UTC (rev 23865)
@@ -14,7 +14,7 @@
<test id="checkboxes3">
<span>
<input id="checkboxes31" disabled="disabled" type="checkbox"/>
- <label>${formBean.availableCategories}.id</label>
+ <label>${formBean.favoriteCategories}.id</label>
</span>
</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/jsp/errors.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/errors.jsp.xml 2010-08-02 12:03:20 UTC (rev 23864)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/errors.jsp.xml 2010-08-02 12:55:27 UTC (rev 23865)
@@ -9,7 +9,7 @@
Errors for user.firstName field.
</span>
</test>
- <test id="nameErrors2">
+ <test id="lastNameErrors">
<span id="lastNameErrors" style="color: red;">
Errors for user.lastName field.
</span>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp.xml 2010-08-02 12:03:20 UTC (rev 23864)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp.xml 2010-08-02 12:55:27 UTC (rev 23865)
@@ -2,13 +2,13 @@
<test id="radiobuttons1">
<span>
<input id="radiobuttons11" type="radio"/>
- <label>${formBean.favoriteCategories}</label>
+ <label>${formBean.availableCategories}</label>
</span>
</test>
<test id="radiobuttons2">
<span>
<input id="radiobuttons21" type="radio" class="tall-radiobuttons" style="width: 30px;"/>
- <label>${formBean.favoriteCategories}</label>
+ <label>${formBean.availableCategories}</label>
</span>
</test>
<test id="radiobuttons3">
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 12:03:20 UTC (rev 23864)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java 2010-08-02 12:55:27 UTC (rev 23865)
@@ -10,7 +10,9 @@
******************************************************************************/
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
@@ -33,6 +35,22 @@
performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/checkbox.jsp"); //$NON-NLS-1$
}
+ public void testCheckboxes() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/checkboxes.jsp"); //$NON-NLS-1$
+ }
+
+ public void testRadiobutton() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/radiobutton.jsp"); //$NON-NLS-1$
+ }
+
+ public void testRadiobuttons() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/radiobuttons.jsp"); //$NON-NLS-1$
+ }
+
+ public void testErrors() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/errors.jsp"); //$NON-NLS-1$
+ }
+
@Override
protected String getTestProjectName() {
return SpringAllTests.IMPORT_PROJECT_NAME;
14 years, 5 months
JBoss Tools SVN: r23864 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-08-02 08:03:20 -0400 (Mon, 02 Aug 2010)
New Revision: 23864
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
Log:
https://jira.jboss.org/browse/JBIDE-6484
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2010-08-02 11:24:35 UTC (rev 23863)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2010-08-02 12:03:20 UTC (rev 23864)
@@ -411,7 +411,7 @@
}
}
- if(sv != null && (sv.indexOf("2.3") >= 0 || sv.indexOf("2.5") >= 0 || sv.indexOf("3.0") >= 0)) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if(sv != null && (sv.indexOf("2.3") >= 0 || sv.indexOf("2.4") >= 0 || sv.indexOf("2.5") >= 0 || sv.indexOf("3.0") >= 0)) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
configDM.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, sv);
}
if(configJavaDM != null && sv != null && sv.indexOf("3.0") >= 0) { //$NON-NLS-1$
14 years, 5 months
JBoss Tools SVN: r23863 - in trunk/vpe/tests: org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-08-02 07:24:35 -0400 (Mon, 02 Aug 2010)
New Revision: 23863
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringAllTests.java
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
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestUtil.java
Log:
https://jira.jboss.org/browse/JBIDE-6711 , ComponentContentTest class was updated, component file could be found by the full path.
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringAllTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringAllTests.java 2010-08-02 10:33:31 UTC (rev 23862)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringAllTests.java 2010-08-02 11:24:35 UTC (rev 23863)
@@ -33,6 +33,7 @@
TestSuite suite = new TestSuite("Tests for Vpe Spring components"); //$NON-NLS-1$
// $JUnit-BEGIN$
suite.addTestSuite(SpringComponentTest.class);
+ suite.addTestSuite(SpringComponentContentTest.class);
//cleanUpTests();
// $JUnit-END$
return new VpeTestSetup(suite);
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 10:33:31 UTC (rev 23862)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java 2010-08-02 11:24:35 UTC (rev 23863)
@@ -30,7 +30,7 @@
}
public void testCheckbox() throws Throwable {
-// performContentTest("components/inplaceSelect/JBIDE4309.xhtml"); //$NON-NLS-1$
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/checkbox.jsp"); //$NON-NLS-1$
}
@Override
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 10:33:31 UTC (rev 23862)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java 2010-08-02 11:24:35 UTC (rev 23863)
@@ -64,31 +64,39 @@
* @throws Throwable
*/
protected void performContentTest(String elementPagePath) throws Throwable {
+ performContentTestByFullPath(TestUtil.COMPONENTS_PATH + elementPagePath);
+ }
+
+ protected void performContentTestByFullPath(String elementPagePath) throws Throwable {
setException(null);
-
- IFile elementPageFile = (IFile) TestUtil.getComponentPath(
+ IFile elementPageFile = (IFile) TestUtil.getComponentFileByFullPath(
elementPagePath, getTestProjectName());
-
TestUtil.waitForIdle();
-
+ /*
+ * Test that test file was found and exists
+ */
+ assertNotNull("Could not find component file '"+elementPagePath+"'", elementPageFile); //$NON-NLS-1$ //$NON-NLS-2$
+
IEditorPart editor = WorkbenchUtils.openEditor(elementPageFile,EDITOR_ID);
-
assertNotNull(editor);
-
VpeController controller = TestUtil.getVpeController((JSPMultiPageEditor) editor);
-
- // get xml test file
- File xmlTestFile = TestUtil.getComponentPath(
+ /*
+ * Get xml test file
+ */
+ File xmlTestFile = TestUtil.getComponentFileByFullPath(
elementPagePath + XML_FILE_EXTENSION, getTestProjectName())
.getLocation().toFile();
-
- // get document
+ /*
+ * Test that XML test file was found and exists
+ */
+ assertNotNull("Could not find XML component file '"+elementPagePath + XML_FILE_EXTENSION+"'", elementPageFile); //$NON-NLS-1$ //$NON-NLS-2$
+ /*
+ * Get document
+ */
compareContent(controller, xmlTestFile);
-
if (getException() != null) {
throw getException();
}
-
}
protected void compareContent(VpeController controller, File xmlTestFile)
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestUtil.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestUtil.java 2010-08-02 10:33:31 UTC (rev 23862)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestUtil.java 2010-08-02 11:24:35 UTC (rev 23863)
@@ -47,7 +47,7 @@
public class TestUtil {
/** The Constant COMPONENTS_PATH. */
- private static final String COMPONENTS_PATH = "WebContent/pages"; //$NON-NLS-1$
+ public static final String COMPONENTS_PATH = "WebContent/pages/"; //$NON-NLS-1$
/** The Constant WEBCONTENT_PATH. */
private static final String WEBCONTENT_PATH = "WebContent"; //$NON-NLS-1$
@@ -75,10 +75,31 @@
if (project != null) {
return project.getFolder(COMPONENTS_PATH).findMember(componentPage);
}
-
return null;
}
+ /**
+ * Gets the component path.
+ *
+ * @param componentPage the component page
+ * @param projectName the project name
+ *
+ * @return the component path
+ *
+ * @throws CoreException the core exception
+ * @throws IOException
+ */
+ public static IResource getComponentFileByFullPath(String componentPage,
+ String projectName) throws CoreException, IOException {
+ IProject project = ProjectsLoader.getInstance().getProject(projectName);
+ if (project != null) {
+ return project.findMember(componentPage);
+ }
+ return null;
+ }
+
+
+
public static IResource getResource(String path,
String projectName) throws CoreException, IOException {
IProject project = ProjectsLoader.getInstance().getProject(projectName);
@@ -186,21 +207,19 @@
*/
static public void findElementsByName(nsIDOMNode node,
List<nsIDOMNode> elements, String name) {
-
- // get children
+ /*
+ * Get children
+ */
nsIDOMNodeList children = node.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
nsIDOMNode child = children.item(i);
-
- // if current child is required then add his to list
+ /*
+ * if current child is required then add it to list
+ */
if (name.equalsIgnoreCase((child.getNodeName()))) {
-
elements.add(child);
-
} else {
-
findElementsByName(child, elements, name);
-
}
}
@@ -218,7 +237,6 @@
*/
static public void findAllElementsByName(nsIDOMNode node,
List<nsIDOMNode> elements, String name) {
-
try {
nsIDOMNodeList list = node.getChildNodes();
if (node.getNodeName().equalsIgnoreCase(name)) {
14 years, 5 months
JBoss Tools SVN: r23862 - trunk/cdi/plugins/org.jboss.tools.cdi.ui.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-08-02 06:33:31 -0400 (Mon, 02 Aug 2010)
New Revision: 23862
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
Log:
https://jira.jboss.org/browse/JBIDE-6704 Enabled CDI validator settings at project level
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml 2010-08-02 10:01:25 UTC (rev 23861)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml 2010-08-02 10:33:31 UTC (rev 23862)
@@ -14,6 +14,17 @@
</adapt>
</enabledWhen>
</page>
+ <page
+ name="%PreferencePage_Validator"
+ class="org.jboss.tools.cdi.ui.preferences.CDIValidatorPreferencePage"
+ id="org.jboss.tools.cdi.ui.propertyPages.CDIValidatorPreferencePage"
+ category="org.jboss.tools.cdi.ui.propertyPages.CDISettingsPreferencePage">
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject">
+ <test property="org.eclipse.core.resources.projectNature" value="org.jboss.tools.cdi.core.cdinature"/>
+ </adapt>
+ </enabledWhen>
+ </page>
</extension>
<extension point="org.eclipse.ui.preferencePages">
14 years, 5 months
JBoss Tools SVN: r23861 - in trunk/vpe/tests/org.jboss.tools.vpe.spring.test: resources/SpringTest/src/main/webapp and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-08-02 06:01:25 -0400 (Mon, 02 Aug 2010)
New Revision: 23861
Added:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp.xml
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp.xml
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/SpringComponentTest.java
Log:
add tests for form:radiobuttons
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java 2010-08-02 08:43:30 UTC (rev 23860)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java 2010-08-02 10:01:25 UTC (rev 23861)
@@ -17,7 +17,9 @@
private boolean chechbox3Selected = false;
private Map<Integer, String> availableCategories = new HashMap<Integer, String>();
- private Set<Integer> selectedCategories = new HashSet<Integer>();
+ private Set<Integer> selectedCategories1 = new HashSet<Integer>();
+ private Set<Integer> selectedCategories2 = new HashSet<Integer>();
+ private Set<Integer> selectedCategories3 = new HashSet<Integer>();
private List<CategoryType> favoriteCategories = new ArrayList<CategoryType>();
private String selectedCategory;
@@ -27,7 +29,9 @@
for (CategoryType categoryType : CategoryType.values()) {
availableCategories.put(categoryType.getId(), categoryType.getName());
}
- selectedCategories.add(CategoryType.Books.getId());
+ selectedCategories1.add(CategoryType.Sport.getId());
+ selectedCategories2.add(CategoryType.Fishing.getId());
+ selectedCategories3.add(CategoryType.Books.getId());
favoriteCategories.add(CategoryType.Sport);
favoriteCategories.add(CategoryType.Books);
selectedCategory = CategoryType.Sport.getName();
@@ -65,14 +69,30 @@
this.availableCategories = availableCategories;
}
- public Set<Integer> getSelectedCategories() {
- return selectedCategories;
+ public Set<Integer> getSelectedCategories1() {
+ return selectedCategories1;
}
- public void setSelectedCategories(Set<Integer> selectedCategories) {
- this.selectedCategories = selectedCategories;
+ public void setSelectedCategories1(Set<Integer> selectedCategories1) {
+ this.selectedCategories1 = selectedCategories1;
}
+ public Set<Integer> getSelectedCategories2() {
+ return selectedCategories2;
+ }
+
+ public void setSelectedCategories2(Set<Integer> selectedCategories2) {
+ this.selectedCategories2 = selectedCategories2;
+ }
+
+ public Set<Integer> getSelectedCategories3() {
+ return selectedCategories3;
+ }
+
+ public void setSelectedCategories3(Set<Integer> selectedCategories3) {
+ this.selectedCategories3 = selectedCategories3;
+ }
+
public List<CategoryType> getFavoriteCategories() {
return favoriteCategories;
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp 2010-08-02 08:43:30 UTC (rev 23860)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp 2010-08-02 10:01:25 UTC (rev 23861)
@@ -14,19 +14,19 @@
<form:form modelAttribute="formBean">
<form:checkboxes id="checkboxes1" items="${formBean.availableCategories}"
- path="selectedCategories" />
+ path="selectedCategories1" />
<br/>form:checkboxes with id, items and path attributes.
<br/><br/>
<form:checkboxes id="checkboxes2"
cssClass="tall-checkbox" cssStyle="width: 30px;"
items="${formBean.availableCategories}"
- path="selectedCategories" />
+ path="selectedCategories2" />
<br/>form:checkboxes with id, cssStyle, cssClass, items and path attributes. (Must look as a big square.)
<br/><br/>
<form:checkboxes id="checkboxes3" disabled="true"
itemLabel="id" itemValue="id"
items="${formBean.favoriteCategories}"
- path="selectedCategories" />
+ path="selectedCategories3" />
<br/>disabled form:checkboxes with itemLabel attribute
<br/><br/>
</form:form>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp.xml 2010-08-02 08:43:30 UTC (rev 23860)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp.xml 2010-08-02 10:01:25 UTC (rev 23861)
@@ -1,19 +1,19 @@
<tests>
<test id="checkboxes1">
<span>
- <input id="checkboxes11" name="selectedCategories" type="checkbox"/>
+ <input id="checkboxes11" type="checkbox"/>
<label>${formBean.availableCategories}</label>
</span>
</test>
<test id="checkboxes2">
<span>
- <input id="checkboxes21" name="selectedCategories" class="tall-checkbox" style="width: 30px;" type="checkbox"/>
+ <input id="checkboxes21" class="tall-checkbox" style="width: 30px;" type="checkbox"/>
<label>${formBean.availableCategories}</label>
</span>
</test>
<test id="checkboxes3">
<span>
- <input id="checkboxes31" name="selectedCategories" disabled="disabled" type="checkbox"/>
+ <input id="checkboxes31" disabled="disabled" type="checkbox"/>
<label>${formBean.availableCategories}.id</label>
</span>
</test>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp 2010-08-02 10:01:25 UTC (rev 23861)
@@ -0,0 +1,35 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<html>
+<head>
+ <style>
+ .tall-radiobuttons {
+ -moz-appearance: none;
+ height: 30px;
+ }
+ </style>
+</head>
+<body>
+ <h1>Test of form:radiobuttons</h1>
+
+ <form:form modelAttribute="formBean">
+ <form:radiobuttons id="radiobuttons1"
+ path="selectedCategories1"
+ items="${formBean.availableCategories}" />
+ <br/>form:checkboxes with id, items and path attributes.
+ <br/><br/>
+ <form:radiobuttons id="radiobuttons2"
+ cssClass="tall-radiobuttons" cssStyle="width: 30px;"
+ items="${formBean.availableCategories}"
+ path="selectedCategories2" />
+ <br/>form:radiobuttons with id, cssStyle, cssClass, items and path attributes. (Must look as a big circle.)
+ <br/><br/>
+ <form:radiobuttons id="radiobuttons3" disabled="true"
+ itemLabel="id" itemValue="id"
+ items="${formBean.favoriteCategories}"
+ path="selectedCategories3" />
+ <br/>disabled form:radiobuttons with itemLabel attribute
+ <br/><br/>
+ </form:form>
+</body>
+</html>
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp.xml 2010-08-02 10:01:25 UTC (rev 23861)
@@ -0,0 +1,20 @@
+<tests>
+ <test id="radiobuttons1">
+ <span>
+ <input id="radiobuttons11" type="radio"/>
+ <label>${formBean.favoriteCategories}</label>
+ </span>
+ </test>
+ <test id="radiobuttons2">
+ <span>
+ <input id="radiobuttons21" type="radio" class="tall-radiobuttons" style="width: 30px;"/>
+ <label>${formBean.favoriteCategories}</label>
+ </span>
+ </test>
+ <test id="radiobuttons3">
+ <span>
+ <input id="radiobuttons31" disabled="disabled" type="radio"/>
+ <label>${formBean.favoriteCategories}.id</label>
+ </span>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
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-02 08:43:30 UTC (rev 23860)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml 2010-08-02 10:01:25 UTC (rev 23861)
@@ -11,6 +11,7 @@
<bean name="/checkbox.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/checkboxes.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/radiobutton.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
+ <bean name="/radiobuttons.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/errors.htm" class="org.jboss.tools.vpe.spring.test.springtest.controller.ErrorsController">
<property name="validator" ref="fieldValidator"/>
</bean>
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-02 08:43:30 UTC (rev 23860)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp 2010-08-02 10:01:25 UTC (rev 23861)
@@ -1,11 +1,13 @@
+<a href="checkbox.htm">checkbox.htm</a>
+<br/>
<a href="checkboxes.htm">checkboxes.htm</a>
<br/>
-<a href="checkbox.htm">checkbox.htm</a>
+<a href="radiobutton.htm">radiobutton.htm</a>
<br/>
+<a href="radiobuttons.htm">radiobuttons.htm</a>
+<br/>
<a href="form.htm">form.htm</a>
<br/>
<a href="errors.htm">errors.htm</a>
<br/>
-<a href="radiobutton.htm">radiobutton.htm</a>
-<br/>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentTest.java 2010-08-02 08:43:30 UTC (rev 23860)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentTest.java 2010-08-02 10:01:25 UTC (rev 23861)
@@ -43,6 +43,11 @@
performTestForVpeComponent((IFile)TestUtil.getResource(
"src/main/webapp/WEB-INF/jsp/radiobutton.jsp", SpringAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
+
+ public void testRadiobuttons() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getResource(
+ "src/main/webapp/WEB-INF/jsp/radiobuttons.jsp", SpringAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
public void testForm() throws Throwable {
performTestForVpeComponent((IFile)TestUtil.getResource(
14 years, 5 months
JBoss Tools SVN: r23860 - in workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui: jbossui/org/jboss/tools/as/rse/ui and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-08-02 04:43:30 -0400 (Mon, 02 Aug 2010)
New Revision: 23860
Modified:
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/rse/ui/RSEDeploymentPreferenceUI.java
Log:
JBIDE-6760 - add browse button for remote server home
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2010-08-02 08:36:34 UTC (rev 23859)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2010-08-02 08:43:30 UTC (rev 23860)
@@ -54,7 +54,9 @@
org.jboss.tools.jmx.core,
org.eclipse.jst.j2ee.core,
org.eclipse.rse.ui;resolution:=optional,
- org.eclipse.rse.core;resolution:=optional
+ org.eclipse.rse.core;resolution:=optional,
+ org.eclipse.rse.files.ui;resolution:=optional,
+ org.eclipse.rse.subsystems.files.core;resolution:=optional
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.ide.eclipse.as.ui,
org.jboss.ide.eclipse.as.ui.dialogs,
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/rse/ui/RSEDeploymentPreferenceUI.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/rse/ui/RSEDeploymentPreferenceUI.java 2010-08-02 08:36:34 UTC (rev 23859)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/rse/ui/RSEDeploymentPreferenceUI.java 2010-08-02 08:43:30 UTC (rev 23860)
@@ -10,20 +10,27 @@
******************************************************************************/
package org.jboss.tools.as.rse.ui;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.files.ui.dialogs.SystemRemoteFileDialog;
+import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.ui.widgets.SystemHostCombo;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.ide.eclipse.as.rse.core.RSERemotePublishHandler;
import org.jboss.ide.eclipse.as.rse.core.RSEUtils;
import org.jboss.ide.eclipse.as.ui.UIUtil;
import org.jboss.ide.eclipse.as.ui.editor.IDeploymentTypeUI;
@@ -46,6 +53,7 @@
private ServerModeSection modeSection;
private SystemHostCombo combo;
private Text rseServerHome,rseServerConfig;
+ private Button rseBrowse;
public RSEDeploymentPreferenceComposite(Composite parent, int style, ServerModeSection modeSection) {
super(parent, style);
this.modeSection = modeSection;
@@ -64,16 +72,27 @@
});
Label serverHomeLabel = new Label(this, SWT.NONE);
serverHomeLabel.setText("Remote Server Home: ");
+ rseBrowse = new Button(this, SWT.DEFAULT);
+ rseBrowse.setText("Browse...");
+ rseBrowse.setLayoutData(UIUtil.createFormData2(child, 5, null, 0, null, 0, 100, -5));
+ rseBrowse.addSelectionListener(new SelectionListener(){
+ public void widgetSelected(SelectionEvent e) {
+ browseClicked();
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ browseClicked();
+ }
+ });
rseServerHome = new Text(this, SWT.SINGLE | SWT.BORDER);
serverHomeLabel.setLayoutData(UIUtil.createFormData2(child, 7, null, 0, 0, 10, null, 0));
- rseServerHome.setLayoutData(UIUtil.createFormData2(child, 5, null, 0, serverHomeLabel, 5, 100, -5));
+ rseServerHome.setLayoutData(UIUtil.createFormData2(child, 5, null, 0, serverHomeLabel, 5, rseBrowse, -5));
rseServerHome.setText(modeSection.getServer().getAttribute(RSEUtils.RSE_SERVER_HOME_DIR,
getRuntime().getRuntime().getLocation().toString()));
rseServerHome.addModifyListener(new ModifyListener(){
public void modifyText(ModifyEvent e) {
serverHomeChanged();
}});
-
+
Label serverConfigLabel = new Label(this, SWT.NONE);
serverConfigLabel.setText("Remote Server Configuration: ");
rseServerConfig= new Text(this, SWT.SINGLE | SWT.BORDER);
@@ -85,8 +104,21 @@
public void modifyText(ModifyEvent e) {
serverConfigChanged();
}});
-}
+ }
+ protected void browseClicked() {
+ SystemRemoteFileDialog d = new SystemRemoteFileDialog(
+ rseBrowse.getShell(), "Browse remote system", combo.getHost());
+ if( d.open() == Dialog.OK) {
+ Object o = d.getOutputObject();
+ if( o instanceof IRemoteFile ) {
+ String path = ((IRemoteFile)o).getAbsolutePath();
+ rseServerHome.setText(path);
+ serverHomeChanged();
+ }
+ }
+ }
+
protected IJBossServerRuntime getRuntime() {
return ServerConverter.getJBossRuntime(modeSection.getServer().getOriginal());
}
14 years, 5 months
JBoss Tools SVN: r23859 - trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-08-02 04:36:34 -0400 (Mon, 02 Aug 2010)
New Revision: 23859
Added:
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/SpringComponentTest.java
Removed:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringFormComponentTest.java
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringAllTests.java
Log:
https://jira.jboss.org/browse/JBIDE-6711 , JUnit class for Spring templates was added.
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringAllTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringAllTests.java 2010-08-02 07:48:37 UTC (rev 23858)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringAllTests.java 2010-08-02 08:36:34 UTC (rev 23859)
@@ -24,10 +24,15 @@
public class SpringAllTests {
+ /*
+ * Import project name
+ */
+ public static final String IMPORT_PROJECT_NAME = "SpringTest"; //$NON-NLS-1$
+
public static Test suite() {
TestSuite suite = new TestSuite("Tests for Vpe Spring components"); //$NON-NLS-1$
// $JUnit-BEGIN$
- suite.addTestSuite(SpringFormComponentTest.class);
+ suite.addTestSuite(SpringComponentTest.class);
//cleanUpTests();
// $JUnit-END$
return new VpeTestSetup(suite);
Added: 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 (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java 2010-08-02 08:36:34 UTC (rev 23859)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2007-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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.spring.test;
+
+import org.jboss.tools.vpe.ui.test.ComponentContentTest;
+
+/**
+ * Tests for the context that was generated by Spring templates
+ *
+ * @author dmaliarevich
+ */
+public class SpringComponentContentTest extends ComponentContentTest {
+
+ /**
+ * The Constructor
+ *
+ * @param name a test case name
+ */
+ public SpringComponentContentTest(String name) {
+ super(name);
+ setCheckWarning(false);
+ }
+
+ public void testCheckbox() throws Throwable {
+// performContentTest("components/inplaceSelect/JBIDE4309.xhtml"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected String getTestProjectName() {
+ return SpringAllTests.IMPORT_PROJECT_NAME;
+ }
+
+}
Copied: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentTest.java (from rev 23836, trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringFormComponentTest.java)
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentTest.java 2010-08-02 08:36:34 UTC (rev 23859)
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2007-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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.spring.test;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * Class for testing form spring components
+ *
+ * @author Yahor Radtsevich (yradtsevich)
+ *
+ */
+public class SpringComponentTest extends VpeTest {
+
+ public SpringComponentTest(String name) {
+ super(name);
+ }
+
+ /*
+ * Spring Form test cases
+ */
+ public void testCheckbox() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getResource(
+ "src/main/webapp/WEB-INF/jsp/checkbox.jsp", SpringAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testCheckboxes() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getResource(
+ "src/main/webapp/WEB-INF/jsp/checkboxes.jsp", SpringAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testRadiobutton() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getResource(
+ "src/main/webapp/WEB-INF/jsp/radiobutton.jsp", SpringAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testForm() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getResource(
+ "src/main/webapp/WEB-INF/jsp/form.jsp", SpringAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testErrors() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getResource(
+ "src/main/webapp/WEB-INF/jsp/errors.jsp", SpringAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+}
Deleted: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringFormComponentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringFormComponentTest.java 2010-08-02 07:48:37 UTC (rev 23858)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringFormComponentTest.java 2010-08-02 08:36:34 UTC (rev 23859)
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-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,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.vpe.spring.test;
-
-import org.eclipse.core.resources.IFile;
-import org.jboss.tools.vpe.ui.test.TestUtil;
-import org.jboss.tools.vpe.ui.test.VpeTest;
-
-/**
- * Class for testing form spring components
- *
- * @author Yahor Radtsevich (yradtsevich)
- *
- */
-public class SpringFormComponentTest extends VpeTest {
-
- // import project name
- static final String IMPORT_PROJECT_NAME = "SpringTest"; //$NON-NLS-1$
-
- public SpringFormComponentTest(String name) {
- super(name);
- }
-
- /*
- * Spring Form test cases
- */
-
- public void testCheckbox() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getResource(
- "src/main/webapp/WEB-INF/jsp/checkbox.jsp", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
- }
-
- public void testCheckboxes() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getResource(
- "src/main/webapp/WEB-INF/jsp/checkboxes.jsp", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
- }
-
- public void testRadiobutton() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getResource(
- "src/main/webapp/WEB-INF/jsp/radiobutton.jsp", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
- }
-
- public void testForm() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getResource(
- "src/main/webapp/WEB-INF/jsp/form.jsp", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
- }
-
- public void testErrors() throws Throwable {
- performTestForVpeComponent((IFile)TestUtil.getResource(
- "src/main/webapp/WEB-INF/jsp/errors.jsp", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
- }
-}
14 years, 5 months
JBoss Tools SVN: r23858 - in trunk/vpe/tests/org.jboss.tools.vpe.spring.test: resources/SpringTest/src/main/webapp and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-08-02 03:48:37 -0400 (Mon, 02 Aug 2010)
New Revision: 23858
Added:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobutton.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobutton.jsp.xml
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java
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/SpringFormComponentTest.java
Log:
add tests for form:radiobutton
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java 2010-08-02 05:28:57 UTC (rev 23857)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java 2010-08-02 07:48:37 UTC (rev 23858)
@@ -19,6 +19,7 @@
private Map<Integer, String> availableCategories = new HashMap<Integer, String>();
private Set<Integer> selectedCategories = new HashSet<Integer>();
private List<CategoryType> favoriteCategories = new ArrayList<CategoryType>();
+ private String selectedCategory;
private User user;
@@ -29,6 +30,7 @@
selectedCategories.add(CategoryType.Books.getId());
favoriteCategories.add(CategoryType.Sport);
favoriteCategories.add(CategoryType.Books);
+ selectedCategory = CategoryType.Sport.getName();
}
public boolean isChechbox1Selected() {
@@ -86,4 +88,12 @@
public void setUser(User user) {
this.user = user;
}
+
+ public String getSelectedCategory() {
+ return selectedCategory;
+ }
+
+ public void setSelectedCategory(String selectedCategory) {
+ this.selectedCategory = selectedCategory;
+ }
}
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobutton.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobutton.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobutton.jsp 2010-08-02 07:48:37 UTC (rev 23858)
@@ -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>
+ .tall-radiobutton {
+ -moz-appearance: none;
+ height: 30px;
+ }
+ </style>
+</head>
+<body>
+ <h1>Test of form:radiobutton</h1>
+
+ <form:form modelAttribute="formBean">
+ <form:radiobutton id="radiobutton1" path="selectedCategory"
+ value="books"/>
+ form:radiobutton with id and path attributes
+ <br/>
+ <form:radiobutton id="radiobutton2" path="selectedCategory"
+ value="sport"
+ cssStyle="width: 30px;" cssClass="tall-radiobutton"
+ label="form:radiobutton with id, path, cssStyle, cssClass and label attributes. (Must look as a big circle.)"/>
+ <br/>
+ <form:radiobutton id="radiobutton3" path="selectedCategory"
+ disabled="true" value="films"
+ label="form:radiobutton with id, path and disabled='true' attributes."/>
+ <br/>
+ </form:form>
+</body>
+</html>
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobutton.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobutton.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobutton.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobutton.jsp.xml 2010-08-02 07:48:37 UTC (rev 23858)
@@ -0,0 +1,26 @@
+<tests>
+ <test id="radiobutton1">
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="radio" ID="radiobutton1" />
+ <LABEL>
+ </LABEL>
+ </SPAN>
+ </test>
+ <test id="radiobutton2">
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="radio" CLASS="tall-radiobutton" ID="radiobutton2"
+ STYLE="width: 30px;" />
+ <LABEL>
+ form:radiobutton with id, path, cssStyle, cssClass and label attributes. (Must look as a big circle.)
+ </LABEL>
+ </SPAN>
+ </test>
+ <test id="radiobutton3">
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="radio" DISABLED="disabled" ID="radiobutton3" />
+ <LABEL>
+ form:radiobutton with id, path and disabled='true' attributes.
+ </LABEL>
+ </SPAN>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobutton.jsp.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
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-02 05:28:57 UTC (rev 23857)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml 2010-08-02 07:48:37 UTC (rev 23858)
@@ -10,6 +10,7 @@
<bean name="/form.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/checkbox.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/checkboxes.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
+ <bean name="/radiobutton.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/errors.htm" class="org.jboss.tools.vpe.spring.test.springtest.controller.ErrorsController">
<property name="validator" ref="fieldValidator"/>
</bean>
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-02 05:28:57 UTC (rev 23857)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp 2010-08-02 07:48:37 UTC (rev 23858)
@@ -6,4 +6,6 @@
<br/>
<a href="errors.htm">errors.htm</a>
<br/>
+<a href="radiobutton.htm">radiobutton.htm</a>
+<br/>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringFormComponentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringFormComponentTest.java 2010-08-02 05:28:57 UTC (rev 23857)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringFormComponentTest.java 2010-08-02 07:48:37 UTC (rev 23858)
@@ -42,6 +42,11 @@
performTestForVpeComponent((IFile)TestUtil.getResource(
"src/main/webapp/WEB-INF/jsp/checkboxes.jsp", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
+
+ public void testRadiobutton() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getResource(
+ "src/main/webapp/WEB-INF/jsp/radiobutton.jsp", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
public void testForm() throws Throwable {
performTestForVpeComponent((IFile)TestUtil.getResource(
14 years, 5 months