Commit 3cc855b4 authored by JiSoo Kim's avatar JiSoo Kim
Browse files

Bug-478472 Added extension and points for IReactorEditorRegistry



Added extension points about IReactorEditorRegistry in
widget.reactoreditor bundle(ReactorEditorComponent), and added extension
about IReactorEditorRegistry in reactor.perspective bundle.
Signed-off-by: default avatarJiSoo Kim <jskim910118@gmail.com>
parent 01316dea
...@@ -287,9 +287,9 @@ ...@@ -287,9 +287,9 @@
id="mooseformwidgetbuilder" id="mooseformwidgetbuilder"
name="MOOSE Form Widget Builder" name="MOOSE Form Widget Builder"
point="org.eclipse.ice.client.widgets.iformwidgetbuilder"> point="org.eclipse.ice.client.widgets.iformwidgetbuilder">
<iformwidgetbuilder <implementation
class="org.eclipse.ice.client.widgets.moose.MOOSEFormWidgetBuilder"> class="org.eclipse.ice.client.widgets.moose.MOOSEFormWidgetBuilder">
</iformwidgetbuilder> </implementation>
</extension> </extension>
</plugin> </plugin>
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<?eclipse version="3.4"?> <?eclipse version="3.4"?>
<plugin> <plugin>
<extension-point id="org.eclipse.ice.client.widgets.reactoreditor.ireactoreditorregistry" name="IReactorEditorRegistry" schema="schema/org.eclipse.ice.client.widgets.reactoreditor.ireactoreditorregistry.exsd"/>
<extension <extension
...@@ -17,9 +18,9 @@ ...@@ -17,9 +18,9 @@
id="reactorformwidgetbuilder" id="reactorformwidgetbuilder"
name="Reactor Form Widget Builder" name="Reactor Form Widget Builder"
point="org.eclipse.ice.client.widgets.iformwidgetbuilder"> point="org.eclipse.ice.client.widgets.iformwidgetbuilder">
<iformwidgetbuilder <implementation
class="org.eclipse.ice.client.widgets.reactoreditor.ReactorFormWidgetBuilder"> class="org.eclipse.ice.client.widgets.reactoreditor.ReactorFormWidgetBuilder">
</iformwidgetbuilder> </implementation>
</extension> </extension>
</plugin> </plugin>
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.ice.client.widgets.reactoreditor" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="org.eclipse.ice.client.widgets.reactoreditor" id="org.eclipse.ice.client.widgets.reactoreditor.ireactoreditorregistry" name="IReactorEditorRegistry"/>
</appinfo>
<documentation>
[Enter description of this extension point.]
</documentation>
</annotation>
<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<choice minOccurs="1" maxOccurs="unbounded">
<element ref="implementation"/>
</choice>
<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="implementation">
<complexType>
<attribute name="class" type="string">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn=":org.eclipse.ice.client.widgets.reactoreditor.IReactorEditorRegistry"/>
</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>
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.ice.client.widgets.reactoreditor; package org.eclipse.ice.client.widgets.reactoreditor;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.Platform;
import org.eclipse.ice.client.widgets.IFormWidgetBuilder; import org.eclipse.ice.client.widgets.IFormWidgetBuilder;
import org.eclipse.ice.iclient.uiwidgets.IFormWidget; import org.eclipse.ice.iclient.uiwidgets.IFormWidget;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -112,6 +114,17 @@ public class ReactorFormWidgetBuilder implements IFormWidgetBuilder { ...@@ -112,6 +114,17 @@ public class ReactorFormWidgetBuilder implements IFormWidgetBuilder {
if (registry != null) { if (registry != null) {
this.editorRegistry = registry; this.editorRegistry = registry;
} }
IConfigurationElement[] elements = Platform.getExtensionRegistry()
.getConfigurationElementsFor(
"org.eclipse.ice.client.widgets.reactoreditor.ireactoreditorregistry");
System.out.println(
"Available configuration elements(in org.eclipse.ice.client.widgets.reactoreditor.ReactorFormInputFactory.java):");
for (IConfigurationElement element : elements) {
System.out.println(
element.getNamespaceIdentifier() + " " + element.getName());
}
return; return;
} }
} }
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</annotation> </annotation>
<complexType> <complexType>
<choice minOccurs="1" maxOccurs="unbounded"> <choice minOccurs="1" maxOccurs="unbounded">
<element ref="iformwidgetbuilder"/> <element ref="implementation"/>
</choice> </choice>
<attribute name="point" type="string" use="required"> <attribute name="point" type="string" use="required">
<annotation> <annotation>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</complexType> </complexType>
</element> </element>
<element name="iformwidgetbuilder"> <element name="implementation">
<complexType> <complexType>
<attribute name="class" type="string"> <attribute name="class" type="string">
<annotation> <annotation>
......
...@@ -85,6 +85,14 @@ ...@@ -85,6 +85,14 @@
</view> </view>
</perspectiveExtension> </perspectiveExtension>
</extension> </extension>
<extension
id="reactoreditorregistry"
name="Reactor Editor Registry"
point="org.eclipse.ice.client.widgets.reactoreditor.ireactoreditorregistry">
<implementation
class="org.eclipse.ice.reactor.perspective.internal.ReactorEditorRegistry">
</implementation>
</extension>
<!-- <!--
<extension <extension
point="org.eclipse.ui.menus"> point="org.eclipse.ui.menus">
......
...@@ -64,9 +64,9 @@ ...@@ -64,9 +64,9 @@
id="reflectivityformwidgetbuilder" id="reflectivityformwidgetbuilder"
name="Reflectivity Form Widget Builder" name="Reflectivity Form Widget Builder"
point="org.eclipse.ice.client.widgets.iformwidgetbuilder"> point="org.eclipse.ice.client.widgets.iformwidgetbuilder">
<iformwidgetbuilder <implementation
class="org.eclipse.ice.reflectivity.ui.ReflectivityFormWidgetBuilder"> class="org.eclipse.ice.reflectivity.ui.ReflectivityFormWidgetBuilder">
</iformwidgetbuilder> </implementation>
</extension> </extension>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment