Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2006-07-27 01:24:38 -0400
committerslewis2006-07-27 01:24:38 -0400
commit92409ac34778238e4afc4fcfb110678f70b413ea (patch)
tree974b37cec91364c539e6fc77060d3a6d649c8b83 /examples
parent078e95db7d11c630cc8298283419e3c061b36f6e (diff)
downloadorg.eclipse.ecf-92409ac34778238e4afc4fcfb110678f70b413ea.tar.gz
org.eclipse.ecf-92409ac34778238e4afc4fcfb110678f70b413ea.tar.xz
org.eclipse.ecf-92409ac34778238e4afc4fcfb110678f70b413ea.zip
Changed return type of handleSharedObjectMsgEvent method (from Event to boolean). Changed/eliminated all references.
Diffstat (limited to 'examples')
-rw-r--r--examples/bundles/org.eclipse.ecf.example.clients/src/org/eclipse/ecf/example/clients/TrivialSharedObject.java12
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/RosterSharedObject.java16
2 files changed, 7 insertions, 21 deletions
diff --git a/examples/bundles/org.eclipse.ecf.example.clients/src/org/eclipse/ecf/example/clients/TrivialSharedObject.java b/examples/bundles/org.eclipse.ecf.example.clients/src/org/eclipse/ecf/example/clients/TrivialSharedObject.java
index d1312d764..b6ebb1074 100644
--- a/examples/bundles/org.eclipse.ecf.example.clients/src/org/eclipse/ecf/example/clients/TrivialSharedObject.java
+++ b/examples/bundles/org.eclipse.ecf.example.clients/src/org/eclipse/ecf/example/clients/TrivialSharedObject.java
@@ -3,12 +3,9 @@ package org.eclipse.ecf.example.clients;
import java.io.IOException;
import org.eclipse.ecf.core.SharedObjectInitException;
-import org.eclipse.ecf.core.events.ISharedObjectMessageEvent;
import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.sharedobject.AbstractSharedObject;
import org.eclipse.ecf.core.sharedobject.SharedObjectMsg;
-import org.eclipse.ecf.core.sharedobject.SharedObjectMsgEvent;
-import org.eclipse.ecf.core.util.Event;
public class TrivialSharedObject extends AbstractSharedObject {
@@ -27,17 +24,14 @@ public class TrivialSharedObject extends AbstractSharedObject {
e.printStackTrace();
}
}
-
- protected Event handleSharedObjectMsgEvent(ISharedObjectMessageEvent event) {
+ protected boolean handleSharedObjectMsg(SharedObjectMsg msg) {
try {
- ((SharedObjectMsgEvent) event.getData()).getSharedObjectMsg()
- .invoke(this);
+ msg.invoke(this);
} catch (Exception e) {
e.printStackTrace();
}
- return event;
+ return false;
}
-
protected void handleMessage(String message) {
// XXX this should call the view back to display the message/do other things, etc
System.out.println("TrivialSharedObject.handleMessage(" + message + ")");
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/RosterSharedObject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/RosterSharedObject.java
index 8ec1b8b68..cde670793 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/RosterSharedObject.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/RosterSharedObject.java
@@ -2,12 +2,9 @@ package org.eclipse.ecf.example.collab.share;
import java.io.IOException;
-import org.eclipse.ecf.core.events.ISharedObjectMessageEvent;
import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.sharedobject.AbstractSharedObject;
import org.eclipse.ecf.core.sharedobject.SharedObjectMsg;
-import org.eclipse.ecf.core.sharedobject.SharedObjectMsgEvent;
-import org.eclipse.ecf.core.util.Event;
import org.eclipse.ecf.example.collab.ui.CollabRosterView;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchPage;
@@ -31,19 +28,14 @@ public class RosterSharedObject extends AbstractSharedObject {
}
}
- protected Event handleSharedObjectMsgEvent(ISharedObjectMessageEvent event) {
- Object data = event.getData();
- SharedObjectMsg m = null;
+ protected boolean handleSharedObjectMsg(SharedObjectMsg msg) {
try {
- if (data instanceof SharedObjectMsg) m = (SharedObjectMsg) data;
- else m = ((SharedObjectMsgEvent) data).getSharedObjectMsg();
- m.invoke(this);
- // We've handled this message, so don't let it go further
- return null;
+ msg.invoke(this);
+ return true;
} catch (Exception e) {
e.printStackTrace();
- return event;
}
+ return false;
}
protected void handleMessage(String message) {

Back to the top