Commit 01316dea authored by JiSoo Kim's avatar JiSoo Kim
Browse files

Added extension and extension points for IFormWidgetBuilder.



Added extension points about IFormWidgetBuilder in widget
bundle(EclipseWidgetComponent), and added extension about
IFormWidgetBuilder in widget.moose bundle,
widget.reactor bundle, and reflectivity.ui bundle.
Signed-off-by: default avatarJiSoo Kim <jskim910118@gmail.com>
parent b026199e
......@@ -283,5 +283,13 @@
</separator>
</menuContribution>
</extension>
<extension
id="mooseformwidgetbuilder"
name="MOOSE Form Widget Builder"
point="org.eclipse.ice.client.widgets.iformwidgetbuilder">
<iformwidgetbuilder
class="org.eclipse.ice.client.widgets.moose.MOOSEFormWidgetBuilder">
</iformwidgetbuilder>
</extension>
</plugin>
......@@ -13,5 +13,13 @@
name="ReactorEditor">
</editor>
</extension>
<extension
id="reactorformwidgetbuilder"
name="Reactor Form Widget Builder"
point="org.eclipse.ice.client.widgets.iformwidgetbuilder">
<iformwidgetbuilder
class="org.eclipse.ice.client.widgets.reactoreditor.ReactorFormWidgetBuilder">
</iformwidgetbuilder>
</extension>
</plugin>
......@@ -2,6 +2,7 @@
<?eclipse version="3.4"?>
<plugin>
<extension-point id="org.eclipse.ice.client.widgets.iformwidgetbuilder" name="IForm Widget Builder" schema="schema/iformwidgetbuilder.exsd"/>
<extension
point="org.eclipse.ui.editors">
......
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.ice.client.widgets" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="org.eclipse.ice.client.widgets" id="iformwidgetbuilder" name="IForm Widget Builder"/>
</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="iformwidgetbuilder"/>
</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="iformwidgetbuilder">
<complexType>
<attribute name="class" type="string">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn=":org.eclipse.ice.client.widgets.IFormWidgetBuilder"/>
</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>
......@@ -14,6 +14,8 @@ package org.eclipse.ice.client.widgets;
import java.util.HashMap;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.Platform;
import org.eclipse.ice.iclient.uiwidgets.IErrorBox;
import org.eclipse.ice.iclient.uiwidgets.IExtraInfoWidget;
import org.eclipse.ice.iclient.uiwidgets.IFormWidget;
......@@ -44,7 +46,8 @@ public class EclipseUIWidgetFactory implements IWidgetFactory {
/**
* Logger for handling event messages and other information.
*/
private static final Logger logger = LoggerFactory.getLogger(EclipseUIWidgetFactory.class);
private static final Logger logger = LoggerFactory
.getLogger(EclipseUIWidgetFactory.class);
/**
* <p>
......@@ -65,6 +68,7 @@ public class EclipseUIWidgetFactory implements IWidgetFactory {
* This operation registers an IFormWidgetBuilder with the Factory. The
* IFormWidgetBuilder is used to extend the abilities of the default set of
* EclipseUIWidgets to draw ICE's Form's.
*
* @param builder
* The builder that will generate the custom IFormWidget.
*/
......@@ -78,6 +82,16 @@ public class EclipseUIWidgetFactory implements IWidgetFactory {
+ builder.getTargetFormName());
}
IConfigurationElement[] elements = Platform.getExtensionRegistry()
.getConfigurationElementsFor(
"org.eclipse.ice.client.widgets.iformwidgetbuilder");
System.out.println(
"Available configuration elements(in org.eclipse.ice.client.widgets.EclipseUIWdigetFactory.java):");
for (IConfigurationElement element : elements) {
System.out.println(
element.getNamespaceIdentifier() + " " + element.getName());
}
return;
}
......
......@@ -60,6 +60,14 @@
</view>
</perspectiveExtension>
</extension>
<extension
id="reflectivityformwidgetbuilder"
name="Reflectivity Form Widget Builder"
point="org.eclipse.ice.client.widgets.iformwidgetbuilder">
<iformwidgetbuilder
class="org.eclipse.ice.reflectivity.ui.ReflectivityFormWidgetBuilder">
</iformwidgetbuilder>
</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