JBoss Tools SVN: r27368 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core: src/org/jboss/tools/deltacloud/core and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-10 11:53:29 -0500 (Fri, 10 Dec 2010)
New Revision: 27368
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
Log:
[JBIDE-7738] made #loadImages public, RefreshImagesHandler needs access to it, made #loadInstances public, RefreshInstancesHandler needs access to it
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-10 16:26:22 UTC (rev 27367)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-10 16:53:29 UTC (rev 27368)
@@ -1,6 +1,10 @@
2010-12-10 André Dietisheim <adietish(a)redhat.com>
- * src/org/jboss/tools/deltacloud/core/DeltaCloud.java (update):
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java (loadImages):
+ [JBIDE-7738] made #loadImages public, RefreshImagesHandler needs access to it
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java (loadInstances):
+ [JBIDE-7738] made #loadInstances public, RefreshInstancesHandler needs access to it
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java (update):
[JBIDE-7863] need to store the password if either connection name, username, pw or url changes
* src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java (notifyCloudRename):
[JBIDE-7856] removed notifyCloudRename since DeltaCloud now notifies about changes in its properties (images, instances, name)
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-10 16:26:22 UTC (rev 27367)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-12-10 16:53:29 UTC (rev 27368)
@@ -363,7 +363,7 @@
*
* @see #notifyInstanceListListeners(DeltaCloudInstance[])
*/
- private void loadInstances() throws DeltaCloudException {
+ public void loadInstances() throws DeltaCloudException {
try {
DeltaCloudInstancesRepository repo = getInstancesRepository();
DeltaCloudInstance[] oldInstances = repo.get();
@@ -558,7 +558,7 @@
*
* @see #notifyImageListListeners(DeltaCloudImage[])
*/
- private void loadImages() throws DeltaCloudException {
+ public void loadImages() throws DeltaCloudException {
try {
DeltaCloudImagesRepository repo = getImagesRepository();
DeltaCloudImage[] oldImages = repo.get();
14 years
JBoss Tools SVN: r27367 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools: deltacloud/ui/commands and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-10 11:26:22 -0500 (Fri, 10 Dec 2010)
New Revision: 27367
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.properties
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/RSEUtils.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DestroyInstanceHandler.java
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/RebootInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/PerformInstanceActionThread.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudView.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/ImagesCategoryItem.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/InstancesCategoryItem.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/CloudPropertySource.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/ImagePropertySource.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java
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/FindImagePage.java
Log:
moving CVMessage + property-file back to view package, it belongs to cloud-view + image/Instance-view
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/RSEUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/RSEUtils.java 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/RSEUtils.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -31,7 +31,7 @@
import org.eclipse.ui.PartInitException;
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
-import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
public class RSEUtils {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DestroyInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DestroyInstanceHandler.java 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DestroyInstanceHandler.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -23,8 +23,8 @@
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.Activator;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.deltacloud.ui.views.PerformDestroyInstanceActionThread;
-import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
/**
Modified: 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 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DisconnectCloudHandler.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -37,7 +37,7 @@
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
-import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.deltacloud.ui.views.cloud.CloudItem;
import org.jboss.tools.deltacloud.ui.views.cloud.DeltaCloudViewItem;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RebootInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RebootInstanceHandler.java 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RebootInstanceHandler.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -23,7 +23,7 @@
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.Activator;
-import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
/**
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -25,8 +25,6 @@
import org.jboss.tools.deltacloud.core.DeltaCloudMultiException;
import org.jboss.tools.deltacloud.core.job.AbstractCloudJob;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
-import org.jboss.tools.deltacloud.ui.views.cloud.DeltaCloudViewItem;
-import org.jboss.tools.internal.deltacloud.ui.utils.CloudViewElementUtils;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
/**
@@ -38,16 +36,14 @@
public Object execute(ExecutionEvent event) throws ExecutionException {
ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof IStructuredSelection) {
- DeltaCloudViewItem cloudViewElement = UIUtils.getFirstAdaptedElement(selection, DeltaCloudViewItem.class);
- refresh(cloudViewElement);
+ DeltaCloud cloud = UIUtils.getFirstAdaptedElement(selection, DeltaCloud.class);
+ refresh(cloud);
}
return Status.OK_STATUS;
}
- private void refresh(final DeltaCloudViewItem cloudViewElement) {
- if (cloudViewElement != null) {
- final DeltaCloud cloud = CloudViewElementUtils.getCloud(cloudViewElement);
+ private void refresh(final DeltaCloud cloud) {
if (cloud != null) {
// TODO: internationalize strings
new AbstractCloudJob("Refreshing images and instances on " + cloud.getName(), cloud) {
@@ -64,7 +60,6 @@
return Status.OK_STATUS;
}
}.schedule();
- }
}
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -24,7 +24,7 @@
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.Activator;
-import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
/**
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -23,7 +23,7 @@
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.Activator;
-import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
/**
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.java (from rev 27366, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.deltacloud.ui.views;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class CVMessages {
+
+ private static final String BUNDLE_NAME = CVMessages.class.getName();
+
+ public static String getString(String key) {
+ try {
+ return ResourceBundle.getBundle(BUNDLE_NAME).getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ } catch (NullPointerException e) {
+ return '#' + key + '#';
+ }
+ }
+
+ public static String getFormattedString(String key, String arg) {
+ return MessageFormat.format(getString(key), new Object[] { arg });
+ }
+
+ public static String getFormattedString(String key, String... args) {
+ return MessageFormat.format(getString(key), (Object[]) args);
+ }
+}
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties (from rev 27366, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.properties)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties 2010-12-10 16:26:22 UTC (rev 27367)
@@ -0,0 +1,82 @@
+#################################################################################
+# Copyright (c) 2010 Red Hat, Inc.
+# All rights reserved. This program and the accompanying materials
+# are 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 Incorporated - initial API and implementation
+#################################################################################
+InstanceActionError.title=Error
+InstanceActionError.msg=Could not {0} instance {1}
+
+InstanceCategoryName=Instances
+ImageCategoryName=Images
+CloudViewName=Cloud View
+
+PropertyName.title=Name
+PropertyId.title=Id
+PropertyOwnerId.title=Owner Id
+PropertyHostname.title=Hostname
+PropertyKeyname.title=Key Name
+PropertyState.title=State
+PropertyProfileId.title=Hardware Profile
+PropertyRealmId.title=Realm Id
+PropertyImageId.title=Image Id
+PropertyArch.title=Architecture
+PropertyDescription.title=Description
+PropertyURL.title=URL
+PropertyUsername.title=User
+
+CollapseAll.label=Collapse All
+
+CloudSelector.label=Select Cloud:
+
+Refresh.label=Refresh
+
+Filter.label=Filter...
+Filtered.label=filtered
+FilteredImages.tooltip=Images shown have been filtered
+ShowInRSE.label=Show in Remote System Explorer
+
+Start.label=Start
+Stop.label=Stop
+Reboot.label=Reboot
+Destroy.label=Destroy
+
+StartingInstance.title=Starting Instance
+StartingInstance.msg=Starting Instance: {0}
+StartInstancesDialog.title=Start Instances
+StartInstancesDialog.msg=Please choose the instances that shall be started by checking them:
+StartInstancesDialogError.title=Error while starting instance(s)
+StartInstancesDialogError.msg=Could not start instance(s) {0}
+StoppingInstance.title=Stopping Instance
+StoppingInstance.msg=Stopping Instance: {0}
+StopInstancesDialog.title=Stop Instances
+StopInstancesDialog.msg=Please choose the instances that shall be stopped by checking them:
+StopInstancesDialogError.title=Error while stopping instance(s)
+StopInstancesDialogError.msg=Could not stop instance(s) {0}
+RebootingInstance.title=Rebooting Instance
+RebootingInstance.msg=Rebooting Instance: {0}
+RebootInstancesDialog.title=Reboot Instances
+RebootInstancesDialog.msg=Please choose the clouds that shall be rebooted by checking them:
+RebootInstancesDialogError.title=Error while rebooting instance(s)
+RebootInstancesDialogError.msg=Could not reboot instance(s) {0}
+DestroyingInstance.title=Destroying Instance
+DestroyingInstance.msg=Destroying Instance: {0}
+DestroyInstancesDialog.title=Destroy Instances
+DestroyInstancesDialog.msg=Please choose the clouds that shall be destroyed by checking them:
+DestroyInstancesDialogError.title=Error while destroying instance(s)
+DestroyInstancesDialogError.msg=Could not destroy instance(s) {0}
+ConnectingRSE.msg=Connecting instance as: {0}
+ConfirmCloudDelete.title=Confirm Cloud Disconnect
+ConfirmCloudDelete.msg=Please choose the clouds that shall be disconnected by checking them:
+CreateInstance.label=Launch Instance
+
+NAME=Name
+ID=ID
+HOSTNAME=Public Hostname
+STATUS=State
+ARCH=Architecture
+DESC=Description
\ No newline at end of file
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/PerformInstanceActionThread.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/PerformInstanceActionThread.java 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/PerformInstanceActionThread.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -20,7 +20,6 @@
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.Activator;
-import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
public class PerformInstanceActionThread extends Job {
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.java 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat Inc..
- * All rights reserved. This program and the accompanying materials
- * are 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 Incorporated - initial API and implementation
- *******************************************************************************/
-package org.jboss.tools.deltacloud.ui.views.cloud;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class CVMessages {
-
- private static final String BUNDLE_NAME = CVMessages.class.getName();
-
- public static String getString(String key) {
- try {
- return ResourceBundle.getBundle(BUNDLE_NAME).getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- } catch (NullPointerException e) {
- return '#' + key + '#';
- }
- }
-
- public static String getFormattedString(String key, String arg) {
- return MessageFormat.format(getString(key), new Object[] { arg });
- }
-
- public static String getFormattedString(String key, String... args) {
- return MessageFormat.format(getString(key), (Object[]) args);
- }
-}
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.properties 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.properties 2010-12-10 16:26:22 UTC (rev 27367)
@@ -1,82 +0,0 @@
-#################################################################################
-# Copyright (c) 2010 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are 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 Incorporated - initial API and implementation
-#################################################################################
-InstanceActionError.title=Error
-InstanceActionError.msg=Could not {0} instance {1}
-
-InstanceCategoryName=Instances
-ImageCategoryName=Images
-CloudViewName=Cloud View
-
-PropertyName.title=Name
-PropertyId.title=Id
-PropertyOwnerId.title=Owner Id
-PropertyHostname.title=Hostname
-PropertyKeyname.title=Key Name
-PropertyState.title=State
-PropertyProfileId.title=Hardware Profile
-PropertyRealmId.title=Realm Id
-PropertyImageId.title=Image Id
-PropertyArch.title=Architecture
-PropertyDescription.title=Description
-PropertyURL.title=URL
-PropertyUsername.title=User
-
-CollapseAll.label=Collapse All
-
-CloudSelector.label=Select Cloud:
-
-Refresh.label=Refresh
-
-Filter.label=Filter...
-Filtered.label=filtered
-FilteredImages.tooltip=Images shown have been filtered
-ShowInRSE.label=Show in Remote System Explorer
-
-Start.label=Start
-Stop.label=Stop
-Reboot.label=Reboot
-Destroy.label=Destroy
-
-StartingInstance.title=Starting Instance
-StartingInstance.msg=Starting Instance: {0}
-StartInstancesDialog.title=Start Instances
-StartInstancesDialog.msg=Please choose the instances that shall be started by checking them:
-StartInstancesDialogError.title=Error while starting instance(s)
-StartInstancesDialogError.msg=Could not start instance(s) {0}
-StoppingInstance.title=Stopping Instance
-StoppingInstance.msg=Stopping Instance: {0}
-StopInstancesDialog.title=Stop Instances
-StopInstancesDialog.msg=Please choose the instances that shall be stopped by checking them:
-StopInstancesDialogError.title=Error while stopping instance(s)
-StopInstancesDialogError.msg=Could not stop instance(s) {0}
-RebootingInstance.title=Rebooting Instance
-RebootingInstance.msg=Rebooting Instance: {0}
-RebootInstancesDialog.title=Reboot Instances
-RebootInstancesDialog.msg=Please choose the clouds that shall be rebooted by checking them:
-RebootInstancesDialogError.title=Error while rebooting instance(s)
-RebootInstancesDialogError.msg=Could not reboot instance(s) {0}
-DestroyingInstance.title=Destroying Instance
-DestroyingInstance.msg=Destroying Instance: {0}
-DestroyInstancesDialog.title=Destroy Instances
-DestroyInstancesDialog.msg=Please choose the clouds that shall be destroyed by checking them:
-DestroyInstancesDialogError.title=Error while destroying instance(s)
-DestroyInstancesDialogError.msg=Could not destroy instance(s) {0}
-ConnectingRSE.msg=Connecting instance as: {0}
-ConfirmCloudDelete.title=Confirm Cloud Disconnect
-ConfirmCloudDelete.msg=Please choose the clouds that shall be disconnected by checking them:
-CreateInstance.label=Launch Instance
-
-NAME=Name
-ID=ID
-HOSTNAME=Public Hostname
-STATUS=State
-ARCH=Architecture
-DESC=Description
\ No newline at end of file
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudView.java 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudView.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -23,6 +23,7 @@
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.deltacloud.ui.views.cloud.property.CVPropertySheetPage;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/ImagesCategoryItem.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/ImagesCategoryItem.java 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/ImagesCategoryItem.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -23,6 +23,7 @@
import org.jboss.tools.deltacloud.core.IImageFilter;
import org.jboss.tools.deltacloud.core.job.AbstractCloudJob;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
/**
* @author Jeff Johnston
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/InstancesCategoryItem.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/InstancesCategoryItem.java 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/InstancesCategoryItem.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -23,6 +23,7 @@
import org.jboss.tools.deltacloud.core.IInstanceFilter;
import org.jboss.tools.deltacloud.core.job.AbstractCloudJob;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
/**
* @author Jeff Johnston
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/CloudPropertySource.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/CloudPropertySource.java 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/CloudPropertySource.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -14,7 +14,7 @@
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.PropertyDescriptor;
import org.jboss.tools.deltacloud.core.DeltaCloud;
-import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
public class CloudPropertySource implements IPropertySource {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/ImagePropertySource.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/ImagePropertySource.java 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/ImagePropertySource.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -14,7 +14,7 @@
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.PropertyDescriptor;
import org.jboss.tools.deltacloud.core.DeltaCloudImage;
-import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
public class ImagePropertySource implements IPropertySource {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -20,7 +20,7 @@
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
-import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.deltacloud.ui.views.cloud.InstanceItem;
import org.jboss.tools.internal.deltacloud.ui.utils.CloudViewElementUtils;
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-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -50,7 +50,7 @@
import org.jboss.tools.deltacloud.core.IInstanceFilter;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
-import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.preferences.TextPreferenceValue;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-10 16:16:38 UTC (rev 27366)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-10 16:26:22 UTC (rev 27367)
@@ -34,7 +34,7 @@
import org.jboss.tools.deltacloud.core.ImageFilter;
import org.jboss.tools.deltacloud.core.job.AbstractCloudJob;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
-import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.deltacloud.ui.views.cloudelements.ImageViewLabelAndContentProvider;
import org.jboss.tools.deltacloud.ui.views.cloudelements.TableViewerColumnComparator;
14 years
JBoss Tools SVN: r27366 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools: deltacloud/ui/commands and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-10 11:16:38 -0500 (Fri, 10 Dec 2010)
New Revision: 27366
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.properties
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/RSEUtils.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DestroyInstanceHandler.java
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/RebootInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/PerformInstanceActionThread.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudView.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/ImagesCategoryItem.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/InstancesCategoryItem.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/CloudPropertySource.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/ImagePropertySource.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java
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/FindImagePage.java
Log:
moved CVMessage + property file to correct package (belongs to cloud view)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/RSEUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/RSEUtils.java 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/RSEUtils.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -31,7 +31,7 @@
import org.eclipse.ui.PartInitException;
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
-import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
public class RSEUtils {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DestroyInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DestroyInstanceHandler.java 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DestroyInstanceHandler.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -23,8 +23,8 @@
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.Activator;
-import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.deltacloud.ui.views.PerformDestroyInstanceActionThread;
+import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
/**
Modified: 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 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DisconnectCloudHandler.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -37,7 +37,7 @@
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
-import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
import org.jboss.tools.deltacloud.ui.views.cloud.CloudItem;
import org.jboss.tools.deltacloud.ui.views.cloud.DeltaCloudViewItem;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RebootInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RebootInstanceHandler.java 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RebootInstanceHandler.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -23,7 +23,7 @@
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.Activator;
-import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
/**
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -24,7 +24,7 @@
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.Activator;
-import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
/**
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -23,7 +23,7 @@
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.Activator;
-import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
/**
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.java 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat Inc..
- * All rights reserved. This program and the accompanying materials
- * are 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 Incorporated - initial API and implementation
- *******************************************************************************/
-package org.jboss.tools.deltacloud.ui.views;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class CVMessages {
-
- private static final String BUNDLE_NAME = CVMessages.class.getName();
-
- public static String getString(String key) {
- try {
- return ResourceBundle.getBundle(BUNDLE_NAME).getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- } catch (NullPointerException e) {
- return '#' + key + '#';
- }
- }
-
- public static String getFormattedString(String key, String arg) {
- return MessageFormat.format(getString(key), new Object[] { arg });
- }
-
- public static String getFormattedString(String key, String... args) {
- return MessageFormat.format(getString(key), (Object[]) args);
- }
-}
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties 2010-12-10 16:16:38 UTC (rev 27366)
@@ -1,82 +0,0 @@
-#################################################################################
-# Copyright (c) 2010 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are 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 Incorporated - initial API and implementation
-#################################################################################
-InstanceActionError.title=Error
-InstanceActionError.msg=Could not {0} instance {1}
-
-InstanceCategoryName=Instances
-ImageCategoryName=Images
-CloudViewName=Cloud View
-
-PropertyName.title=Name
-PropertyId.title=Id
-PropertyOwnerId.title=Owner Id
-PropertyHostname.title=Hostname
-PropertyKeyname.title=Key Name
-PropertyState.title=State
-PropertyProfileId.title=Hardware Profile
-PropertyRealmId.title=Realm Id
-PropertyImageId.title=Image Id
-PropertyArch.title=Architecture
-PropertyDescription.title=Description
-PropertyURL.title=URL
-PropertyUsername.title=User
-
-CollapseAll.label=Collapse All
-
-CloudSelector.label=Select Cloud:
-
-Refresh.label=Refresh
-
-Filter.label=Filter...
-Filtered.label=filtered
-FilteredImages.tooltip=Images shown have been filtered
-ShowInRSE.label=Show in Remote System Explorer
-
-Start.label=Start
-Stop.label=Stop
-Reboot.label=Reboot
-Destroy.label=Destroy
-
-StartingInstance.title=Starting Instance
-StartingInstance.msg=Starting Instance: {0}
-StartInstancesDialog.title=Start Instances
-StartInstancesDialog.msg=Please choose the instances that shall be started by checking them:
-StartInstancesDialogError.title=Error while starting instance(s)
-StartInstancesDialogError.msg=Could not start instance(s) {0}
-StoppingInstance.title=Stopping Instance
-StoppingInstance.msg=Stopping Instance: {0}
-StopInstancesDialog.title=Stop Instances
-StopInstancesDialog.msg=Please choose the instances that shall be stopped by checking them:
-StopInstancesDialogError.title=Error while stopping instance(s)
-StopInstancesDialogError.msg=Could not stop instance(s) {0}
-RebootingInstance.title=Rebooting Instance
-RebootingInstance.msg=Rebooting Instance: {0}
-RebootInstancesDialog.title=Reboot Instances
-RebootInstancesDialog.msg=Please choose the clouds that shall be rebooted by checking them:
-RebootInstancesDialogError.title=Error while rebooting instance(s)
-RebootInstancesDialogError.msg=Could not reboot instance(s) {0}
-DestroyingInstance.title=Destroying Instance
-DestroyingInstance.msg=Destroying Instance: {0}
-DestroyInstancesDialog.title=Destroy Instances
-DestroyInstancesDialog.msg=Please choose the clouds that shall be destroyed by checking them:
-DestroyInstancesDialogError.title=Error while destroying instance(s)
-DestroyInstancesDialogError.msg=Could not destroy instance(s) {0}
-ConnectingRSE.msg=Connecting instance as: {0}
-ConfirmCloudDelete.title=Confirm Cloud Disconnect
-ConfirmCloudDelete.msg=Please choose the clouds that shall be disconnected by checking them:
-CreateInstance.label=Launch Instance
-
-NAME=Name
-ID=ID
-HOSTNAME=Public Hostname
-STATUS=State
-ARCH=Architecture
-DESC=Description
\ No newline at end of file
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/PerformInstanceActionThread.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/PerformInstanceActionThread.java 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/PerformInstanceActionThread.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -20,6 +20,7 @@
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.Activator;
+import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
public class PerformInstanceActionThread extends Job {
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.java (from rev 27269, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.deltacloud.ui.views.cloud;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class CVMessages {
+
+ private static final String BUNDLE_NAME = CVMessages.class.getName();
+
+ public static String getString(String key) {
+ try {
+ return ResourceBundle.getBundle(BUNDLE_NAME).getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ } catch (NullPointerException e) {
+ return '#' + key + '#';
+ }
+ }
+
+ public static String getFormattedString(String key, String arg) {
+ return MessageFormat.format(getString(key), new Object[] { arg });
+ }
+
+ public static String getFormattedString(String key, String... args) {
+ return MessageFormat.format(getString(key), (Object[]) args);
+ }
+}
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.properties (from rev 27269, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.properties (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CVMessages.properties 2010-12-10 16:16:38 UTC (rev 27366)
@@ -0,0 +1,82 @@
+#################################################################################
+# Copyright (c) 2010 Red Hat, Inc.
+# All rights reserved. This program and the accompanying materials
+# are 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 Incorporated - initial API and implementation
+#################################################################################
+InstanceActionError.title=Error
+InstanceActionError.msg=Could not {0} instance {1}
+
+InstanceCategoryName=Instances
+ImageCategoryName=Images
+CloudViewName=Cloud View
+
+PropertyName.title=Name
+PropertyId.title=Id
+PropertyOwnerId.title=Owner Id
+PropertyHostname.title=Hostname
+PropertyKeyname.title=Key Name
+PropertyState.title=State
+PropertyProfileId.title=Hardware Profile
+PropertyRealmId.title=Realm Id
+PropertyImageId.title=Image Id
+PropertyArch.title=Architecture
+PropertyDescription.title=Description
+PropertyURL.title=URL
+PropertyUsername.title=User
+
+CollapseAll.label=Collapse All
+
+CloudSelector.label=Select Cloud:
+
+Refresh.label=Refresh
+
+Filter.label=Filter...
+Filtered.label=filtered
+FilteredImages.tooltip=Images shown have been filtered
+ShowInRSE.label=Show in Remote System Explorer
+
+Start.label=Start
+Stop.label=Stop
+Reboot.label=Reboot
+Destroy.label=Destroy
+
+StartingInstance.title=Starting Instance
+StartingInstance.msg=Starting Instance: {0}
+StartInstancesDialog.title=Start Instances
+StartInstancesDialog.msg=Please choose the instances that shall be started by checking them:
+StartInstancesDialogError.title=Error while starting instance(s)
+StartInstancesDialogError.msg=Could not start instance(s) {0}
+StoppingInstance.title=Stopping Instance
+StoppingInstance.msg=Stopping Instance: {0}
+StopInstancesDialog.title=Stop Instances
+StopInstancesDialog.msg=Please choose the instances that shall be stopped by checking them:
+StopInstancesDialogError.title=Error while stopping instance(s)
+StopInstancesDialogError.msg=Could not stop instance(s) {0}
+RebootingInstance.title=Rebooting Instance
+RebootingInstance.msg=Rebooting Instance: {0}
+RebootInstancesDialog.title=Reboot Instances
+RebootInstancesDialog.msg=Please choose the clouds that shall be rebooted by checking them:
+RebootInstancesDialogError.title=Error while rebooting instance(s)
+RebootInstancesDialogError.msg=Could not reboot instance(s) {0}
+DestroyingInstance.title=Destroying Instance
+DestroyingInstance.msg=Destroying Instance: {0}
+DestroyInstancesDialog.title=Destroy Instances
+DestroyInstancesDialog.msg=Please choose the clouds that shall be destroyed by checking them:
+DestroyInstancesDialogError.title=Error while destroying instance(s)
+DestroyInstancesDialogError.msg=Could not destroy instance(s) {0}
+ConnectingRSE.msg=Connecting instance as: {0}
+ConfirmCloudDelete.title=Confirm Cloud Disconnect
+ConfirmCloudDelete.msg=Please choose the clouds that shall be disconnected by checking them:
+CreateInstance.label=Launch Instance
+
+NAME=Name
+ID=ID
+HOSTNAME=Public Hostname
+STATUS=State
+ARCH=Architecture
+DESC=Description
\ No newline at end of file
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudView.java 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudView.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -23,7 +23,6 @@
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
-import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.deltacloud.ui.views.cloud.property.CVPropertySheetPage;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/ImagesCategoryItem.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/ImagesCategoryItem.java 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/ImagesCategoryItem.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -23,7 +23,6 @@
import org.jboss.tools.deltacloud.core.IImageFilter;
import org.jboss.tools.deltacloud.core.job.AbstractCloudJob;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
-import org.jboss.tools.deltacloud.ui.views.CVMessages;
/**
* @author Jeff Johnston
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/InstancesCategoryItem.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/InstancesCategoryItem.java 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/InstancesCategoryItem.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -23,7 +23,6 @@
import org.jboss.tools.deltacloud.core.IInstanceFilter;
import org.jboss.tools.deltacloud.core.job.AbstractCloudJob;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
-import org.jboss.tools.deltacloud.ui.views.CVMessages;
/**
* @author Jeff Johnston
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/CloudPropertySource.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/CloudPropertySource.java 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/CloudPropertySource.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -14,7 +14,7 @@
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.PropertyDescriptor;
import org.jboss.tools.deltacloud.core.DeltaCloud;
-import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
public class CloudPropertySource implements IPropertySource {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/ImagePropertySource.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/ImagePropertySource.java 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/ImagePropertySource.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -14,7 +14,7 @@
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.PropertyDescriptor;
import org.jboss.tools.deltacloud.core.DeltaCloudImage;
-import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
public class ImagePropertySource implements IPropertySource {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -20,7 +20,7 @@
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
-import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
import org.jboss.tools.deltacloud.ui.views.cloud.InstanceItem;
import org.jboss.tools.internal.deltacloud.ui.utils.CloudViewElementUtils;
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-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -50,7 +50,7 @@
import org.jboss.tools.deltacloud.core.IInstanceFilter;
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.deltacloud.ui.views.cloud.CVMessages;
import org.jboss.tools.internal.deltacloud.ui.preferences.TextPreferenceValue;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-10 15:58:59 UTC (rev 27365)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-10 16:16:38 UTC (rev 27366)
@@ -34,7 +34,7 @@
import org.jboss.tools.deltacloud.core.ImageFilter;
import org.jboss.tools.deltacloud.core.job.AbstractCloudJob;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
-import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.cloud.CVMessages;
import org.jboss.tools.deltacloud.ui.views.cloudelements.ImageViewLabelAndContentProvider;
import org.jboss.tools.deltacloud.ui.views.cloudelements.TableViewerColumnComparator;
14 years
JBoss Tools SVN: r27365 - trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-10 10:58:59 -0500 (Fri, 10 Dec 2010)
New Revision: 27365
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java
Log:
JBIDE-7842
https://issues.jboss.org/browse/JBIDE-7842
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java 2010-12-10 15:41:02 UTC (rev 27364)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java 2010-12-10 15:58:59 UTC (rev 27365)
@@ -27,13 +27,16 @@
import org.eclipse.jdt.internal.ui.wizards.NewElementWizard;
import org.eclipse.jdt.ui.wizards.NewTypeWizardPage;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.ICDIAnnotation;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.ui.CDIUIPlugin;
//import org.jboss.tools.cdi.ui.wizard.NewCDIAnnotationWizardPage;
+import org.jboss.tools.cdi.ui.wizard.NewBeansXMLCreationWizard;
import org.jboss.tools.cdi.ui.wizard.NewDecoratorWizardPage;
import org.jboss.tools.cdi.ui.wizard.NewInterceptorBindingWizardPage;
import org.jboss.tools.cdi.ui.wizard.NewInterceptorWizardPage;
@@ -118,6 +121,30 @@
}
+ static class NewBeansXMLWizardContext {
+ NewBeansXMLCreationWizard wizard;
+ IProject tck;
+ IJavaProject jp;
+ WizardDialog dialog;
+
+
+ public void init(String wizardId) {
+ wizard = (NewBeansXMLCreationWizard)WorkbenchUtils.findWizardByDefId(wizardId);
+ tck = ResourcesPlugin.getWorkspace().getRoot().getProject("tck");
+ jp = EclipseUtil.getJavaProject(tck);
+ wizard.init(CDIUIPlugin.getDefault().getWorkbench(), new StructuredSelection(jp));
+ dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ wizard);
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ }
+
+ public void close() {
+ dialog.close();
+ }
+ }
+
public void testNewQualifierWizard() {
WizardContext context = new WizardContext();
context.init("org.jboss.tools.cdi.ui.wizard.NewQualifierCreationWizard",
@@ -263,4 +290,33 @@
}
}
+ public void testNewBeansXMLWizard() throws CoreException {
+ NewBeansXMLWizardContext context = new NewBeansXMLWizardContext();
+ context.init("org.jboss.tools.cdi.ui.wizard.NewBeansXMLCreationWizard");
+ JobUtils.waitForIdle(2000);
+
+ try {
+
+ WizardNewFileCreationPage page = (WizardNewFileCreationPage)context.wizard.getPage("newFilePage1");
+ String s = page.getFileName();
+ assertEquals("beans.xml", s);
+ assertFalse(context.wizard.canFinish());
+ page.setFileName("beans2.xml");
+ assertTrue(context.wizard.canFinish());
+ String c = page.getContainerFullPath().toString();
+ assertEquals("/tck/WebContent/WEB-INF", c);
+
+ context.wizard.performFinish();
+
+ IFile f = context.tck.getParent().getFile(page.getContainerFullPath().append(page.getFileName()));
+ assertTrue(f.exists());
+
+ String text = FileUtil.readStream(f.getContents());
+ assertTrue(text.indexOf("http://java.sun.com/xml/ns/javaee") > 0);
+
+ } finally {
+ context.close();
+ }
+ }
+
}
\ No newline at end of file
14 years
JBoss Tools SVN: r27364 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core: src/org/jboss/tools/deltacloud/core and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-10 10:41:02 -0500 (Fri, 10 Dec 2010)
New Revision: 27364
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
Log:
[JBIDE-7863] need to store the password if either connection name, username, pw or url changes
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-10 15:18:45 UTC (rev 27363)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-10 15:41:02 UTC (rev 27364)
@@ -1,5 +1,7 @@
2010-12-10 André Dietisheim <adietish(a)redhat.com>
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java (update):
+ [JBIDE-7863] need to store the password if either connection name, username, pw or url changes
* src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java (notifyCloudRename):
[JBIDE-7856] removed notifyCloudRename since DeltaCloud now notifies about changes in its properties (images, instances, name)
* src/org/jboss/tools/internal/deltacloud/core/observable/ObservablePojo.java:
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-10 15:18:45 UTC (rev 27363)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-12-10 15:41:02 UTC (rev 27364)
@@ -99,15 +99,29 @@
public void update(String name, String url, String username, String password, String type)
throws DeltaCloudException {
this.type = type;
- setName(name);
- boolean changed = updateConnectionProperties(url, username, password);
- if (changed) {
- client = createClient(name, url, username, passwordStore.getPassword());
+ boolean nameChanged = updateName(name);
+ boolean connectionPropertiesChanged = updateConnectionProperties(url, username, password);
+
+ if (nameChanged || connectionPropertiesChanged) {
+ this.passwordStore.update(new DeltaCloudPasswordStorageKey(name, username), password);
+ }
+
+ if (connectionPropertiesChanged) {
+ client = createClient(name, url, username, password);
loadChildren();
}
}
+
+ private boolean updateName(String name) {
+ if (equals(this.name, name)) {
+ return false;
+ }
+ setName(name);
+ return true;
+ }
+
private boolean updateConnectionProperties(String url, String username, String password)
throws DeltaCloudException {
boolean changed = false;
@@ -120,9 +134,9 @@
changed = true;
}
if (!equals(this.passwordStore.getPassword(), password)) {
- this.passwordStore.setPassword(password);
changed = true;
}
+
return changed;
}
@@ -173,7 +187,7 @@
this.lastImageId = lastImageId;
}
- protected void setName(String name) {
+ private void setName(String name) {
firePropertyChange(PROP_NAME, this.name, this.name = name);
}
14 years
JBoss Tools SVN: r27362 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-10 10:17:44 -0500 (Fri, 10 Dec 2010)
New Revision: 27362
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeansXMLCreationWizard.java
Log:
JBIDE-7842
https://issues.jboss.org/browse/JBIDE-7842
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeansXMLCreationWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeansXMLCreationWizard.java 2010-12-10 15:17:29 UTC (rev 27361)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeansXMLCreationWizard.java 2010-12-10 15:17:44 UTC (rev 27362)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * 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.wizard;
import java.io.ByteArrayInputStream;
@@ -34,6 +45,11 @@
import org.jboss.tools.common.model.project.ProjectHome;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
public class NewBeansXMLCreationWizard extends BasicNewResourceWizard {
public static final String WIZARD_ID = "org.jboss.tools.cdi.ui.wizard.NewBeansXMLCreationWizard"; //$NON-NLS-1$
14 years
JBoss Tools SVN: r27361 - trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-12-10 10:17:29 -0500 (Fri, 10 Dec 2010)
New Revision: 27361
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java
Log:
https://issues.jboss.org/browse/JBIDE-7739
removed unused method
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java 2010-12-10 15:16:06 UTC (rev 27360)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java 2010-12-10 15:17:29 UTC (rev 27361)
@@ -23,6 +23,8 @@
import java.util.Properties;
import java.util.TreeMap;
+import junit.framework.TestCase;
+
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.datatools.connectivity.IConnectionProfile;
@@ -41,8 +43,6 @@
import org.hibernate.eclipse.launch.ExporterAttributes;
import org.hibernate.eclipse.launch.HibernateLaunchConstants;
-import junit.framework.TestCase;
-
/**
* @author Vitali Yemialyanchyk
*/
@@ -139,10 +139,6 @@
return null;
}
- public String getConnectionProfileDriverURL(String connectionProfile) {
- return "test-driver-path.jar"; //$NON-NLS-1$
- }
-
public IConnectionProfile getConnectionProfile(String connProfileName) {
return null;
}
14 years
JBoss Tools SVN: r27360 - in trunk/cdi/plugins/org.jboss.tools.cdi.ui: src/org/jboss/tools/cdi/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-10 10:16:06 -0500 (Fri, 10 Dec 2010)
New Revision: 27360
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeansXMLCreationWizard.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
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
Log:
JBIDE-7842
https://issues.jboss.org/browse/JBIDE-7842
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties 2010-12-10 14:51:16 UTC (rev 27359)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties 2010-12-10 15:16:06 UTC (rev 27360)
@@ -11,4 +11,8 @@
proposalCategory.cdiClass= JBoss CDI (Context and Dependency Injection) Class Proposals
-preferenceKeywords.newJava=CDI (Context and Dependency Injection)
+preferenceKeywords.newJava=CDI
+preferenceKeywords.newBeansXML=CDI XML
+
+NewWizards.file=File beans.xml
+NewWizards.file.description=Create a new beans.xml File
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml 2010-12-10 14:51:16 UTC (rev 27359)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml 2010-12-10 15:16:06 UTC (rev 27360)
@@ -221,6 +221,23 @@
</keywordReference>
</wizard>
+ <wizard
+ name="%NewWizards.file"
+ icon="icons/cdi16.png"
+ category="org.jboss.tools.cdi.ui"
+ class="org.jboss.tools.cdi.ui.wizard.NewBeansXMLCreationWizard"
+ id="org.jboss.tools.cdi.ui.wizard.NewBeansXMLCreationWizard">
+ <description>
+ %NewWizards.file.description
+ </description>
+ <selection
+ class="org.eclipse.core.resources.IResource">
+ </selection>
+ <keywordReference
+ id="org.jboss.tools.cdi.ui.newBeansXML">
+ </keywordReference>
+ </wizard>
+
</extension>
<extension
@@ -228,6 +245,9 @@
<keyword
label="%preferenceKeywords.newJava"
id="org.jboss.tools.cdi.ui.newJava"/>
+ <keyword
+ label="%preferenceKeywords.newBeansXML"
+ id="org.jboss.tools.cdi.ui.newBeansXML"/>
</extension>
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-10 14:51:16 UTC (rev 27359)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2010-12-10 15:16:06 UTC (rev 27360)
@@ -1,4 +1,5 @@
/*******************************************************************************
+
* 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
@@ -45,6 +46,10 @@
public static String NEW_DECORATOR_WIZARD_PAGE_NAME;
public static String NEW_DECORATOR_WIZARD_DESCRIPTION;
+ public static String NEW_BEANS_XML_WIZARD_TITLE;
+ public static String NEW_BEANS_XML_WIZARD_PAGE_NAME;
+ public static String NEW_BEANS_XML_WIZARD_DESCRIPTION;
+
public static String SELECT_STEREOTYPE;
public static String SELECT_INTERCEPTOR_BINDING;
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-10 14:51:16 UTC (rev 27359)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2010-12-10 15:16:06 UTC (rev 27360)
@@ -58,3 +58,7 @@
CDI_GENERATE_BEANS_XML=Generate beans.xml file:
CDI_INSTALL_WIZARD_PAGE_FACET=Context and Dependency Injection (CDI) Facet
CDI_INSTALL_WIZARD_PAGE_CONFIGURE=Configure Context and Dependency Injection (CDI) Facet Settings>>>>>>> .r27235
+
+NEW_BEANS_XML_WIZARD_TITLE=New beans.xml File
+NEW_BEANS_XML_WIZARD_PAGE_NAME=beans.xml File
+NEW_BEANS_XML_WIZARD_DESCRIPTION=Create a new beans.xml File
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeansXMLCreationWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeansXMLCreationWizard.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeansXMLCreationWizard.java 2010-12-10 15:16:06 UTC (rev 27360)
@@ -0,0 +1,181 @@
+package org.jboss.tools.cdi.ui.wizard;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.util.Properties;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.internal.dialogs.DialogUtil;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup;
+import org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup;
+import org.eclipse.ui.internal.wizards.newresource.ResourceMessages;
+import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
+import org.jboss.tools.cdi.ui.CDIUIMessages;
+import org.jboss.tools.cdi.ui.CDIUIPlugin;
+import org.jboss.tools.common.model.filesystems.impl.FileAnyImpl;
+import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.common.model.project.ProjectHome;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+
+public class NewBeansXMLCreationWizard extends BasicNewResourceWizard {
+ public static final String WIZARD_ID = "org.jboss.tools.cdi.ui.wizard.NewBeansXMLCreationWizard"; //$NON-NLS-1$
+
+ private WizardNewFileCreationPage mainPage;
+
+ /**
+ * Creates a wizard for creating a new file resource in the workspace.
+ */
+ public NewBeansXMLCreationWizard() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * Method declared on IWizard.
+ */
+ public void addPages() {
+ super.addPages();
+ mainPage = new WizardNewBeansXMLFileCreationPage("newFilePage1", getSelection());//$NON-NLS-1$
+ mainPage.setTitle(CDIUIMessages.NEW_BEANS_XML_WIZARD_PAGE_NAME);
+ mainPage.setDescription(CDIUIMessages.NEW_BEANS_XML_WIZARD_DESCRIPTION);
+
+ mainPage.setFileName("beans.xml");
+
+ addPage(mainPage);
+ }
+
+ /* (non-Javadoc)
+ * Method declared on IWorkbenchWizard.
+ */
+ public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
+ super.init(workbench, currentSelection);
+ setWindowTitle(CDIUIMessages.NEW_BEANS_XML_WIZARD_TITLE);
+ setNeedsProgressMonitor(true);
+ }
+
+ /* (non-Javadoc)
+ * Method declared on BasicNewResourceWizard.
+ */
+ protected void initializeDefaultPageImageDescriptor() {
+ ImageDescriptor desc = IDEWorkbenchPlugin.getIDEImageDescriptor("wizban/newfile_wiz.png");//$NON-NLS-1$
+ setDefaultPageImageDescriptor(desc);
+ }
+
+ /* (non-Javadoc)
+ * Method declared on IWizard.
+ */
+ public boolean performFinish() {
+ IFile file = mainPage.createNewFile();
+ if (file == null) {
+ return false;
+ }
+
+ selectAndReveal(file);
+
+ // Open editor on new file.
+ IWorkbenchWindow dw = getWorkbench().getActiveWorkbenchWindow();
+ try {
+ if (dw != null) {
+ IWorkbenchPage page = dw.getActivePage();
+ if (page != null) {
+ IDE.openEditor(page, file, true);
+ }
+ }
+ } catch (PartInitException e) {
+ DialogUtil.openError(dw.getShell(), ResourceMessages.FileResource_errorMessage,
+ e.getMessage(), e);
+ }
+
+ return true;
+ }
+
+ class WizardNewBeansXMLFileCreationPage extends WizardNewFileCreationPage {
+
+ public WizardNewBeansXMLFileCreationPage(String pageName, IStructuredSelection selection) {
+ super(pageName, selection);
+ }
+
+ protected void initialPopulateContainerNameField() {
+ super.initialPopulateContainerNameField();
+ if(!selection.isEmpty() && selection instanceof IStructuredSelection) {
+ Object o = ((IStructuredSelection)selection).getFirstElement();
+ IResource r = null;
+ if(o instanceof IResource) {
+ r = (IResource)o;
+ } else if(o instanceof IAdaptable) {
+ r = (IResource)((IAdaptable)o).getAdapter(IResource.class);
+ }
+ if(r != null) {
+ boolean needMetaInf = false;
+ IPath current = getContainerFullPath();
+ IProject p = r.getProject();
+ IPath path = ProjectHome.getWebInfPath(p);
+ if(current != null && current.equals(path)) return;
+ if(path == null) {
+
+ Set<IFolder> fs = EclipseResourceUtil.getSourceFolders(p);
+ if(fs != null) for (IFolder f: fs) {
+ IFolder fm = f.getFolder("META-INF");
+ if(!fm.exists()) {
+ needMetaInf = true;
+ fm = f;
+ }
+ IPath pth = fm.getFullPath();
+ if(current != null && current.equals(pth)) return;
+ if(path == null) path = pth;
+ }
+ }
+ if(path != null) {
+ setContainerFullPath(path);
+ if(needMetaInf) {
+ String value = path.append("META-INF").toString();
+ try {
+ setContainerValue(value);
+ } catch (NoSuchFieldException e) {
+ CDIUIPlugin.getDefault().logError(e);
+ } catch (IllegalAccessException e) {
+ CDIUIPlugin.getDefault().logError(e);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ void setContainerValue(String value) throws NoSuchFieldException, IllegalAccessException {
+ Field f = WizardNewFileCreationPage.class.getDeclaredField("resourceGroup");
+ f.setAccessible(true);
+ ResourceAndContainerGroup resourceGroup = (ResourceAndContainerGroup)f.get(this);
+ Field f2 = ResourceAndContainerGroup.class.getDeclaredField("containerGroup");
+ f2.setAccessible(true);
+ ContainerSelectionGroup containerGroup = (ContainerSelectionGroup)f2.get(resourceGroup);
+ Field f3 = ContainerSelectionGroup.class.getDeclaredField("containerNameField");
+ f3.setAccessible(true);
+ Text text = (Text)f3.get(containerGroup);
+ text.setText(value);
+ }
+
+ protected InputStream getInitialContents() {
+ FileAnyImpl file = (FileAnyImpl)PreferenceModelUtilities.getPreferenceModel().createModelObject("FileCDIBeans", new Properties());
+ return new ByteArrayInputStream(file.getAsText().getBytes());
+ }
+
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeansXMLCreationWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years
JBoss Tools SVN: r27359 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-10 09:51:16 -0500 (Fri, 10 Dec 2010)
New Revision: 27359
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudViewItem.java
Log:
[JBIDE-7856]
* removed DeltaCloudManager#notifyCloudRename and IDeltaCloudManagerListener#RENAME_EVENT. DeltaCloud now notifies about changes in its properties (images, instances, name), no manual triggering of change notification needed any more
* switched the observer pattern in DeltaCloud to PropertyChangeSupport, listening to changes in name, image and instances of the cloud
* updating CloudViewItem in tree if cloud name changes
* updating cloud combo in InstanceView and ImageView if cloud name changes
* now using Generics in the various Items to gain strict typing
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudViewItem.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudViewItem.java 2010-12-10 14:45:09 UTC (rev 27358)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudViewItem.java 2010-12-10 14:51:16 UTC (rev 27359)
@@ -170,15 +170,17 @@
}
protected void removePropertyChangeListener(DELTACLOUDITEM model) {
- try {
- Method method = model.getClass().getMethod("removePropertyChangeListener", PropertyChangeListener.class);
- if (method != null) {
- method.invoke(model, this);
+ if (model != null) {
+ try {
+ Method method = model.getClass()
+ .getMethod("removePropertyChangeListener", PropertyChangeListener.class);
+ if (method != null) {
+ method.invoke(model, this);
+ }
+ } catch (Exception e) {
+ // ignore
}
- } catch (Exception e) {
- e.printStackTrace();
}
-
}
protected abstract void addPropertyChangeListener(DELTACLOUDITEM object);
14 years