Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-05-18 05:55:23 +0000
committerslewis2007-05-18 05:55:23 +0000
commitae334e3bdec948b00252efa03ebe46e866c598b2 (patch)
treec2a6cdcfa05cc11ab2e26c4d41f6afe1c6d3055c
parentaba2d60bea4bd99857ecb52f5596258e585fd20a (diff)
downloadorg.eclipse.ecf-ae334e3bdec948b00252efa03ebe46e866c598b2.tar.gz
org.eclipse.ecf-ae334e3bdec948b00252efa03ebe46e866c598b2.tar.xz
org.eclipse.ecf-ae334e3bdec948b00252efa03ebe46e866c598b2.zip
Applied patches from bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=187060. Also refactored some of org.eclipse.ecf.example.collab. Also internalized strings.v20070517-2300
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java130
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseProject.java50
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseProjectComponent.java57
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/HelloMessageSharedObject.java (renamed from examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseMessage.java)6
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/SenderID.java28
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/SharedObjectMsg.java13
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientEntry.java1
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java96
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatClientView.java59
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatHandler.java11
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/TeamChat.java4
11 files changed, 22 insertions, 433 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 9f28af456..7e1703786 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
@@ -26,7 +26,6 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.identity.IDFactory;
-import org.eclipse.ecf.core.sharedobject.ISharedObjectContext;
import org.eclipse.ecf.core.sharedobject.ReplicaSharedObjectDescription;
import org.eclipse.ecf.example.collab.share.io.EclipseFileTransfer;
import org.eclipse.ecf.example.collab.share.io.FileTransferParams;
@@ -56,7 +55,7 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.ViewPart;
public class EclipseCollabSharedObject extends GenericSharedObject implements
- LineChatHandler, EclipseProject {
+ LineChatHandler {
private static final String HANDLE_SHOW_VIEW_MSG = "handleShowView";
private static final String HANDLE_SHOW_VIEW_WITH_ID_MSG = "handleShowViewWithID";
private static final String HANDLE_LAUNCH_EDITOR_FOR_FILE_MSG = "handleLaunchEditorForFile";
@@ -145,7 +144,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject implements
// Make sure we disconnect
try {
if (isHost())
- leaveGroup();
+ disconnect();
} catch (Exception e) {
log("Exception in destroySelf", e);
}
@@ -279,14 +278,6 @@ public class EclipseCollabSharedObject extends GenericSharedObject implements
}
}
- protected void handleRegisterProxy(User sender, String proxyClass,
- String name) {
- Assert.isNotNull(sender);
- Assert.isNotNull(proxyClass);
- Assert.isNotNull(name);
- localRegisterProxy(sender, proxyClass, name);
- }
-
protected void handleRequestUserUpdate(ID requestor) {
sendUserUpdate(requestor);
}
@@ -316,13 +307,6 @@ public class EclipseCollabSharedObject extends GenericSharedObject implements
showLineOnGUI(remote, aString);
}
- protected void handleUnregisterProxy(User sender, String name) {
- Assert.isNotNull(sender);
- Assert.isNotNull(name);
- // loadClass and create instance if possible
- localUnregisterProxy(sender, name);
- }
-
protected void handleUpdateTreeDisplay(final ID fromID, final TreeItem item) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
@@ -392,67 +376,14 @@ public class EclipseCollabSharedObject extends GenericSharedObject implements
return super.isHost();
}
- public void leaveGroup() {
- ISharedObjectContext crs = getContext();
- if (crs == null) {
- } else {
- // Do it.
- crs.disconnect();
- }
- }
-
- public void localRegisterProxy(User sender, String proxyClass, String name) {
- EclipseProjectComponent ec = null;
- try {
- Class cl = Class.forName(proxyClass);
- ec = (EclipseProjectComponent) cl.newInstance();
- ec.register(this, sender);
- // OK, we have new instance...now we add it to our registered
- // proxies
- registerProxy(ec, name, EclipseProjectComponent.INVOKE_METHOD_NAME);
- } catch (Exception e) {
- log("Exception in localRegisterProxy", e);
- }
- }
-
- public void localUnregisterProxy(User ud, String name) {
- MsgMap m = null;
- Object removed = null;
- synchronized (msgMapLock) {
- // Get entry (if exists)
- m = (MsgMap) ((msgMap == null) ? null : (msgMap.get(name)));
- if (m == null)
- return;
- // Then remove
- removed = msgMap.remove(name);
- }
- if (removed != null) {
- try {
- MsgMap mm = (MsgMap) removed;
- EclipseProjectComponent ec = (EclipseProjectComponent) mm
- .getObject();
- // Call it to give it a chance to clean up
- if (ec != null)
- ec.deregister(this);
- } catch (Exception e) {
- log("Exception deregistering component with name " + name
- + " with User " + ud, e);
- }
- }
+ public void disconnect() {
+ getContext().disconnect();
}
public Object getObject(ID obj) {
return getContext().getSharedObjectManager().getSharedObject(obj);
}
- public void createProxyObject(ID target, String proxyClass, String name) {
- ID[] targets = new ID[1];
- targets[0] = target;
- if (name == null)
- name = proxyClass;
- registerEclipseProxy((target == null), targets, proxyClass, name);
- }
-
public void memberAdded(ID member) {
if (sharedObjectEventListener != null) {
sharedObjectEventListener.memberAdded(member);
@@ -519,29 +450,6 @@ public class EclipseCollabSharedObject extends GenericSharedObject implements
}
}
- public void registerEclipseProxy(boolean localAlso, ID[] toReceivers,
- String proxyClass, String name) {
- // first, do it locally if this is what is desired
- if (localAlso)
- localRegisterProxy(localUser, proxyClass, name);
- // Now send register message to appropriate receiver(s).
- if (toReceivers == null)
- sendRegisterProxy(null, proxyClass, name);
- else if (toReceivers.length == 1)
- sendRegisterProxy(toReceivers[0], proxyClass, name);
- else {
- for (int i = 0; i < toReceivers.length; i++) {
- sendRegisterProxy(toReceivers[i], proxyClass, name);
- }
- }
- }
-
- public void removeProxyObject(ID target, String name) {
- ID[] targets = new ID[1];
- targets[0] = target;
- unregisterEclipseProxy((target == null), targets, name);
- }
-
// SharedObjectMsg senders
public void sendNotifyUserAdded() {
try {
@@ -1109,36 +1017,6 @@ public class EclipseCollabSharedObject extends GenericSharedObject implements
return wp.showView(id);
}
- public void unregisterEclipseProxy(boolean localAlso, ID[] toReceivers,
- String name) {
- // first, do it locally if this is what is desired
- if (localAlso) {
- try {
- localUnregisterProxy(getUser(), name);
- } catch (Exception e) {
- log("Exception deregistering locally", e);
- throw new RuntimeException(
- "deregisterEclipseProxy. Local deregistration failed",
- e);
- }
- }
- // Now send register message to appropriate receiver(s).
- if (toReceivers == null)
- sendUnregisterProxy(null, name);
- else if (toReceivers.length == 1)
- sendUnregisterProxy(toReceivers[0], name);
- else {
- for (int i = 0; i < toReceivers.length; i++) {
- try {
- sendUnregisterProxy(toReceivers[i], name);
- } catch (Exception e) {
- log("Exception sending register proxy message to "
- + toReceivers[i], e);
- }
- }
- }
- }
-
public FileReceiverUI getFileReceiverUI(EclipseFileTransfer transfer,
FileTransferParams params) {
return new FileReceiverUI() {
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseProject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseProject.java
deleted file mode 100644
index 494d65c25..000000000
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseProject.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others.
- * 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:
- * Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.example.collab.share;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.ecf.core.identity.ID;
-import org.eclipse.ecf.core.sharedobject.ISharedObjectContext;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * Interface describing access to the Eclipse resource that is associated with a
- * given collaboration group.
- *
- * @author slewis
- */
-public interface EclipseProject {
-
- public ID getID();
-
- public IResource getResource();
-
- public IWorkbenchWindow getWorkbenchWindow();
-
- public ISharedObjectContext getContext();
-
- public void createProxyObject(ID target, String classname, String name);
-
- public void messageProxyObject(ID target, String name, String meth,
- Object[] args);
-
- public void removeProxyObject(ID target, String name);
-
- public User getUser();
-
- public User getUserForID(ID user);
-
- public void sendPrivateMessageToUser(User touser, String msg);
-
- public void sendShowTextMsg(String msg);
-
-}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseProjectComponent.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseProjectComponent.java
deleted file mode 100644
index 49a9e1fde..000000000
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseProjectComponent.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others.
- * 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:
- * Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.example.collab.share;
-
-/*
- * Interface contract for dynamic component registration/ deregistration with a
- * Eclipse Project and it's associated group.
- *
- * @author slewis
- */
-public interface EclipseProjectComponent {
-
- public static final String INVOKE_METHOD_NAME = "invoke";
-
- /**
- * Method called when this component is instantiated and registered with the
- * associated EclipseProject. Component implementers may override this
- * method in order to initialize, setup ui for this component, or perform
- * some other component startup functions
- *
- * @param sharedObject
- * @param requestor
- * @throws Exception
- */
- public void register(EclipseProject obj, User requestor) throws Exception;
-
- /**
- * This method is invoked when a message is sent to the given component
- *
- * @param meth
- * the method name to invoke
- * @param args
- * array of args to pass to call
- * @return Object result of the invocation
- */
- public Object invoke(String meth, Object[] args);
-
- /**
- * Method called when this component is removed from the associated
- * EclipseProject. Component implementers may override this method in order
- * to cleanup during component shutdown
- *
- * @param sharedObject
- * @throws Exception
- */
- public void deregister(EclipseProject obj);
-
-}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseMessage.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/HelloMessageSharedObject.java
index 7ce3ca236..aeee3efa8 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseMessage.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/HelloMessageSharedObject.java
@@ -21,16 +21,16 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Display;
-public class EclipseMessage extends GenericSharedObject {
+public class HelloMessageSharedObject extends GenericSharedObject {
private String message;
private String sender;
- public EclipseMessage() {
+ public HelloMessageSharedObject() {
sender = "<unknown>";
message = " says hello";
}
- public EclipseMessage(String message, String sender) {
+ public HelloMessageSharedObject(String message, String sender) {
this.message = message;
this.sender = sender;
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/SenderID.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/SenderID.java
deleted file mode 100644
index 5b48585f0..000000000
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/SenderID.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others.
- * 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:
- * Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.example.collab.share;
-
-import org.eclipse.ecf.core.identity.ID;
-
-public final class SenderID {
-
- private ID myID;
-
- // No instances other than ones created in SharedObjectMsg.invokeFrom/2
- protected SenderID(ID theID) {
- myID = theID;
- }
-
- public ID getID() {
- return myID;
- }
-} \ No newline at end of file
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/SharedObjectMsg.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/SharedObjectMsg.java
index c8f3385b4..b81a892af 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/SharedObjectMsg.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/SharedObjectMsg.java
@@ -26,6 +26,19 @@ public class SharedObjectMsg implements Serializable {
public static final Object[] nullArgs = new Object[0];
public static final Class[] nullTypes = new Class[0];
+ class SenderID {
+
+ private ID id;
+
+ // No instances other than ones created in SharedObjectMsg.invokeFrom/2
+ protected SenderID(ID theID) {
+ id = theID;
+ }
+
+ public ID getID() {
+ return id;
+ }
+ }
// Static factory methods for creating SharedObjectMsg instances
public static SharedObjectMsg createMsg(String className,
String methodName, Object[] param) {
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientEntry.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientEntry.java
index 8689e6d38..c6a7821d7 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientEntry.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientEntry.java
@@ -50,6 +50,5 @@ public class ClientEntry {
sharedObject.destroySelf();
sharedObject = null;
}
- container.dispose();
}
} \ No newline at end of file
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java
index 86facd832..467d1de0d 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java
@@ -111,7 +111,6 @@ public class ChatComposite extends Composite {
ChatLayout cl = null;
Action coBrowseURL = null;
- Action messageEclipseComponent = null;
Action outputClear = null;
Action outputCopy = null;
Action outputPaste = null;
@@ -123,7 +122,6 @@ public class ChatComposite extends Composite {
Action sendMessage = null;
Action startProgram = null;
Action closeGroup = null;
- Action sendCVSUpdateRequest = null;
Action sendShowViewRequest = null;
@@ -355,10 +353,6 @@ public class ChatComposite extends Composite {
bos.close();
}
- protected void enableProxyMessage(boolean val) {
- messageEclipseComponent.setEnabled(val);
- }
-
private void fillContextMenu(IMenuManager manager) {
if (chatWindow != null) {
manager.add(showChatWindow);
@@ -374,21 +368,9 @@ public class ChatComposite extends Composite {
manager.add(sendFileToGroup);
// manager.add(sendFileToGroupAndLaunch);
manager.add(coBrowseURL);
- // manager.add(startProgram);
- // appShare.setEnabled(!LineChatView.appShareActive());
- // manager.add(appShare);
manager.add(new Separator());
manager.add(sendMessage);
- manager.add(sendCVSUpdateRequest);
manager.add(sendShowViewRequest);
- // manager.add(new Separator());
- // manager.add(sendEclipseComponent);
- // manager.add(messageEclipseComponent);
- // manager.add(removeEclipseComponent);
- /*
- * manager.add(new Separator()); manager.add(sendComponent);
- * manager.add(sendComponentToServer);
- */
manager.add(new Separator());
manager.add(closeGroup);
// Other plug-ins can contribute there actions here
@@ -413,30 +395,11 @@ public class ChatComposite extends Composite {
manager.add(appShare);
manager.add(new Separator());
manager.add(sendMessage);
- manager.add(sendCVSUpdateRequest);
manager.add(sendShowViewRequest);
- /*
- * manager.add(new Separator()); manager.add(sendComponent);
- * manager.add(sendComponentToServer);
- * manager.add(sendEclipseComponent);
- */
manager.add(new Separator());
manager.add(closeGroup);
}
- /*
- * private void fillLocalToolBar(IToolBarManager manager) {
- * manager.add(inputCopy); manager.add(inputPaste); manager.add(inputClear);
- * manager.add(new Separator()); manager.add(inputSelectAll);
- * manager.add(new Separator()); manager.add(sendFileToGroup);
- * manager.add(coBrowseURL); manager.add(startProgram);
- * manager.add(appShare); manager.add(new Separator());
- * manager.add(sendMessage); //manager.add(new Separator());
- * manager.add(sendComponent); //manager.add(sendComponentToServer);
- * //manager.add(sendEclipseComponent); manager.add(new Separator());
- * manager.add(closeGroup); }
- */
-
private void fillTreeContextMenu(IMenuManager manager) {
User ud = treeView.getSelectionUser();
if (ud != null) {
@@ -988,16 +951,6 @@ public class ChatComposite extends Composite {
.getString("LineChatClientView.contextmenu.leaveGroup"));
closeGroup.setEnabled(true);
- sendCVSUpdateRequest = new Action() {
- public void run() {
- sendCVSUpdateRequest(null);
- }
- };
- sendCVSUpdateRequest
- .setText(MessageLoader
- .getString("LineChatClientView.contextmenu.sendCVSUpdateRequest"));
- sendCVSUpdateRequest.setEnabled(this.view.lch.isCVSShared());
-
sendShowViewRequest = new Action() {
public void run() {
sendShowViewRequest(null);
@@ -1197,16 +1150,6 @@ public class ChatComposite extends Composite {
section.put(SELECTION_SETTING, selectedIDs);
}
- protected void sendCVSUpdateRequest(User touser) {
- // String initStr =
- // MessageLoader.getString("LineChatClientView.contextmenu.sendCVSUpdateRequestInitStr");
- // String res =
- // getID(MessageLoader.getString("LineChatClientView.contextmenu.sendCVSUpdateRequestTitle"),
- // MessageLoader.getString("LineChatClientView.contextmenu.sendCVSUpdateRequestMessage"),
- // initStr);
- this.view.lch.sendCVSProjectUpdateRequest(touser, null);
- }
-
protected void closeProjectGroup(User user) {
if (MessageDialog
.openConfirm(
@@ -1222,45 +1165,6 @@ public class ChatComposite extends Composite {
}
- protected void messageEclipseComponent(User user) {
- String res = null;
- ID userID = null;
-
- String initStr = "";
- if (this.view.proxyObjects.size() > 0) {
- initStr = (String) this.view.proxyObjects
- .get(this.view.proxyObjects.size() - 1);
- }
- res = initStr;
- if (user != null) {
- res = getID("Message EclipseProjectComponent for "
- + user.getNickname(), "EclipseProjectComponent Message:",
- initStr);
- userID = user.getUserID();
- } else {
- res = getID("Message EclipseProjectComponent for Group",
- "EclipseProjectComponent Message:", initStr);
- }
- if (res != null) {
- String className = getCommand(res);
- // Find proxy object in local vector
- if (this.view.proxyObjects.contains(className)) {
- String[] args = getArgs(res);
- String meth = "";
- Object[] actualArgs = new Object[0];
- if (args != null && args.length >= 2) {
- meth = args[0];
- actualArgs = new Object[args.length - 1];
- for (int i = 1; i < args.length; i++) {
- actualArgs[i - 1] = args[i];
- }
- }
- // Send message
- this.view.messageProxyObject(userID, className, meth,
- actualArgs);
- }
- }
- }
protected void outputClear() {
if (MessageDialog.openConfirm(null, "Confirm Clear Text Output",
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatClientView.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatClientView.java
index dd698de95..496ce5182 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatClientView.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatClientView.java
@@ -21,7 +21,7 @@ import java.util.Iterator;
import java.util.Vector;
import org.eclipse.ecf.core.identity.ID;
-import org.eclipse.ecf.example.collab.share.EclipseMessage;
+import org.eclipse.ecf.example.collab.share.HelloMessageSharedObject;
import org.eclipse.ecf.example.collab.share.TreeItem;
import org.eclipse.ecf.example.collab.share.User;
import org.eclipse.ecf.example.collab.share.url.StartProgramSharedObject;
@@ -46,7 +46,7 @@ public class LineChatClientView implements FileSenderUI {
.getName();
public static final String HOST_PREFIX = "You say";
public static final String LEFT_STRING = "LEFT";
- public static final String MESSAGECLASSNAME = EclipseMessage.class
+ public static final String MESSAGECLASSNAME = HelloMessageSharedObject.class
.getName();
public static final String REMOTEFILEPATH = null;
public static final String SHOWURLARGTYPES[] = { ID.class.getName(),
@@ -343,30 +343,6 @@ public class LineChatClientView implements FileSenderUI {
}
}
- protected void createProxyObject(ID target, final String className) {
- if (lch != null) {
- try {
- // With this interface, we'll simply supply the class name
- // as the instance name. Eventually, the user interface should
- // allow the creation of some other instance name
- lch.createProxyObject(target, className, className);
- proxyObjects.add(className);
- teamChat.enableProxyMessage(true);
- } catch (final Exception e) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openInformation(null,
- "Make Proxy Object Exception",
- "Exception creating instance of '" + className
- + "'. \nException: " + e);
- }
- });
- e.printStackTrace();
- lch.chatException(e, "createProxyObject(" + className + ")");
- }
- }
- }
-
protected TreeParent createUserNode(TreeParent node, Vector ht) {
if (node == null || ht == null)
return null;
@@ -391,13 +367,6 @@ public class LineChatClientView implements FileSenderUI {
return (TreeUser) createUserNode(tu, ud.getUserFields());
}
- protected void messageProxyObject(ID target, String classname, String meth,
- Object[] args) {
- if (lch != null) {
- lch.messageProxyObject(target, classname, meth, args);
- }
- }
-
protected void refreshTreeView() {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
@@ -413,30 +382,6 @@ public class LineChatClientView implements FileSenderUI {
});
}
- protected void removeProxyObject(ID target, final String className) {
- if (lch != null) {
- try {
- // With this interface, we'll simply supply the class name
- // as the instance name. Eventually, the user interface should
- // allow the creation of some other instance name
- lch.removeProxyObject(target, className);
- proxyObjects.remove(className);
- teamChat.enableProxyMessage(proxyObjects.size() > 0);
- } catch (final Exception e) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openInformation(null,
- "Remove Proxy Object Exception",
- "Exception creating instance of '" + className
- + "'. \nException: " + e);
- }
- });
- e.printStackTrace();
- lch.chatException(e, "removeProxyObject(" + className + ")");
- }
- }
- }
-
public void removeUser(ID id) {
String name = getUserData(id);
if (name != null) {
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatHandler.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatHandler.java
index 947c7cc94..ed770cce6 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatHandler.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatHandler.java
@@ -47,17 +47,6 @@ public interface LineChatHandler {
public void sendPrivateMessageToUser(User touser, String msg);
- public void createProxyObject(ID target, String classname, String name);
-
- public void messageProxyObject(ID target, String name, String meth,
- Object[] args);
-
- public void removeProxyObject(ID target, String name);
-
- public void sendCVSProjectUpdateRequest(User touser, String msg);
-
- public boolean isCVSShared();
-
public void sendShowViewWithID(User touser, String id, String secID,
Integer mode);
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/TeamChat.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/TeamChat.java
index 8262a2277..65923f3fc 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/TeamChat.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/TeamChat.java
@@ -133,10 +133,6 @@ class TeamChat extends Composite {
chat.clearInput();
}
- void enableProxyMessage(boolean val) {
- chat.enableProxyMessage(val);
- }
-
ChatTreeViewer getTree() {
return treeView;
}

Back to the top