summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-08 04:10:48 (EDT)
committerEike Stepper2007-10-08 04:10:48 (EDT)
commit95879b7b79e7659aa4a300aaf3d2e34a34cead23 (patch)
treeba26cf46c5b52c5ea7dcbb44c4e1f57c374ac325
parenta1bdd3c6bea3be3cdb7d43e4b1570a0d2d3765bf (diff)
downloadcdo-95879b7b79e7659aa4a300aaf3d2e34a34cead23.zip
cdo-95879b7b79e7659aa4a300aaf3d2e34a34cead23.tar.gz
cdo-95879b7b79e7659aa4a300aaf3d2e34a34cead23.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.java16
1 files changed, 4 insertions, 12 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 6ef0d27..532a6d4 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
@@ -66,6 +66,8 @@ public class BuddiesView extends ContainerView implements IListener
if (connecting)
{
session.addListener(BuddiesView.this);
+ connectAction.setEnabled(false);
+ disconnectAction.setEnabled(true);
}
else
{
@@ -89,6 +91,8 @@ public class BuddiesView extends ContainerView implements IListener
session.close();
session = null;
connecting = false;
+ connectAction.setEnabled(true);
+ disconnectAction.setEnabled(false);
}
@Override
@@ -177,12 +181,6 @@ public class BuddiesView extends ContainerView implements IListener
}
@Override
- public boolean isEnabled()
- {
- return session == null && !connecting;
- }
-
- @Override
protected void safeRun() throws Exception
{
connect();
@@ -200,12 +198,6 @@ public class BuddiesView extends ContainerView implements IListener
}
@Override
- public boolean isEnabled()
- {
- return session != null || connecting;
- }
-
- @Override
protected void safeRun() throws Exception
{
disconnect();