Author: adietish
Date: 2010-10-13 11:55:57 -0400 (Wed, 13 Oct 2010)
New Revision: 25795
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DisconnectCloudHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/EditConnectionHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/NewConnectionHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/DataBindingUtils.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/MaxSeverityValidationStatusProvider.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/ObservablePojo.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/validator/
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/swt/
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/utils/
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/utils/UIUtils.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/DataBindingUtils.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/MaxSeverityValidationStatusProvider.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/ObservablePojo.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/validator/
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/swt/
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/
Modified:
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/plugin.xml
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/validator/CompositeValidator.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/validator/MandatoryStringValidator.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/swt/JFaceUtils.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/CloudConnection.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/CloudConnectionModel.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/CloudConnectionPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/CustomWizardDialog.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/EditCloudConnection.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/ImageFilter.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/ImageFilterPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/InstanceFilter.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/InstanceFilterPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/ManageKeys.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/ManageKeysPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/NewCloudConnection.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/NewInstance.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/NewInstancePage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/ProfileComposite.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/WizardMessages.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageView.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
Log:
[JBIDE-7329] corrected package structure (internal was in the wrong place), replaced
connection related actions by handlers, hooked delete connectoin to the global delete
action
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud
Tools.launch 2010-10-13 15:51:43 UTC (rev 25794)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud
Tools.launch 2010-10-13 15:55:57 UTC (rev 25795)
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="askclear" value="true"/>
+<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="clearws" value="false"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation"
value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Deltacloud
Tools"/>
<booleanAttribute key="default" value="false"/>
@@ -23,13 +23,13 @@
<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.ui.console@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.ecf.filetransfer@default:default,org.hamcrest.core@default:default,org.eclipse.help.webapp@default:default,org.eclipse.wst.validation@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.http.jetty@default:default,org.apache.xerces@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.compare.core@default:default,com.ibm.icu@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.core.databinding@default:default,org.eclipse.help.appserver@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.p2.core@default:defau!
lt,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.jboss.tools.common@default:default,org.eclipse.equinox.concurrent@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.rse.services@default:default,org.eclipse.ui.ide@default:default,org.eclipse.equinox.app@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.core.runtime.compatibility@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.apache.commons.el@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ui.views@default:default,org.apach!
e.xml.serializer@default:default,org.eclipse.rse.core@default:!
default,
org.eclipse.jdt.compiler.tool@default:false,org.eclipse.text@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.core.resources@default:default,org.apache.jasper@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.update.configurator@3:true,org.eclipse.osgi.util@default:default,javax.servlet@default:default,org.eclipse.debug.ui@default:default,org.eclipse.ecf@default:default,org.eclipse.team.core@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.emf.ecore@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.core.jobs@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.jdt.core.manipulation@default:default,org.apache.xml.resolver@default:default,org.eclipse.help@default:default,org.eclipse.jdt.ui!
@default:default,org.eclipse.jem.util@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.commands@default:default,javax.servlet.jsp@default:default,org.eclipse.core.expressions@default:default,org.eclipse.emf.common@default:default,org.eclipse.search@default:default,org.eclipse.jface.text@default:default,org.eclipse.team.ui@default:default,org.eclipse.ant.core@default:default,org.eclipse.ui@default:default,org.eclipse.ui.editors@default:default,org.apache.ant@default:default,org.eclipse.equinox.p2.engine@default:default,org.apache.lucene@default:default,org.eclipse.jface@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.core.databinding.observable@default:default,org.eclipse.ecf.identity@default:default,org.jbos!
s.tools.xulrunner.initializer@default:false,org.eclipse.emf.ec!
ore.chan
ge@default:default,org.eclipse.compare@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.equinox.preferences@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.osgi@-1:true,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.jdt.core@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.help.ui@default:default,org.mortbay.jetty.util@default:default,org.eclipse.osgi.services@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.variables@default:default,org.eclipse.core.contenttype@default:default,org.mortbay.jetty.server@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.core.net@default:default,org.eclipse.debug.core@default:default,org.eclipse.equinox.p2.metadata.repo!
sitory@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.core.runtime@default:true,org.apache.lucene.analysis@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.ui.navigator.resources@default:default,org.junit4@default:default,javax.xml@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.sdk@default:default,org.eclipse.help.base@default:default,org.eclipse.swt@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.ui.navigator@default:default"/>
-<stringAttribute key="selected_workspace_plugins"
value="org.jboss.tools.deltacloud.ui@default:default,org.jboss.tools.usage@default:default,org.jboss.tools.deltacloud.docs@default:default,org.jboss.tools.deltacloud.core@default:default"/>
+<stringAttribute key="selected_target_plugins"
value="org.eclipse.help.webapp@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.wst.validation@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.p2.engine@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.jface@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.apache.lucene@default:default,org.eclipse.wst.common.environment@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.mortbay.jetty.util@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.equinox.common@2:true,org.eclipse.compare@default:default,org.e!
clipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.console@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.equinox.http.servlet@default:default,org.eclipse.jface.text@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.team.core@default:default,org.eclipse.help@default:default,org.eclipse.swt@default:default,org.mortbay.jetty.server@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.ant.core@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.apache.xml.serializer@default:default,org.eclipse.ui.cheatsheets@def!
ault:default,org.eclipse.debug.core@default:default,org.eclips!
e.wst.xm
l.core@default:default,org.eclipse.jdt.ui@default:default,org.apache.xml.resolver@default:default,org.jboss.tools.common@default:default,org.eclipse.wst.common.emf@default:default,org.junit4@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.core.runtime@default:true,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.jem.util@default:default,org.apache.ant@default:default,org.eclipse.osgi.services@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,org.apache.lucene.analysis@default:default,org.eclipse.help.appserver@default:default,org.eclipse.core.net@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.rse.services@default:default,org.eclipse.core.resources@default:default,org.eclipse.ui@default:default,org.eclipse.emf.common@default:default,javax.servlet.jsp@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.equinox.p2.metadata.repository@default:default,org.ecl!
ipse.debug.ui@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.help.base@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.editors@default:default,org.eclipse.sdk@default:default,org.eclipse.ui.forms@default:default,org.eclipse.compare.core@default:default,javax.xml@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.jdt.core@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.text@default:default,org.eclipse.osgi.util@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.osgi@-1:true,org.eclipse.core.databinding@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.ui.ide@default:default,org.apache.jasper@!
default:default,org.eclipse.search@default:default,org.apache.!
commons.
el@default:default,javax.servlet@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.team.ui@default:default,org.eclipse.core.variables@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.rse.core@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.equinox.registry@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.emf.edit@default:default,org.hamcrest.core@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.update.configurator@3:true,org.eclipse.equinox.jsp.jasper.r!
egistry@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.help.ui@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.core.commands@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.core.expressions@default:default,org.eclipse.ecf.identity@default:default,com.ibm.icu@default:default,org.eclipse.jface.databinding@default:default,org.apache.xerces@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.security.ui@default:default"/>
+<stringAttribute key="selected_workspace_plugins"
value="org.jboss.tools.deltacloud.docs@default:default,org.jboss.tools.usage@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.deltacloud.ui@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig"
value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
<booleanAttribute key="useProduct" value="true"/>
</launchConfiguration>
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-10-13
15:51:43 UTC (rev 25794)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2010-10-13
15:55:57 UTC (rev 25795)
@@ -13,11 +13,11 @@
org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.0",
org.jboss.tools.deltacloud.core;bundle-version="0.0.1",
org.eclipse.rse.core;bundle-version="3.1.1",
- org.eclipse.jface.databinding;bundle-version="1.4.0",
- org.eclipse.core.databinding;bundle-version="1.3.100",
- org.eclipse.core.databinding.observable;bundle-version="1.3.0",
- org.eclipse.core.databinding.property;bundle-version="1.3.0",
+ org.eclipse.jface.databinding;bundle-version="[1.4.0,2.0.0)",
+ org.eclipse.core.databinding;bundle-version="[1.3.100,2.0.0)",
+ org.eclipse.core.databinding.observable;bundle-version="[1.3.0,2.0.0)",
+ org.eclipse.core.databinding.property;bundle-version="[1.3.0,2.0.0)",
org.eclipse.core.databinding.beans;bundle-version="1.2.100",
- org.jboss.tools.common;bundle-version="3.2.0"
+ org.jboss.tools.common;bundle-version="[3.2.0,4.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-10-13 15:51:43
UTC (rev 25794)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-10-13 15:55:57
UTC (rev 25795)
@@ -79,7 +79,7 @@
</category>
<wizard
category="org.jboss.tools.deltacloud.ui.wizard.category"
-
class="org.jboss.tools.internal.deltacloud.ui.wizards.NewCloudConnection"
+
class="org.jboss.tools.deltacloud.ui.internal.wizards.NewCloudConnection"
icon="icons/delta.gif"
id="org.jboss.tools.deltacloud.ui.connection.wizard"
name="%NewWizard.name">
@@ -102,5 +102,74 @@
name="%Preferences.name">
</page>
</extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+
class="org.jboss.tools.deltacloud.ui.commands.NewConnectionHandler"
+ commandId="org.jboss.tools.deltacloud.ui.newconnection">
+ </handler>
+ <handler
+
class="org.jboss.tools.deltacloud.ui.commands.EditConnectionHandler"
+ commandId="org.jboss.tools.deltacloud.ui.editconnection">
+ <enabledWhen>
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+
value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+
class="org.jboss.tools.deltacloud.ui.commands.DisconnectCloudHandler"
+ commandId="org.eclipse.ui.edit.delete">
+ <enabledWhen>
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+
value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+
locationURI="popup:org.jboss.tools.deltacloud.menus.cloudviewer">
+ <command
+ commandId="org.eclipse.ui.edit.delete"
+ label="Disconnect Cloud"
+ style="push">
+ </command>
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.newconnection"
+ label="New Connection"
+ style="push">
+ </command>
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.editconnection"
+ label="Edit Connection"
+ style="push">
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Creates a new cloud connection"
+ id="org.jboss.tools.deltacloud.ui.newconnection"
+ name="New Connection">
+ </command>
+ <command
+ id="org.jboss.tools.deltacloud.ui.editconnection"
+ name="Edit Connection">
+ </command>
+ </extension>
</plugin>
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DisconnectCloudHandler.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DisconnectCloudHandler.java
(rev 0)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DisconnectCloudHandler.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * 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.deltacloud.ui.commands;
+
+import javax.net.ssl.SSLEngineResult.Status;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudManager;
+import org.jboss.tools.deltacloud.ui.views.CloudViewElement;
+import org.jboss.tools.deltacloud.ui.views.DisconnectCloudsDialog;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class DisconnectCloudHandler extends AbstractHandler implements IHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ DisconnectCloudsDialog dialog = new DisconnectCloudsDialog(
+ shell
+ , ((IStructuredSelection) selection).toList());
+ if (Dialog.OK == dialog.open()) {
+ removeCloudViewElements(dialog.getResult());
+ }
+ }
+
+ return Status.OK;
+ }
+
+ private void removeCloudViewElements(Object[] cloudViewerElements) {
+ for (Object cloudViewElement : cloudViewerElements) {
+ if (cloudViewElement instanceof CloudViewElement) {
+ DeltaCloud deltaCloud = (DeltaCloud) ((CloudViewElement)
cloudViewElement).getElement();
+ DeltaCloudManager.getDefault().removeCloud(deltaCloud);
+ }
+ }
+ }
+}
Property changes on:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DisconnectCloudHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/EditConnectionHandler.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/EditConnectionHandler.java
(rev 0)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/EditConnectionHandler.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * 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.deltacloud.ui.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.ui.internal.utils.UIUtils;
+import org.jboss.tools.deltacloud.ui.internal.wizards.EditCloudConnection;
+import org.jboss.tools.deltacloud.ui.views.CVCloudElement;
+import org.jboss.tools.deltacloud.ui.views.CloudViewElement;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class EditConnectionHandler extends AbstractHandler implements IHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ CloudViewElement element = UIUtils.getFirstElement(selection,
CloudViewElement.class);
+ while (element != null && !(element instanceof CVCloudElement)) {
+ element = (CloudViewElement) element.getParent();
+ }
+ if (element != null) {
+ CVCloudElement cloudElement = (CVCloudElement) element;
+ DeltaCloud cloud = (DeltaCloud) cloudElement.getElement();
+ IWizard wizard = new EditCloudConnection(cloud);
+ WizardDialog dialog = new WizardDialog(UIUtils.getActiveWorkbenchWindow().getShell(),
wizard);
+ dialog.create();
+ dialog.open();
+ }
+ }
+
+ return Status.OK_STATUS;
+ }
+}
Property changes on:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/EditConnectionHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/NewConnectionHandler.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/NewConnectionHandler.java
(rev 0)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/NewConnectionHandler.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -0,0 +1,38 @@
+package org.jboss.tools.deltacloud.ui.commands;
+/*******************************************************************************
+ * 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
+ ******************************************************************************/
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.deltacloud.ui.internal.wizards.NewCloudConnection;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class NewConnectionHandler extends AbstractHandler implements IHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ NewCloudConnection wizard = new NewCloudConnection();
+ wizard.init(PlatformUI.getWorkbench(), new StructuredSelection());
+ WizardDialog dialog = new
WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ wizard);
+ dialog.create();
+ dialog.open();
+
+ return Status.OK_STATUS;
+ }
+}
Property changes on:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/NewConnectionHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/DataBindingUtils.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/DataBindingUtils.java 2010-10-13
15:51:43 UTC (rev 25794)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/DataBindingUtils.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -1,44 +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.deltacloud.ui.common.databinding;
-
-
-import java.util.Collection;
-
-import org.eclipse.core.databinding.Binding;
-
-public class DataBindingUtils
-{
- private DataBindingUtils()
- {
- }
-
- /**
- * Disposes all bindings in a given collection an clears the collection.
- *
- * @param bindingCollection the binding collection
- *
- * @return the collection<binding>
- */
- public static Collection<Binding> disposeBindings( Collection<Binding>
bindingCollection )
- {
- if ( bindingCollection != null )
- {
- for ( Binding binding : bindingCollection )
- {
- binding.dispose();
- }
- bindingCollection.clear();
- }
- return bindingCollection;
- }
-}
Deleted:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/MaxSeverityValidationStatusProvider.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/MaxSeverityValidationStatusProvider.java 2010-10-13
15:51:43 UTC (rev 25794)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/MaxSeverityValidationStatusProvider.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -1,40 +0,0 @@
-package org.jboss.tools.deltacloud.ui.common.databinding;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.ValidationStatusProvider;
-import org.eclipse.core.databinding.observable.value.ComputedValue;
-import org.eclipse.core.runtime.IStatus;
-
-public class MaxSeverityValidationStatusProvider extends ComputedValue {
-
- private Collection validationStatusProviders;
-
- public MaxSeverityValidationStatusProvider(DataBindingContext dbc) {
- super(ValidationStatusProvider.class);
- this.validationStatusProviders = dbc.getValidationStatusProviders();
- }
-
- protected Object calculate() {
- int maxSeverity = IStatus.OK;
- ValidationStatusProvider maxSeverityProvider = null;
- for (Iterator it = validationStatusProviders.iterator(); it.hasNext();) {
- ValidationStatusProvider provider = (ValidationStatusProvider) it
- .next();
- IStatus status = (IStatus) provider.getValidationStatus()
- .getValue();
- if (status.getSeverity() > maxSeverity) {
- maxSeverity = status.getSeverity();
- maxSeverityProvider = provider;
- }
- }
- return maxSeverityProvider;
- }
-
- public synchronized void dispose() {
- validationStatusProviders = null;
- super.dispose();
- }
-}
Deleted:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/ObservablePojo.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/ObservablePojo.java 2010-10-13
15:51:43 UTC (rev 25794)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/ObservablePojo.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -1,39 +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.deltacloud.ui.common.databinding;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-
-/**
- * A POJO base class that may notify observers on behalf of
- * {@link PropertyChangeSupport}
- */
-public abstract class ObservablePojo {
-
- private PropertyChangeSupport propertyChangeSupport;
-
- public ObservablePojo() {
- this.propertyChangeSupport = new PropertyChangeSupport(this);
- }
-
- public void addPropertyChangeListener(String propertyName, PropertyChangeListener
listener) {
- propertyChangeSupport.addPropertyChangeListener(propertyName, listener);
- }
-
- public void removePropertyChangeListener(String propertyName, PropertyChangeListener
listener) {
- propertyChangeSupport.removePropertyChangeListener(propertyName, listener);
- }
-
- protected PropertyChangeSupport getPropertyChangeSupport() {
- return propertyChangeSupport;
- }
-}
Copied:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/DataBindingUtils.java
(from rev 25789,
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/DataBindingUtils.java)
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/DataBindingUtils.java
(rev 0)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/DataBindingUtils.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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.deltacloud.ui.internal.common.databinding;
+
+
+import java.util.Collection;
+
+import org.eclipse.core.databinding.Binding;
+
+public class DataBindingUtils
+{
+ private DataBindingUtils()
+ {
+ }
+
+ /**
+ * Disposes all bindings in a given collection an clears the collection.
+ *
+ * @param bindingCollection the binding collection
+ *
+ * @return the collection<binding>
+ */
+ public static Collection<Binding> disposeBindings( Collection<Binding>
bindingCollection )
+ {
+ if ( bindingCollection != null )
+ {
+ for ( Binding binding : bindingCollection )
+ {
+ binding.dispose();
+ }
+ bindingCollection.clear();
+ }
+ return bindingCollection;
+ }
+}
Property changes on:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/DataBindingUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/MaxSeverityValidationStatusProvider.java
(from rev 25789,
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/MaxSeverityValidationStatusProvider.java)
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/MaxSeverityValidationStatusProvider.java
(rev 0)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/MaxSeverityValidationStatusProvider.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -0,0 +1,40 @@
+package org.jboss.tools.deltacloud.ui.internal.common.databinding;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.ValidationStatusProvider;
+import org.eclipse.core.databinding.observable.value.ComputedValue;
+import org.eclipse.core.runtime.IStatus;
+
+public class MaxSeverityValidationStatusProvider extends ComputedValue {
+
+ private Collection validationStatusProviders;
+
+ public MaxSeverityValidationStatusProvider(DataBindingContext dbc) {
+ super(ValidationStatusProvider.class);
+ this.validationStatusProviders = dbc.getValidationStatusProviders();
+ }
+
+ protected Object calculate() {
+ int maxSeverity = IStatus.OK;
+ ValidationStatusProvider maxSeverityProvider = null;
+ for (Iterator it = validationStatusProviders.iterator(); it.hasNext();) {
+ ValidationStatusProvider provider = (ValidationStatusProvider) it
+ .next();
+ IStatus status = (IStatus) provider.getValidationStatus()
+ .getValue();
+ if (status.getSeverity() > maxSeverity) {
+ maxSeverity = status.getSeverity();
+ maxSeverityProvider = provider;
+ }
+ }
+ return maxSeverityProvider;
+ }
+
+ public synchronized void dispose() {
+ validationStatusProviders = null;
+ super.dispose();
+ }
+}
Property changes on:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/MaxSeverityValidationStatusProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/ObservablePojo.java
(from rev 25789,
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/ObservablePojo.java)
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/ObservablePojo.java
(rev 0)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/ObservablePojo.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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.deltacloud.ui.internal.common.databinding;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+
+/**
+ * A POJO base class that may notify observers on behalf of
+ * {@link PropertyChangeSupport}
+ */
+public abstract class ObservablePojo {
+
+ private PropertyChangeSupport propertyChangeSupport;
+
+ public ObservablePojo() {
+ this.propertyChangeSupport = new PropertyChangeSupport(this);
+ }
+
+ public void addPropertyChangeListener(String propertyName, PropertyChangeListener
listener) {
+ propertyChangeSupport.addPropertyChangeListener(propertyName, listener);
+ }
+
+ public void removePropertyChangeListener(String propertyName, PropertyChangeListener
listener) {
+ propertyChangeSupport.removePropertyChangeListener(propertyName, listener);
+ }
+
+ protected PropertyChangeSupport getPropertyChangeSupport() {
+ return propertyChangeSupport;
+ }
+}
Property changes on:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/ObservablePojo.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/validator
(from rev 25789,
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/validator)
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/validator/CompositeValidator.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/validator/CompositeValidator.java 2010-10-13
14:21:53 UTC (rev 25789)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/validator/CompositeValidator.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.deltacloud.ui.common.databinding.validator;
+package org.jboss.tools.deltacloud.ui.internal.common.databinding.validator;
import org.eclipse.core.databinding.validation.IValidator;
import org.eclipse.core.runtime.Assert;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/validator/MandatoryStringValidator.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/databinding/validator/MandatoryStringValidator.java 2010-10-13
14:21:53 UTC (rev 25789)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/databinding/validator/MandatoryStringValidator.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.deltacloud.ui.common.databinding.validator;
+package org.jboss.tools.deltacloud.ui.internal.common.databinding.validator;
import org.eclipse.core.databinding.validation.IValidator;
import org.eclipse.core.databinding.validation.ValidationStatus;
Copied:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/swt
(from rev 25789,
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/swt)
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/swt/JFaceUtils.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/common/swt/JFaceUtils.java 2010-10-13
14:21:53 UTC (rev 25789)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/common/swt/JFaceUtils.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.deltacloud.ui.common.swt;
+package org.jboss.tools.deltacloud.ui.internal.common.swt;
import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse.jface.fieldassist.FieldDecoration;
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/utils/UIUtils.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/utils/UIUtils.java
(rev 0)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/utils/UIUtils.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -0,0 +1,259 @@
+/*******************************************************************************
+ * 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.deltacloud.ui.internal.utils;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.ContributionManager;
+import org.eclipse.jface.action.GroupMarker;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.menus.IMenuService;
+import org.eclipse.ui.part.EditorPart;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class UIUtils
+{
+
+ private UIUtils()
+ {
+ }
+
+ /**
+ * Returns the selection of the active workbench window.
+ *
+ * @return the selection
+ *
+ * @see IWorkbenchWindow#getSelectionService()
+ */
+ public static ISelection getWorkbenchWindowSelection()
+ {
+ return getActiveWorkbenchWindow().getSelectionService().getSelection();
+ }
+
+ /**
+ * Gets the structured selection.
+ *
+ * @return the structured selection
+ */
+ public static IStructuredSelection getStructuredSelection()
+ {
+ ISelection selection = getWorkbenchWindowSelection();
+ if ( selection instanceof IStructuredSelection )
+ {
+ return ( IStructuredSelection ) selection;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Gets the first element.
+ *
+ * @param selection the selection
+ * @param expectedClass the expected class
+ *
+ * @return the first element
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> T getFirstElement( final ISelection selection, final
Class<T> expectedClass )
+ {
+ if ( selection == null )
+ {
+ return null;
+ }
+ else
+ {
+ Assert.isTrue( selection instanceof IStructuredSelection );
+ Object firstElement = ( ( IStructuredSelection ) selection ).getFirstElement();
+ if ( expectedClass.isAssignableFrom( firstElement.getClass() ) )
+ {
+ return ( T ) firstElement;
+ }
+ else
+ {
+ return null;
+ }
+ }
+ }
+
+ /**
+ * Gets the active page.
+ *
+ * @return the active page
+ */
+ public static IWorkbenchPage getActivePage()
+ {
+ IWorkbenchPage workbenchPage = getActiveWorkbenchWindow().getActivePage();
+ Assert.isNotNull( workbenchPage );
+ return workbenchPage;
+ }
+
+ /**
+ * Returns the editor that's currently active (focused).
+ *
+ * @return the active editor
+ */
+ public static IEditorPart getActiveEditor()
+ {
+ IEditorPart editor = getActivePage().getActiveEditor();
+ Assert.isNotNull( editor );
+ return editor;
+ }
+
+ /**
+ * Gets the active workbench window.
+ *
+ * @return the active workbench window
+ */
+ public static IWorkbenchWindow getActiveWorkbenchWindow()
+ {
+ IWorkbenchWindow workbenchWindow = getWorkbench().getActiveWorkbenchWindow();
+ Assert.isNotNull( workbenchWindow );
+ return workbenchWindow;
+ }
+
+ /**
+ * Gets the workbench.
+ *
+ * @return the workbench
+ */
+ public static IWorkbench getWorkbench()
+ {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ Assert.isNotNull( workbench );
+ return workbench;
+ }
+
+ /**
+ * Replaces an image with the given key by the given image descriptor.
+ *
+ * @param imageKey the image key
+ * @param imageDescriptor the image descriptor
+ */
+ public static void replaceInJfaceImageRegistry( final String imageKey, final
ImageDescriptor imageDescriptor )
+ {
+ Assert.isNotNull( imageKey );
+ Assert.isNotNull( imageDescriptor );
+
+ JFaceResources.getImageRegistry().remove( imageKey );
+ JFaceResources.getImageRegistry().put( imageKey, imageDescriptor );
+ }
+
+ /**
+ * Register the given ContributionManager with the given id. The contribution manager
gets unregistered on control disposal.
+ *
+ * @param id the id
+ * @param contributionManager the contribution manager
+ * @param control the control
+ *
+ * @see ContributionManager
+ * @see IMenuService
+ * @see DisposeListener
+ */
+ public static void registerContributionManager( final String id, final
IContributionManager contributionManager,
+ final Control control )
+ {
+ Assert.isNotNull( id );
+ Assert.isNotNull( contributionManager );
+ Assert.isTrue( control != null && !control.isDisposed() );
+
+ final IMenuService menuService = ( IMenuService ) PlatformUI.getWorkbench().getService(
IMenuService.class );
+ menuService.populateContributionManager( ( ContributionManager ) contributionManager,
id );
+ contributionManager.update( true );
+ control.addDisposeListener( new DisposeListener()
+ {
+ public void widgetDisposed( DisposeEvent e )
+ {
+ menuService.releaseContributions( ( ContributionManager ) contributionManager );
+ }
+ } );
+ }
+
+ /**
+ * Creates context menu to a given control.
+ *
+ * @param control the control
+ *
+ * @return the i menu manager
+ */
+ public static IMenuManager createContextMenu( final Control control )
+ {
+ Assert.isTrue( control != null && !control.isDisposed() );
+
+ MenuManager menuManager = new MenuManager();
+ menuManager.add( new GroupMarker( IWorkbenchActionConstants.MB_ADDITIONS ) );
+
+ Menu menu = menuManager.createContextMenu( control );
+ control.setMenu( menu );
+ return menuManager;
+ }
+
+ /**
+ * Gets the dialog settings for the given identifer and plugin.
+ *
+ * @param identifier the identifier
+ * @param plugin the plugin
+ *
+ * @return the dialog settings
+ */
+ public static IDialogSettings getDialogSettings( final String identifier, final
AbstractUIPlugin plugin )
+ {
+ Assert.isNotNull( plugin );
+ IDialogSettings dialogSettings = plugin.getDialogSettings();
+ IDialogSettings section = dialogSettings.getSection( identifier );
+ if ( section == null )
+ {
+ section = dialogSettings.addNewSection( identifier );
+ }
+ return section;
+ }
+
+ /**
+ * Returns the page for a given editor.
+ *
+ * @param editor the editor
+ * @return
+ *
+ * @return the page
+ *
+ * @see IWorkbenchPage
+ */
+ public static IWorkbenchPage getPage( EditorPart editor )
+ {
+ Assert.isNotNull( editor );
+ IWorkbenchPartSite site = editor.getSite();
+ Assert.isNotNull( site );
+ return site.getPage();
+ }
+
+}
Property changes on:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/utils/UIUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards
(from rev 25772,
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards)
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/CloudConnection.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnection.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/CloudConnection.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -1,4 +1,4 @@
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
public interface CloudConnection {
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/CloudConnectionModel.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/CloudConnectionModel.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
import java.io.BufferedReader;
import java.io.IOException;
@@ -29,7 +29,7 @@
import org.eclipse.core.databinding.validation.ValidationStatus;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
-import org.jboss.tools.deltacloud.ui.common.databinding.ObservablePojo;
+import org.jboss.tools.deltacloud.ui.internal.common.databinding.ObservablePojo;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/CloudConnectionPage.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/CloudConnectionPage.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat Incorporated - initial API and implementation
*******************************************************************************/
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
import java.net.URL;
@@ -48,9 +48,9 @@
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
-import org.jboss.tools.deltacloud.ui.common.databinding.validator.CompositeValidator;
-import
org.jboss.tools.deltacloud.ui.common.databinding.validator.MandatoryStringValidator;
-import org.jboss.tools.deltacloud.ui.common.swt.JFaceUtils;
+import
org.jboss.tools.deltacloud.ui.internal.common.databinding.validator.CompositeValidator;
+import
org.jboss.tools.deltacloud.ui.internal.common.databinding.validator.MandatoryStringValidator;
+import org.jboss.tools.deltacloud.ui.internal.common.swt.JFaceUtils;
/**
* @author Jeff Jonhston
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/CustomWizardDialog.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CustomWizardDialog.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/CustomWizardDialog.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -1,4 +1,4 @@
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.wizard.IWizard;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/EditCloudConnection.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/EditCloudConnection.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat Incorporated - initial API and implementation
*******************************************************************************/
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
import java.net.MalformedURLException;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/ImageFilter.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilter.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/ImageFilter.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -1,4 +1,4 @@
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
import org.eclipse.jface.wizard.Wizard;
import org.jboss.tools.deltacloud.core.DeltaCloud;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/ImageFilterPage.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterPage.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/ImageFilterPage.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -1,4 +1,4 @@
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/InstanceFilter.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilter.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/InstanceFilter.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -1,4 +1,4 @@
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
import org.eclipse.jface.wizard.Wizard;
import org.jboss.tools.deltacloud.core.DeltaCloud;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/InstanceFilterPage.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterPage.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/InstanceFilterPage.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -1,4 +1,4 @@
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/ManageKeys.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeys.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/ManageKeys.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -1,4 +1,4 @@
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
import org.eclipse.jface.wizard.Wizard;
import org.jboss.tools.deltacloud.core.DeltaCloud;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/ManageKeysPage.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/ManageKeysPage.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -1,4 +1,4 @@
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
import java.io.File;
import java.io.FilenameFilter;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/NewCloudConnection.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/NewCloudConnection.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat Incorporated - initial API and implementation
*******************************************************************************/
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
import java.net.MalformedURLException;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/NewInstance.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstance.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/NewInstance.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat Incorporated - initial API and implementation
*******************************************************************************/
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/NewInstancePage.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/NewInstancePage.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat Incorporated - initial API and implementation
*******************************************************************************/
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
import java.util.ArrayList;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/ProfileComposite.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ProfileComposite.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/ProfileComposite.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat Incorporated - initial API and implementation
*******************************************************************************/
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
import java.util.List;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/WizardMessages.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.java 2010-10-13
07:35:26 UTC (rev 25772)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/internal/wizards/WizardMessages.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat Incorporated - initial API and implementation
*******************************************************************************/
-package org.jboss.tools.internal.deltacloud.ui.wizards;
+package org.jboss.tools.deltacloud.ui.internal.wizards;
import java.text.MessageFormat;
import java.util.MissingResourceException;
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java 2010-10-13
15:51:43 UTC (rev 25794)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -14,14 +14,10 @@
import java.util.List;
import java.util.Map;
-import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
@@ -29,7 +25,6 @@
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
@@ -37,11 +32,9 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.ui.views.properties.IPropertySheetPage;
@@ -52,15 +45,16 @@
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
import org.jboss.tools.deltacloud.core.ICloudManagerListener;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
-import org.jboss.tools.internal.deltacloud.ui.wizards.EditCloudConnection;
-import org.jboss.tools.internal.deltacloud.ui.wizards.ImageFilter;
-import org.jboss.tools.internal.deltacloud.ui.wizards.InstanceFilter;
-import org.jboss.tools.internal.deltacloud.ui.wizards.NewCloudConnection;
-import org.jboss.tools.internal.deltacloud.ui.wizards.NewInstance;
+import org.jboss.tools.deltacloud.ui.internal.utils.UIUtils;
+import org.jboss.tools.deltacloud.ui.internal.wizards.ImageFilter;
+import org.jboss.tools.deltacloud.ui.internal.wizards.InstanceFilter;
+import org.jboss.tools.deltacloud.ui.internal.wizards.NewInstance;
public class DeltaCloudView extends ViewPart implements ICloudManagerListener,
ITabbedPropertySheetPageContributor {
+ private static final String CONTEXT_MENU_ID =
"popup:org.jboss.tools.deltacloud.menus.cloudviewer";
+
/**
* The ID of the view as specified by the extension.
*/
@@ -89,8 +83,6 @@
private TreeViewer viewer;
- private Action createConnection;
- private Action disconnectCloud;
private Action refreshAction;
private Action startAction;
private Action stopAction;
@@ -99,7 +91,6 @@
private Action collapseall;
private Action doubleClickAction;
private Action createInstance;
- private Action editCloud;
private Action imageFilterAction;
private Action instanceFilterAction;
@@ -151,16 +142,10 @@
}
private void hookContextMenu() {
- MenuManager menuMgr = new MenuManager("#PopupMenu");
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- DeltaCloudView.this.fillContextMenu(manager);
- }
- });
- Menu menu = menuMgr.createContextMenu(viewer.getControl());
- viewer.getControl().setMenu(menu);
- getSite().registerContextMenu(menuMgr, viewer);
+ IMenuManager contextMenu = UIUtils.createContextMenu(viewer.getControl());
+ // TODO: replace by declarative commands
+ fillContextMenu(contextMenu);
+ UIUtils.registerContributionManager(CONTEXT_MENU_ID, contextMenu,
viewer.getControl());
}
private void contributeToActionBars() {
@@ -178,8 +163,6 @@
private void handleSelection() {
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
selectedElement = (CloudViewElement) selection.getFirstElement();
- editCloud.setEnabled(selectedElement != null);
- disconnectCloud.setEnabled(selectedElement != null);
refreshAction.setEnabled(selectedElement != null);
imageFilterAction.setEnabled(selectedElement != null);
instanceFilterAction.setEnabled(selectedElement != null);
@@ -187,9 +170,6 @@
private void fillLocalPullDown(IMenuManager manager) {
manager.removeAll();
- manager.add(createConnection);
- manager.add(editCloud);
- manager.add(disconnectCloud);
manager.add(refreshAction);
manager.add(imageFilterAction);
manager.add(instanceFilterAction);
@@ -205,15 +185,13 @@
for (String action : actions) {
manager.add(instanceActions.get(action));
}
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ // manager.add(new
+ // Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
- manager.add(createConnection);
- manager.add(editCloud);
- manager.add(disconnectCloud);
manager.add(imageFilterAction);
manager.add(instanceFilterAction);
// Other plug-ins can contribute there actions here
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ // manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
private void fillLocalToolBar(IToolBarManager manager) {
@@ -221,10 +199,7 @@
}
private void makeActions() {
- createConnection = createNewConnectionAction();
- disconnectCloud = createDisconnectAction();
createInstance = createInstanceAction();
- editCloud = createEditCloudAction();
refreshAction = createRefreshAction();
startAction = createStartAction();
stopAction = createStopAction();
@@ -252,23 +227,6 @@
}
- private Action createNewConnectionAction() {
- Action createConnection = new Action() {
- public void run() {
- NewCloudConnection wizard = new NewCloudConnection();
- wizard.init(PlatformUI.getWorkbench(), new StructuredSelection());
- WizardDialog dialog = new
WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- wizard);
- dialog.create();
- dialog.open();
- }
- };
- createConnection.setText(CVMessages.getString(NEW_CONNECTION));
- createConnection.setToolTipText(CVMessages.getString(NEW_CONNECTION));
- createConnection.setImageDescriptor(SWTImagesFactory.DESC_CLOUD);
- return createConnection;
- }
-
private Action createCollapseAllAction() {
Action collapseAll = new Action() {
public void run() {
@@ -296,7 +254,6 @@
@Override
public void run() {
- // TODO Auto-generated method stub
Shell shell = viewer.getControl().getShell();
IWizard wizard = new InstanceFilter(cloud);
WizardDialog dialog = new WizardDialog(shell, wizard);
@@ -330,7 +287,6 @@
@Override
public void run() {
- // TODO Auto-generated method stub
Shell shell = viewer.getControl().getShell();
IWizard wizard = new ImageFilter(cloud);
WizardDialog dialog = new WizardDialog(shell, wizard);
@@ -492,59 +448,62 @@
return refreshAction;
}
- private Action createEditCloudAction() {
- Action editCloud = new Action() {
- public void run() {
- IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
- CloudViewElement element = (CloudViewElement) selection.getFirstElement();
- while (element != null && !(element instanceof CVCloudElement)) {
- element = (CloudViewElement) element.getParent();
- }
- if (element != null) {
- CVCloudElement cloudElement = (CVCloudElement) element;
- DeltaCloud cloud = (DeltaCloud) cloudElement.getElement();
- IWizard wizard = new EditCloudConnection(cloud);
- Shell shell = viewer.getControl().getShell();
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
- }
- };
- editCloud.setText(CVMessages.getString(EDIT_CLOUD));
- editCloud.setToolTipText(CVMessages.getString(EDIT_CLOUD));
- editCloud.setEnabled(selectedElement != null);
- return editCloud;
- }
+ // private Action createEditCloudAction() {
+ // Action editCloud = new Action() {
+ // public void run() {
+ // IStructuredSelection selection = (IStructuredSelection)
+ // viewer.getSelection();
+ // CloudViewElement element = (CloudViewElement)
+ // selection.getFirstElement();
+ // while (element != null && !(element instanceof CVCloudElement)) {
+ // element = (CloudViewElement) element.getParent();
+ // }
+ // if (element != null) {
+ // CVCloudElement cloudElement = (CVCloudElement) element;
+ // DeltaCloud cloud = (DeltaCloud) cloudElement.getElement();
+ // IWizard wizard = new EditCloudConnection(cloud);
+ // Shell shell = viewer.getControl().getShell();
+ // WizardDialog dialog = new WizardDialog(shell, wizard);
+ // dialog.create();
+ // dialog.open();
+ // }
+ // }
+ // };
+ // editCloud.setText(CVMessages.getString(EDIT_CLOUD));
+ // editCloud.setToolTipText(CVMessages.getString(EDIT_CLOUD));
+ // editCloud.setEnabled(selectedElement != null);
+ // return editCloud;
+ // }
- private Action createDisconnectAction() {
- Action removeCloud = new Action() {
- public void run() {
- DisconnectCloudsDialog dialog = new DisconnectCloudsDialog(
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()
- , ((IStructuredSelection) viewer.getSelection()).toList());
- if (Dialog.OK == dialog.open()) {
- removeCloudViewElements(dialog.getResult());
- }
- }
+ // private Action createDisconnectAction() {
+ // Action removeCloud = new Action() {
+ // public void run() {
+ // DisconnectCloudsDialog dialog = new DisconnectCloudsDialog(
+ // PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()
+ // , ((IStructuredSelection) viewer.getSelection()).toList());
+ // if (Dialog.OK == dialog.open()) {
+ // removeCloudViewElements(dialog.getResult());
+ // }
+ // }
+ //
+ // private void removeCloudViewElements(Object[] cloudViewerElements) {
+ // // viewer.remove(cloudViewerElements);
+ // for (Object cloudViewElement : cloudViewerElements) {
+ // Assert.isTrue(cloudViewElement instanceof CloudViewElement);
+ // DeltaCloud deltaCloud = (DeltaCloud) ((CloudViewElement)
+ // cloudViewElement).getElement();
+ // DeltaCloudManager.getDefault().removeCloud(deltaCloud);
+ // }
+ // }
+ // };
+ // removeCloud.setText(CVMessages.getString(REMOVE_CLOUD));
+ // removeCloud.setToolTipText(CVMessages.getString(REMOVE_CLOUD));
+ // removeCloud.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
+ // getImageDescriptor(ISharedImages.IMG_ELCL_REMOVE));
+ // removeCloud.setEnabled(selectedElement != null);
+ // return removeCloud;
+ // }
- private void removeCloudViewElements(Object[] cloudViewerElements) {
- viewer.remove(cloudViewerElements);
- for (Object cloudViewElement : cloudViewerElements) {
- Assert.isTrue(cloudViewElement instanceof CloudViewElement);
- DeltaCloud deltaCloud = (DeltaCloud) ((CloudViewElement)
cloudViewElement).getElement();
- DeltaCloudManager.getDefault().removeCloud(deltaCloud);
- }
- }
- };
- removeCloud.setText(CVMessages.getString(REMOVE_CLOUD));
- removeCloud.setToolTipText(CVMessages.getString(REMOVE_CLOUD));
- removeCloud.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
- getImageDescriptor(ISharedImages.IMG_ELCL_REMOVE));
- removeCloud.setEnabled(selectedElement != null);
- return removeCloud;
- }
-
private Action createInstanceAction() {
Action createInstance = new Action() {
public void run() {
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageView.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageView.java 2010-10-13
15:51:43 UTC (rev 25794)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageView.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -58,8 +58,8 @@
import org.jboss.tools.deltacloud.core.IImageListListener;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
-import org.jboss.tools.internal.deltacloud.ui.wizards.ImageFilter;
-import org.jboss.tools.internal.deltacloud.ui.wizards.NewInstance;
+import org.jboss.tools.deltacloud.ui.internal.wizards.ImageFilter;
+import org.jboss.tools.deltacloud.ui.internal.wizards.NewInstance;
import org.osgi.service.prefs.Preferences;
public class ImageView extends ViewPart implements ICloudManagerListener,
IImageListListener {
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-10-13
15:51:43 UTC (rev 25794)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-10-13
15:55:57 UTC (rev 25795)
@@ -75,7 +75,7 @@
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
-import org.jboss.tools.internal.deltacloud.ui.wizards.InstanceFilter;
+import org.jboss.tools.deltacloud.ui.internal.wizards.InstanceFilter;
import org.osgi.service.prefs.Preferences;
public class InstanceView extends ViewPart implements ICloudManagerListener,
IInstanceListListener {