summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-08 04:49:29 (EDT)
committerEike Stepper2007-10-08 04:49:29 (EDT)
commitc07cb7756aff9fe29b3ed8b6b7662981b6dcca99 (patch)
treea77f6c84c8d72c1cfd346239d107f9291cb5321a
parentce24a6efc8b85f7f3ad0083ea2bd87bf058741df (diff)
downloadcdo-c07cb7756aff9fe29b3ed8b6b7662981b6dcca99.zip
cdo-c07cb7756aff9fe29b3ed8b6b7662981b6dcca99.tar.gz
cdo-c07cb7756aff9fe29b3ed8b6b7662981b6dcca99.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/BuddiesView.java5
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/BuddySession.java8
2 files changed, 8 insertions, 5 deletions
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesView.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesView.java
index e347461..6b56b4c 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesView.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesView.java
@@ -18,6 +18,7 @@ import org.eclipse.net4j.util.ui.actions.SafeAction;
import org.eclipse.net4j.util.ui.views.ContainerItemProvider;
import org.eclipse.net4j.util.ui.views.ContainerView;
+import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.Separator;
@@ -231,7 +232,9 @@ public class BuddiesView extends ContainerView implements IListener
private StateAction(String text, State state, String key)
{
- super(text, "Set own state to '" + text.toLowerCase() + "'", SharedIcons.getDescriptor(key));
+ super(text, Action.AS_RADIO_BUTTON);
+ setToolTipText("Set own state to '" + text.toLowerCase() + "'");
+ setImageDescriptor(SharedIcons.getDescriptor(key));
this.state = state;
}
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/BuddySession.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/BuddySession.java
index 45b6d1a..f4dd908 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/BuddySession.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/BuddySession.java
@@ -46,7 +46,7 @@ public class BuddySession extends Lifecycle implements IBuddySession, IListener
return channel;
}
- public IBuddy getSelf()
+ public Self getSelf()
{
return self;
}
@@ -56,7 +56,7 @@ public class BuddySession extends Lifecycle implements IBuddySession, IListener
this.self = new Self(this, account);
}
- public IBuddy addBuddy(String userID)
+ public Buddy addBuddy(String userID)
{
Buddy buddy = null;
synchronized (buddies)
@@ -83,7 +83,7 @@ public class BuddySession extends Lifecycle implements IBuddySession, IListener
{
synchronized (buddies)
{
- return buddies.values().toArray(new IBuddy[buddies.size()]);
+ return buddies.values().toArray(new Buddy[buddies.size()]);
}
}
@@ -117,7 +117,7 @@ public class BuddySession extends Lifecycle implements IBuddySession, IListener
public void buddyAdded(String userID)
{
- IBuddy buddy = addBuddy(userID);
+ Buddy buddy = addBuddy(userID);
if (buddy != null)
{
fireEvent(new SingleDeltaContainerEvent<IBuddy>(this, buddy, IContainerDelta.Kind.ADDED));