summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-11 03:43:28 (EDT)
committerEike Stepper2007-10-11 03:43:28 (EDT)
commit23c4eea0ead49083ddba5eddb4a55ecde7414d3a (patch)
tree469e8cd3bbcdfc22ffe0509b7f5c04cefcbeb1d5
parent1486bbcb74d7524637ac59501abc0404035f245e (diff)
downloadcdo-23c4eea0ead49083ddba5eddb4a55ecde7414d3a.zip
cdo-23c4eea0ead49083ddba5eddb4a55ecde7414d3a.tar.gz
cdo-23c4eea0ead49083ddba5eddb4a55ecde7414d3a.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.java26
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java22
2 files changed, 3 insertions, 45 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 b0569e5..27d26a2 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
@@ -14,37 +14,12 @@ import org.eclipse.net4j.buddies.protocol.IBuddy;
import org.eclipse.net4j.util.container.ContainerUtil;
import org.eclipse.net4j.util.container.IContainer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
public class BuddiesView extends SessionManagerView
{
- private static BuddiesView INSTANCE;
-
public BuddiesView()
{
}
- public static synchronized BuddiesView getINSTANCE()
- {
- return INSTANCE;
- }
-
- @Override
- public synchronized void dispose()
- {
- INSTANCE = null;
- super.dispose();
- }
-
- @Override
- protected Control createControl(Composite parent)
- {
- Control control = super.createControl(parent);
- INSTANCE = this;
- return control;
- }
-
@Override
protected IContainer<?> getContainer()
{
@@ -61,5 +36,4 @@ public class BuddiesView extends SessionManagerView
self.initiate(buddy);
}
}
-
} \ No newline at end of file
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 79332e0..45b905d 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
@@ -22,34 +22,21 @@ import org.eclipse.swt.widgets.List;
public class CollaborationsView extends SessionManagerView
{
- private static final int LIMIT = 10;
-
- private static final int PERCENT = 30;
-
- private static CollaborationsView INSTANCE;
-
private SashComposite sashComposite;
public CollaborationsView()
{
}
- public static synchronized CollaborationsView getINSTANCE()
- {
- return INSTANCE;
- }
-
- @Override
- public synchronized void dispose()
+ public Control getPane()
{
- INSTANCE = null;
- super.dispose();
+ return sashComposite.getControl2();
}
@Override
protected Control createControl(Composite parent)
{
- sashComposite = new SashComposite(parent, SWT.NONE, LIMIT, PERCENT)
+ return sashComposite = new SashComposite(parent, SWT.NONE, 10, 30)
{
@Override
protected Control createControl1(Composite parent)
@@ -63,9 +50,6 @@ public class CollaborationsView extends SessionManagerView
return createPane(parent);
}
};
-
- INSTANCE = this;
- return sashComposite;
}
protected Control createPane(Composite parent)