JBoss Tools SVN: r27759 - in trunk/deltacloud/tests/org.jboss.tools.deltacloud.test: src/org/jboss/tools/internal/deltacloud/test/fakes and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-27 18:17:22 -0500 (Mon, 27 Dec 2010)
New Revision: 27759
Removed:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/KeyActionDomUnmarshallingTest.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/KeyActionJAXBUnmarshallingTest.launch
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/KeyDomUnmarshallingTest.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerKeyResponseFakes.java
Log:
[JBIDE-7979] fixed test
Deleted: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/KeyActionDomUnmarshallingTest.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/KeyActionDomUnmarshallingTest.launch 2010-12-27 23:16:50 UTC (rev 27758)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/KeyActionDomUnmarshallingTest.launch 2010-12-27 23:17:22 UTC (rev 27759)
@@ -1,48 +0,0 @@
-<?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.jboss.tools.gwt.ui,org.eclipse.epp.usagedata.recording,org.jboss.tools.deltacloud.integration,org.jboss.tools.common.model.ui.capabilities,org.eclipse.epp.usagedata.gathering,org.jboss.tools.deltacloud.docs,org.jboss.tools.usage,org.jboss.tools.usage.test,com.jboss.jbds.usage.branding,org.jboss.tools.gwt.core,org.eclipse.epp.usagedata.ui,org.jboss.tools.tests,org.jboss.tools.common.model.ui,org.jboss.tools.deltacloud.ui,org.jboss.tools.common.model"/>
-<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/core/client/KeyActionDomUnmarshallingTest.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.core.client.KeyActionDomUnmarshallingTest"/>
-<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 -Djaxb.debug=true"/>
-<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.ecf.identity@default:default,org.eclipse.jface.databinding@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.equinox.concurrent@default:default,org.apache.xml.serializer@default:default,org.eclipse.equinox.common@2:true,org.eclipse.emf.edit@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.jface.text@default:default,org.eclipse.emf.common@default:default,org.apache.xml.resolver@default:default,org.eclipse.osgi@-1:true,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.expressions@default:default,org.eclipse.jem.util@default:default,org.eclipse.core.variables@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.core.datab!
inding@default:default,org.eclipse.equinox.app@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.mortbay.jetty.server@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.jdt.core@default:default,org.eclipse.core.jobs@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.core.net@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.update.configurator@3:true,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.team.ui@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.equinox.p2.core@default:default,com.ibm.icu@default:default,org.eclipse.ui.editors@default:default,org.eclipse.core.filebuffers@default:default,org.apache.lucene@default:default,or!
g.hamcrest.core@default:default,org.eclipse.core.databinding.o!
bservabl
e@default:default,org.eclipse.ui.forms@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.wst.validation@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.preferences@default:default,org.mortbay.jetty.util@default:default,org.eclipse.debug.ui@default:default,org.eclipse.equinox.p2.engine@default:default,javax.servlet@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.ui@default:default,javax.xml@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.osgi.services@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.jdt.core.manipulation@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.wst.common.framewo!
rks@default:default,org.eclipse.help@default:default,org.junit4@default:default,org.eclipse.ui.views@default:default,org.eclipse.compare@default:default,org.eclipse.equinox.security@default:default,org.eclipse.swt@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.help.base@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.console@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.core.runtime@default:true,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.help.ui@default:default,org.eclipse.ecf@default:default,org.eclipse.team.core@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.tex!
t@default:default,org.eclipse.ui.ide@default:default,org.eclip!
se.jface
@default:default,org.eclipse.jdt.compiler.tool@default:false,org.apache.ant@default:default,org.eclipse.search@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.jdt.ui@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ant.core@default:default,org.eclipse.equinox.http.servlet@default:default,org.apache.lucene.analysis@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.apache.jasper@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.core.resources@default:default,org.eclipse.osgi.util@default:default,org.apache.xerces@default:default,org.eclipse.sdk@default:default,org.eclipse.debug.core@default:default,javax.servlet.jsp@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ui.navigator@default:default,org.eclipse.equinox.http.jetty@default:default,o!
rg.apache.commons.el@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.compare.core@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.common@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>
Deleted: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/KeyActionJAXBUnmarshallingTest.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/KeyActionJAXBUnmarshallingTest.launch 2010-12-27 23:16:50 UTC (rev 27758)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/KeyActionJAXBUnmarshallingTest.launch 2010-12-27 23:17:22 UTC (rev 27759)
@@ -1,48 +0,0 @@
-<?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.jboss.tools.gwt.ui,org.eclipse.epp.usagedata.recording,org.jboss.tools.deltacloud.integration,org.jboss.tools.common.model.ui.capabilities,org.eclipse.epp.usagedata.gathering,org.jboss.tools.deltacloud.docs,org.jboss.tools.usage,org.jboss.tools.usage.test,com.jboss.jbds.usage.branding,org.jboss.tools.gwt.core,org.eclipse.epp.usagedata.ui,org.jboss.tools.tests,org.jboss.tools.common.model.ui,org.jboss.tools.deltacloud.ui,org.jboss.tools.common.model"/>
-<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/core/client/KeyActionJAXBUnmarshallingTest.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.core.client.KeyActionJAXBUnmarshallingTest"/>
-<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 -Djaxb.debug=true"/>
-<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.ecf.identity@default:default,org.eclipse.jface.databinding@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.equinox.concurrent@default:default,org.apache.xml.serializer@default:default,org.eclipse.equinox.common@2:true,org.eclipse.emf.edit@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.jface.text@default:default,org.eclipse.emf.common@default:default,org.apache.xml.resolver@default:default,org.eclipse.osgi@-1:true,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.expressions@default:default,org.eclipse.jem.util@default:default,org.eclipse.core.variables@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.core.datab!
inding@default:default,org.eclipse.equinox.app@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.mortbay.jetty.server@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.jdt.core@default:default,org.eclipse.core.jobs@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.core.net@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.update.configurator@3:true,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.team.ui@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.equinox.p2.core@default:default,com.ibm.icu@default:default,org.eclipse.ui.editors@default:default,org.eclipse.core.filebuffers@default:default,org.apache.lucene@default:default,or!
g.hamcrest.core@default:default,org.eclipse.core.databinding.o!
bservabl
e@default:default,org.eclipse.ui.forms@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.wst.validation@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.preferences@default:default,org.mortbay.jetty.util@default:default,org.eclipse.debug.ui@default:default,org.eclipse.equinox.p2.engine@default:default,javax.servlet@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.ui@default:default,javax.xml@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.osgi.services@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.jdt.core.manipulation@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.wst.common.framewo!
rks@default:default,org.eclipse.help@default:default,org.junit4@default:default,org.eclipse.ui.views@default:default,org.eclipse.compare@default:default,org.eclipse.equinox.security@default:default,org.eclipse.swt@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.help.base@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.console@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.core.runtime@default:true,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.help.ui@default:default,org.eclipse.ecf@default:default,org.eclipse.team.core@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.tex!
t@default:default,org.eclipse.ui.ide@default:default,org.eclip!
se.jface
@default:default,org.eclipse.jdt.compiler.tool@default:false,org.apache.ant@default:default,org.eclipse.search@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.jdt.ui@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ant.core@default:default,org.eclipse.equinox.http.servlet@default:default,org.apache.lucene.analysis@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.apache.jasper@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.core.resources@default:default,org.eclipse.osgi.util@default:default,org.apache.xerces@default:default,org.eclipse.sdk@default:default,org.eclipse.debug.core@default:default,javax.servlet.jsp@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ui.navigator@default:default,org.eclipse.equinox.http.jetty@default:default,o!
rg.apache.commons.el@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.compare.core@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.common@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>
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/KeyDomUnmarshallingTest.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/KeyDomUnmarshallingTest.launch 2010-12-27 23:16:50 UTC (rev 27758)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/KeyDomUnmarshallingTest.launch 2010-12-27 23:17:22 UTC (rev 27759)
@@ -12,7 +12,7 @@
<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.jboss.tools.gwt.ui,org.eclipse.epp.usagedata.recording,org.jboss.tools.deltacloud.integration,org.jboss.tools.common.model.ui.capabilities,org.eclipse.epp.usagedata.gathering,org.jboss.tools.deltacloud.docs,org.jboss.tools.usage,org.jboss.tools.usage.test,com.jboss.jbds.usage.branding,org.jboss.tools.gwt.core,org.eclipse.epp.usagedata.ui,org.jboss.tools.tests,org.jboss.tools.common.model.ui,org.jboss.tools.deltacloud.ui,org.jboss.tools.common.model"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.jboss.ide.eclipse.as.wtp.ui,org.eclipse.rse.subsystems.shells.ssh,org.jboss.tools.ui.bot.ext,org.jboss.ide.eclipse.as.core,org.jboss.tools.common.projecttemplates,org.jboss.ide.eclipse.as.rse.core,org.jboss.tools.tests.performance,org.jboss.ide.eclipse.as.ui.mbeans,org.jboss.tools.common.el.core,org.jboss.tools.common.gef,org.jboss.ide.eclipse.as.archives.integration.test,org.jboss.tools.common.verification.test,org.jboss.ide.eclipse.archives.core,org.jboss.tools.common.verification,org.jboss.tools.jmx.core.test,org.jboss.ide.eclipse.archives.jdt.integration,org.jboss.tools.common.model,org.jboss.ide.eclipse.as.classpath.core,org.eclipse.ui.net,org.jboss.ide.eclipse.archives.test,org.jboss.ide.eclipse.as.classpath.ui,org.jboss.tools.deltacloud.integration,org.jboss.tools.common.ui,org.jboss.tools.common.text.ext,org.jboss.tools.jmx.ui,org.jboss.tools.ui.bot.ext.test,org.jboss.tools.common.el.core.test,org.jboss.!
tools.common.model.ui.test,org.jboss.tools.tests,org.jboss.tools.common.text.xml,org.jboss.ide.eclipse.as.ui.test,org.jboss.tools.common.meta.ui,org.jboss.ide.eclipse.archives.webtools,org.jboss.tools.deltacloud.docs,org.jboss.ide.eclipse.as.rse.ui,org.eclipse.jsch.core,org.jboss.tools.common.verification.ui.test,org.jboss.tools.common.verification.ui,org.jboss.ide.eclipse.as.wtp.core,org.jboss.tools.common.test,org.jboss.tools.deltacloud.ui,org.eclipse.rse.connectorservice.ssh,org.jboss.tools.common.model.ui.capabilities,org.jboss.tools.common.resref.core,org.eclipse.jsch.ui,org.eclipse.rse.subsystems.files.ssh,org.jboss.ide.eclipse.archives.ui,org.jboss.ide.eclipse.as.test,org.jboss.tools.common.el.ui,org.jboss.tools.jmx.ui.test,org.jboss.ide.eclipse.as.ssh,org.eclipse.rse.services.ssh,org.jboss.tools.common.resref.ui,org.jboss.ide.eclipse.as.ui,org.jboss.ide.eclipse.as.doc.user,org.jboss.ide.eclipse.archives.ui.test,org.jboss.tools.jmx.core,org.jboss.tools.common.model.u!
i,org.jboss.tools.common.model.test"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
@@ -22,8 +22,8 @@
<listEntry value="1"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<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"/>
@@ -37,8 +37,8 @@
<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.ecf.identity@default:default,org.eclipse.jface.databinding@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.equinox.concurrent@default:default,org.apache.xml.serializer@default:default,org.eclipse.equinox.common@2:true,org.eclipse.emf.edit@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.jface.text@default:default,org.eclipse.emf.common@default:default,org.apache.xml.resolver@default:default,org.eclipse.osgi@-1:true,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.expressions@default:default,org.eclipse.jem.util@default:default,org.eclipse.core.variables@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.core.datab!
inding@default:default,org.eclipse.equinox.app@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.mortbay.jetty.server@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.jdt.core@default:default,org.eclipse.core.jobs@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.core.net@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.update.configurator@3:true,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.team.ui@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.equinox.p2.core@default:default,com.ibm.icu@default:default,org.eclipse.ui.editors@default:default,org.eclipse.core.filebuffers@default:default,org.apache.lucene@default:default,or!
g.hamcrest.core@default:default,org.eclipse.core.databinding.o!
bservabl
e@default:default,org.eclipse.ui.forms@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.wst.validation@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.preferences@default:default,org.mortbay.jetty.util@default:default,org.eclipse.debug.ui@default:default,org.eclipse.equinox.p2.engine@default:default,javax.servlet@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.ui@default:default,javax.xml@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.osgi.services@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.jdt.core.manipulation@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.wst.common.framewo!
rks@default:default,org.eclipse.help@default:default,org.junit4@default:default,org.eclipse.ui.views@default:default,org.eclipse.compare@default:default,org.eclipse.equinox.security@default:default,org.eclipse.swt@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.help.base@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.console@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.core.runtime@default:true,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.help.ui@default:default,org.eclipse.ecf@default:default,org.eclipse.team.core@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.tex!
t@default:default,org.eclipse.ui.ide@default:default,org.eclip!
se.jface
@default:default,org.eclipse.jdt.compiler.tool@default:false,org.apache.ant@default:default,org.eclipse.search@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.jdt.ui@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ant.core@default:default,org.eclipse.equinox.http.servlet@default:default,org.apache.lucene.analysis@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.apache.jasper@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.core.resources@default:default,org.eclipse.osgi.util@default:default,org.apache.xerces@default:default,org.eclipse.sdk@default:default,org.eclipse.debug.core@default:default,javax.servlet.jsp@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ui.navigator@default:default,org.eclipse.equinox.http.jetty@default:default,o!
rg.apache.commons.el@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.compare.core@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.common@default:default"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.text@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.debug.core@default:default,org.eclipse.swt@default:default,org.eclipse.ui@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.osgi.services@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.equinox.security@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.common@default:default,org.eclipse.jdt.ui@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.wst.sse.core@default:default,org.apache.xml.resolver@default:default,org.eclipse.core.databinding@default:default,org.eclipse.equinox.p2.metadata.!
repository@default:default,org.eclipse.osgi,org.eclipse.team.ui@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.emf.ecore.xmi@default:default,javax.servlet@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.team.core@default:default,org.eclipse.equinox.common@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.commands@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.runtime@default:true,org.eclipse.wst.common.environment@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.core.expressions@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.e!
clipse.ecf@default:default,org.eclipse.core.runtime.compatibil!
ity.regi
stry@default:false,org.eclipse.osgi.util@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.equinox.app@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.apache.xml.serializer@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.jdt.core@default:default,org.eclipse.core.jobs@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.ui.ide@default:default,org.eclipse.core.resources@default:default,org.eclipse.search@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.wst.validation@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.wst.common.project.facet.core@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclip!
se.jface.text@default:default,org.eclipse.ui.editors@default:default,org.eclipse.core.net@default:default,org.eclipse.jem.util@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.ui.console@default:default,com.ibm.icu@default:default,org.eclipse.debug.ui@default:default,org.eclipse.ui.forms@default:default,org.hamcrest.core@default:default,org.eclipse.ecf.identity@default:default,javax.xml@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.wst.common.core@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.emf.edit@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.apache.xerces@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.jface@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.equinox.p2.metadata@!
default:default,org.eclipse.compare@default:default,org.eclips!
e.jdt.co
mpiler.tool@default:false,org.eclipse.core.databinding.observable@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.compare.core@default:default,org.eclipse.help@default:default,org.eclipse.core.variables@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.common@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerKeyResponseFakes.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerKeyResponseFakes.java 2010-12-27 23:16:50 UTC (rev 27758)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerKeyResponseFakes.java 2010-12-27 23:17:22 UTC (rev 27759)
@@ -30,29 +30,29 @@
public static final String fingerprint = "60:7c:f6:9e:e0:a1:52:bc:c0:9a:11:80:a7:1b:f6:8b:c6:55:cd:1f";
public static final String pem =
"-----BEGIN RSA PRIVATE KEY-----"
- + "YkFqsstgVJqYc=sxypCDk=qJbHOmhQNYxaQR4vna=ccPbj68MuxQSZ9tiyu+Z8yAog0DI65/j6u"
- + "xE6gTMsqqTrDkGmAwhiGLsgORkQyxEthGyDfA40YaBf5/5F=Cvuj2zpnp63JIrUrqoqI1FQYhnA"
- + "U34yKaj8+3/0AqsdEmWsWLMbV4HXaRtGZOPbERnJE28EhLlq/v+9wC59hpIZt6s4K0eRBYxCWz/"
- + "xvEG=7wZJi7WE0/tsH9YIAHaLRqyxV7H5kRqaYExZhUpBgf/x745KJlPpr1I20BJSrj6Fw4z4P5"
- + "DIUPDWit8aQdnBpO2fq9eQLGZKyWmj5xpzFm5DxbV1K=bdmqCnC6XHTLcfV4fqW1egYg2DK5WCj"
- + "nsl+mQjn4CNvEdymhna7+Bw0D3JcPcW/EGUrsBGEGLT/suQbEi8x0vQscpBEAizq5GZaKZ6Kec9"
- + "7MOHpx7qDqIAPjH9Y3ben7EaR0O3laY/OPrFREw8jP=mptePHF2r07s52QkdqkbU4ePC5BSWOcb"
- + "bhOqypbbv9V8YssYLyt6m3VOJFHOoERaDJQ2fMmqTDuFc87lxDrChJk4cw0q9o6Q+YzEnjTqGQo"
- + "XcwTtutpL97f1HjO34XlcHn3B1iZ8lsQGJWry9MWaiCdjj02v0mfN+UpbIQNBX452Xllf8YM//0"
- + "Kaylt3GZvr2bJsJ=lQIUIxVzREHd7ym/hRNTBx5qK2/=8h57IdyQHZSnjDT05qDRsSPcm5nQmbM"
- + "dgivv0/vXogWg9ehbym4DNez38QVkQaoJuKd/ESBIU2p8PIEXWC13HHzIMDbkbM235nFn3Roj59"
- + "xt2AJoQnltdfuhA4+5ApnnIYcWzgkd8vWZPhNL2u40Sw1ZPrM+g4n7H48IdwtE3vZ0XfF3Lpdee"
- + "IReubErRzxIMNVz=PrLQMAOhukYNJeH63PdxfSsJf7rtGwA1qEF1WcZ1ibvAuFr0G3KQalGCgCh"
- + "zkF63HCWcjafUTJ3jE6/U5ZPu8GrhAQQqu=r3NyzLgoTBaNwfe7ybxvBBofjdmD9xPipOhrQjDC"
- + "PDeaMDZ6XzwAddh4fd1K3kl29DXNBmPAgfaG8CgdnHVc/gQgAv40RvWDNnYae0/MGE+qrLN0XXF"
- + "1g3qHLkmqdtg88nCH=X7kf6FZZ3LE+bLKIF2Y4Xh3X8sqHlImLWSlKvKu6/CuB4GsrfLxu1VLdc"
- + "ee3DxUIaqz3LmkERnT7ALcMBjBjRNp=DR=x7zON0f0Nht0gIj1vvDWQmEzRqGxgTwS2PtGL3bOZ"
- + "v2hiV3G3+S/9SAD9rfiW9Ws1YLH5mVDcHcKWhHXoM/UqPj3ob3yGzvYgR+X/dIg7tug/k=TTtD8"
- + "1wkG4gTjHkfEhCs05/+PZ4rFG15nVpv06e/a3nXtyDQ77qH3irRPsLZDp/CWFdt=Poe4NLX46gE"
- + "nU07L+ueqgZUa8Tq6A9oG7QUyjtJh4ZxkShYkIullvUksW0yppaIeB32Xxw2XVEtdu/v=rFHSHh"
- + "HwoZ1A/=ku7ICdMg5gD6U+Zg0YlxniHDaSJ8A6kdt2iUaPaZQQcH8T4yh90CKHhbl5NzhxAu3Jz"
- + "dc=oRQqdzizw9UrN84wEmQ6r9hDHUq2x14PR=xBzwLGzR2dh73GdjxF5OmOrp3m4yCkw"
- + "-----END RSA PRIVATE KEY-----";
+ + "YkFqsstgVJqYc=sxypCDk=qJbHOmhQNYxaQR4vna=ccPbj68MuxQSZ9tiyu+Z8yAog0DI65/j6u\n"
+ + "xE6gTMsqqTrDkGmAwhiGLsgORkQyxEthGyDfA40YaBf5/5F=Cvuj2zpnp63JIrUrqoqI1FQYhnA\n"
+ + "U34yKaj8+3/0AqsdEmWsWLMbV4HXaRtGZOPbERnJE28EhLlq/v+9wC59hpIZt6s4K0eRBYxCWz/\n"
+ + "xvEG=7wZJi7WE0/tsH9YIAHaLRqyxV7H5kRqaYExZhUpBgf/x745KJlPpr1I20BJSrj6Fw4z4P5\n"
+ + "DIUPDWit8aQdnBpO2fq9eQLGZKyWmj5xpzFm5DxbV1K=bdmqCnC6XHTLcfV4fqW1egYg2DK5WCj\n"
+ + "nsl+mQjn4CNvEdymhna7+Bw0D3JcPcW/EGUrsBGEGLT/suQbEi8x0vQscpBEAizq5GZaKZ6Kec9\n"
+ + "7MOHpx7qDqIAPjH9Y3ben7EaR0O3laY/OPrFREw8jP=mptePHF2r07s52QkdqkbU4ePC5BSWOcb\n"
+ + "bhOqypbbv9V8YssYLyt6m3VOJFHOoERaDJQ2fMmqTDuFc87lxDrChJk4cw0q9o6Q+YzEnjTqGQo\n"
+ + "XcwTtutpL97f1HjO34XlcHn3B1iZ8lsQGJWry9MWaiCdjj02v0mfN+UpbIQNBX452Xllf8YM//0\n"
+ + "Kaylt3GZvr2bJsJ=lQIUIxVzREHd7ym/hRNTBx5qK2/=8h57IdyQHZSnjDT05qDRsSPcm5nQmbM\n"
+ + "dgivv0/vXogWg9ehbym4DNez38QVkQaoJuKd/ESBIU2p8PIEXWC13HHzIMDbkbM235nFn3Roj59\n"
+ + "xt2AJoQnltdfuhA4+5ApnnIYcWzgkd8vWZPhNL2u40Sw1ZPrM+g4n7H48IdwtE3vZ0XfF3Lpdee\n"
+ + "IReubErRzxIMNVz=PrLQMAOhukYNJeH63PdxfSsJf7rtGwA1qEF1WcZ1ibvAuFr0G3KQalGCgCh\n"
+ + "zkF63HCWcjafUTJ3jE6/U5ZPu8GrhAQQqu=r3NyzLgoTBaNwfe7ybxvBBofjdmD9xPipOhrQjDC\n"
+ + "PDeaMDZ6XzwAddh4fd1K3kl29DXNBmPAgfaG8CgdnHVc/gQgAv40RvWDNnYae0/MGE+qrLN0XXF\n"
+ + "1g3qHLkmqdtg88nCH=X7kf6FZZ3LE+bLKIF2Y4Xh3X8sqHlImLWSlKvKu6/CuB4GsrfLxu1VLdc\n"
+ + "ee3DxUIaqz3LmkERnT7ALcMBjBjRNp=DR=x7zON0f0Nht0gIj1vvDWQmEzRqGxgTwS2PtGL3bOZ\n"
+ + "v2hiV3G3+S/9SAD9rfiW9Ws1YLH5mVDcHcKWhHXoM/UqPj3ob3yGzvYgR+X/dIg7tug/k=TTtD8\n"
+ + "1wkG4gTjHkfEhCs05/+PZ4rFG15nVpv06e/a3nXtyDQ77qH3irRPsLZDp/CWFdt=Poe4NLX46gE\n"
+ + "nU07L+ueqgZUa8Tq6A9oG7QUyjtJh4ZxkShYkIullvUksW0yppaIeB32Xxw2XVEtdu/v=rFHSHh\n"
+ + "HwoZ1A/=ku7ICdMg5gD6U+Zg0YlxniHDaSJ8A6kdt2iUaPaZQQcH8T4yh90CKHhbl5NzhxAu3Jz\n"
+ + "dc=oRQqdzizw9UrN84wEmQ6r9hDHUq2x14PR=xBzwLGzR2dh73GdjxF5OmOrp3m4yCkw\n"
+ + "-----END RSA PRIVATE KEY-----\n";
public static final String keyResponse = getKeyResponseXML(id, fingerprint, pem, url, method, name);
}
@@ -64,7 +64,7 @@
public static final String name1 = "destroy";
public static final String fingerprint1 = "60:7c:f6:9e:e0:a1:52:bc:c0:9a:11:80:a7:1b:f6:8b:c6:55:cd:1f";
public static final String pem1 = "-----BEGIN RSA PRIVATE KEY-----"
- + "YkFqsstgVJqYc=sxypCDk=qJbHOmhQNYxaQR4vna=ccPbj68MuxQSZ9tiyu+Z8yAog0DI65/j6u";
+ + "YkFqsstgVJqYc=sxypCDk=qJbHOmhQNYxaQR4vna=ccPbj68MuxQSZ9tiyu+Z8yAog0DI65/j6u\n";
public static final String url2 = "http://localhost:3001/api/keys/test1292840175427";
public static final String method2 = "delete";
14 years
JBoss Tools SVN: r27758 - in trunk/tests/plugins: org.jboss.tools.ui.bot.ext.test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-27 18:16:50 -0500 (Mon, 27 Dec 2010)
New Revision: 27758
Modified:
trunk/tests/plugins/org.jboss.tools.tests/
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/
Log:
Property changes on: trunk/tests/plugins/org.jboss.tools.tests
___________________________________________________________________
Name: svn:ignore
- target
buildlog.latest.txt
bin
build
*.class
+ target
buildlog.latest.txt
bin
build
*.class
.settings
Property changes on: trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test
___________________________________________________________________
Name: svn:ignore
+ target
14 years
JBoss Tools SVN: r27757 - in trunk/deltacloud/plugins: org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-27 17:56:43 -0500 (Mon, 27 Dec 2010)
New Revision: 27757
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
Log:
[JBIDE-7864]
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-12-27 21:32:12 UTC (rev 27756)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-12-27 22:56:43 UTC (rev 27757)
@@ -590,7 +590,7 @@
public static Driver getServerDriver(String url) throws DeltaCloudException {
try {
- DeltaCloudServerType serverType = new DeltaCloudClientImpl(url, "", "").getServerType();
+ DeltaCloudServerType serverType = new DeltaCloudClientImpl(url).getServerType();
return Driver.valueOf(serverType);
} catch (Exception e) {
// TODO internationalize strings
@@ -620,7 +620,7 @@
} catch (DeltaCloudAuthClientException e) {
return false;
} catch (DeltaCloudClientException e) {
- throw new DeltaCloudException("Could not connection to ", e);
+ throw new DeltaCloudException(MessageFormat.format("Could not connection to cloud \"{0}\" at \"{1}\"", name, url), e);
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2010-12-27 21:32:12 UTC (rev 27756)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2010-12-27 22:56:43 UTC (rev 27757)
@@ -95,8 +95,7 @@
this(url, null, null);
}
- public DeltaCloudClientImpl(String url, String username, String password)
- throws DeltaCloudClientException {
+ public DeltaCloudClientImpl(String url, String username, String password) throws DeltaCloudClientException {
this.baseUrl = createUrl(url);
this.username = username;
this.password = password;
@@ -262,16 +261,13 @@
try {
String apiResponse = requestStringResponse(new TypeRequest(baseUrl));
Document document = getDocument(apiResponse);
- NodeList elements = document
- .getElementsByTagName(DOCUMENT_ELEMENT_API);
+ NodeList elements = document.getElementsByTagName(DOCUMENT_ELEMENT_API);
if (elements.getLength() > 0) {
Node n = elements.item(0);
- Node driver = n.getAttributes().getNamedItem(
- DOCUMENT_ELEMENT_DRIVER);
+ Node driver = n.getAttributes().getNamedItem(DOCUMENT_ELEMENT_DRIVER);
if (driver != null) {
String driverValue = driver.getNodeValue();
- serverType = DeltaCloudServerType.valueOf(driverValue
- .toUpperCase());
+ serverType = DeltaCloudServerType.valueOf(driverValue.toUpperCase());
}
}
} catch (Exception e) {
@@ -311,11 +307,13 @@
String response = requestStringResponse(
new CreateInstanceRequest(baseUrl, imageId, profileId, realmId, name, keyId, memory, storage));
Instance instance = buildInstance(response);
- // TODO: WORKAROUND for https://issues.apache.org/jira/browse/DTACLOUD-11
+ // TODO: WORKAROUND for
+ // https://issues.apache.org/jira/browse/DTACLOUD-11
if (keyId != null) {
instance.setKeyId(keyId);
}
- // TODO: WORKAROUND for https://issues.apache.org/jira/browse/DTACLOUD-11
+ // TODO: WORKAROUND for
+ // https://issues.apache.org/jira/browse/DTACLOUD-11
return instance;
} catch (DeltaCloudClientException e) {
throw e;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-12-27 21:32:12 UTC (rev 27756)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-12-27 22:56:43 UTC (rev 27757)
@@ -20,6 +20,7 @@
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.UpdateValueStrategy;
import org.eclipse.core.databinding.beans.BeanProperties;
+import org.eclipse.core.databinding.conversion.Converter;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.databinding.observable.value.IValueChangeListener;
import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
@@ -267,6 +268,23 @@
}
}
+ private static class TrimTrailingSlashConverter extends Converter {
+
+ public TrimTrailingSlashConverter() {
+ super(String.class, String.class);
+ }
+
+ @Override
+ public Object convert(Object fromObject) {
+ Assert.isLegal(fromObject instanceof String);
+ String url = (String) fromObject;
+ if (url.charAt(url.length() - 1) == '/') {
+ return url.substring(0, url.length() - 1);
+ }
+ return url;
+ }
+ }
+
public CloudConnectionPage(String pageName, CloudConnection cloudConnection) {
super(pageName);
setDescription(WizardMessages.getString(DESCRIPTION));
@@ -325,7 +343,8 @@
BeanProperties.value(
CloudConnectionPageModel.class, CloudConnectionPageModel.PROPERTY_URL).observe(connectionModel),
new UpdateValueStrategy()
- .setAfterGetValidator(new MandatoryStringValidator(WizardMessages.getString(MUST_ENTER_A_URL))),
+ .setAfterGetValidator(new MandatoryStringValidator(WizardMessages.getString(MUST_ENTER_A_URL)))
+ .setConverter(new TrimTrailingSlashConverter()),
null);
// cloud type
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2010-12-27 21:32:12 UTC (rev 27756)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2010-12-27 22:56:43 UTC (rev 27757)
@@ -31,7 +31,7 @@
*/
public class NewCloudConnectionWizard extends Wizard implements INewWizard, CloudConnection {
- private static final String MAINPAGE_NAME = "NewCloudConnection.name"; //$NON-NLS-1$
+ private static final String MAINPAGE_NAME = "CloudConnection.name"; //$NON-NLS-1$
protected CloudConnectionPage mainPage;
protected DeltaCloud initialCloud;
private String pageTitle;
@@ -82,7 +82,7 @@
}
public boolean performTest() {
- String name = mainPage.getName();
+ String name = mainPage.getModel().getName();
String url = mainPage.getModel().getUrl();
String username = mainPage.getModel().getUsername();
String password = mainPage.getModel().getPassword();
@@ -90,7 +90,7 @@
DeltaCloud newCloud = new DeltaCloud(name, url, username, password);
return newCloud.testCredentials();
} catch (DeltaCloudException e) {
- ErrorUtils.handleError(WizardMessages.getString("CloudConnectionAuthError.title"),
+ ErrorUtils.handleErrorAsync(WizardMessages.getString("CloudConnectionAuthError.title"),
WizardMessages.getFormattedString("CloudConnectionAuthError.message", url), e, getShell());
return true;
}
14 years
JBoss Tools SVN: r27756 - in trunk/deltacloud/plugins: org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-27 16:32:12 -0500 (Mon, 27 Dec 2010)
New Revision: 27756
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPageModel.java
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Driver.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DeltaCloudPropertyTester.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
Log:
[JBIDE-7864] added isValid property tester to offer "launch instance" on valid clouds only
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-27 19:55:00 UTC (rev 27755)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-27 21:32:12 UTC (rev 27756)
@@ -1,3 +1,8 @@
+2010-12-27 adietisheim <adietisheim@adietisheim-thinkpad>
+
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java (isValid):
+ [JBIDE-7864] added isValid property tester to offer "launch instance" on valid clouds only
+
2010-12-23 adietisheim <adietisheim@adietisheim-thinkpad>
* src/org/jboss/tools/deltacloud/core/job/AbstractCloudElementJob.java (CLOUDELEMENT.KEYS):
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-12-27 19:55:00 UTC (rev 27755)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-12-27 21:32:12 UTC (rev 27756)
@@ -172,6 +172,11 @@
return driver;
}
+ public boolean isValid() {
+ return driver != null
+ && driver != Driver.UNKNOWN;
+ }
+
public String getLastImageId() {
return lastImageId;
}
@@ -428,7 +433,8 @@
return new DeltaCloudKey(key, this);
} catch (DeltaCloudClientException e) {
// TODO: internationalize strings
- throw new DeltaCloudException(MessageFormat.format("Could not get key \"{0}\" from cloud \"{1}\"", keyId, getName()), e);
+ throw new DeltaCloudException(MessageFormat.format("Could not get key \"{0}\" from cloud \"{1}\"", keyId,
+ getName()), e);
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Driver.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Driver.java 2010-12-27 19:55:00 UTC (rev 27755)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Driver.java 2010-12-27 21:32:12 UTC (rev 27756)
@@ -42,5 +42,4 @@
}
return UNKNOWN;
}
-
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-27 19:55:00 UTC (rev 27755)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-27 21:32:12 UTC (rev 27756)
@@ -1,3 +1,12 @@
+2010-12-27 adietisheim <adietisheim@adietisheim-thinkpad>
+
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java (createControl):
+ * src/org/jboss/tools/deltacloud/ui/commands/DeltaCloudPropertyTester.java
+ (PROPERTY_IS_VALID):
+ (test):
+ (isValid):
+ [JBIDE-7864] added isValid property tester to offer "launch instance" on valid clouds only
+
2010-12-27 adietisheim <adietish(a)redhat.com>
* META-INF/MANIFEST.MF:
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-12-27 19:55:00 UTC (rev 27755)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-12-27 21:32:12 UTC (rev 27756)
@@ -289,7 +289,7 @@
<iterate operator="and">
<adapt
type="org.jboss.tools.deltacloud.core.DeltaCloud">
- <test property="org.jboss.tools.deltacloud.ui.commands.hasImages"
+ <test property="org.jboss.tools.deltacloud.ui.commands.isValid"
value="true"/>
</adapt>
</iterate>
@@ -782,7 +782,7 @@
class="org.jboss.tools.deltacloud.ui.commands.DeltaCloudPropertyTester"
id="org.jboss.tools.deltacloud.ui.commands.cloudpropertytester"
namespace="org.jboss.tools.deltacloud.ui.commands"
- properties="hasImages"
+ properties="hasImages,isValid"
type="org.jboss.tools.deltacloud.core.DeltaCloud">
</propertyTester>
</extension>
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DeltaCloudPropertyTester.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DeltaCloudPropertyTester.java 2010-12-27 19:55:00 UTC (rev 27755)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DeltaCloudPropertyTester.java 2010-12-27 21:32:12 UTC (rev 27756)
@@ -26,6 +26,7 @@
public class DeltaCloudPropertyTester extends PropertyTester {
private static final String PROPERTY_HAS_IMAGES = "hasImages";
+ private static final String PROPERTY_IS_VALID = "isValid";
@Override
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
@@ -37,6 +38,11 @@
if (PROPERTY_HAS_IMAGES.equals(property)) {
return equalsExpectedValue(getImages(cloud), true);
}
+
+ if (PROPERTY_IS_VALID.equals(property)) {
+ return equalsExpectedValue(isValid(cloud), true);
+ }
+
return false;
}
@@ -54,4 +60,15 @@
return expectedBoolean.equals(images.length > 0);
}
+ private boolean isValid(DeltaCloud cloud) {
+ return cloud != null
+ && cloud.isValid();
+ }
+
+ private boolean equalsExpectedValue(boolean value, Object expectedValue) {
+ Assert.isTrue(expectedValue instanceof Boolean);
+ Boolean expectedBoolean = (Boolean) expectedValue;
+ return expectedBoolean.equals(value);
+ }
+
}
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java 2010-12-27 19:55:00 UTC (rev 27755)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java 2010-12-27 21:32:12 UTC (rev 27756)
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * 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.ui.wizards;
-
-import java.net.MalformedURLException;
-
-import org.jboss.tools.deltacloud.core.Driver;
-import org.jboss.tools.internal.deltacloud.core.observable.ObservablePojo;
-
-/**
- * @author Andre Dietisheim
- */
-public class CloudConnectionModel extends ObservablePojo {
-
- public static final String PROPERTY_URL = "url"; //$NON-NLS-1$
- public static final String PROPERTY_NAME = "name"; //$NON-NLS-1$
- public static final String PROPERTY_PASSWORD = "password"; //$NON-NLS-1$
- public static final String PROPERTY_USERNAME = "username"; //$NON-NLS-1$
- public static final String PROPERTY_DRIVER = "type"; //$NON-NLS-1$
-
- public static final String UNKNOWN_TYPE_LABEL = "UnknownType.label"; //$NON-NLS-1$
- public static final String INVALID_URL = "ErrorInvalidURL.text"; //$NON-NLS-1$
- public static final String NONCLOUD_URL = "ErrorNonCloudURL.text"; //$NON-NLS-1$
-
- private String name;
- private String url;
- private String username;
-
- private String password;
- private Driver driver;
- private String initialName;
-
- public CloudConnectionModel() {
- this("", "", "", "", (Driver) null);
- }
-
- public CloudConnectionModel(String name, String url, String username, String password) throws MalformedURLException {
- this(name, url, username, password, (Driver) null);
- }
-
- public CloudConnectionModel(String name, String url, String username, String password, Driver cloudType) {
- this.name = name;
- this.initialName = name;
- this.url = url;
- this.username = username;
- this.password = password;
- this.driver = cloudType;
- }
-
- public String getUsername() {
- return username;
- }
-
- public void setUsername(String username) {
- getPropertyChangeSupport().firePropertyChange(PROPERTY_USERNAME, this.username, this.username = username);
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- getPropertyChangeSupport().firePropertyChange(PROPERTY_PASSWORD, this.password, this.password = password);
- }
-
- public String getInitialName() {
- return initialName;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- getPropertyChangeSupport().firePropertyChange(PROPERTY_NAME, this.name, this.name = name);
- }
-
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- getPropertyChangeSupport().firePropertyChange(PROPERTY_URL, this.url, this.url = url);
- }
-
- public Driver getDriver() {
- return driver;
- }
-
- public void setType(Driver cloudType) {
- getPropertyChangeSupport().firePropertyChange(PROPERTY_DRIVER, this.driver, this.driver = cloudType);
- }
-}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-12-27 19:55:00 UTC (rev 27755)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-12-27 21:32:12 UTC (rev 27756)
@@ -94,7 +94,7 @@
private static final String MUST_ENTER_A_NAME = "ErrorMustNameConnection.text"; //$NON-NLS-1$
private static final String MUST_ENTER_A_URL = "ErrorMustProvideUrl.text"; //$NON-NLS-1$;
- private CloudConnectionModel connectionModel;
+ private CloudConnectionPageModel connectionModel;
private CloudConnection cloudConnection;
private Listener linkListener = new Listener() {
@@ -241,7 +241,7 @@
* name the connection had before editing.
*
* @see IValidator
- * @see CloudConnectionModel#getInitialName()
+ * @see CloudConnectionPageModel#getInitialName()
* @see DeltaCloudManager#findCloud(String)
*
*/
@@ -272,7 +272,7 @@
setDescription(WizardMessages.getString(DESCRIPTION));
setTitle(WizardMessages.getString(TITLE));
setImageDescriptor(SWTImagesFactory.DESC_DELTA_LARGE);
- this.connectionModel = new CloudConnectionModel();
+ this.connectionModel = new CloudConnectionPageModel();
this.cloudConnection = cloudConnection;
}
@@ -283,12 +283,11 @@
initial.getPassword(), initial.getDriver(), connection);
}
- public CloudConnectionPage(String pageName, String defaultName, String defaultUrl,
- String defaultUsername, String defaultPassword, Driver defaultDriver,
- CloudConnection cloudConnection) throws MalformedURLException {
+ public CloudConnectionPage(String pageName, String defaultName, String defaultUrl, String defaultUsername,
+ String defaultPassword, Driver defaultDriver, CloudConnection cloudConnection) throws MalformedURLException {
super(pageName);
- this.connectionModel = new CloudConnectionModel(defaultName, defaultUrl, defaultUsername, defaultPassword,
- defaultDriver);
+ this.connectionModel =
+ new CloudConnectionPageModel(defaultName, defaultUrl, defaultUsername, defaultPassword, defaultDriver);
this.cloudConnection = cloudConnection;
setDescription(WizardMessages.getString(DESCRIPTION));
setTitle(WizardMessages.getString(TITLE));
@@ -324,21 +323,22 @@
dbc.bindValue(
WidgetProperties.text(SWT.Modify).observe(urlText),
BeanProperties.value(
- CloudConnectionModel.class, CloudConnectionModel.PROPERTY_URL).observe(connectionModel),
+ CloudConnectionPageModel.class, CloudConnectionPageModel.PROPERTY_URL).observe(connectionModel),
new UpdateValueStrategy()
.setAfterGetValidator(new MandatoryStringValidator(WizardMessages.getString(MUST_ENTER_A_URL))),
null);
- String url = new StringPreferenceValue(IPreferenceKeys.LAST_URL, Activator.PLUGIN_ID)
- .get(urlText.getText());
- urlText.setText(url);
-
// cloud type
Label typeLabel = new Label(container, SWT.NULL);
typeLabel.setText(WizardMessages.getString(CLOUDTYPE_LABEL));
Label computedTypeLabel = new Label(container, SWT.NULL);
Binding urlTypeBinding = bindCloudType(dbc, urlText, computedTypeLabel);
+ // set url from preferences
+ String url =
+ new StringPreferenceValue(IPreferenceKeys.LAST_URL, Activator.PLUGIN_ID).get(urlText.getText());
+ urlText.setText(url);
+
// username
Label usernameLabel = new Label(container, SWT.NULL);
usernameLabel.setText(WizardMessages.getString(USERNAME_LABEL));
@@ -346,7 +346,7 @@
IObservableValue usernameObservable = WidgetProperties.text(SWT.Modify).observe(usernameText);
dbc.bindValue(
usernameObservable,
- BeanProperties.value(CloudConnectionModel.class, CloudConnectionModel.PROPERTY_USERNAME)
+ BeanProperties.value(CloudConnectionPageModel.class, CloudConnectionPageModel.PROPERTY_USERNAME)
.observe(connectionModel));
// password
@@ -356,8 +356,9 @@
ISWTObservableValue passwordTextObservable = WidgetProperties.text(SWT.Modify).observe(passwordText);
dbc.bindValue(
passwordTextObservable,
- BeanProperties.value(CloudConnectionModel.class, CloudConnectionModel.PROPERTY_PASSWORD).observe(
- connectionModel));
+ BeanProperties.value(CloudConnectionPageModel.class, CloudConnectionPageModel.PROPERTY_PASSWORD)
+ .observe(
+ connectionModel));
// test button
final Button testButton = new Button(container, SWT.NULL);
testButton.setText(WizardMessages.getString(TESTBUTTON_LABEL));
@@ -507,9 +508,8 @@
// bind url to cloud type in model
Binding urlTypeBinding = dbc.bindValue(
- WidgetProperties.text(SWT.Modify).observeDelayed(CLOUDTYPE_CHECK_DELAY,
- urlText),
- BeanProperties.value(CloudConnectionModel.PROPERTY_DRIVER).observe(connectionModel),
+ WidgetProperties.text(SWT.Modify).observeDelayed(CLOUDTYPE_CHECK_DELAY, urlText),
+ BeanProperties.value(CloudConnectionPageModel.PROPERTY_DRIVER).observe(connectionModel),
updateStrategy,
new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER));
/*
@@ -542,7 +542,7 @@
private void bindName(DataBindingContext dbc, final Text nameText) {
Binding nameTextBinding = dbc.bindValue(
WidgetProperties.text(SWT.Modify).observe(nameText),
- BeanProperties.value(CloudConnectionModel.class, CloudConnectionModel.PROPERTY_NAME)
+ BeanProperties.value(CloudConnectionPageModel.class, CloudConnectionPageModel.PROPERTY_NAME)
.observe(connectionModel),
new UpdateValueStrategy().setBeforeSetValidator(
new CompositeValidator(
@@ -552,7 +552,7 @@
ControlDecorationSupport.create(nameTextBinding, SWT.LEFT | SWT.TOP);
}
- public CloudConnectionModel getModel() {
+ public CloudConnectionPageModel getModel() {
return connectionModel;
}
}
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPageModel.java (from rev 27583, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPageModel.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPageModel.java 2010-12-27 21:32:12 UTC (rev 27756)
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * 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.ui.wizards;
+
+import java.net.MalformedURLException;
+
+import org.jboss.tools.deltacloud.core.Driver;
+import org.jboss.tools.internal.deltacloud.core.observable.ObservablePojo;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class CloudConnectionPageModel extends ObservablePojo {
+
+ public static final String PROPERTY_URL = "url"; //$NON-NLS-1$
+ public static final String PROPERTY_NAME = "name"; //$NON-NLS-1$
+ public static final String PROPERTY_PASSWORD = "password"; //$NON-NLS-1$
+ public static final String PROPERTY_USERNAME = "username"; //$NON-NLS-1$
+ public static final String PROPERTY_DRIVER = "driver"; //$NON-NLS-1$
+
+ public static final String UNKNOWN_TYPE_LABEL = "UnknownType.label"; //$NON-NLS-1$
+ public static final String INVALID_URL = "ErrorInvalidURL.text"; //$NON-NLS-1$
+ public static final String NONCLOUD_URL = "ErrorNonCloudURL.text"; //$NON-NLS-1$
+
+ private String name;
+ private String url;
+ private String username;
+
+ private String password;
+ private Driver driver;
+ private String initialName;
+
+ public CloudConnectionPageModel() {
+ this("", "", "", "", Driver.UNKNOWN);
+ }
+
+ public CloudConnectionPageModel(String name, String url, String username, String password) throws MalformedURLException {
+ this(name, url, username, password, Driver.UNKNOWN);
+ }
+
+ public CloudConnectionPageModel(String name, String url, String username, String password, Driver driver) {
+ this.name = name;
+ this.initialName = name;
+ this.url = url;
+ this.username = username;
+ this.password = password;
+ this.driver = driver;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ firePropertyChange(PROPERTY_USERNAME, this.username, this.username = username);
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ firePropertyChange(PROPERTY_PASSWORD, this.password, this.password = password);
+ }
+
+ public String getInitialName() {
+ return initialName;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ firePropertyChange(PROPERTY_NAME, this.name, this.name = name);
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ firePropertyChange(PROPERTY_URL, this.url, this.url = url);
+ }
+
+ public Driver getDriver() {
+ return driver;
+ }
+
+ public void setDriver(Driver driver) {
+ firePropertyChange(PROPERTY_DRIVER, this.driver, this.driver = driver);
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPageModel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years
JBoss Tools SVN: r27755 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-27 14:55:00 -0500 (Mon, 27 Dec 2010)
New Revision: 27755
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
Log:
corrected email-address
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-27 19:53:54 UTC (rev 27754)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-27 19:55:00 UTC (rev 27755)
@@ -1,4 +1,4 @@
-2010-12-27 adietisheim <adietisheim@adietisheim-thinkpad>
+2010-12-27 adietisheim <adietish(a)redhat.com>
* META-INF/MANIFEST.MF:
[JBIDE-7760] added dependency to org.eclipse.jsch.core (which holds the ssh preferences)
@@ -9,7 +9,7 @@
* src/org/jboss/tools/internal/deltacloud/ui/wizards/PemFileManager.java:
[JBIDE-7763] adding/removing the key to/from the ssh preferences (Network Connections -> SSH2 -> Private keys)
-2010-12-25 adietisheim <adietisheim@adietisheim-thinkpad>
+2010-12-25 adietisheim <adietish(a)redhat.com>
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePageModel.java:
[JBIDE-8000] switched to observable pojo that notifies in UI thread only
@@ -18,14 +18,14 @@
(bindProfileCombo):
[JBIDE-8000] corrected binding order (first bind items, then selected item, then enablement)
-2010-12-23 adietisheim <adietisheim@adietisheim-thinkpad>
+2010-12-23 adietisheim <adietish(a)redhat.com>
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java:
* src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysWizard.java:
* src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java:
[JBIDE-7763] revamped the whole manage keys page to deal with keys on the server (list, refresh, create, delete)
-2010-12-22 adietisheim <adietisheim@adietisheim-thinkpad>
+2010-12-22 adietisheim <adietish(a)redhat.com>
* src/org/jboss/tools/deltacloud/ui/views/cloudelements/InstanceViewLabelAndContentProvider.java (asyncAddCloudElements):
* src/org/jboss/tools/deltacloud/ui/views/cloudelements/ImageViewLabelAndContentProvider.java (asyncAddCloudElements):
@@ -313,7 +313,7 @@
* src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java (performTest):
fixed NPE
-2010-11-24 adietisheim <adietisheim@adietisheim-thinkpad>
+2010-11-24 adietisheim <adietish(a)redhat.com>
slide
* src/org/jboss/tools/deltacloud/ui/views/InstanceView.java (.modifyText):
[JBIDE-7694] removed refresh(es) of tableViewer (setInput should be enough),
14 years
JBoss Tools SVN: r27754 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-27 14:53:54 -0500 (Mon, 27 Dec 2010)
New Revision: 27754
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/AbstractPreferenceValue.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringEntriesPreferenceValue.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringPreferenceValue.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/PemFileManager.java
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/TextPreferenceValue.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/PemFileFactory.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
Log:
adding/removing the key to/from the ssh preferences (Network Connections -> SSH2 -> Private keys)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-27 19:51:30 UTC (rev 27753)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-27 19:53:54 UTC (rev 27754)
@@ -1,3 +1,14 @@
+2010-12-27 adietisheim <adietisheim@adietisheim-thinkpad>
+
+ * META-INF/MANIFEST.MF:
+ [JBIDE-7760] added dependency to org.eclipse.jsch.core (which holds the ssh preferences)
+ * src/org/jboss/tools/internal/deltacloud/ui/preferences/StringEntriesPreferenceValue.java:
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java
+ (createKey):
+ (deleteSelectedKey):
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/PemFileManager.java:
+ [JBIDE-7763] adding/removing the key to/from the ssh preferences (Network Connections -> SSH2 -> Private keys)
+
2010-12-25 adietisheim <adietisheim@adietisheim-thinkpad>
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePageModel.java:
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch 2010-12-27 19:51:30 UTC (rev 27753)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch 2010-12-27 19:53:54 UTC (rev 27754)
@@ -11,7 +11,7 @@
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Deltacloud Tools"/>
<booleanAttribute key="default" value="false"/>
-<stringAttribute key="deselected_workspace_plugins" value="org.jboss.tools.ui.bot.ext,org.jboss.tools.common.projecttemplates,org.jboss.tools.tests.performance,org.jboss.tools.common.el.core,org.jboss.ide.eclipse.as.ui.mbeans,org.jboss.tools.common.gef,org.jboss.ide.eclipse.as.archives.integration.test,org.jboss.tools.common.verification.test,org.jboss.tools.common.verification,org.jboss.ide.eclipse.archives.jdt.integration,org.jboss.tools.jmx.core.test,org.jboss.tools.common.model,org.jboss.ide.eclipse.as.classpath.core,org.jboss.ide.eclipse.archives.test,org.jboss.ide.eclipse.as.classpath.ui,org.jboss.tools.common.ui,org.jboss.tools.common.text.ext,org.jboss.tools.ui.bot.ext.test,org.jboss.tools.common.el.core.test,org.jboss.tools.common.model.ui.test,org.jboss.tools.tests,org.jboss.tools.common.text.xml,org.jboss.ide.eclipse.as.ui.test,org.jboss.tools.common.meta.ui,org.jboss.tools.deltacloud.docs,org.jboss.ide.eclipse.as.rse.ui,org.jboss.tools.common.verification.ui.tes!
t,org.jboss.tools.common.verification.ui,org.jboss.tools.common.test,org.jboss.tools.common.model.ui.capabilities,org.jboss.tools.common.resref.core,org.jboss.ide.eclipse.as.test,org.jboss.tools.common.el.ui,org.jboss.tools.deltacloud.test,org.jboss.tools.jmx.ui.test,org.jboss.ide.eclipse.as.ssh,org.jboss.tools.common.resref.ui,org.jboss.ide.eclipse.archives.ui.test,org.jboss.ide.eclipse.as.doc.user,org.jboss.tools.common.model.ui,org.jboss.tools.common.model.test"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.jboss.tools.ui.bot.ext,org.jboss.tools.common.projecttemplates,org.jboss.tools.tests.performance,org.jboss.tools.common.el.core,org.jboss.ide.eclipse.as.ui.mbeans,org.jboss.tools.common.gef,org.jboss.ide.eclipse.as.archives.integration.test,org.jboss.tools.common.verification.test,org.jboss.tools.common.verification,org.jboss.tools.jmx.core.test,org.jboss.ide.eclipse.archives.jdt.integration,org.jboss.tools.common.model,org.jboss.ide.eclipse.as.classpath.core,org.jboss.ide.eclipse.archives.test,org.jboss.ide.eclipse.as.classpath.ui,org.jboss.tools.common.ui,org.jboss.tools.common.text.ext,org.jboss.tools.ui.bot.ext.test,org.jboss.tools.common.el.core.test,org.jboss.tools.common.model.ui.test,org.jboss.tools.tests,org.jboss.tools.common.text.xml,org.jboss.ide.eclipse.as.ui.test,org.jboss.tools.common.meta.ui,org.jboss.tools.deltacloud.docs,org.jboss.ide.eclipse.as.rse.ui,org.jboss.tools.common.verification.ui.tes!
t,org.jboss.tools.common.verification.ui,org.jboss.tools.common.test,org.jboss.tools.common.model.ui.capabilities,org.jboss.tools.common.resref.core,org.jboss.ide.eclipse.as.test,org.jboss.tools.common.el.ui,org.jboss.tools.deltacloud.test,org.jboss.tools.jmx.ui.test,org.jboss.ide.eclipse.as.ssh,org.jboss.tools.common.resref.ui,org.jboss.ide.eclipse.archives.ui.test,org.jboss.ide.eclipse.as.doc.user,org.jboss.tools.common.model.ui,org.jboss.tools.common.model.test"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../runtime-deltacloud"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
@@ -24,8 +24,8 @@
<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"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.wst.sse.core@default:default,org.eclipse.emf.codegen@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.rse.terminals.ui@default:default,org.eclipse.equinox.p2.operations@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.rse.files.ui@default:default,org.eclipse.pde.core@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.jdt.debug.ui@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.jst.server.ui@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.wst.sse.ui@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.ecf@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.core.runtime@default:true,org.eclipse.wst.common.modulecore@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.team.ui@default:default,org.ecl!
ipse.team.core@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ecf.ssl@default:false,org.apache.lucene@default:default,org.eclipse.rse.services.telnet@default:default,org.eclipse.rse.services.local@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.wst.jsdt.ui@default:default,org.eclipse.wst.web.ui@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.rse.services.files.ftp@default:default,org.eclipse.jst.server.core@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.core.databinding.property@default:default,org.sat4j.core@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.jst.common.project.facet.core@default:default,org.eclipse.wst.css.core@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.apache.commons.codec*1.3.0.v20!
100518-1140@default:default,org.eclipse.rse.connectorservice.d!
store@de
fault:default,org.apache.jasper@default:default,org.eclipse.rse.subsystems.processes.core@default:default,org.eclipse.ui.intro@default:default,org.eclipse.wst.common.emf@default:default,org.apache.commons.net@default:default,org.eclipse.platform@default:default,org.eclipse.rse.subsystems.shells.local@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.jem.util@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.rse.subsystems.processes.shell.linux@default:default,org.eclipse.equinox.app@default:default,org.eclipse.wst.internet.monitor.core@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.wst.common.ui@default:default,org.eclipse.emf.ecore@default:default,javax.xml@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.jst.common.project.facet.ui@default:default,org.eclipse.rse.shells.ui@default:default,org!
.eclipse.rse.processes.ui@default:default,org.mortbay.jetty.server@default:default,org.eclipse.rse.subsystems.files.core@default:default,org.apache.xml.serializer@default:default,org.eclipse.rse.importexport@default:default,org.eclipse.rse.subsystems.processes.local@default:default,org.eclipse.rse.subsystems.files.ssh@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.core.commands@default:default,org.eclipse.rse.useractions@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.wst.server.ui.infopop@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.wst.web@default:default,org.eclipse.wst.common.project.facet.ui@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclip!
se.ui.ide@default:default,org.eclipse.jdt.debug@default:defaul!
t,org.ec
lipse.update.configurator@3:true,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.wst.html.ui@default:default,org.eclipse.equinox.security@default:default,org.eclipse.pde.build@default:default,org.eclipse.rse.services.dstore@default:default,org.eclipse.ui.editors@default:default,org.eclipse.jem.proxy@default:default,org.eclipse.wst.validation@default:default,org.eclipse.rse.subsystems.shells.telnet@default:default,org.eclipse.core.net@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.ui.browser@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.osgi.util@default:default,org.eclipse.jst.j2ee.jca@default:default,org.eclipse.rse.services.ssh@default:default,org.eclipse.jst.j2ee@default:default,javax.servlet@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.rse.subsystems.terminals.ssh@default:default,org.eclipse.jem.beaninfo.vm@default:default,o!
rg.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.jst.j2ee.navigator.ui@default:default,org.eclipse.rse.connectorservice.ssh@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.rse.subsystems.files.ftp@default:default,org.eclipse.rse.connectorservice.telnet@default:default,org.eclipse.wst.common.modulecore.ui@default:default,org.eclipse.rse.subsystems.shells.ssh@default:default,org.eclipse.rse.efs.ui@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.osgi.services@default:default,com.ibm.icu@default:default,org.apache.lucene.analysis@default:default,org.eclipse.wst.html.core@default:default,org.eclipse.ui.forms@default:default,org.eclipse.wst.css.ui@default:default,org.apache.xml.resolver@default:default,org.eclipse.rse.subsystems.files.local@default:default,org.eclipse.wst.jsdt.manipulation@default:default,org.eclipse.equinox.p2!
.repository.tools@default:default,org.eclipse.equinox.p2.metad!
ata@defa
ult:default,org.eclipse.search@default:default,org.eclipse.rse.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.rse.connectorservice.local@default:default,javax.servlet.jsp@default:default,org.apache.ant@default:default,org.eclipse.wst.jsdt.core@default:default,org.eclipse.sdk@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.rse.subsystems.shells.core@default:default,com.jcraft.jsch@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.hamcrest.core@default:default,org.eclipse.jst.j2ee.ui@default:default,org.eclipse.jem.beaninfo@default:default,org.eclipse.core.expressions@default:default,org.eclipse.jem.workbench@default:default,org.eclipse.jdt.core@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.ec!
lipse.jem@default:default,org.eclipse.text@default:default,org.eclipse.jsch.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.osgi@-1:true,org.eclipse.jst.common.ui@default:default,org.eclipse.help.ui@default:default,org.eclipse.rse.core@default:default,org.apache.xerces@default:default,org.eclipse.core.resources@default:default,org.eclipse.jface.text@default:default,org.eclipse.wst.xml.ui@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.rse.subsystems.terminals.core@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.variables@default:default,org.eclipse.jdt@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jst.jee@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.console@default:default,org.eclipse.wst.common.uriresolver@d!
efault:default,org.eclipse.rse.subsystems.files.dstore@default!
:default
,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.jdt.launching@default:default,org.eclipse.ui@default:default,org.eclipse.rse.subsystems.processes.dstore@default:default,org.apache.commons.el@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.debug.ui@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.jface@default:default,org.eclipse.ui.views@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.emf.common@default:default,org.eclipse.jst.common.annotations.controller@default:default,org.eclipse.help.base@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.help@default:default,org.eclipse.rse.subsystems.shells.dstore@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.rse.dstore.security@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.jst.j2ee.web@default:default,org.eclipse.wst.!
server.ui.doc.user@default:default,org.sat4j.pb@default:default,org.mortbay.jetty.util@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.compare@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.jem.beaninfo.vm.common@default:default,org.eclipse.rse.efs@default:default,org.eclipse.jst.servlet.ui@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.dstore.extra@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.jst.jee.ui@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.wst.common.frameworks.ui@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.jst.common.frameworks@default:default,org.eclipse.wst.server.discovery@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.rse.services@default:default,org.eclipse.equinox.p2.director@d!
efault:default,org.eclipse.update.core@default:default,org.ecl!
ipse.swt
@default:default,org.eclipse.jst.common.annotations.core@default:default,org.eclipse.core.databinding@default:default,org.eclipse.jst.j2ee.ejb.annotation.model@default:default,org.junit4@default:default,org.eclipse.wst.server.ui@default:default,org.eclipse.jst.j2ee.ejb@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.dstore.core@default:default,org.eclipse.tm.terminal@default:default,org.eclipse.wst.server.core@default:default,org.eclipse.jst.j2ee.core@default:default,org.eclipse.debug.core@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.jst.j2ee.jca.ui@default:default,org.eclipse.rse.doc.user@default:default,org.eclipse.wst.common.project.facet.core@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.ide.eclipse.as.rse.core@default:default,org.jboss.ide.eclipse.as.ui@default:default,org.jboss.tools.jmx.ui@default:default,org.jboss.ide.eclipse.as.core@default:default,org.jboss.ide.eclipse.archives.ui@default:default,org.jboss.tools.deltacloud.ui@default:default,org.jboss.ide.eclipse.archives.core@default:default,org.jboss.ide.eclipse.as.wtp.core@default:default,org.jboss.tools.common@default:default,org.jboss.ide.eclipse.archives.webtools@default:default,org.jboss.tools.deltacloud.integration@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.jmx.core@default:default,org.jboss.ide.eclipse.as.wtp.ui@default:default"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.rse.subsystems.terminals.core@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.wst.server.core@default:default,org.eclipse.rse.services.files.ftp@default:default,org.eclipse.jem.beaninfo.vm.common@default:default,org.eclipse.compare.core@default:default,org.eclipse.team.core@default:default,org.eclipse.wst.common.project.facet.ui@default:default,org.eclipse.rse.connectorservice.local@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.wst.css.core@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.jst.j2ee.ejb.annotation.model@default:default,org.eclipse.wst.css.ui@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.core.commands@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.ui.navigator.resources@default:default,org.ec!
lipse.rse.connectorservice.ssh@default:default,org.apache.ant@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.jst.j2ee.jca@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.rse.subsystems.processes.dstore@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.jst.j2ee.ui@default:default,org.eclipse.wst.common.modulecore@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.jst.common.annotations.core@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.rse.files.ui@default:default,org.eclipse.rse.terminals.ui@default:default,org.eclipse.platform@default:default,org.eclipse.jdt.core@default:default,org.eclipse.jem@default:default,org.eclipse.pde.core@default:default,org.eclipse.swt.gtk.linux.x86_6!
4@default:false,org.eclipse.jem.util@default:default,org.eclip!
se.rse.u
i@default:default,org.eclipse.rse.subsystems.shells.dstore@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,com.ibm.icu@default:default,org.eclipse.rse.processes.ui@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.help@default:default,org.eclipse.jst.jee.ui@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.help.ui@default:default,org.eclipse.jst.j2ee.web@default:default,org.eclipse.search@default:default,org.eclipse.wst.jsdt.ui@default:default,org.eclipse.wst.jsdt.manipulation@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.rse.services@default:default,org.eclipse.tm.terminal.view@default:default,org.eclipse.equinox.p2.ui@default:default,org.apache.xml.serializer@default:default,org.eclipse.rse.doc.user@default:default,org.eclipse.debug.ui@default:default,org.eclipse.tm.term!
inal.ssh@default:default,org.eclipse.core.variables@default:default,org.eclipse.wst.common.ui@default:default,org.eclipse.rse.subsystems.shells.local@default:default,org.eclipse.ui.intro@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.dstore.core@default:default,org.eclipse.wst.web.ui@default:default,org.eclipse.ant.core@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.wst.validation@default:default,org.eclipse.jface.text@default:default,org.eclipse.ecf.identity@default:default,org.sat4j.core@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.update.configurator@3:true,org.eclipse.jst.server.core@default:default,org.eclipse.rse.subsystems.files.dstore@default:default,org.eclipse.compare@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.wst.server.ui.infopop@default:default,org.eclipse.rse.subsystems!
.processes.core@default:default,org.junit*4.8.1.v4_8_1_v201004!
27-1100@
default:default,org.eclipse.swt@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.pde.build@default:default,javax.servlet.jsp@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.rse.efs.ui@default:default,org.hamcrest.core@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.apache.lucene@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.runtime@default:true,org.eclipse.wst.server.ui@default:default,org.eclipse.jst.server.ui@default:default,org.eclipse.wst.server.ui.doc.user@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.jface@default:default,org.eclipse.debug.!
core@default:default,javax.xml@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.rse.services.ssh@default:default,org.eclipse.jdt.ui@default:default,org.apache.commons.el@default:default,org.mortbay.jetty.server@default:default,org.eclipse.cdt.core@default:default,org.eclipse.jst.j2ee.jca.ui@default:default,org.eclipse.core.databinding@default:default,org.eclipse.wst.xml.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.osgi.util@default:default,org.eclipse.jst.common.ui@default:default,org.eclipse.equinox.security@default:default,org.eclipse.osgi@-1:true,org.eclipse.ui.ide@default:default,org.eclipse.help.base@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.rse.connectorservice.telnet@default:default,org.eclipse.core.net@default:default,org.apache.xerces@default:default,org.eclipse.rse.dstore.security@defaul!
t:default,org.eclipse.jem.beaninfo.vm@default:default,org.ecli!
pse.ui.b
rowser@default:default,org.eclipse.jem.beaninfo@default:default,org.eclipse.jdt@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.wst.jsdt.core@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.jst.j2ee.navigator.ui@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.wst.server.discovery@default:default,org.eclipse.rse.subsystems.terminals.ssh@default:default,org.eclipse.rse.subsystems.shells.ssh@default:default,org.eclipse.ui@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.rse.subsystems.files.local@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.wst.common.modulecore.ui@default:default,org.apache.lucene.analysis@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.jdt.launching@default:default,o!
rg.eclipse.osgi.services@default:default,org.eclipse.dstore.extra@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.ecf@default:default,org.eclipse.rse.services.local@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.tm.terminal@default:default,org.eclipse.rse.core@default:default,org.eclipse.text@default:default,org.eclipse.jst.common.annotations.controller@default:default,org.eclipse.ui.editors@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.ui.net@default:default,org.eclipse.jst.common.project.facet.ui@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.emf.codegen@default:default,org.junit4@default:default,org.eclipse.jst.j2ee.core@default:default,org.eclipse.jst.j2ee@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.apache.commons.httpclient*3.1.0.v201005080502@defaul!
t:default,org.eclipse.rse.subsystems.files.ssh@default:default!
,org.ecl
ipse.ltk.core.refactoring@default:default,org.eclipse.jst.common.project.facet.core@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.sdk@default:default,org.apache.xml.resolver@default:default,org.eclipse.emf.edit@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.wst.xml.core@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.wst.sse.ui@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.common@2:true,org.eclipse.jst.j2ee.ejb@default:default,org.apache.jasper@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.emf.edit.ui@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jem.workbench@default:default,org.eclipse.cdt.ui@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.wst.sse.core@default:de!
fault,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.jst.servlet.ui@default:default,org.eclipse.ui.console@default:default,org.eclipse.jst.common.frameworks@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.jst.jee@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.rse.services.telnet@default:default,org.eclipse.rse.subsystems.shells.telnet@default:default,org.eclipse.rse.subsystems.processes.shell.linux@default:default,org.mortbay.jetty.util@default:default,org.eclipse.team.ui@default:default,org.eclipse.rse.shells.ui@default:default,org.eclipse.jem.proxy@default:default,org.eclipse.tm.terminal.telnet@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.jsch.core@default:default,org.eclipse.rse.subsystems.files.core@default:default,org.eclipse.equinox.security.ui@default:de!
fault,org.eclipse.wst.html.core@default:default,org.eclipse.rs!
e.connec
torservice.dstore@default:default,org.eclipse.rse.efs@default:default,org.eclipse.update.core@default:default,org.eclipse.rse.services.dstore@default:default,org.eclipse.rse.subsystems.shells.core@default:default,org.eclipse.rse.subsystems.files.ftp@default:default,org.eclipse.core.resources@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.wst.html.ui@default:default,org.eclipse.rse.subsystems.processes.local@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ui.views@default:default,org.eclipse.rse.useractions@default:default,org.apache.commons.net@default:default,javax.servlet@default:default,com.jcraft.jsch@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.wst.common.frameworks.ui@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.rse.importexport@default:default,org.eclipse.wst.web@default:default,org.eclipse.c!
ore.net.linux.x86_64@default:false,org.eclipse.wst.internet.monitor.core@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.jsch.core@default:default,org.jboss.ide.eclipse.archives.core@default:default,org.jboss.tools.deltacloud.integration@default:default,org.jboss.ide.eclipse.as.wtp.core@default:default,org.eclipse.rse.connectorservice.ssh@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.ide.eclipse.as.core@default:default,org.jboss.tools.jmx.core@default:default,org.jboss.ide.eclipse.archives.webtools@default:default,org.eclipse.ui.net@default:default,org.jboss.ide.eclipse.as.ui@default:default,org.jboss.ide.eclipse.as.rse.core@default:default,org.jboss.tools.jmx.ui@default:default,org.jboss.tools.common@default:default,org.jboss.ide.eclipse.as.wtp.ui@default:default,org.eclipse.rse.services.ssh@default:default,org.jboss.tools.deltacloud.ui@default:default,org.eclipse.rse.subsystems.shells.ssh@default:default,org.eclipse.jsch.ui@default:default,org.jboss.ide.eclipse.archives.ui@default:default,org.ec!
lipse.rse.subsystems.files.ssh@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/>
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2010-12-27 19:51:30 UTC (rev 27753)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2010-12-27 19:53:54 UTC (rev 27754)
@@ -20,7 +20,8 @@
org.eclipse.core.databinding.beans;bundle-version="[1.2.100,2.0.0)",
org.eclipse.core.expressions;bundle-version="[3.4.200,4.0.0)",
org.eclipse.equinox.security;bundle-version="[1.0.100,2.0.0)",
- org.eclipse.equinox.security.ui;bundle-version="1.0.200"
+ org.eclipse.equinox.security.ui;bundle-version="1.0.200",
+ org.eclipse.jsch.core;bundle-version="1.1.200"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.deltacloud.ui,
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java 2010-12-27 19:51:30 UTC (rev 27753)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java 2010-12-27 19:53:54 UTC (rev 27754)
@@ -52,7 +52,7 @@
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
import org.jboss.tools.deltacloud.ui.views.CVMessages;
-import org.jboss.tools.internal.deltacloud.ui.preferences.TextPreferenceValue;
+import org.jboss.tools.internal.deltacloud.ui.preferences.StringPreferenceValue;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
/**
@@ -77,7 +77,7 @@
private Label currentCloudSelectorLabel;
private TableViewer viewer;
private DeltaCloud currentCloud;
- private TextPreferenceValue lastSelectedCloudPref;
+ private StringPreferenceValue lastSelectedCloudPref;
private Composite container;
private ModifyListener currentCloudModifyListener = new ModifyListener() {
@@ -144,7 +144,7 @@
};
public AbstractCloudElementTableView() {
- lastSelectedCloudPref = new TextPreferenceValue(getSelectedCloudPrefsKey(), Activator.getDefault());
+ lastSelectedCloudPref = new StringPreferenceValue(getSelectedCloudPrefsKey(), Activator.PLUGIN_ID);
}
private boolean isNewCloud(DeltaCloud cloud) {
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/AbstractPreferenceValue.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/AbstractPreferenceValue.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/AbstractPreferenceValue.java 2010-12-27 19:53:54 UTC (rev 27754)
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * 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.ui.preferences;
+
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
+
+/**
+ * @author Andre Dietisheim
+ */
+public abstract class AbstractPreferenceValue<TYPE> {
+
+ private String pluginId;
+ private String prefsKey;
+
+ public AbstractPreferenceValue(String prefsKey, String pluginId) {
+ this.pluginId = pluginId;
+ this.prefsKey = prefsKey;
+ }
+
+ public abstract TYPE get();
+
+ protected String doGet() {
+ return doGet(null);
+ }
+
+ public abstract TYPE get(TYPE currentValue);
+
+ protected String doGet(String currentValue) {
+ if( currentValue == null || currentValue.equals("")) {
+ // pre-set with previously used
+ Preferences prefs = getPreferences(this.pluginId);
+ return prefs.get(prefsKey, "");
+ } else {
+ return currentValue;
+ }
+ }
+
+ public void remove() {
+ String prefsValue = doGet();
+ if (prefsValue == null
+ || prefsValue == null) {
+ return;
+ }
+ store(null);
+ }
+
+ public abstract void store(TYPE value);
+
+ protected void doStore(String value) {
+ Preferences prefs = getPreferences(this.pluginId);
+ String prefsValue = prefs.get(prefsKey, "");
+ if (prefsValue == null
+ || prefsValue.equals("")
+ || !prefsValue.equals(value)) {
+ prefs.put(prefsKey, value);
+ try {
+ prefs.flush();
+ } catch (BackingStoreException bse) {
+ // intentionally ignore, non-critical
+ }
+ }
+ }
+
+ protected Preferences getPreferences(String pluginId) {
+ return new InstanceScope().getNode(pluginId);
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/AbstractPreferenceValue.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringEntriesPreferenceValue.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringEntriesPreferenceValue.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringEntriesPreferenceValue.java 2010-12-27 19:53:54 UTC (rev 27754)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * 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.ui.preferences;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class StringEntriesPreferenceValue extends AbstractPreferenceValue<String[]> {
+
+ private String delimiter;
+
+ public StringEntriesPreferenceValue(String delimiter, String prefsKey, String pluginId) {
+ super(prefsKey, pluginId);
+ this.delimiter = delimiter;
+ }
+
+ public String[] get() {
+ return get(null);
+ }
+
+ public String[] get(String[] currentValues) {
+
+ String string = doGet(null);
+ String[] prefValues = string.split(delimiter);
+ return overrideValues(currentValues, prefValues);
+ }
+
+ private String[] overrideValues(String[] newValues, String[] prefValues) {
+ if (prefValues == null) {
+ return newValues;
+ }
+
+ for (int i = 0; i < prefValues.length; i++) {
+ if (newValues == null
+ || newValues.length < i) {
+ break;
+ }
+ prefValues[i] = newValues[i];
+ }
+ return prefValues;
+ }
+
+ public void add(String value) {
+ StringBuilder builder = new StringBuilder(doGet());
+ if (builder.length() > 0) {
+ builder.append(delimiter);
+ }
+ builder.append(value);
+ doStore(builder.toString());
+ }
+
+ /**
+ * Removes the given values from the strings stored in the preferences and
+ * stores the preferences.
+ *
+ * @param values
+ * the values
+ */
+ public void remove(String... valuesToRemove) {
+ String[] currentValues = get();
+ if (valuesToRemove != null) {
+ for (int i = 0; i < currentValues.length; i++) {
+ for (String valueToRemove : valuesToRemove) {
+ if (valueToRemove.equals(currentValues[i])) {
+ currentValues[i] = null;
+ }
+ }
+ }
+ }
+ store(currentValues);
+ }
+
+ /**
+ * Overrides the current values in the preferences with the values in the
+ * given array (value in the preferences at index x is overridden with the
+ * value in the given array at index x) and stores the preferences.
+ */
+ public void store(String[] newValues) {
+ String[] currentValues = get();
+ overrideValues(newValues, currentValues);
+ doStore(concatenate(currentValues));
+ }
+
+ protected String concatenate(String[] values) {
+ StringBuilder builder = new StringBuilder();
+ for (int i = 0; i < values.length; i++) {
+ if (values[i] != null) {
+ if (builder.length() > 0) {
+ builder.append(delimiter);
+ }
+ builder.append(values[i]);
+ }
+ }
+ return builder.toString();
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringEntriesPreferenceValue.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringPreferenceValue.java (from rev 27744, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/TextPreferenceValue.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringPreferenceValue.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringPreferenceValue.java 2010-12-27 19:53:54 UTC (rev 27754)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.ui.preferences;
+
+
+/**
+ * @author Andre Dietisheim
+ */
+public class StringPreferenceValue extends AbstractPreferenceValue<String> {
+
+ public StringPreferenceValue(String prefsKey, String pluginId) {
+ super(prefsKey, pluginId);
+ }
+
+ public String get() {
+ return get(null);
+ }
+
+ public String get(String currentValue) {
+ return doGet(currentValue);
+ }
+
+ public void store(String value) {
+ doStore(value);
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/StringPreferenceValue.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/TextPreferenceValue.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/TextPreferenceValue.java 2010-12-27 19:51:30 UTC (rev 27753)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/TextPreferenceValue.java 2010-12-27 19:53:54 UTC (rev 27754)
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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.ui.preferences;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * @author Andre Dietisheim
- */
-public class TextPreferenceValue {
-
- private Plugin plugin;
- private String prefsKey;
-
- public TextPreferenceValue(String prefsKey, Plugin plugin) {
- this.plugin = plugin;
- this.prefsKey = prefsKey;
- }
-
- public String get() {
- return get(null);
- }
-
- public String get(String currentValue) {
- if( currentValue == null || currentValue.equals("")) {
- // pre-set with previously used
- Preferences prefs = getPreferences();
- return prefs.get(prefsKey, "");
- } else {
- return currentValue;
- }
- }
-
- public void store(String value) {
- Preferences prefs = getPreferences();
- String prefsValue = prefs.get(prefsKey, "");
- if (prefsValue == null || prefsValue.equals("") || !prefsValue.equals(value)) {
- prefs.put(prefsKey, value);
- try {
- prefs.flush();
- } catch (BackingStoreException bse) {
- // intentionally ignore, non-critical
- }
- }
-
- }
-
- protected Preferences getPreferences() {
- return new InstanceScope().getNode(plugin.getBundle().getSymbolicName());
- }
-}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-12-27 19:51:30 UTC (rev 27753)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-12-27 19:53:54 UTC (rev 27754)
@@ -65,7 +65,7 @@
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.MandatoryStringValidator;
import org.jboss.tools.internal.deltacloud.ui.common.swt.JFaceUtils;
import org.jboss.tools.internal.deltacloud.ui.preferences.IPreferenceKeys;
-import org.jboss.tools.internal.deltacloud.ui.preferences.TextPreferenceValue;
+import org.jboss.tools.internal.deltacloud.ui.preferences.StringPreferenceValue;
/**
* @author Jeff Jonhston
@@ -329,7 +329,7 @@
.setAfterGetValidator(new MandatoryStringValidator(WizardMessages.getString(MUST_ENTER_A_URL))),
null);
- String url = new TextPreferenceValue(IPreferenceKeys.LAST_URL, Activator.getDefault())
+ String url = new StringPreferenceValue(IPreferenceKeys.LAST_URL, Activator.PLUGIN_ID)
.get(urlText.getText());
urlText.setText(url);
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2010-12-27 19:51:30 UTC (rev 27753)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2010-12-27 19:53:54 UTC (rev 27754)
@@ -269,9 +269,7 @@
private void createKey(final String keyId) {
try {
- DeltaCloudKey key = model.createKey(keyId);
-// I guess that the launch job stores the key in the appropriate place already
- PemFileFactory.create(key);
+ model.createKey(keyId);
} catch (Exception e) {
// TODO: internationalize strings
ErrorUtils.handleError(
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java 2010-12-27 19:51:30 UTC (rev 27753)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java 2010-12-27 19:53:54 UTC (rev 27754)
@@ -40,7 +40,7 @@
private List<DeltaCloudKey> keys = new ArrayList<DeltaCloudKey>();
private DeltaCloud cloud;
private DeltaCloudKey selectedKey;
-
+
public ManageKeysPageModel(DeltaCloud cloud) {
this.cloud = cloud;
asyncGetKeys(cloud);
@@ -58,16 +58,17 @@
int index = keys.indexOf(selectedKey);
keys.remove(selectedKey);
fireIndexedPropertyChange(PROP_KEYS, index, selectedKey, null);
+ PemFileManager.delete(selectedKey);
setSelectedKey(index - 1);
}
- public DeltaCloudKey createKey(String keyId) throws DeltaCloudException {
+ public void createKey(String keyId) throws DeltaCloudException {
DeltaCloudKey key = cloud.createKey(keyId);
keys.add(key);
int index = keys.indexOf(key);
fireIndexedPropertyChange(PROP_KEYS, index, null, key);
setSelectedKey(key);
- return key;
+ PemFileManager.create(key);
}
public DeltaCloudKey getSelectedKey() {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2010-12-27 19:51:30 UTC (rev 27753)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2010-12-27 19:53:54 UTC (rev 27754)
@@ -23,7 +23,7 @@
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
import org.jboss.tools.internal.deltacloud.ui.preferences.IPreferenceKeys;
-import org.jboss.tools.internal.deltacloud.ui.preferences.TextPreferenceValue;
+import org.jboss.tools.internal.deltacloud.ui.preferences.StringPreferenceValue;
/**
* @author Jeff Johnston
@@ -106,7 +106,7 @@
String name = mainPage.getModel().getName();
String url = mainPage.getModel().getUrl();
- new TextPreferenceValue(IPreferenceKeys.LAST_URL, Activator.getDefault())
+ new StringPreferenceValue(IPreferenceKeys.LAST_URL, Activator.PLUGIN_ID)
.store(url);
String username = mainPage.getModel().getUsername();
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/PemFileFactory.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/PemFileFactory.java 2010-12-27 19:51:30 UTC (rev 27753)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/PemFileFactory.java 2010-12-27 19:53:54 UTC (rev 27754)
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * 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.ui.wizards;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-
-import org.eclipse.core.runtime.Path;
-import org.jboss.tools.deltacloud.core.DeltaCloudException;
-import org.jboss.tools.deltacloud.core.DeltaCloudKey;
-
-/**
- * @author André Dietisheim
- */
-public class PemFileFactory {
-
- private static final String PEM_FILE_SUFFIX = "pem";
-
- public static File create(DeltaCloudKey key) throws DeltaCloudException {
- return create(key, getKeyStorePath());
- }
-
- private static String getKeyStorePath() throws DeltaCloudException {
- // TODO: replace by code that queries the RSE preferences for its key
- // location setting
- String userHomePath = System.getProperty("user.home");
- if (userHomePath == null) {
- throw new DeltaCloudException("Could not determine path to save pem file to");
- }
- return new StringBuilder(userHomePath)
- .append(File.separatorChar).append(".ssh").append(File.separatorChar)
- .toString();
- }
-
- private static File create(DeltaCloudKey key, String keyStorePath) throws DeltaCloudException {
- try {
- File keyFile = createFile(key.getId(), keyStorePath);
- save(key.getPem(), keyFile);
- return keyFile;
- } catch (Exception e) {
- throw new DeltaCloudException(e);
- }
- }
-
- private static void save(String key, File keyFile) throws IOException {
- if (key != null) {
- FileWriter w = new FileWriter(keyFile);
- w.write(key);
- w.close();
- }
- }
-
- private static File createFile(String keyname, String keyStoreLocation)
- throws IOException {
- File keyFile =
- Path.fromOSString(keyStoreLocation)
- .append(keyname)
- .addFileExtension(PEM_FILE_SUFFIX) //$NON-NLS-1$
- .toFile();
- if (!keyFile.exists()) {
- keyFile.createNewFile();
- }
- keyFile.setReadable(false, false);
- keyFile.setWritable(true, true);
- keyFile.setReadable(true, true);
- return keyFile;
- }
-
-}
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/PemFileManager.java (from rev 27739, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/PemFileFactory.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/PemFileManager.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/PemFileManager.java 2010-12-27 19:53:54 UTC (rev 27754)
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * 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.ui.wizards;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.deltacloud.core.DeltaCloudException;
+import org.jboss.tools.deltacloud.core.DeltaCloudKey;
+import org.jboss.tools.internal.deltacloud.ui.preferences.StringEntriesPreferenceValue;
+
+/**
+ * @author André Dietisheim
+ */
+public class PemFileManager {
+
+ private static final String PEM_FILE_SUFFIX = "pem";
+ private static final String PLUGIN_ID = "org.eclipse.jsch.core";
+ private static final String KEY_PRIVATEKEY = "PRIVATEKEY";
+
+ private static StringEntriesPreferenceValue sshPrivateKeyPreference =
+ new StringEntriesPreferenceValue(",", KEY_PRIVATEKEY, PLUGIN_ID);
+
+ public static File create(DeltaCloudKey key) throws DeltaCloudException {
+ File file = create(key, getKeyStorePath());
+ sshPrivateKeyPreference.add(file.getName());
+ return file;
+ }
+
+ public static void delete(DeltaCloudKey key) throws DeltaCloudException {
+ File file = getFile(key.getId(), getKeyStorePath());
+ delete(file);
+ sshPrivateKeyPreference.remove(file.getName());
+ }
+
+ private static String getKeyStorePath() throws DeltaCloudException {
+ // TODO: replace by code that queries the RSE preferences for its key
+ // location setting
+ String userHomePath = System.getProperty("user.home");
+ if (userHomePath == null) {
+ throw new DeltaCloudException("Could not determine path to save pem file to");
+ }
+ return new StringBuilder(userHomePath)
+ .append(File.separatorChar).append(".ssh").append(File.separatorChar)
+ .toString();
+ }
+
+ private static File create(DeltaCloudKey key, String keyStorePath) throws DeltaCloudException {
+ try {
+ File keyFile = create(getFile(key.getId(), keyStorePath), keyStorePath);
+ save(key.getPem(), keyFile);
+ keyFile.setWritable(false, false);
+ return keyFile;
+ } catch (Exception e) {
+ throw new DeltaCloudException(e);
+ }
+ }
+
+ private static void save(String key, File keyFile) throws IOException {
+ if (key != null) {
+ FileWriter w = new FileWriter(keyFile);
+ w.write(key);
+ w.close();
+ }
+ }
+
+ private static File create(File file, String keyStoreLocation)
+ throws IOException {
+ if (!file.exists()) {
+ file.createNewFile();
+ }
+ file.setReadable(false, false);
+ file.setWritable(true, true);
+ file.setReadable(true, true);
+ return file;
+ }
+
+ private static File getFile(String keyId, String keyStoreLocation) {
+ File keyFile =
+ Path.fromOSString(keyStoreLocation)
+ .append(keyId)
+ .addFileExtension(PEM_FILE_SUFFIX) //$NON-NLS-1$
+ .toFile();
+ return keyFile;
+ }
+
+ private static void delete(File file) throws DeltaCloudException {
+ try {
+ if (file == null
+ || !file.exists()) {
+ return;
+ }
+ file.delete();
+ } catch (Exception e) {
+ throw new DeltaCloudException(e);
+ }
+ }
+
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/PemFileManager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years
JBoss Tools SVN: r27753 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-27 14:51:30 -0500 (Mon, 27 Dec 2010)
New Revision: 27753
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/META-INF/MANIFEST.MF
Log:
[JBIDE-7763] added RSE dependencies
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/ChangeLog 2010-12-27 18:40:40 UTC (rev 27752)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/ChangeLog 2010-12-27 19:51:30 UTC (rev 27753)
@@ -1,3 +1,8 @@
+2010-12-27 adietisheim <adietisheim@adietisheim-thinkpad>
+
+ * META-INF/MANIFEST.MF:
+ [JBIDE-7763] added RSE dependencies
+
2010-12-09 André Dietisheim <adietish(a)redhat.com>
* create new empty plugin
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/META-INF/MANIFEST.MF 2010-12-27 18:40:40 UTC (rev 27752)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/META-INF/MANIFEST.MF 2010-12-27 19:51:30 UTC (rev 27753)
@@ -9,6 +9,17 @@
Bundle-Localization: plugin
Require-Bundle: org.jboss.tools.common,
org.eclipse.rse.core,
+ org.eclipse.rse.subsystems.files.core,
+ org.eclipse.rse.services,
+ org.eclipse.rse.services.files.ftp,
+ org.eclipse.rse.services.local,
+ org.eclipse.rse.services.ssh,
+ org.eclipse.rse.files.ui,
+ org.eclipse.rse.ui,
+ org.eclipse.tm.terminal,
+ org.eclipse.tm.terminal.view,
+ org.eclipse.tm.terminal.telnet,
+ org.eclipse.tm.terminal.ssh,
org.eclipse.core.runtime,
org.eclipse.jface,
org.eclipse.ui,
@@ -18,4 +29,5 @@
org.eclipse.core.resources;bundle-version="[3.6.0,4.0.0)",
org.jboss.ide.eclipse.as.rse.core;bundle-version="[0.9.0,2.0.0)",
org.eclipse.wst.server.core;bundle-version="[1.1.204,2.0.0)",
- org.eclipse.wst.server.ui;bundle-version="[1.1.205,2.0.0)"
+ org.eclipse.wst.server.ui;bundle-version="[1.1.205,2.0.0)",
+ org.eclipse.jsch.core;bundle-version="1.1.200"
14 years
JBoss Tools SVN: r27752 - in trunk/cdi/plugins: org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-12-27 13:40:40 -0500 (Mon, 27 Dec 2010)
New Revision: 27752
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeMethodBusinessMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanComposite.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizard.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizardPage.java
Log:
https://issues.jboss.org/browse/JBIDE-7635
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-12-27 16:54:36 UTC (rev 27751)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-12-27 18:40:40 UTC (rev 27752)
@@ -553,7 +553,7 @@
}
if(sourceType.isInterface()) {
IAnnotation annotation = sourceType.getAnnotation(CDIConstants.LOCAL_ANNOTATION_TYPE_NAME);
- if (annotation == null) {
+ if (annotation == null || !annotation.exists()) {
annotation = sourceType.getAnnotation("Local"); //$NON-NLS-N1
}
if (annotation != null && CDIConstants.LOCAL_ANNOTATION_TYPE_NAME.equals(EclipseJavaUtil.resolveType(sourceType, "Local"))) { //$NON-NLS-N1
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2010-12-27 16:54:36 UTC (rev 27751)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2010-12-27 18:40:40 UTC (rev 27752)
@@ -95,6 +95,7 @@
public static String ADD_QUALIFIERS_TO_BEAN_WIZARD_REMOVE;
public static String ADD_QUALIFIERS_TO_BEAN_WIZARD_REMOVE_ALL;
public static String ADD_QUALIFIERS_TO_BEAN_WIZARD_CREATE_NEW_QUALIFIER;
+ public static String ADD_QUALIFIERS_TO_BEAN_WIZARD_SET_IS_NOT_UNIQUE;
public static String CDI_GENERATE_BEANS_XML;
public static String CDI_INSTALL_WIZARD_PAGE_FACET;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2010-12-27 16:54:36 UTC (rev 27751)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2010-12-27 18:40:40 UTC (rev 27752)
@@ -68,9 +68,8 @@
ADD_LOCAL_BEAN_MARKER_RESOLUTION_TITLE=Add @LocalBean annotation to ''{0}'' class
DELETE_ALL_DISPOSER_DUPLICANT_MARKER_RESOLUTION_TITLE=Delete @Disposes annotations from all methods except ''{0}'' method
DELETE_ALL_INJECTED_CONSTRUCTORS_MARKER_RESOLUTION_TITLE=Delete @Inject annotations from all constructors except ''{0}'' constructor
-MAKE_INJECTED_POINT_UNAMBIGUOUS_TITLE=Make injected point unambiguous by adding to it ''{0}'' bean
+MAKE_INJECTED_POINT_UNAMBIGUOUS_TITLE=Make injected point unambiguous by specifying ''{0}'' bean
-
ADD_QUALIFIERS_TO_BEAN_WIZARD_TITLE=Add Qualifiers to the Bean
ADD_QUALIFIERS_TO_BEAN_WIZARD_AVAILABLE=Available:
ADD_QUALIFIERS_TO_BEAN_WIZARD_IN_BEAN=In the Bean:
@@ -80,6 +79,7 @@
ADD_QUALIFIERS_TO_BEAN_WIZARD_REMOVE=< Remove
ADD_QUALIFIERS_TO_BEAN_WIZARD_REMOVE_ALL=<< Remove All
ADD_QUALIFIERS_TO_BEAN_WIZARD_CREATE_NEW_QUALIFIER=Create New Qualifier
+ADD_QUALIFIERS_TO_BEAN_WIZARD_SET_IS_NOT_UNIQUE=This set of qualifiers is not unique
CDI_GENERATE_BEANS_XML=Generate beans.xml file:
CDI_INSTALL_WIZARD_PAGE_FACET=Context and Dependency Injection (CDI) Facet
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2010-12-27 16:54:36 UTC (rev 27751)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2010-12-27 18:40:40 UTC (rev 27752)
@@ -112,20 +112,23 @@
new DeleteAllInjectedConstructorsMarkerResolution(method, file)
};
}
- }/*else if(messageId == CDIValidationErrorManager.UNSATISFIED_INJECTION_POINTS_ID ||
+ }else if(messageId == CDIValidationErrorManager.UNSATISFIED_INJECTION_POINTS_ID ||
messageId == CDIValidationErrorManager.AMBIGUOUS_INJECTION_POINTS_ID){
- List<IBean> beans = findBeans(file, start);
- IMarkerResolution[] resolutions = new IMarkerResolution[beans.size()];
- for(int i = 0; i < beans.size(); i++){
- resolutions[i] = new MakeInjectedPointUnambiguousMarkerResolution(beans, file, i);
+ IInjectionPoint injectionPoint = findInjectionPoint(file, start);
+ if(injectionPoint != null){
+ List<IBean> beans = findBeans(injectionPoint);
+ IMarkerResolution[] resolutions = new IMarkerResolution[beans.size()];
+ for(int i = 0; i < beans.size(); i++){
+ resolutions[i] = new MakeInjectedPointUnambiguousMarkerResolution(injectionPoint, beans, file, i);
+ }
+ return resolutions;
}
- return resolutions;
- }*/
+ }
}
return new IMarkerResolution[] {};
}
- private List<IBean> findBeans(IFile file, int start){
+ private IInjectionPoint findInjectionPoint(IFile file, int start){
IJavaElement element = findJavaElement(file, start);
if(element == null)
return null;
@@ -143,18 +146,13 @@
Set<IBean> allBeans = cdiProject.getBeans(file.getFullPath());
- //System.out.println("All beans - "+allBeans.size());
- //System.out.println("java element - "+element.getClass());
-
- IInjectionPoint injectionPoint = CDIUtil.findInjectionPoint(allBeans, element, start);
- if(injectionPoint == null){
- return null;
- }
-
+ return CDIUtil.findInjectionPoint(allBeans, element, start);
+ }
+
+ private List<IBean> findBeans(IInjectionPoint injectionPoint){
+ ICDIProject cdiProject = injectionPoint.getCDIProject();
Set<IBean> beanSet = cdiProject.getBeans(false, injectionPoint);
- //System.out.println("Beans on injected point - "+beanSet.size());
-
List<IBean> beanList = CDIUtil.sortBeans(beanSet);
return beanList;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java 2010-12-27 16:54:36 UTC (rev 27751)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java 2010-12-27 18:40:40 UTC (rev 27752)
@@ -16,15 +16,33 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeParameter;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IMarkerResolution2;
import org.eclipse.ui.internal.Workbench;
+import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IInjectionPoint;
+import org.jboss.tools.cdi.core.IInjectionPointField;
+import org.jboss.tools.cdi.core.IInjectionPointMethod;
+import org.jboss.tools.cdi.core.IInjectionPointParameter;
import org.jboss.tools.cdi.core.IQualifier;
import org.jboss.tools.cdi.ui.CDIUIMessages;
+import org.jboss.tools.cdi.ui.CDIUIPlugin;
+import org.jboss.tools.cdi.ui.wizard.AddQualifiersToBeanComposite;
import org.jboss.tools.cdi.ui.wizard.AddQualifiersToBeanWizard;
+import org.jboss.tools.common.EclipseUtil;
/**
* @author Daniel Azarov
@@ -32,11 +50,13 @@
public class MakeInjectedPointUnambiguousMarkerResolution implements IMarkerResolution2 {
private String label;
private IFile file;
+ private IInjectionPoint injectionPoint;
private List<IBean> beans;
private IBean selectedBean;
- public MakeInjectedPointUnambiguousMarkerResolution(List<IBean> beans, IFile file, int index){
+ public MakeInjectedPointUnambiguousMarkerResolution(IInjectionPoint injectionPoint, List<IBean> beans, IFile file, int index){
this.file = file;
+ this.injectionPoint = injectionPoint;
this.beans = beans;
this.selectedBean = beans.get(index);
this.label = MessageFormat.format(CDIUIMessages.MAKE_INJECTED_POINT_UNAMBIGUOUS_TITLE, new Object[]{selectedBean.getBeanClass().getElementName()});
@@ -48,16 +68,94 @@
public void run(IMarker marker) {
if(checkBeans()){
- //System.out.println("Should show dialog here.");
Shell shell = Workbench.getInstance().getActiveWorkbenchWindow().getShell();
- AddQualifiersToBeanWizard wizard = new AddQualifiersToBeanWizard(selectedBean);
+ AddQualifiersToBeanWizard wizard = new AddQualifiersToBeanWizard(injectionPoint, beans, selectedBean);
WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.open();
- }else{
- //System.out.println("Should update injected point without dialog");
+ int status = dialog.open();
+ if(status != WizardDialog.OK)
+ return;
+
+ List<IQualifier> deployed = wizard.getDeployedQualifiers();
+ addQualifiersToBean(deployed);
+ try {
+ Thread.sleep(3000);
+ Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
+ } catch (InterruptedException e) {
+ // do nothing
+ }
}
+ addQualifiersToInjectedPoint();
}
+ private void addQualifiersToBean(List<IQualifier> deployed){
+ IFile file = (IFile)selectedBean.getBeanClass().getResource();
+ try{
+ ICompilationUnit original = EclipseUtil.getCompilationUnit(file);
+ ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
+
+ IType type = compilationUnit.findPrimaryType();
+ if(type != null){
+ for(IQualifier qualifier : deployed){
+ MarkerResolutionUtils.addAnnotation(qualifier.getSourceType().getFullyQualifiedName(), compilationUnit, type);
+ }
+ }
+
+ compilationUnit.commitWorkingCopy(false, new NullProgressMonitor());
+ compilationUnit.discardWorkingCopy();
+ }catch(CoreException ex){
+ CDIUIPlugin.getDefault().logError(ex);
+ }
+ }
+
+ private void addQualifiersToInjectedPoint(){
+ try{
+ ICompilationUnit original = injectionPoint.getClassBean().getBeanClass().getCompilationUnit();
+ ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
+
+ Set<IQualifier> qualifiers = selectedBean.getQualifiers();
+ for(IQualifier qualifier : qualifiers){
+ String qualifierName = qualifier.getSourceType().getFullyQualifiedName();
+ if(!qualifierName.equals(CDIConstants.ANY_QUALIFIER_TYPE_NAME) && !qualifierName.equals(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME)){
+ IJavaElement element = getInjectedJavaElement(compilationUnit);
+ MarkerResolutionUtils.addQualifier(qualifierName, compilationUnit, element);
+ }
+ }
+
+ compilationUnit.commitWorkingCopy(false, new NullProgressMonitor());
+ compilationUnit.discardWorkingCopy();
+ }catch(CoreException ex){
+ CDIUIPlugin.getDefault().logError(ex);
+ }
+ }
+
+ private IJavaElement getInjectedJavaElement(ICompilationUnit compolationUnit){
+ if(injectionPoint instanceof IInjectionPointField){
+ IField field = ((IInjectionPointField)injectionPoint).getField();
+ IType type = field.getDeclaringType();
+ IType t = compolationUnit.getType(type.getElementName());
+ IField f = t.getField(field.getElementName());
+
+ return f;
+ }else if(injectionPoint instanceof IInjectionPointMethod){
+ IMethod method = ((IInjectionPointMethod)injectionPoint).getMethod();
+ IType type = method.getDeclaringType();
+ IType t = compolationUnit.getType(type.getElementName());
+ IMethod m = t.getMethod(method.getElementName(), method.getParameterTypes());
+
+ return m;
+ }else if(injectionPoint instanceof IInjectionPointParameter){
+ String paramName = ((IInjectionPointParameter)injectionPoint).getName();
+ IMethod method = ((IInjectionPointParameter)injectionPoint).getBeanMethod().getMethod();
+ IType type = method.getDeclaringType();
+ IType t = compolationUnit.getType(type.getElementName());
+ IMethod m = t.getMethod(method.getElementName(), method.getParameterTypes());
+ ITypeParameter p = m.getTypeParameter(paramName);
+
+ return p;
+ }
+ return null;
+ }
+
private boolean checkBeans(){
Set<IQualifier> qualifiers = selectedBean.getQualifiers();
if(qualifiers.size() == 0)
@@ -66,32 +164,14 @@
for(IBean bean: beans){
if(bean.equals(selectedBean))
continue;
- if(checkBeanQualifiers(bean, qualifiers))
+ if(AddQualifiersToBeanComposite.checkBeanQualifiers(bean, qualifiers))
return true;
}
return false;
}
- private boolean checkBeanQualifiers(IBean bean, Set<IQualifier> qualifiers){
- for(IQualifier qualifier : qualifiers){
- if(!isBeanContainQualifier(bean.getQualifiers(), qualifier)){
- return false;
- }
- }
- if(bean.getQualifiers().size() == qualifiers.size())
- return true;
- return false;
- }
- private boolean isBeanContainQualifier(Set<IQualifier> qualifiers, IQualifier qualifier){
- for(IQualifier q : qualifiers){
- if(q.getSourceType().getFullyQualifiedName().equals(qualifier.getSourceType().getFullyQualifiedName()))
- return true;
- }
- return false;
- }
-
public String getDescription() {
return null;
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeMethodBusinessMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeMethodBusinessMarkerResolution.java 2010-12-27 16:54:36 UTC (rev 27751)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeMethodBusinessMarkerResolution.java 2010-12-27 18:40:40 UTC (rev 27752)
@@ -41,29 +41,7 @@
private static final String PRIVATE = "private"; //$NON-NLS-1$
private static final String PROTECTED = "protected"; //$NON-NLS-1$
private static final String SPACE = " "; //$NON-NLS-1$
- private static final String DOT = "."; //$NON-NLS-1$
- static final HashSet<String> primitives = new HashSet<String>();
- static{
- primitives.add("void"); //$NON-NLS-1$
- primitives.add("int"); //$NON-NLS-1$
- primitives.add("java.lang.Integer"); //$NON-NLS-1$
- primitives.add("char"); //$NON-NLS-1$
- primitives.add("java.lang.Character"); //$NON-NLS-1$
- primitives.add("boolean"); //$NON-NLS-1$
- primitives.add("java.lang.Boolean"); //$NON-NLS-1$
- primitives.add("short"); //$NON-NLS-1$
- primitives.add("java.lang.Short"); //$NON-NLS-1$
- primitives.add("long"); //$NON-NLS-1$
- primitives.add("java.lang.Long"); //$NON-NLS-1$
- primitives.add("float"); //$NON-NLS-1$
- primitives.add("java.lang.Float"); //$NON-NLS-1$
- primitives.add("double"); //$NON-NLS-1$
- primitives.add("java.lang.Double"); //$NON-NLS-1$
- primitives.add("byte"); //$NON-NLS-1$
- primitives.add("java.lang.Byte"); //$NON-NLS-1$
- primitives.add("java.lang.String"); //$NON-NLS-1$
- }
private String label;
private IMethod method;
@@ -161,31 +139,9 @@
private void addImport(IType originalType, String simpleName, ICompilationUnit compilationUnit) throws JavaModelException{
String qualifiedName = EclipseJavaUtil.resolveType(originalType, simpleName);
- addImport(qualifiedName, compilationUnit);
+ MarkerResolutionUtils.addImport(qualifiedName, compilationUnit);
}
- private void addImport(String qualifiedName, ICompilationUnit compilationUnit) throws JavaModelException{
- if(primitives.contains(qualifiedName))
- return;
-
- IPackageDeclaration[] packages = compilationUnit.getPackageDeclarations();
-
- if(qualifiedName.indexOf(DOT) >= 0){
- String typePackage = qualifiedName.substring(0,qualifiedName.lastIndexOf(DOT));
-
- for(IPackageDeclaration packageDeclaration : packages){
- if(packageDeclaration.getElementName().equals(typePackage))
- return;
- }
- }
-
- if(qualifiedName != null){
- IImportDeclaration importDeclaration = compilationUnit.getImport(qualifiedName);
- if(importDeclaration == null || !importDeclaration.exists())
- compilationUnit.createImport(qualifiedName, null, new NullProgressMonitor());
- }
-
- }
public String getDescription() {
return null;
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java 2010-12-27 18:40:40 UTC (rev 27752)
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * 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.cdi.ui.marker;
+
+import java.util.HashSet;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.core.IAnnotatable;
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.IBuffer;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IImportDeclaration;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IPackageDeclaration;
+import org.eclipse.jdt.core.ISourceReference;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeParameter;
+import org.eclipse.jdt.core.JavaModelException;
+import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.common.model.util.EclipseJavaUtil;
+
+/**
+ * @author Daniel Azarov
+ */
+public class MarkerResolutionUtils {
+ public static final String DOT = "."; //$NON-NLS-1$
+ public static final String SPACE = " "; //$NON-NLS-1$
+ public static final String AT = "@"; //$NON-NLS-1$
+
+ static final HashSet<String> primitives = new HashSet<String>();
+ static{
+ primitives.add("void"); //$NON-NLS-1$
+ primitives.add("int"); //$NON-NLS-1$
+ primitives.add("java.lang.Integer"); //$NON-NLS-1$
+ primitives.add("char"); //$NON-NLS-1$
+ primitives.add("java.lang.Character"); //$NON-NLS-1$
+ primitives.add("boolean"); //$NON-NLS-1$
+ primitives.add("java.lang.Boolean"); //$NON-NLS-1$
+ primitives.add("short"); //$NON-NLS-1$
+ primitives.add("java.lang.Short"); //$NON-NLS-1$
+ primitives.add("long"); //$NON-NLS-1$
+ primitives.add("java.lang.Long"); //$NON-NLS-1$
+ primitives.add("float"); //$NON-NLS-1$
+ primitives.add("java.lang.Float"); //$NON-NLS-1$
+ primitives.add("double"); //$NON-NLS-1$
+ primitives.add("java.lang.Double"); //$NON-NLS-1$
+ primitives.add("byte"); //$NON-NLS-1$
+ primitives.add("java.lang.Byte"); //$NON-NLS-1$
+ primitives.add("java.lang.String"); //$NON-NLS-1$
+ }
+
+ public static void addImport(String qualifiedName, ICompilationUnit compilationUnit) throws JavaModelException{
+ if(primitives.contains(qualifiedName))
+ return;
+
+ IPackageDeclaration[] packages = compilationUnit.getPackageDeclarations();
+
+ if(qualifiedName.indexOf(DOT) >= 0){
+ String typePackage = qualifiedName.substring(0,qualifiedName.lastIndexOf(DOT));
+
+ for(IPackageDeclaration packageDeclaration : packages){
+ if(packageDeclaration.getElementName().equals(typePackage))
+ return;
+ }
+ }
+
+ if(qualifiedName != null){
+ IImportDeclaration importDeclaration = compilationUnit.getImport(qualifiedName);
+ if(importDeclaration == null || !importDeclaration.exists())
+ compilationUnit.createImport(qualifiedName, null, new NullProgressMonitor());
+ }
+
+ }
+
+ public static void addAnnotation(String qualifiedName, ICompilationUnit compilationUnit, ISourceReference element) throws JavaModelException{
+ addImport(qualifiedName, compilationUnit);
+
+ String lineDelim = compilationUnit.findRecommendedLineSeparator();
+
+ IBuffer buffer = compilationUnit.getBuffer();
+ String shortName = getShortName(qualifiedName);
+
+ buffer.replace(element.getSourceRange().getOffset(), 0, AT+shortName+lineDelim);
+
+ synchronized(compilationUnit) {
+ compilationUnit.reconcile(ICompilationUnit.NO_AST, true, null, null);
+ }
+ }
+
+ public static void addQualifier(String qualifiedName, ICompilationUnit compilationUnit, IJavaElement element) throws JavaModelException{
+ addImport(qualifiedName, compilationUnit);
+
+ String lineDelim = SPACE;
+
+ IBuffer buffer = compilationUnit.getBuffer();
+ String shortName = getShortName(qualifiedName);
+
+ IAnnotation annotation = getAnnotation(element, CDIConstants.INJECT_ANNOTATION_TYPE_NAME);
+
+ buffer.replace(annotation.getSourceRange().getOffset()+annotation.getSourceRange().getLength(), 0, lineDelim+AT+shortName);
+
+ synchronized(compilationUnit) {
+ compilationUnit.reconcile(ICompilationUnit.NO_AST, true, null, null);
+ }
+ }
+
+ public static String getShortName(String qualifiedName){
+ int lastDot = qualifiedName.lastIndexOf(DOT);
+ String name;
+ if(lastDot < 0)
+ name = qualifiedName;
+ else
+ name = qualifiedName.substring(lastDot+1);
+ return name;
+ }
+
+ public static IAnnotation getAnnotation(IJavaElement element, String qualifiedName){
+ if(element instanceof IAnnotatable){
+ String name = getShortName(qualifiedName);
+ IAnnotation annotation = ((IAnnotatable)element).getAnnotation(qualifiedName);
+ if (annotation == null || !annotation.exists()) {
+ annotation = ((IAnnotatable)element).getAnnotation(name);
+ }
+ IMember member=null;
+ if(element instanceof IMember){
+ member = (IMember)element;
+ }else if(element instanceof ITypeParameter){
+ member = ((ITypeParameter)element).getDeclaringMember();
+ }
+ if (member != null && annotation != null && qualifiedName.equals(EclipseJavaUtil.resolveType(member.getDeclaringType(), name))) {
+ return annotation;
+ }
+ }
+ return null;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanComposite.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanComposite.java 2010-12-27 16:54:36 UTC (rev 27751)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanComposite.java 2010-12-27 18:40:40 UTC (rev 27752)
@@ -1,9 +1,17 @@
package org.jboss.tools.cdi.ui.wizard;
+import java.text.MessageFormat;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.Iterator;
+import java.util.Set;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IContentProvider;
import org.eclipse.jface.viewers.IDoubleClickListener;
@@ -14,8 +22,11 @@
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ListViewer;
import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
@@ -31,12 +42,21 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.internal.Workbench;
import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IQualifier;
import org.jboss.tools.cdi.ui.CDIUIMessages;
+import org.jboss.tools.cdi.ui.CDIUIPlugin;
+import org.jboss.tools.cdi.ui.marker.MarkerResolutionUtils;
public class AddQualifiersToBeanComposite extends Composite {
private static Font font;
+ private IInjectionPoint injectionPoint;
+ private IBean bean;
+ private java.util.List<IBean> beans;
+ private WizardPage wizard;
// original qualifiers on the bean
private ArrayList<IQualifier> originalQualifiers;
@@ -46,6 +66,9 @@
// current qualifiers on the bean
private ArrayList<IQualifier> deployed = new ArrayList<IQualifier>();
+
+ // original + deployed
+ ArrayList<IQualifier> total = new ArrayList<IQualifier>();
private ListViewer availableListViewer;
private ListViewer deployedListViewer;
@@ -55,20 +78,47 @@
protected boolean isComplete = true;
- public AddQualifiersToBeanComposite(Composite parent, IBean bean) {
+ public AddQualifiersToBeanComposite(Composite parent, WizardPage wizard) {
super(parent, SWT.NONE);
+ this.wizard = wizard;
+ this.injectionPoint = ((AddQualifiersToBeanWizard)wizard.getWizard()).getInjectionPoint();
+ this.bean = ((AddQualifiersToBeanWizard)wizard.getWizard()).getBean();
+ this.beans = ((AddQualifiersToBeanWizard)wizard.getWizard()).getBeans();
originalQualifiers = new ArrayList<IQualifier>(bean.getQualifiers());
+ loadAvailableQualifiers();
+
+ createControl();
+ }
+
+ private void loadAvailableQualifiers(){
+ String beanTypeName = bean.getBeanClass().getFullyQualifiedName();
+ String beanPackage = beanTypeName.substring(0,beanTypeName.lastIndexOf(MarkerResolutionUtils.DOT));
+
+ String injectionPointTypeName = injectionPoint.getClassBean().getBeanClass().getFullyQualifiedName();
+ String injectionPointPackage = injectionPointTypeName.substring(0,injectionPointTypeName.lastIndexOf(MarkerResolutionUtils.DOT));
+
+ boolean samePackage = beanPackage.equals(injectionPointPackage);
+
IQualifier[] qs = bean.getCDIProject().getQualifiers();
qualifiers = new ArrayList<IQualifier>();
for(IQualifier q : qs){
- if(!originalQualifiers.contains(q))
- qualifiers.add(q);
+ if(!originalQualifiers.contains(q)){
+ boolean isPublic = true;
+ try{
+ isPublic = Flags.isPublic(q.getSourceType().getFlags());
+ }catch(JavaModelException ex){
+ CDIUIPlugin.getDefault().logError(ex);
+ }
+ String qualifierTypeName = q.getSourceType().getFullyQualifiedName();
+ String qualifierPackage = qualifierTypeName.substring(0,qualifierTypeName.lastIndexOf(MarkerResolutionUtils.DOT));
+ if(isPublic || (samePackage && injectionPointPackage.equals(qualifierPackage)))
+ qualifiers.add(q);
+ }
}
- createControl();
}
public void setVisible(boolean visible) {
@@ -90,6 +140,42 @@
});
}
+ private boolean checkBeans(){
+ total.clear();
+ total.addAll(originalQualifiers);
+ total.addAll(deployed);
+ HashSet<IQualifier> qfs = new HashSet<IQualifier>(total);
+
+ for(IBean b: beans){
+ if(b.equals(bean))
+ continue;
+ if(checkBeanQualifiers(b, qfs))
+ return false;
+
+ }
+ return true;
+ }
+
+ public static boolean checkBeanQualifiers(IBean bean, Set<IQualifier> qualifiers){
+ for(IQualifier qualifier : qualifiers){
+ if(!isBeanContainQualifier(bean.getQualifiers(), qualifier)){
+ return false;
+ }
+ }
+ if(bean.getQualifiers().size() == qualifiers.size())
+ return true;
+ return false;
+ }
+
+ public static boolean isBeanContainQualifier(Set<IQualifier> qualifiers, IQualifier qualifier){
+ for(IQualifier q : qualifiers){
+ if(q.getSourceType().getFullyQualifiedName().equals(qualifier.getSourceType().getFullyQualifiedName()))
+ return true;
+ }
+ return false;
+ }
+
+
protected void createControl() {
GridLayout layout = new GridLayout();
layout.horizontalSpacing = 4;
@@ -111,6 +197,13 @@
});
Label label = new Label(this, SWT.NONE);
+ GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
+ data.horizontalSpan = 3;
+ label.setLayoutData(data);
+ label.setText(MessageFormat.format(CDIUIMessages.ADD_QUALIFIERS_TO_BEAN_WIZARD_MESSAGE,
+ new Object[]{bean.getBeanClass().getElementName()}));
+
+ label = new Label(this, SWT.NONE);
label.setText(CDIUIMessages.ADD_QUALIFIERS_TO_BEAN_WIZARD_AVAILABLE);
label = new Label(this, SWT.NONE);
@@ -120,7 +213,7 @@
label.setText(CDIUIMessages.ADD_QUALIFIERS_TO_BEAN_WIZARD_IN_BEAN);
List availableList = new List(this, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData data = new GridData(GridData.FILL_BOTH);
+ data = new GridData(GridData.FILL_BOTH);
data.heightHint = 200;
data.widthHint = 150;
availableList.setLayoutData(data);
@@ -135,7 +228,7 @@
if (o1 instanceof IQualifier && o2 instanceof IQualifier) {
IQualifier q1 = (IQualifier) o1;
IQualifier q2 = (IQualifier) o2;
- return (q1.getSourceType().getFullyQualifiedName().compareToIgnoreCase(q2.getSourceType().getFullyQualifiedName()));
+ return (q1.getSourceType().getElementName().compareToIgnoreCase(q2.getSourceType().getElementName()));
}
return super.compare(viewer, o1, o2);
@@ -219,7 +312,7 @@
if (o1 instanceof IQualifier && o2 instanceof IQualifier) {
IQualifier q1 = (IQualifier) o1;
IQualifier q2 = (IQualifier) o2;
- return (q1.getSourceType().getFullyQualifiedName().compareToIgnoreCase(q2.getSourceType().getFullyQualifiedName()));
+ return (q1.getSourceType().getElementName().compareToIgnoreCase(q2.getSourceType().getElementName()));
}
return super.compare(viewer, o1, o2);
@@ -245,7 +338,27 @@
createQualifier.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
- // TODO
+ Shell shell = Workbench.getInstance().getActiveWorkbenchWindow().getShell();
+ NewQualifierCreationWizard wizard = new NewQualifierCreationWizard();
+ StructuredSelection selection = new StructuredSelection(new Object[]{bean.getBeanClass()});
+
+ wizard.init(Workbench.getInstance(), selection);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ int status = dialog.open();
+ if(status == WizardDialog.OK){
+ // reload qualifiers
+ try {
+ Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
+ } catch (InterruptedException e) {
+ // do nothing
+ }
+
+ qualifiers.clear();
+
+ loadAvailableQualifiers();
+
+ refresh();
+ }
}
});
@@ -317,6 +430,15 @@
}
removeAll.setEnabled(deployed.size() > 0);
+
+ // check uniqueness of qualifiers
+ isComplete = checkBeans();
+ if(isComplete)
+ wizard.setMessage("");
+ else
+ wizard.setMessage(CDIUIMessages.ADD_QUALIFIERS_TO_BEAN_WIZARD_SET_IS_NOT_UNIQUE, IMessageProvider.ERROR);
+
+ wizard.setPageComplete(isComplete);
}
protected void add(boolean all) {
@@ -394,6 +516,10 @@
public boolean isComplete() {
return isComplete;
}
+
+ public ArrayList<IQualifier> getDeployedQualifiers(){
+ return deployed;
+ }
class QualifiersListLabelProvider implements ILabelProvider{
@@ -417,7 +543,11 @@
public String getText(Object element) {
if(element instanceof IQualifier){
IQualifier qualifier = (IQualifier)element;
- return qualifier.getSourceType().getFullyQualifiedName();
+ String qualifierTypeName = qualifier.getSourceType().getFullyQualifiedName();
+ String qualifierPackage = qualifierTypeName.substring(0,qualifierTypeName.lastIndexOf(MarkerResolutionUtils.DOT));
+ String name = qualifier.getSourceType().getElementName();
+
+ return name+" - "+qualifierPackage;
}
return "";
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizard.java 2010-12-27 16:54:36 UTC (rev 27751)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizard.java 2010-12-27 18:40:40 UTC (rev 27752)
@@ -10,15 +10,24 @@
******************************************************************************/
package org.jboss.tools.cdi.ui.wizard;
+import java.util.List;
+
import org.eclipse.jface.wizard.Wizard;
import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IInjectionPoint;
+import org.jboss.tools.cdi.core.IQualifier;
import org.jboss.tools.cdi.ui.CDIUIMessages;
import org.jboss.tools.common.model.ui.ModelUIImages;
public class AddQualifiersToBeanWizard extends Wizard{
+ private IInjectionPoint injectionPoint;
+ private List<IBean> beans;
private IBean bean;
+ private AddQualifiersToBeanWizardPage page;
- public AddQualifiersToBeanWizard(IBean bean){
+ public AddQualifiersToBeanWizard(IInjectionPoint injectionPoint, List<IBean> beans, IBean bean){
+ this.injectionPoint = injectionPoint;
+ this.beans = beans;
this.bean = bean;
setWindowTitle(CDIUIMessages.ADD_QUALIFIERS_TO_BEAN_WIZARD_TITLE);
@@ -26,15 +35,27 @@
}
public void addPages() {
- addPage(new AddQualifiersToBeanWizardPage(""));
+ page = new AddQualifiersToBeanWizardPage("");
+ addPage(page);
}
-
@Override
public boolean performFinish() {
- return false;
+ return true;
}
+ public List<IQualifier> getDeployedQualifiers(){
+ return page.getDeployedQualifiers();
+ }
+
+ public IInjectionPoint getInjectionPoint(){
+ return injectionPoint;
+ }
+
+ public List<IBean> getBeans(){
+ return beans;
+ }
+
public IBean getBean(){
return bean;
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizardPage.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizardPage.java 2010-12-27 16:54:36 UTC (rev 27751)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizardPage.java 2010-12-27 18:40:40 UTC (rev 27752)
@@ -11,22 +11,29 @@
package org.jboss.tools.cdi.ui.wizard;
import java.text.MessageFormat;
+import java.util.ArrayList;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.widgets.Composite;
+import org.jboss.tools.cdi.core.IQualifier;
import org.jboss.tools.cdi.ui.CDIUIMessages;
public class AddQualifiersToBeanWizardPage extends WizardPage{
+ private AddQualifiersToBeanComposite composite;
+
protected AddQualifiersToBeanWizardPage(String pageName) {
super(pageName);
setTitle(CDIUIMessages.ADD_QUALIFIERS_TO_BEAN_WIZARD_TITLE);
}
public void createControl(Composite parent) {
- setControl(new AddQualifiersToBeanComposite(parent, ((AddQualifiersToBeanWizard)getWizard()).getBean()));
- setMessage(MessageFormat.format(CDIUIMessages.ADD_QUALIFIERS_TO_BEAN_WIZARD_MESSAGE,
- new Object[]{((AddQualifiersToBeanWizard)getWizard()).getBean().getBeanClass().getElementName()}));
+ composite = new AddQualifiersToBeanComposite(parent, this);
+ setControl(composite);
}
-
+
+ public ArrayList<IQualifier> getDeployedQualifiers(){
+ return composite.getDeployedQualifiers();
+ }
+
}
14 years
JBoss Tools SVN: r27751 - in trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse: criteriaeditor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-12-27 11:54:36 -0500 (Mon, 27 Dec 2010)
New Revision: 27751
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/SimpleTestProjectWithMapping.java
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditorTest.java
Log:
https://issues.jboss.org/browse/JBIDE-7938 - try to fix
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/SimpleTestProjectWithMapping.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/SimpleTestProjectWithMapping.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/SimpleTestProjectWithMapping.java 2010-12-27 16:54:36 UTC (rev 27751)
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.console.test.project;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.core.JavaModelException;
+
+public class SimpleTestProjectWithMapping extends SimpleTestProject {
+
+ public static final String HMB_CONTENT =
+ "<?xml version=\"1.0\"?>\n" + //$NON-NLS-1$
+ "<!DOCTYPE hibernate-mapping PUBLIC\n" + //$NON-NLS-1$
+ "\"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n" + //$NON-NLS-1$
+ "\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n" + //$NON-NLS-1$
+ "<hibernate-mapping package=\"" + PACKAGE_NAME + "\">\n" + //$NON-NLS-1$ //$NON-NLS-2$
+ "<class name=\"" + TYPE_NAME + "\">\n" + //$NON-NLS-1$ //$NON-NLS-2$
+ "<id type=\"java.lang.Long\"/>\n" + //$NON-NLS-1$
+ "<property name=\"testField\"/>\n" + //$NON-NLS-1$
+ "</class>\n" + //$NON-NLS-1$
+ "</hibernate-mapping>\n"; //$NON-NLS-1$
+
+ public SimpleTestProjectWithMapping(String projName) {
+ super(projName);
+ }
+
+ @Override
+ protected void buildProject() throws JavaModelException, CoreException, IOException {
+ super.buildProject();
+ final String path = SRC_FOLDER + "/" + //$NON-NLS-1$
+ PACKAGE_NAME + "/" + //$NON-NLS-1$
+ TYPE_NAME + ".hbm.xml"; //$NON-NLS-1$
+ getIProject().getFile(path).create(
+ new ByteArrayInputStream(HMB_CONTENT.getBytes()),
+ false, new NullProgressMonitor());
+ getIProject().findMember(path);
+ getIProject().build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ }
+
+}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditorTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditorTest.java 2010-12-27 14:56:16 UTC (rev 27750)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditorTest.java 2010-12-27 16:54:36 UTC (rev 27751)
@@ -12,6 +12,8 @@
import java.io.File;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
import junit.framework.TestCase;
@@ -19,13 +21,15 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.ui.IEditorPart;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.KnownConfigurations;
import org.hibernate.console.QueryInputModel;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
-import org.hibernate.eclipse.console.test.project.ConfigurableTestProject;
+import org.hibernate.eclipse.console.test.project.SimpleTestProject;
+import org.hibernate.eclipse.console.test.project.SimpleTestProjectWithMapping;
import org.hibernate.eclipse.console.test.project.TestProject;
import org.hibernate.eclipse.console.test.utils.ConsoleConfigUtils;
@@ -35,53 +39,60 @@
*/
public class CriteriaEditorTest extends TestCase {
- private static final String PROJ_NAME = "CriteriaTest";
+ private static final String PROJ_NAME = "CriteriaTest"; //$NON-NLS-1$
private static final String CONSOLE_NAME = PROJ_NAME;
- private ConfigurableTestProject project = null;
+ private SimpleTestProjectWithMapping project = null;
protected void setUp() throws Exception {
- project = new ConfigurableTestProject(PROJ_NAME);
}
protected void tearDown() throws Exception {
- project.deleteIProject();
- project = null;
+ cleanUpProject();
}
+ protected void cleanUpProject() {
+ if (project != null) {
+ project.deleteIProject();
+ project = null;
+ }
+ }
+
public void testCriteriaEditorOpen(){
IEditorPart editorPart = HibernateConsolePlugin.getDefault()
- .openCriteriaEditor(null, "");
- assertNotNull("Criteria Editor was not opened", editorPart);
- assertTrue("Opened editor is not CriteriaEditor", editorPart instanceof CriteriaEditor);
+ .openCriteriaEditor(null, ""); //$NON-NLS-1$
+ assertNotNull("Criteria Editor was not opened", editorPart); //$NON-NLS-1$
+ assertTrue("Opened editor is not CriteriaEditor", editorPart instanceof CriteriaEditor); //$NON-NLS-1$
CriteriaEditor editor = (CriteriaEditor)editorPart;
QueryInputModel model = editor.getQueryInputModel();
- assertNotNull("Model is NULL", model);
+ assertNotNull("Model is NULL", model); //$NON-NLS-1$
}
public void testCriteriaCodeCompletion() throws CoreException, NoSuchFieldException, IllegalAccessException, IOException{
+ cleanUpProject();
+ project = new SimpleTestProjectWithMapping(PROJ_NAME);
+
+ IPackageFragmentRoot sourceFolder = project.createSourceFolder();
+ IPackageFragment pf = sourceFolder.createPackageFragment(SimpleTestProject.PACKAGE_NAME, false, null);
+ ConsoleConfigUtils.customizeCfgXmlForPack(pf);
+ List<IPath> libs = new ArrayList<IPath>();
+ project.generateClassPath(libs, sourceFolder);
+ project.fullBuild();
+
//setup console configuration
IPath cfgFilePath = new Path(project.getIProject().getName() + File.separator +
- TestProject.SRC_FOLDER + File.separator + ConsoleConfigUtils.CFG_FILE_NAME);
+ TestProject.SRC_FOLDER + File.separator + ConsoleConfigUtils.CFG_FILE_NAME);
ConsoleConfigUtils.createConsoleConfig(PROJ_NAME, cfgFilePath, CONSOLE_NAME);
- boolean createListRes = project.createTestFoldersList();
- assertTrue(createListRes);
- project.setupNextTestFolder();
-
- IPackageFragment packFragment = project.getCurrentPackage();
- assertNotNull(packFragment);
- ConsoleConfigUtils.customizeCfgXmlForPack(packFragment);
- project.fullBuild();
-
ConsoleConfiguration cc = KnownConfigurations.getInstance().find(CONSOLE_NAME);
- assertNotNull("Console Configuration not found", cc);
+ assertNotNull("Console Configuration not found", cc); //$NON-NLS-1$
+ cc.build();
- String query = "Object o = new Object();\n" +
- "System.out.print(o.toString());";
+ String query = "Object o = new Object();\n" + //$NON-NLS-1$
+ "System.out.print(o.toString());"; //$NON-NLS-1$
IEditorPart editorPart = HibernateConsolePlugin.getDefault()
.openCriteriaEditor(CONSOLE_NAME, query);
- assertTrue("Opened editor is not CriteriaEditor", editorPart instanceof CriteriaEditor);
+ assertTrue("Opened editor is not CriteriaEditor", editorPart instanceof CriteriaEditor); //$NON-NLS-1$
CriteriaEditor editor = (CriteriaEditor)editorPart;
assertEquals(editor.getEditorText(), query);
@@ -89,12 +100,14 @@
QueryInputModel model = editor.getQueryInputModel();
assertTrue(model.getParameterCount() == 0);
+ editor.setConsoleConfigurationName(CONSOLE_NAME);
+
JavaCompletionProcessor processor = new JavaCompletionProcessor(editor);
- int position = query.indexOf("toString()");
+ int position = query.indexOf("toString()"); //$NON-NLS-1$
ICompletionProposal[] proposals = processor.computeCompletionProposals(null, position);
- assertTrue("Class java.lang.Object has at least 9 methods. But " + proposals.length
- + " code completion proposals where provided.", proposals.length >= 9);
+ assertTrue("Class java.lang.Object has at least 9 methods. But " + proposals.length //$NON-NLS-1$
+ + " code completion proposals where provided.", proposals.length >= 9); //$NON-NLS-1$
cc.reset();
}
14 years
JBoss Tools SVN: r27750 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-27 09:56:16 -0500 (Mon, 27 Dec 2010)
New Revision: 27750
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
Log:
JBIDE-7963
https://issues.jboss.org/browse/JBIDE-7963
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-12-27 13:41:52 UTC (rev 27749)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-12-27 14:56:16 UTC (rev 27750)
@@ -1026,7 +1026,7 @@
CDICoreNature[] ps = n.getDependentProjects().toArray(new CDICoreNature[0]);
for (CDICoreNature p: ps) {
- if(p.getProject() != null && p.getProject().isAccessible()) {
+ if(p.getProject() != null && p.getProject().isAccessible() && p.getDelegate() != null) {
p.getDelegate().update();
}
}
14 years