Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-01-02 19:20:11 -0500
committerslewis2008-01-02 19:20:11 -0500
commit2d34ae9abb94ef5de5d83fdf037c3a1d7e92746d (patch)
treef7828ce50913fba39706d1bfb141f72781ec1e4f /examples
parentb4f5ecb3f273de97b2e0590aea00e07e893d71f9 (diff)
downloadorg.eclipse.ecf-2d34ae9abb94ef5de5d83fdf037c3a1d7e92746d.tar.gz
org.eclipse.ecf-2d34ae9abb94ef5de5d83fdf037c3a1d7e92746d.tar.xz
org.eclipse.ecf-2d34ae9abb94ef5de5d83fdf037c3a1d7e92746d.zip
Extra clean up for showImageShell
Diffstat (limited to 'examples')
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java4
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ShowImageShell.java16
2 files changed, 19 insertions, 1 deletions
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
index 98997833c..a30af9813 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
@@ -71,7 +71,6 @@ public class EclipseCollabSharedObject extends GenericSharedObject {
private static final String HANDLE_UPDATE_TREE_DISPLAY_MSG = "handleUpdateTreeDisplay";
private static final String HANDLE_UNREGISTER_PROXY_MSG = "handleUnregisterProxy";
private static final String HANDLE_SHOW_TEXT_MSG = "handleShowTextMsg";
- private static final String HANDLE_SHOW_IMAGE_MSG = "handleShowImage";
private static final String HANDLE_USER_MSG = "handleUserMessage";
private static final String HANDLE_CVS_PROJECT_UPDATE_REQUEST_MSG = "handleCVSProjectUpdateRequest";
private static final String HANDLE_REQUEST_USER_UPDATE_MSG = "handleRequestUserUpdate";
@@ -136,6 +135,9 @@ public class EclipseCollabSharedObject extends GenericSharedObject {
localGUI = null;
}
}
+ if (showImageShell != null) {
+ showImageShell.close();
+ }
if (sharedObjectEventListener != null) {
sharedObjectEventListener = null;
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ShowImageShell.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ShowImageShell.java
index 632711347..4f610153e 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ShowImageShell.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ShowImageShell.java
@@ -62,6 +62,22 @@ public class ShowImageShell {
shell.open();
}
+ public void close() {
+ if (shell != null) {
+ shell.getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ try {
+ if (!shell.isDisposed())
+ shell.close();
+ shell = null;
+ } catch (final Exception e) {
+ // do nothing
+ }
+ }
+ });
+ }
+ }
+
public ID getSenderID() {
return senderID;
}

Back to the top