JBoss Tools SVN: r26002 - trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-10-22 11:42:55 -0400 (Fri, 22 Oct 2010)
New Revision: 26002
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/studio_eclipse_option.meta
Log:
JBIDE-7388
https://jira.jboss.org/browse/JBIDE-7388
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/studio_eclipse_option.meta
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/studio_eclipse_option.meta 2010-10-22 15:26:06 UTC (rev 26001)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/studio_eclipse_option.meta 2010-10-22 15:42:55 UTC (rev 26002)
@@ -246,7 +246,7 @@
visibility="false" xmlname="NAME">
<Editor name="Uneditable"/>
</XModelAttribute>
- <XModelAttribute default="2.3" name="Servlet Version" xmlname="servlet_version">
+ <XModelAttribute default="2.4" name="Servlet Version" xmlname="servlet_version">
<Constraint loader="List">
<value name="2.3"/>
<value name="2.4"/>
@@ -621,7 +621,7 @@
</Constraint>
<Editor name="FolderChooser"/>
</XModelAttribute>
- <XModelAttribute default="2.3" name="Servlet Version" xmlname="servlet_version">
+ <XModelAttribute default="2.4" name="Servlet Version" xmlname="servlet_version">
<Constraint loader="List">
<value name="2.3"/>
<value name="2.4"/>
14 years, 2 months
JBoss Tools SVN: r26001 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-10-22 11:26:06 -0400 (Fri, 22 Oct 2010)
New Revision: 26001
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java
Log:
JBIDE-7391
https://jira.jboss.org/browse/JBIDE-7391
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java 2010-10-22 15:18:40 UTC (rev 26000)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java 2010-10-22 15:26:06 UTC (rev 26001)
@@ -410,6 +410,8 @@
}
public void doGlobalAction(String actionName) {
+ if(nsupport.doGlobalAction(actionName));
+ if(vsupport.doGlobalAction(actionName));
if(ITextEditorActionConstants.DELETE.equals(actionName)) {
action(XChildrenEditor.DELETE);
} else if(ITextEditorActionConstants.COPY.equals(actionName)) {
@@ -420,6 +422,10 @@
}
private void doXActionCopy() {
+ if(xtable == null || xtable.getTable() == null || xtable.getTable().isDisposed()
+ || !xtable.getTable().isFocusControl()) {
+ return;
+ }
ISelection selection = getSelectionProvider().getSelection();
if(selection == null || selection.isEmpty() || !(selection instanceof StructuredSelection)) return;
StructuredSelection ss = (StructuredSelection)selection;
@@ -435,6 +441,10 @@
}
private void doXActionPaste() {
+ if(xtable == null || xtable.getTable() == null || xtable.getTable().isDisposed()
+ || !xtable.getTable().isFocusControl()) {
+ return;
+ }
invokeXAction(XAction.PASTE, helper.getModelObject(), null);
}
14 years, 2 months
JBoss Tools SVN: r26000 - trunk/deltacloud/features.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-22 11:18:40 -0400 (Fri, 22 Oct 2010)
New Revision: 26000
Modified:
trunk/deltacloud/features/pom.xml
Log:
[7371] disbaling automated tests for deltacloud since those are integration tests run against a local dc instance
Modified: trunk/deltacloud/features/pom.xml
===================================================================
--- trunk/deltacloud/features/pom.xml 2010-10-22 15:18:17 UTC (rev 25999)
+++ trunk/deltacloud/features/pom.xml 2010-10-22 15:18:40 UTC (rev 26000)
@@ -8,7 +8,7 @@
<name>seam.features</name>
<modules>
<module>org.jboss.tools.deltacloud.feature</module>
- <module>org.jboss.tools.deltacloud.test.feature</module>
+ <!-- <module>org.jboss.tools.deltacloud.test.feature</module> -->
</modules>
</project>
14 years, 2 months
JBoss Tools SVN: r25999 - trunk/deltacloud/tests.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-22 11:18:17 -0400 (Fri, 22 Oct 2010)
New Revision: 25999
Modified:
trunk/deltacloud/tests/pom.xml
Log:
[7371] disbaling automated tests for deltacloud since those are integration tests run against a local dc instance
Modified: trunk/deltacloud/tests/pom.xml
===================================================================
--- trunk/deltacloud/tests/pom.xml 2010-10-22 14:42:25 UTC (rev 25998)
+++ trunk/deltacloud/tests/pom.xml 2010-10-22 15:18:17 UTC (rev 25999)
@@ -6,8 +6,8 @@
<name>deltacloud.tests</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
- <modules>
+<!-- <modules>
<module>org.jboss.tools.deltacloud.test</module>
- </modules>
+ </modules> -->
</project>
14 years, 2 months
JBoss Tools SVN: r25998 - in trunk/deltacloud/tests/org.jboss.tools.deltacloud.test: src/org/jboss/tools/internal/deltacloud/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-22 10:42:25 -0400 (Fri, 22 Oct 2010)
New Revision: 25998
Added:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ImageMockIntegrationTest.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/InstanceMockIntegrationTest.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ServerTypeMockIntegrationTest.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ImageMockIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/KeyMockIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/MockIntegrationTestSetup.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ServerTypeMockIntegrationTest.java
Removed:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudMockClientIntegrationTest.java
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/bootstrap-deltacloud.rb
Log:
[JBIDE-7371] added instance tests, split tests into separate classes (was getting too large to run as one test case)
Added: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ImageMockIntegrationTest.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ImageMockIntegrationTest.launch (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ImageMockIntegrationTest.launch 2010-10-22 14:42:25 UTC (rev 25998)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="false"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.eclipse.epp.usagedata.recording,org.eclipse.epp.usagedata.gathering,org.mozilla.xulrunner.cocoa.macosx,org.jboss.tools.common,org.jboss.tools.deltacloud.docs,org.mozilla.xulrunner.gtk.linux.x86_64,org.jboss.tools.usage,org.mozilla.xulrunner.win32.win32.x86,com.jboss.jbds.usage.branding,org.jboss.tools.usage.test,org.mozilla.xulrunner.gtk.linux.x86,org.eclipse.epp.usagedata.ui,org.mozilla.xulrunner.carbon.macosx,org.mozilla.xpcom,org.jboss.tools.tests,org.jboss.tools.deltacloud.ui,org.jruby.jruby"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ImageMockIntegrationTest.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.internal.deltacloud.test.ImageMockIntegrationTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.deltacloud.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx1024m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.equinox.preferences@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.core.runtime@default:true,org.eclipse.debug.core@default:default,org.eclipse.ecf.identity@default:default,org.apache.xml.resolver@default:default,org.eclipse.compare@default:default,javax.servlet@default:default,org.eclipse.ui@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.emf.common@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.emf.ecore.xmi@default:default,com.ibm.icu@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.osgi.util@default:default,org.eclipse.wst.validation@default:default,org.eclipse.equinox.p2.repository@default:default,org.ecli!
pse.search@default:default,org.eclipse.ui.views@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.ui.console@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.net@default:default,org.eclipse.ecf@default:default,org.eclipse.jface@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.jem.util@default:default,org.eclipse.core.databinding@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.databinding.observable@default:default,org.eclipse.equinox.common@2:true,org.apache.xml.serializer@default:default,org.apache.xerces@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.ec!
f.filetransfer@default:default,org.eclipse.jdt.compiler.apt@de!
fault:fa
lse,org.eclipse.compare.core@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.swt@default:default,org.eclipse.osgi.services@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.core.variables@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.text@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.help@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.ui.ide@default!
:default,org.eclipse.jdt.launching@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.ui.editors@default:default,org.eclipse.team.ui@default:default,org.eclipse.debug.ui@default:default,org.eclipse.team.core@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.ant.core@default:default,org.eclipse.jdt.debug@default:default,javax.xml@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui.forms@default:default,org.hamcrest.core@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.core.expressions@default:default,org.eclipse.ui.navigator.resources@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.core.jobs@de!
fault:default,org.eclipse.core.commands@default:default,org.ec!
lipse.os
gi@-1:true,org.eclipse.wst.sse.core@default:default,org.eclipse.core.resources@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.jdt.core@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.jface.text@default:default,org.eclipse.emf.edit@default:default,org.eclipse.core.filesystem@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.deltacloud.core@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ImageMockIntegrationTest.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/InstanceMockIntegrationTest.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/InstanceMockIntegrationTest.launch (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/InstanceMockIntegrationTest.launch 2010-10-22 14:42:25 UTC (rev 25998)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="false"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.eclipse.epp.usagedata.recording,org.eclipse.epp.usagedata.gathering,org.mozilla.xulrunner.cocoa.macosx,org.jboss.tools.common,org.jboss.tools.deltacloud.docs,org.mozilla.xulrunner.gtk.linux.x86_64,org.jboss.tools.usage,org.mozilla.xulrunner.win32.win32.x86,com.jboss.jbds.usage.branding,org.jboss.tools.usage.test,org.mozilla.xulrunner.gtk.linux.x86,org.eclipse.epp.usagedata.ui,org.mozilla.xulrunner.carbon.macosx,org.mozilla.xpcom,org.jboss.tools.tests,org.jboss.tools.deltacloud.ui,org.jruby.jruby"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.internal.deltacloud.test.InstanceMockIntegrationTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.deltacloud.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx1024m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.equinox.preferences@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,javax.servlet.jsp@default:default,org.eclipse.help.base@default:default,org.eclipse.core.runtime@default:true,org.eclipse.debug.core@default:default,org.eclipse.ecf.identity@default:default,org.apache.xml.resolver@default:default,org.eclipse.compare@default:default,javax.servlet@default:default,org.eclipse.ui@default:default,org.eclipse.help.ui@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.emf.common@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.emf.ecore.xmi@default:default,com.ibm.icu@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.osgi.util@default:d!
efault,org.apache.lucene.analysis@default:default,org.mortbay.jetty.server@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.wst.validation@default:default,org.eclipse.update.configurator@3:true,org.eclipse.equinox.p2.repository@default:default,org.eclipse.search@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.views@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.ui.console@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.net@default:default,org.eclipse.ecf@default:default,org.eclipse.jface@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.jem.util@default:default,org.eclipse.core.databinding@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.databinding.observable@default:default,org.eclipse.equinox.common@2:true,org.apache.xml.seria!
lizer@default:default,org.apache.xerces@default:default,org.ec!
lipse.eq
uinox.security@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.ecf.filetransfer@default:default,org.apache.ant@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.compare.core@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.swt@default:default,org.eclipse.osgi.services@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.core.variables@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.swtbot.ant.optional.junit3@!
default:false,org.eclipse.equinox.p2.metadata@default:default,org.apache.lucene@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.text@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.help@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.ui.ide@default:default,org.junit4@default:default,org.apache.commons.el@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.ui.editors@default:default,org.eclipse.team.ui@default:default,org.eclipse.debug.ui@default:default,org.eclipse.team.core@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.jdt.ui@default:default,org.ecl!
ipse.ant.core@default:default,org.eclipse.jdt.debug@default:de!
fault,or
g.mortbay.jetty.util@default:default,javax.xml@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui.forms@default:default,org.hamcrest.core@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.sdk@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.core.expressions@default:default,org.eclipse.ui.navigator.resources@default:default,com.instantiations.designer.jdt.fragment@default:false,org.apache.jasper@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.commands@default:default,org.eclipse.osgi@-1:true,org.eclipse.wst.sse.core@default:default,org.eclipse.core.resources@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.jdt.core@default:d!
efault,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.jface.text@default:default,org.eclipse.emf.edit@default:default,org.eclipse.core.filesystem@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.deltacloud.core@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/InstanceMockIntegrationTest.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ServerTypeMockIntegrationTest.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ServerTypeMockIntegrationTest.launch (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ServerTypeMockIntegrationTest.launch 2010-10-22 14:42:25 UTC (rev 25998)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="false"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.eclipse.epp.usagedata.recording,org.eclipse.epp.usagedata.gathering,org.mozilla.xulrunner.cocoa.macosx,org.jboss.tools.common,org.jboss.tools.deltacloud.docs,org.mozilla.xulrunner.gtk.linux.x86_64,org.jboss.tools.usage,org.mozilla.xulrunner.win32.win32.x86,com.jboss.jbds.usage.branding,org.jboss.tools.usage.test,org.mozilla.xulrunner.gtk.linux.x86,org.eclipse.epp.usagedata.ui,org.mozilla.xulrunner.carbon.macosx,org.mozilla.xpcom,org.jboss.tools.tests,org.jboss.tools.deltacloud.ui,org.jruby.jruby"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ServerTypeMockIntegrationTest.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.internal.deltacloud.test.ServerTypeMockIntegrationTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.deltacloud.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx1024m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.equinox.preferences@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.core.runtime@default:true,org.eclipse.debug.core@default:default,org.eclipse.ecf.identity@default:default,org.apache.xml.resolver@default:default,org.eclipse.compare@default:default,javax.servlet@default:default,org.eclipse.ui@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.emf.common@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.emf.ecore.xmi@default:default,com.ibm.icu@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.osgi.util@default:default,org.eclipse.wst.validation@default:default,org.eclipse.equinox.p2.repository@default:default,org.ecli!
pse.search@default:default,org.eclipse.ui.views@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.ui.console@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.net@default:default,org.eclipse.ecf@default:default,org.eclipse.jface@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.jem.util@default:default,org.eclipse.core.databinding@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.databinding.observable@default:default,org.eclipse.equinox.common@2:true,org.apache.xml.serializer@default:default,org.apache.xerces@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.ec!
f.filetransfer@default:default,org.eclipse.jdt.compiler.apt@de!
fault:fa
lse,org.eclipse.compare.core@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.swt@default:default,org.eclipse.osgi.services@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.core.variables@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.text@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.help@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.ui.ide@default!
:default,org.eclipse.jdt.launching@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.ui.editors@default:default,org.eclipse.team.ui@default:default,org.eclipse.debug.ui@default:default,org.eclipse.team.core@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.ant.core@default:default,org.eclipse.jdt.debug@default:default,javax.xml@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui.forms@default:default,org.hamcrest.core@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.core.expressions@default:default,org.eclipse.ui.navigator.resources@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.core.jobs@de!
fault:default,org.eclipse.core.commands@default:default,org.ec!
lipse.os
gi@-1:true,org.eclipse.wst.sse.core@default:default,org.eclipse.core.resources@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.jdt.core@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.jface.text@default:default,org.eclipse.emf.edit@default:default,org.eclipse.core.filesystem@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.deltacloud.core@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ServerTypeMockIntegrationTest.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/bootstrap-deltacloud.rb
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/bootstrap-deltacloud.rb 2010-10-22 14:39:43 UTC (rev 25997)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/bootstrap-deltacloud.rb 2010-10-22 14:42:25 UTC (rev 25998)
@@ -1,5 +1,4 @@
require 'rubygems'
-#require 'deltacloud-dependencies.jar'
require 'deltacloud-dependencies.jar'
#require 'steamcannon-deltacloud-core'
Deleted: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudMockClientIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudMockClientIntegrationTest.java 2010-10-22 14:39:43 UTC (rev 25997)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudMockClientIntegrationTest.java 2010-10-22 14:42:25 UTC (rev 25998)
@@ -1,116 +0,0 @@
-package org.jboss.tools.internal.deltacloud.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.List;
-
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
-import org.jboss.tools.deltacloud.core.client.Image;
-import org.jboss.tools.deltacloud.core.client.Instance;
-import org.jboss.tools.internal.deltacloud.test.fakes.ServerFake;
-import org.junit.Before;
-import org.junit.Test;
-
-public class DeltaCloudMockClientIntegrationTest {
-
- private static final String DELTACLOUD_URL = "http://localhost:3001";
- private static final String SERVERFAKE_URL = "http://localhost:3002";
- private static final String DELTACLOUD_USER = "mockuser";
- private static final String DELTACLOUD_PASSWORD = "mockpassword";
-
- private DeltaCloudClient client;
-
- @Before
- public void createClient() throws IOException {
- assertTrue(isDeltaCloudRunning());
- client = new DeltaCloudClient(DELTACLOUD_URL, DELTACLOUD_USER, DELTACLOUD_PASSWORD);
- }
-
- public boolean isDeltaCloudRunning() throws IOException {
- URLConnection connection = new URL(DELTACLOUD_URL).openConnection();
- connection.connect();
- return true;
- }
-
- @Test
- public void canRecognizeMockDeltaCloud() throws IOException {
- assertEquals(DeltaCloudClient.DeltaCloudType.MOCK, client.getServerType());
- }
-
- @Test
- public void reportsUnknownUrl() throws IOException {
- ServerFake serverFake = new ServerFake(new URL(SERVERFAKE_URL).getPort(), "<dummy></dummy>");
- serverFake.start();
- try {
- assertEquals(DeltaCloudClient.DeltaCloudType.UNKNOWN, new DeltaCloudClient(SERVERFAKE_URL, DELTACLOUD_USER,
- DELTACLOUD_PASSWORD).getServerType());
- } finally {
- serverFake.stop();
- }
- }
-
- @Test(expected = DeltaCloudClientException.class)
- public void notAuthenticatedCannotListImages() throws MalformedURLException, DeltaCloudClientException {
- DeltaCloudClient client = new DeltaCloudClient(DELTACLOUD_URL, "badUser", "badPassword");
- client.listImages();
- }
-
- @Test
- public void reports404OnUnknownResource() {
- try {
- DeltaCloudClient errorClient = new DeltaCloudClient(DELTACLOUD_URL) {
- @Override
- protected HttpUriRequest getRequest(RequestType requestType, String requestUrl) {
- return new HttpGet(DELTACLOUD_URL + "/DUMMY");
- }
- };
- errorClient.listImages();
- fail("no exception catched");
- } catch (Exception e) {
- assertEquals(DeltaCloudClientException.class, e.getClass());
- }
- }
-
- @Test
- public void canListMockImages() throws DeltaCloudClientException {
- List<Image> images = client.listImages();
- assertEquals(3, images.size());
- assertImage("img2", "Fedora 10", "fedoraproject", "Fedora 10", "i386", images.get(0));
- assertImage("img1", "Fedora 10", "fedoraproject", "Fedora 10", "x86_64", images.get(1));
- assertImage("img3", "JBoss", "mockuser", "JBoss", "i386", images.get(2));
- }
-
- private void assertImage(String id, String name, String owner, String description, String architecture, Image image) {
- assertEquals(id, image.getId());
- assertEquals(name, image.getName());
- assertEquals(owner, image.getOwnerId());
- assertEquals(architecture, image.getArchitecture());
- assertEquals(description, image.getDescription());
- }
-
- @Test
- public void canListMockInstances() throws DeltaCloudClientException {
- List<Instance> instances = client.listInstances();
- assertEquals(1, instances.size());
- assertInstance("inst0", "Mock Instance With Profile Change", "mockuser", "img1", "us", "m1-large", "12288 MB", instances.get(0));
- }
-
- private void assertInstance(String id, String name, String owner, String ImageId, String realmId, String profile, String memory, Instance instance) {
- assertEquals(id, instance.getId());
- assertEquals(name, instance.getName());
- assertEquals(owner, instance.getOwnerId());
- assertEquals(realmId, instance.getRealmId());
- assertEquals(profile, instance.getProfileId());
- assertEquals(memory, instance.getMemory());
- }
-
-}
Copied: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ImageMockIntegrationTest.java (from rev 25975, trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudMockClientIntegrationTest.java)
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ImageMockIntegrationTest.java (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ImageMockIntegrationTest.java 2010-10-22 14:42:25 UTC (rev 25998)
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.List;
+
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
+import org.jboss.tools.deltacloud.core.client.Image;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ImageMockIntegrationTest {
+
+ private MockIntegrationTestSetup testSetup;
+
+ @Before
+ public void setUp() throws IOException, DeltaCloudClientException {
+ this.testSetup = new MockIntegrationTestSetup();
+ testSetup.setUp();
+ }
+
+ @After
+ public void tearDown() {
+ testSetup.tearDown();
+ }
+
+ @Test(expected = DeltaCloudClientException.class)
+ public void cannotListIfNotAuthenticated() throws MalformedURLException, DeltaCloudClientException {
+ DeltaCloudClient client = new DeltaCloudClient(MockIntegrationTestSetup.DELTACLOUD_URL, "badUser", "badPassword");
+ client.listImages();
+ }
+
+ @Test
+ public void throwsDeltaCloudClientExceptionOnUnknownResource() {
+ try {
+ DeltaCloudClient errorClient = new DeltaCloudClient(MockIntegrationTestSetup.DELTACLOUD_URL) {
+ @Override
+ protected HttpUriRequest getRequest(RequestType requestType, String requestUrl) {
+ return new HttpGet(MockIntegrationTestSetup.DELTACLOUD_URL + "/DUMMY");
+ }
+ };
+ errorClient.listImages();
+ fail("no exception catched");
+ } catch (Exception e) {
+ assertEquals(DeltaCloudClientException.class, e.getClass());
+ }
+ }
+
+ @Test
+ public void assertImagesFromWebUI() throws DeltaCloudClientException {
+ List<Image> images = testSetup.getClient().listImages();
+ assertEquals(3, images.size());
+ assertImage("img2", "Fedora 10", "fedoraproject", "Fedora 10", "i386", images.get(0));
+ assertImage("img1", "Fedora 10", "fedoraproject", "Fedora 10", "x86_64", images.get(1));
+ assertImage("img3", "JBoss", "mockuser", "JBoss", "i386", images.get(2));
+ }
+
+ private void assertImage(String id, String name, String owner, String description, String architecture, Image image) {
+ assertEquals(id, image.getId());
+ assertEquals(name, image.getName());
+ assertEquals(owner, image.getOwnerId());
+ assertEquals(architecture, image.getArchitecture());
+ assertEquals(description, image.getDescription());
+ }
+}
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ImageMockIntegrationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java 2010-10-22 14:42:25 UTC (rev 25998)
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.List;
+
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
+import org.jboss.tools.deltacloud.core.client.Image;
+import org.jboss.tools.deltacloud.core.client.Instance;
+import org.jboss.tools.deltacloud.core.client.Instance.State;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Integration tests for instances.
+ */
+public class InstanceMockIntegrationTest {
+
+ private MockIntegrationTestSetup testSetup;
+
+ @Before
+ public void setUp() throws IOException, DeltaCloudClientException {
+ this.testSetup = new MockIntegrationTestSetup();
+ testSetup.setUp();
+ }
+
+ @After
+ public void tearDown() {
+ testSetup.tearDown();
+ }
+
+ /**
+ * #listInstance contains the test instance created in {@link #setUp()}
+ *
+ * @throws DeltaCloudClientException
+ * the delta cloud client exception
+ */
+ @Test
+ public void listContainsTestInstance() throws DeltaCloudClientException {
+ List<Instance> instances = testSetup.getClient().listInstances();
+ assertTrue(instances.size() > 0);
+ assertNotNull(testSetup.getInstanceById(testSetup.getTestInstance().getId(), testSetup.getClient()));
+ }
+
+ @Test
+ public void listTestInstance() throws DeltaCloudClientException {
+ Instance instance = testSetup.getClient().listInstances(testSetup.getTestInstance().getId());
+ assertNotNull(instance);
+ Instance testInstance = testSetup.getTestInstance();
+ assertEquals(testInstance.getId(), instance.getId());
+ assertInstance(
+ testInstance.getName()
+ , testInstance.getOwnerId()
+ , testInstance.getImageId()
+ , testInstance.getRealmId()
+ , testInstance.getProfileId()
+ , testInstance.getMemory()
+ , instance);
+ }
+
+ @Test
+ public void listInstanceFromWebUI() throws DeltaCloudClientException {
+ Instance testInstance = testSetup.getClient().listInstances("inst0");
+ assertInstance("Mock Instance With Profile Change", "mockuser", "img1", "us", "m1-large", "12288 MB",
+ testInstance);
+ }
+
+ @Test(expected = DeltaCloudClientException.class)
+ public void listDestroyedInstanceThrowsException() throws DeltaCloudClientException {
+ Instance testInstance = testSetup.getTestInstance();
+ testSetup.quietlyDestroyInstance(testInstance);
+ testSetup.getClient().listInstances(testInstance.getId());
+ }
+
+ private void assertInstance(String name, String owner, String ImageId, String realmId, String profile,
+ String memory, Instance instance) {
+ assertNotNull(instance);
+ assertEquals(name, instance.getName());
+ assertEquals(owner, instance.getOwnerId());
+ assertEquals(realmId, instance.getRealmId());
+ assertEquals(profile, instance.getProfileId());
+ assertEquals(memory, instance.getMemory());
+ }
+
+ @Test(expected = DeltaCloudClientException.class)
+ public void cannotDestroyIfNotAuthenticated() throws MalformedURLException, DeltaCloudClientException {
+ DeltaCloudClient unauthenticatedClient = new DeltaCloudClient(MockIntegrationTestSetup.DELTACLOUD_URL, "badUser", "badPassword");
+ Image image = testSetup.getFirstImage(unauthenticatedClient);
+ unauthenticatedClient.createInstance(image.getId());
+ }
+
+ @Test
+ public void canCreateInstance() throws DeltaCloudClientException {
+ Instance instance = null;
+ try {
+ Image image = testSetup.getFirstImage(testSetup.getClient());
+ instance = testSetup.getClient().createInstance(image.getId());
+ assertTrue(instance != null);
+ assertEquals(image.getId(), instance.getImageId());
+ assertEquals(State.RUNNING, instance.getState());
+ } finally {
+ testSetup.quietlyDestroyInstance(instance);
+ }
+ }
+
+ @Test(expected = DeltaCloudClientException.class)
+ public void createInstance_DeltaCloudExceptionOnUnknowsImageId() throws DeltaCloudClientException {
+ testSetup.getClient().createInstance("dummy");
+ }
+
+ @Test
+ public void canDestroy() throws DeltaCloudClientException {
+ Image image = testSetup.getFirstImage(testSetup.getClient());
+ Instance instance = testSetup.getClient().createInstance(image.getId());
+ testSetup.getClient().destroyInstance(instance.getId());
+ assertNull(testSetup.getInstanceById(instance.getId(), testSetup.getClient()));
+ }
+
+ @Test(expected=DeltaCloudClientException.class)
+ public void destroyThrowExceptionOnUnknowInstanceId() throws DeltaCloudClientException {
+ testSetup.getClient().destroyInstance("dummy");
+ }
+}
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/KeyMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/KeyMockIntegrationTest.java (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/KeyMockIntegrationTest.java 2010-10-22 14:42:25 UTC (rev 25998)
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.test;
+
+import java.io.IOException;
+
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
+import org.junit.After;
+import org.junit.Before;
+
+/**
+ * Integration tests for key related operations in delta cloud client.
+ *
+ * @see DeltaCloudClient#createKey(String, String)
+ * @see DeltaCloudClient#deleteKey(String)
+ */
+public class KeyMockIntegrationTest {
+
+ private MockIntegrationTestSetup testSetup;
+
+ @Before
+ public void setUp() throws IOException, DeltaCloudClientException {
+ this.testSetup = new MockIntegrationTestSetup();
+ testSetup.setUp();
+ }
+
+ @After
+ public void tearDown() {
+ testSetup.tearDown();
+ }
+}
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/KeyMockIntegrationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/MockIntegrationTestSetup.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/MockIntegrationTestSetup.java (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/MockIntegrationTestSetup.java 2010-10-22 14:42:25 UTC (rev 25998)
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.test;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.net.ConnectException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.List;
+
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
+import org.jboss.tools.deltacloud.core.client.Image;
+import org.jboss.tools.deltacloud.core.client.Instance;
+
+public class MockIntegrationTestSetup {
+
+ public static final String DELTACLOUD_URL = "http://localhost:3001";
+ public static final String SERVERFAKE_URL = "http://localhost:3002";
+ public static final String DELTACLOUD_USER = "mockuser";
+ public static final String DELTACLOUD_PASSWORD = "mockpassword";
+
+ private DeltaCloudClient client;
+ private Instance testInstance;
+
+ public void setUp() throws IOException, DeltaCloudClientException {
+ ensureDeltaCloudIsRunning();
+ this.client = new DeltaCloudClient(DELTACLOUD_URL, DELTACLOUD_USER, DELTACLOUD_PASSWORD);
+ Image image = getFirstImage(client);
+ assertNotNull(image);
+ this.testInstance = client.createInstance(image.getId());
+ }
+
+ public void ensureDeltaCloudIsRunning() throws IOException {
+ try {
+ URLConnection connection = new URL(DELTACLOUD_URL).openConnection();
+ connection.connect();
+ } catch (ConnectException e) {
+ fail("Local DeltaCloud instance is not running. Please start a DeltaCloud instance before running these tests.");
+ }
+ }
+
+ public DeltaCloudClient getClient() {
+ return client;
+ }
+
+ public Instance getTestInstance() {
+ return testInstance;
+ }
+
+ public Image getFirstImage(DeltaCloudClient client) throws DeltaCloudClientException {
+ List<Image> images = client.listImages();
+ assertTrue(images.size() >= 1);
+ Image image = images.get(0);
+ return image;
+ }
+
+
+ public Instance getInstanceById(String id, DeltaCloudClient client) throws DeltaCloudClientException {
+ for (Instance availableInstance : client.listInstances()) {
+ if (id.equals(availableInstance.getId())) {
+ return availableInstance;
+ }
+ }
+ return null;
+ }
+
+ public void tearDown() {
+ quietlyDestroyInstance(testInstance);
+ }
+
+ public void quietlyDestroyInstance(Instance instance) {
+ if (instance != null) {
+ try {
+ client.destroyInstance(instance.getId());
+ } catch (Exception e) {
+ // ignore
+ }
+ }
+ }
+}
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/MockIntegrationTestSetup.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ServerTypeMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ServerTypeMockIntegrationTest.java (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ServerTypeMockIntegrationTest.java 2010-10-22 14:42:25 UTC (rev 25998)
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
+import org.jboss.tools.internal.deltacloud.test.fakes.ServerFake;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Integration tests for {@link DeltaCloudClient#getServerType()}.
+ */
+public class ServerTypeMockIntegrationTest {
+
+ private MockIntegrationTestSetup testSetup;
+
+ @Before
+ public void setUp() throws IOException, DeltaCloudClientException {
+ this.testSetup = new MockIntegrationTestSetup();
+ testSetup.setUp();
+ }
+
+ @After
+ public void tearDown() {
+ testSetup.tearDown();
+ }
+
+ @Test
+ public void recognizesDeltaCloud() throws IOException {
+ assertEquals(DeltaCloudClient.DeltaCloudType.MOCK,testSetup.getClient().getServerType());
+ }
+
+ /**
+ *
+ * #getServerType reports {@link DeltaCloudClient.DeltaCloudType#UNKNOWN) if it queries a fake server that responds with a unknown answer.
+ *
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ @Test
+ public void reportsUnknownUrl() throws IOException {
+ ServerFake serverFake = new ServerFake(new URL(MockIntegrationTestSetup.SERVERFAKE_URL).getPort(), "<dummy></dummy>");
+ serverFake.start();
+ try {
+ assertEquals(DeltaCloudClient.DeltaCloudType.UNKNOWN, new DeltaCloudClient(MockIntegrationTestSetup.SERVERFAKE_URL, MockIntegrationTestSetup.DELTACLOUD_USER,
+ MockIntegrationTestSetup.DELTACLOUD_PASSWORD).getServerType());
+ } finally {
+ serverFake.stop();
+ }
+ }
+
+ @Test(expected = DeltaCloudClientException.class)
+ public void listImages_cannotListIfNotAuthenticated() throws MalformedURLException, DeltaCloudClientException {
+ DeltaCloudClient client = new DeltaCloudClient(MockIntegrationTestSetup.DELTACLOUD_URL, "badUser", "badPassword");
+ client.listImages();
+ }
+
+ @Test
+ public void throwsDeltaCloudClientExceptionOnUnknownResource() {
+ try {
+ DeltaCloudClient errorClient = new DeltaCloudClient(MockIntegrationTestSetup.DELTACLOUD_URL) {
+ @Override
+ protected HttpUriRequest getRequest(RequestType requestType, String requestUrl) {
+ return new HttpGet(MockIntegrationTestSetup.DELTACLOUD_URL + "/DUMMY");
+ }
+ };
+ errorClient.listImages();
+ fail("no exception catched");
+ } catch (Exception e) {
+ assertEquals(DeltaCloudClientException.class, e.getClass());
+ }
+ }
+}
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ServerTypeMockIntegrationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 2 months
JBoss Tools SVN: r25997 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-22 10:39:43 -0400 (Fri, 22 Oct 2010)
New Revision: 25997
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
Log:
[JBIDE-7384] corrected error detection
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-10-22 14:33:58 UTC (rev 25996)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-10-22 14:39:43 UTC (rev 25997)
@@ -159,12 +159,12 @@
}
private boolean isHttpClientError(int statusCode) {
- return (statusCode - HTTP_STATUSCODE_CLIENTERROR) > 0
+ return (statusCode - HTTP_STATUSCODE_CLIENTERROR) >= 0
&& (statusCode - HTTP_STATUSCODE_CLIENTERROR) < 100;
}
private boolean isHttpServerError(int statusCode) {
- return (statusCode - HTTP_STATUSCODE_SERVERERROR) > 0
+ return (statusCode - HTTP_STATUSCODE_SERVERERROR) >= 0
&& (statusCode - HTTP_STATUSCODE_SERVERERROR) < 100;
}
14 years, 2 months
JBoss Tools SVN: r25996 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-22 10:33:58 -0400 (Fri, 22 Oct 2010)
New Revision: 25996
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
Log:
[JBIDE-7384] commented old unrestful error status handling
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-10-22 14:25:04 UTC (rev 25995)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-10-22 14:33:58 UTC (rev 25996)
@@ -376,22 +376,22 @@
sendRequest(DCNS.INSTANCES + "/" + instanceId, RequestType.DELETE);
}
- private void checkForErrors(Document d) throws DeltaCloudClientException {
- NodeList n = d.getElementsByTagName("error");
- for (int i = 0; i < n.getLength(); ++i) {
- Node node = n.item(i);
- Node statusNode = node.getAttributes().getNamedItem("status");
- if (statusNode != null) {
- String status = node.getAttributes().getNamedItem("status").getNodeValue();
- if (status.equals("403"))
- throw new DeltaCloudAuthException("Authorization error");
- else if (status.equals("404"))
- throw new DeltaCloudClientException("Not found");
- else
- throw new DeltaCloudClientException("Connection error");
- }
- }
- }
+// private void checkForErrors(Document d) throws DeltaCloudClientException {
+// NodeList n = d.getElementsByTagName("error");
+// for (int i = 0; i < n.getLength(); ++i) {
+// Node node = n.item(i);
+// Node statusNode = node.getAttributes().getNamedItem("status");
+// if (statusNode != null) {
+// String status = node.getAttributes().getNamedItem("status").getNodeValue();
+// if (status.equals("403"))
+// throw new DeltaCloudAuthException("Authorization error");
+// else if (status.equals("404"))
+// throw new DeltaCloudClientException("Not found");
+// else
+// throw new DeltaCloudClientException("Connection error");
+// }
+// }
+// }
private Instance buildInstance(String xml) throws DeltaCloudClientException {
try {
@@ -401,7 +401,7 @@
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.parse(new InputSource(new StringReader(xml)));
- checkForErrors(document);
+// checkForErrors(document);
instance.setImageId(getIdFromHref(getAttributeValues(document, "image", "href").get(0))); //$NON-NLS-1$ //$NON-NLS-2$
instance.setProfileId(getIdFromHref(getAttributeValues(document, "hardware_profile", "href").get(0))); //$NON-NLS-1$ //$NON-NLS-2$
@@ -418,8 +418,8 @@
instance.setActions(actions);
return instance;
- } catch (DeltaCloudClientException e) {
- throw e;
+// } catch (DeltaCloudClientException e) {
+// throw e;
} catch (Exception e) {
DeltaCloudClientException newException = new DeltaCloudClientException(e.getLocalizedMessage());
throw newException;
@@ -434,7 +434,7 @@
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.parse(new InputSource(new StringReader(xml)));
- checkForErrors(document);
+// checkForErrors(document);
List<Node> nodes = getPropertyNodes(document, "hardware_profile"); //$NON-NLS-1$
@@ -575,7 +575,7 @@
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.parse(is);
- checkForErrors(document);
+// checkForErrors(document);
document.getElementsByTagName(path).toString();
14 years, 2 months
JBoss Tools SVN: r25995 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: internal/project/facet and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-10-22 10:25:04 -0400 (Fri, 22 Oct 2010)
New Revision: 25995
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
Log:
https://jira.jboss.org/browse/JBIDE-7392
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2010-10-22 13:28:27 UTC (rev 25994)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2010-10-22 14:25:04 UTC (rev 25995)
@@ -293,10 +293,16 @@
public static String VALIDATOR_FACTORY_TEST_PROJECT_ALREADY_EXISTS;
+ public static String VALIDATOR_FACTORY_TEST_PROJECT_CANNOT_BE_EMPTY;
+
public static String VALIDATOR_FACTORY_EAR_PROJECT_ALREADY_EXISTS;
+ public static String VALIDATOR_FACTORY_EAR_PROJECT_CANNOT_BE_EMPTY;
+
public static String VALIDATOR_FACTORY_EJB_PROJECT_ALREADY_EXISTS;
+ public static String VALIDATOR_FACTORY_EJB_PROJECT_CANNOT_BE_EMPTY;
+
public static String VALIDATOR_INVALID_SETTINGS;
public static String SEAM_TARGET_SERVER;
@@ -381,6 +387,7 @@
public static String ADD_ANNOTATED_DESTROY_METHOD_MARKER_RESOLUTION_TITLE;
public static String CHANGE_SCOPETYPE_MARKER_RESOLUTION_TITLE;
+ public static String ADD_SETTER_MARKER_RESOLUTION_TITLE;
static {
// load message values from bundle file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2010-10-22 13:28:27 UTC (rev 25994)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2010-10-22 14:25:04 UTC (rev 25995)
@@ -851,6 +851,11 @@
.validateName(testProjectName);
if (((IStatus.ERROR | IStatus.WARNING) & status.getSeverity() ) != 0 ){
+ if("".equals(testProjectName.trim()))
+ return doPackStatus(status,
+ propertyName,
+ SeamUIMessages.VALIDATOR_FACTORY_TEST_PROJECT_CANNOT_BE_EMPTY);
+
return doPackStatus(status,
propertyName,
NLS.bind(SeamUIMessages.VALIDATOR_FACTORY_TEST_PROJECT_ALREADY_EXISTS,
@@ -864,6 +869,11 @@
.validateName(earProjectName);
if (((IStatus.ERROR | IStatus.WARNING) & status.getSeverity() ) != 0 ){
+ if("".equals(earProjectName.trim()))
+ return doPackStatus(status,
+ propertyName,
+ SeamUIMessages.VALIDATOR_FACTORY_EAR_PROJECT_CANNOT_BE_EMPTY);
+
return doPackStatus(status,
propertyName,
NLS.bind(SeamUIMessages.VALIDATOR_FACTORY_EAR_PROJECT_ALREADY_EXISTS,
@@ -875,6 +885,11 @@
.validateName(ejbProjectName);
if (((IStatus.ERROR | IStatus.WARNING) & status.getSeverity() ) != 0 ){
+ if("".equals(ejbProjectName.trim()))
+ return doPackStatus(status,
+ propertyName,
+ SeamUIMessages.VALIDATOR_FACTORY_EJB_PROJECT_CANNOT_BE_EMPTY);
+
return doPackStatus(status,
propertyName,
NLS.bind(SeamUIMessages.VALIDATOR_FACTORY_EJB_PROJECT_ALREADY_EXISTS,
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2010-10-22 13:28:27 UTC (rev 25994)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2010-10-22 14:25:04 UTC (rev 25995)
@@ -126,8 +126,11 @@
VALIDATOR_FACTORY_CANNOT_FIND_SEAM_RUNTIME=Cannot find Seam Runtime ''{0}''
VALIDATOR_FACTORY_SEAM_RT_SRC_DIR_IS_MISSING=Seam Runtime ''{0}'' source templates directory doesn't exist
VALIDATOR_FACTORY_TEST_PROJECT_ALREADY_EXISTS=Test project ''{0}'' already exists. Please select other name for new Seam project.
+VALIDATOR_FACTORY_TEST_PROJECT_CANNOT_BE_EMPTY=Test project name cannot be empty.
VALIDATOR_FACTORY_EAR_PROJECT_ALREADY_EXISTS=EAR project ''{0}'' already exists. Please select other name for new Seam project.
+VALIDATOR_FACTORY_EAR_PROJECT_CANNOT_BE_EMPTY=EAR project name cannot be empty.
VALIDATOR_FACTORY_EJB_PROJECT_ALREADY_EXISTS=EJB project ''{0}'' already exists. Please select other name for new Seam project.
+VALIDATOR_FACTORY_EJB_PROJECT_CANNOT_BE_EMPTY=EJB project name cannot be empty.
VALIDATOR_FACTORY_SEAM_RT_NOT_CONFIGURED=Seam Runtime is not configured for selected Seam Web Project
VALIDATOR_INVALID_SETTINGS=Selected seam project has some invalid settings. Please press "Settings..." and correct them.
SEAM_RUNTIME_LIST_FIELD_EDITOR_RUNTIME_NAME_IS_NOT_CORRECT=Runtime name is not correct
@@ -199,3 +202,4 @@
ADD_ANNOTATED_REMOVE_METHOD_MARKER_RESOLUTION_TITLE=Add @Remove annotated method
ADD_ANNOTATED_DESTROY_METHOD_MARKER_RESOLUTION_TITLE=Add @Destroy annotated method
CHANGE_SCOPETYPE_MARKER_RESOLUTION_TITLE=Change scope to ''{0}''
+ADD_SETTER_MARKER_RESOLUTION_TITLE=Add setter for ''{0}'' property in ''{1}'' class
14 years, 2 months
JBoss Tools SVN: r25994 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-10-22 09:28:27 -0400 (Fri, 22 Oct 2010)
New Revision: 25994
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
Log:
https://jira.jboss.org/browse/JBIDE-7219
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2010-10-22 13:00:51 UTC (rev 25993)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2010-10-22 13:28:27 UTC (rev 25994)
@@ -620,25 +620,30 @@
.getProperty().toString());
} else if (event.getPropertyName().equals(
IFacetDataModelProperties.FACET_PROJECT_NAME)) {
- String p = event.getProperty().toString();
-
+ String seamProjectName = event.getProperty().toString();
+
model.setStringProperty(
- ISeamFacetDataModelProperties.SEAM_PROJECT_NAME, p);
+ ISeamFacetDataModelProperties.SEAM_PROJECT_NAME, seamProjectName);
- setCodeGenerationProperties(p);
+ sessionBeanPkgNameditor.setValue(getSessionPkgName(seamProjectName));
+ entityBeanPkgNameditor.setValue(getEntityPkgName(seamProjectName));
+ testsPkgNameditor.setValue(getTestPkgName(seamProjectName));
+ ejbProjectNameditor.setValue(getEJBProjectName(seamProjectName));
+ earProjectNameditor.setValue(getEARProjectName(seamProjectName));
+ testProjectNameditor.setValue(getTestProjectName(seamProjectName));
model.setStringProperty(
ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME,
- getSessionPkgName(p));
+ getSessionPkgName(seamProjectName));
model.setStringProperty(
ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME,
- getEntityPkgName(p));
+ getEntityPkgName(seamProjectName));
model.setProperty(
ISeamFacetDataModelProperties.TEST_PROJECT_CREATING,
createTestProjectCheckboxeditor.getValue());
model.setStringProperty(
ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME,
- getTestPkgName(p));
+ getTestPkgName(seamProjectName));
model.setStringProperty(
ISeamFacetDataModelProperties.SEAM_EAR_PROJECT,
earProjectNameditor.getValueAsString());
@@ -660,6 +665,7 @@
@Override
public void setVisible(boolean visible) {
if (visible) {
+ setCodeGenerationProperties();
setDefaultSeamRuntime();
boolean jpaFacetAdded = getJpaFacetVersion() != null;
if (jpaFacetAdded == needToShowConnectionProfile){
@@ -677,6 +683,7 @@
};
private void initDefaultWizardProperties() {
+ setCodeGenerationProperties();
setDefaultSeamRuntime();
validate();
}
@@ -684,13 +691,30 @@
/*
* Fills Code Generation group with the default package names.
*/
- private void setCodeGenerationProperties(String seamProjectName) {
- sessionBeanPkgNameditor.setValue(getSessionPkgName(seamProjectName));
- entityBeanPkgNameditor.setValue(getEntityPkgName(seamProjectName));
- testsPkgNameditor.setValue(getTestPkgName(seamProjectName));
- ejbProjectNameditor.setValue(getEJBProjectName(seamProjectName));
- earProjectNameditor.setValue(getEARProjectName(seamProjectName));
- testProjectNameditor.setValue(getTestProjectName(seamProjectName));
+ private void setCodeGenerationProperties() {
+ String seamProjectName = model.getStringProperty(
+ ISeamFacetDataModelProperties.SEAM_PROJECT_NAME);
+
+ if(seamProjectName == null)
+ return;
+
+ if("".equals(sessionBeanPkgNameditor.getValueAsString()))
+ sessionBeanPkgNameditor.setValue(getSessionPkgName(seamProjectName));
+
+ if("".equals(entityBeanPkgNameditor.getValueAsString()))
+ entityBeanPkgNameditor.setValue(getEntityPkgName(seamProjectName));
+
+ if("".equals(testsPkgNameditor.getValueAsString()))
+ testsPkgNameditor.setValue(getTestPkgName(seamProjectName));
+
+ if("".equals(ejbProjectNameditor.getValueAsString()))
+ ejbProjectNameditor.setValue(getEJBProjectName(seamProjectName));
+
+ if("".equals(earProjectNameditor.getValueAsString()))
+ earProjectNameditor.setValue(getEARProjectName(seamProjectName));
+
+ if("".equals(testProjectNameditor.getValueAsString()))
+ testProjectNameditor.setValue(getTestProjectName(seamProjectName));
}
private String getSessionPkgName(String projectName) {
14 years, 2 months
JBoss Tools SVN: r25993 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-10-22 09:00:51 -0400 (Fri, 22 Oct 2010)
New Revision: 25993
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java
Log:
https://jira.jboss.org/browse/JBIDE-7382
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java 2010-10-22 12:16:05 UTC (rev 25992)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java 2010-10-22 13:00:51 UTC (rev 25993)
@@ -171,7 +171,12 @@
if (bg==null) bg = Display.getCurrent().getSystemColor(SWT.COLOR_WHITE);// bug with gray bg
Color fg = getSettings().getColor("Combo.Foreground"); //$NON-NLS-1$
Font font = getSettings().getFont("Combo.Font"); //$NON-NLS-1$
- Border border = getSettings().getBorder("Combo.Border"); //$NON-NLS-1$
+ Border border = null; //$NON-NLS-1$
+ //Platform check has been added for not drawning black border for mac os
+ //added by Maksim Areshkau as fix for JBIDE-7382
+ if(!Platform.OS_MACOSX.equals(Platform.getOS())){
+ border = getSettings().getBorder("Combo.Border");
+ }
if (style == SWT.DEFAULT) style = defaultStyle;
if (isDropDown()) style = style | SWT.READ_ONLY;
14 years, 2 months