summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Liebig2008-03-11 11:04:25 (EDT)
committerStefan Liebig2008-03-11 11:04:25 (EDT)
commitafee7ca3d65f253882c91c07ab386f3fad8c30cb (patch)
treebc8d7d03c507a9358dcc932b7dec8090296b5ca3
parent182b11cec120634896f0583143a62de5a24cdf9f (diff)
downloadorg.eclipse.riena-afee7ca3d65f253882c91c07ab386f3fad8c30cb.zip
org.eclipse.riena-afee7ca3d65f253882c91c07ab386f3fad8c30cb.tar.gz
org.eclipse.riena-afee7ca3d65f253882c91c07ab386f3fad8c30cb.tar.bz2
made plugin.xml & schema local
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/ExtensionUtilTest.java7
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/extpoint.exsd112
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/plugin.xml27
3 files changed, 145 insertions, 1 deletions
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/ExtensionUtilTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/ExtensionUtilTest.java
index 9a3ccba..8167172 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/ExtensionUtilTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/ExtensionUtilTest.java
@@ -18,7 +18,8 @@ import org.eclipse.riena.tests.RienaTestCase;
public class ExtensionUtilTest extends RienaTestCase {
public void testExceptionUtil1() {
- System.out.println("test");
+ printTestName();
+ addPluginXml(ExtensionUtilTest.class, "plugin.xml");
ITest[] tests = ExtensionUtility.readExtensions("core.test.extpoint", ITest.class);
assertNotNull(tests);
assertTrue("tests.length should be 3 but is " + tests.length, tests.length == 3);
@@ -42,12 +43,16 @@ public class ExtensionUtilTest extends RienaTestCase {
}
}
}
+ removeExtensionPoint("core.test.extpoint");
}
public void testExceptionUtil2() {
+ printTestName();
+ addPluginXml(ExtensionUtilTest.class, "plugin.xml");
ITest[] tests = ExtensionUtility.readExtensions("core.test.extpoint2", ITest.class);
assertFalse(tests == null);
assertTrue(tests instanceof ITest[]);
assertTrue(tests.length == 0);
+ removeExtensionPoint("core.test.extpoint");
}
}
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/extpoint.exsd b/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/extpoint.exsd
new file mode 100644
index 0000000..3add169
--- /dev/null
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/extpoint.exsd
@@ -0,0 +1,112 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="de.compeople.scp.core.tests" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="de.compeople.scp.core.tests" id="core.test.extpoint" name="extpoint"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="test"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="test">
+ <complexType>
+ <attribute name="string" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="boolean" type="boolean">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="executable" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiInfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/plugin.xml b/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/plugin.xml
new file mode 100644
index 0000000..4f44b9c
--- /dev/null
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/plugin.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension-point id="core.test.extpoint" name="core test extensionpoint" schema="extpoint.exsd"/>
+ <extension-point id="core.test.extpoint2" name="core test extensionpoint" schema="extpoint.exsd"/>
+ <extension
+ point="core.test.extpoint">
+ <test
+ boolean="true"
+ executable="java.lang.String"
+ string="test1">
+ </test>
+ <test
+ boolean="false"
+ executable="java.util.HashMap"
+ string="test2">
+ </test>
+ </extension>
+ <extension
+ point="core.test.extpoint">
+ <test
+ boolean="true"
+ executable="java.util.ArrayList"
+ string="test3">
+ </test>
+ </extension>
+</plugin>