summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-11 05:34:27 (EDT)
committerEike Stepper2007-10-11 05:34:27 (EDT)
commit073c022f883397b315664de66e4afd16a59e2442 (patch)
treeae3e5c5b0a906758a23b283db3e43313e5ac40fe
parent1fc67683e7b590a543a3f21d4002db595717b434 (diff)
downloadcdo-073c022f883397b315664de66e4afd16a59e2442.zip
cdo-073c022f883397b315664de66e4afd16a59e2442.tar.gz
cdo-073c022f883397b315664de66e4afd16a59e2442.tar.bz2
[205668] Provide buddies example
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205668
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java16
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java8
2 files changed, 19 insertions, 5 deletions
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java
index 364f2a2..0e0292e 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java
@@ -13,6 +13,8 @@ package org.eclipse.net4j.buddies.internal.ui.views;
import org.eclipse.net4j.buddies.IBuddyCollaboration;
import org.eclipse.net4j.buddies.IBuddySession;
import org.eclipse.net4j.buddies.protocol.IFacility;
+import org.eclipse.net4j.util.event.IEvent;
+import org.eclipse.net4j.util.event.IListener;
import org.eclipse.net4j.util.ui.UIUtil;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -26,7 +28,7 @@ import java.util.Map;
/**
* @author Eike Stepper
*/
-public class CollaborationsPane extends Composite
+public class CollaborationsPane extends Composite implements IListener
{
private CollaborationsView collaborationsView;
@@ -52,6 +54,13 @@ public class CollaborationsPane extends Composite
collaborationsView.getViewer().addSelectionChangedListener(collaborationsViewerListener);
}
+ @Override
+ public void dispose()
+ {
+ collaborationsView.getViewer().removeSelectionChangedListener(collaborationsViewerListener);
+ super.dispose();
+ }
+
public CollaborationsView getCollaborationsView()
{
return collaborationsView;
@@ -67,10 +76,7 @@ public class CollaborationsPane extends Composite
this.session = session;
}
- @Override
- public void dispose()
+ public void notifyEvent(IEvent event)
{
- collaborationsView.getViewer().removeSelectionChangedListener(collaborationsViewerListener);
- super.dispose();
}
}
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java
index 51f9ad0..e747c71 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java
@@ -12,6 +12,7 @@ package org.eclipse.net4j.buddies.internal.ui.views;
import org.eclipse.net4j.util.container.ContainerUtil;
import org.eclipse.net4j.util.container.IContainer;
+import org.eclipse.net4j.util.event.IEvent;
import org.eclipse.net4j.util.ui.widgets.SashComposite;
import org.eclipse.jface.action.IToolBarManager;
@@ -67,6 +68,13 @@ public class CollaborationsView extends SessionManagerView
}
@Override
+ public void notifyEvent(IEvent event)
+ {
+ super.notifyEvent(event);
+ getCollaborationsPane().notifyEvent(event);
+ }
+
+ @Override
protected IContainer<?> getContainer()
{
return getSession() != null ? getSession().getSelf() : ContainerUtil.emptyContainer();