summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-11 13:13:01 (EDT)
committerEike Stepper2007-10-11 13:13:01 (EDT)
commit2c3b751c168cd1f1553d6b1087eeb379460d8082 (patch)
tree1457ef26531a047cc6e7bc8160e6c2da1cfae05f
parent2a833c138063a98bd5ad513c954fc1615e225bc1 (diff)
downloadcdo-2c3b751c168cd1f1553d6b1087eeb379460d8082.zip
cdo-2c3b751c168cd1f1553d6b1087eeb379460d8082.tar.gz
cdo-2c3b751c168cd1f1553d6b1087eeb379460d8082.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/plugin.xml14
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/Test1PaneCreator.java37
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/Test2PaneCreator.java37
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/Test3PaneCreator.java37
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/TestPane.java29
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java1
6 files changed, 155 insertions, 0 deletions
diff --git a/plugins/org.eclipse.net4j.buddies.ui/plugin.xml b/plugins/org.eclipse.net4j.buddies.ui/plugin.xml
index a38dfb8..d18612f 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/plugin.xml
+++ b/plugins/org.eclipse.net4j.buddies.ui/plugin.xml
@@ -16,8 +16,22 @@
-->
<plugin>
+
<extension-point id="facilityPaneCreators" name="Facility Pane Creators" schema="schema/facilityPaneCreators.exsd"/>
+ <extension
+ point="org.eclipse.net4j.buddies.ui.facilityPaneCreators">
+ <facilityPaneCreator
+ class="org.eclipse.net4j.buddies.internal.ui.Test1PaneCreator"
+ type="Test1Facility"/>
+ <facilityPaneCreator
+ class="org.eclipse.net4j.buddies.internal.ui.Test2PaneCreator"
+ type="Test2Facility"/>
+ <facilityPaneCreator
+ class="org.eclipse.net4j.buddies.internal.ui.Test3PaneCreator"
+ type="Test3Facility"/>
+ </extension>
+
<extension
point="org.eclipse.ui.preferencePages">
<page
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/Test1PaneCreator.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/Test1PaneCreator.java
new file mode 100644
index 0000000..a4ea43c
--- /dev/null
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/Test1PaneCreator.java
@@ -0,0 +1,37 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2007 Eike Stepper, Germany.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.net4j.buddies.internal.ui;
+
+import org.eclipse.net4j.buddies.internal.protocol.Test1Facility;
+import org.eclipse.net4j.buddies.internal.ui.views.FacilityPane;
+import org.eclipse.net4j.buddies.ui.IFacilityPaneCreator;
+
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author Eike Stepper
+ */
+public class Test1PaneCreator implements IFacilityPaneCreator
+{
+ public Test1PaneCreator()
+ {
+ }
+
+ public String getFacilityType()
+ {
+ return Test1Facility.class.getSimpleName();
+ }
+
+ public FacilityPane createFacilityPane(Composite parent, int style)
+ {
+ return new TestPane(parent, style, getFacilityType());
+ }
+}
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/Test2PaneCreator.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/Test2PaneCreator.java
new file mode 100644
index 0000000..fe7a21c
--- /dev/null
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/Test2PaneCreator.java
@@ -0,0 +1,37 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2007 Eike Stepper, Germany.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.net4j.buddies.internal.ui;
+
+import org.eclipse.net4j.buddies.internal.protocol.Test2Facility;
+import org.eclipse.net4j.buddies.internal.ui.views.FacilityPane;
+import org.eclipse.net4j.buddies.ui.IFacilityPaneCreator;
+
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author Eike Stepper
+ */
+public class Test2PaneCreator implements IFacilityPaneCreator
+{
+ public Test2PaneCreator()
+ {
+ }
+
+ public String getFacilityType()
+ {
+ return Test2Facility.class.getSimpleName();
+ }
+
+ public FacilityPane createFacilityPane(Composite parent, int style)
+ {
+ return new TestPane(parent, style, getFacilityType());
+ }
+}
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/Test3PaneCreator.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/Test3PaneCreator.java
new file mode 100644
index 0000000..a92ec41
--- /dev/null
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/Test3PaneCreator.java
@@ -0,0 +1,37 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2007 Eike Stepper, Germany.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.net4j.buddies.internal.ui;
+
+import org.eclipse.net4j.buddies.internal.protocol.Test3Facility;
+import org.eclipse.net4j.buddies.internal.ui.views.FacilityPane;
+import org.eclipse.net4j.buddies.ui.IFacilityPaneCreator;
+
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author Eike Stepper
+ */
+public class Test3PaneCreator implements IFacilityPaneCreator
+{
+ public Test3PaneCreator()
+ {
+ }
+
+ public String getFacilityType()
+ {
+ return Test3Facility.class.getSimpleName();
+ }
+
+ public FacilityPane createFacilityPane(Composite parent, int style)
+ {
+ return new TestPane(parent, style, getFacilityType());
+ }
+}
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/TestPane.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/TestPane.java
new file mode 100644
index 0000000..01a8674
--- /dev/null
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/TestPane.java
@@ -0,0 +1,29 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2007 Eike Stepper, Germany.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.net4j.buddies.internal.ui;
+
+import org.eclipse.net4j.buddies.internal.ui.views.FacilityPane;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @author Eike Stepper
+ */
+public class TestPane extends FacilityPane
+{
+ public TestPane(Composite parent, int style, String type)
+ {
+ super(parent, style);
+ new Text(this, SWT.CENTER).setText(type);
+ }
+}
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 277ca18..19469a5 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
@@ -43,6 +43,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
/**
* @author Eike Stepper