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);