Author: DartPeng
Date: 2008-10-08 04:27:25 -0400 (Wed, 08 Oct 2008)
New Revision: 10731
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/plugin.xml
trunk/smooks/plugins/org.jboss.tools.smooks.ui/schema/viewerInitor.exsd
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/BaseViewerInitor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IViewerInitor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/ViewerInitorStore.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformDataWizardSelectionPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformSelectWizardNode.java
trunk/smooks/plugins/org.jboss.tools.smooks.xml/plugin.xml
Log:
JBIDE-2846
Add subtitle and description on the wizard page and add a description label under the
treeviewer to describe the data type.
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.javabean/plugin.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.javabean/plugin.xml 2008-10-08 08:11:10
UTC (rev 10730)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.javabean/plugin.xml 2008-10-08 08:27:25
UTC (rev 10731)
@@ -6,8 +6,9 @@
<viewerInitor
contentProvider="org.jboss.tools.smooks.javabean.model.BeanContentProvider"
creationWizard="org.jboss.tools.smooks.javabean.ui.NewJavaBeanStrucutredDataWizard"
+ description="This data type can get from any Java .class."
labelProvider="org.jboss.tools.smooks.javabean.model.BeanlabelProvider"
- name="JavaBean"
+ name="JavaBean Data Type"
typeID="org.jboss.tools.smooks.ui.viewerInitor.javabean">
</viewerInitor>
</extension>
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/schema/viewerInitor.exsd
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/schema/viewerInitor.exsd 2008-10-08
08:11:10 UTC (rev 10730)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/schema/viewerInitor.exsd 2008-10-08
08:27:25 UTC (rev 10731)
@@ -1,146 +1,153 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.jboss.tools.smooks.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.jboss.tools.smooks.ui"
id="viewerInitor" name="viewerInitor"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="viewerInitor" minOccurs="1"
maxOccurs="unbounded"/>
- </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="viewerInitor">
- <complexType>
- <attribute name="typeID" type="string"
use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="labelProvider" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java"
basedOn=":org.eclipse.jface.viewers.ILabelProvider"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="contentProvider" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java"
basedOn=":org.eclipse.jface.viewers.ITreeContentProvider"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="creationWizard" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java"
basedOn=":org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </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>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.jboss.tools.smooks.ui">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.jboss.tools.smooks.ui"
id="viewerInitor" name="viewerInitor"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="viewerInitor" minOccurs="1"
maxOccurs="unbounded"/>
+ </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="viewerInitor">
+ <complexType>
+ <attribute name="typeID" type="string"
use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="labelProvider" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java"
basedOn=":org.eclipse.jface.viewers.ILabelProvider"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="contentProvider" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java"
basedOn=":org.eclipse.jface.viewers.ITreeContentProvider"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="creationWizard" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java"
basedOn=":org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="icon" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </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>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+</schema>
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/BaseViewerInitor.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/BaseViewerInitor.java 2008-10-08
08:11:10 UTC (rev 10730)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/BaseViewerInitor.java 2008-10-08
08:27:25 UTC (rev 10731)
@@ -25,6 +25,7 @@
protected String name = "nonamed";
protected String wizardIconPath = null;
IConfigurationElement configurationElement = null;
+ protected String description;
/**
* @return the name
@@ -127,4 +128,12 @@
IConfigurationElement configurationElement) {
this.configurationElement = configurationElement;
}
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IViewerInitor.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IViewerInitor.java 2008-10-08
08:11:10 UTC (rev 10730)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IViewerInitor.java 2008-10-08
08:27:25 UTC (rev 10731)
@@ -30,4 +30,6 @@
String getName();
String getWizardIconPath();
+
+ String getDescription();
}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/ViewerInitorStore.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/ViewerInitorStore.java 2008-10-08
08:11:10 UTC (rev 10730)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/ViewerInitorStore.java 2008-10-08
08:27:25 UTC (rev 10731)
@@ -138,10 +138,11 @@
String iconPath =
element.getAttribute(SmooksExtensionPointConstants.EXTENTION_POINT_ATTRIBUTE_ICON);
+ String description =
element.getAttribute(SmooksExtensionPointConstants.EXTENTION_POINT_ATTRIBUTE_DESCRIPTION);
BaseViewerInitor initor = new BaseViewerInitor();
initor.setName(name);
-
+ initor.setDescription(description);
initor.setWizardIconPath(iconPath);
initor.setTypeID(typeID);
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformDataWizardSelectionPage.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformDataWizardSelectionPage.java 2008-10-08
08:11:10 UTC (rev 10730)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformDataWizardSelectionPage.java 2008-10-08
08:27:25 UTC (rev 10731)
@@ -31,7 +31,10 @@
import org.eclipse.jface.wizard.WizardSelectionPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
import org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard;
import org.jboss.tools.smooks.ui.IViewerInitor;
import org.jboss.tools.smooks.ui.ViewerInitorStore;
@@ -44,6 +47,7 @@
List registedWizard = new ArrayList();
TreeViewer viewer = null;
+ private Label desLabel;
/*
* (non-Javadoc)
@@ -52,12 +56,22 @@
*/
public void createControl(Composite parent) {
// parent.setLayout(new FillLayout());
- viewer = new TreeViewer(parent, SWT.NONE);
+ Composite main = new Composite(parent, SWT.NONE);
+
+ GridLayout gridLayout = new GridLayout();
+ main.setLayout(gridLayout);
+
+ viewer = new TreeViewer(main, SWT.NONE);
viewer.setContentProvider(new WizardNodeContentProvider());
viewer.setLabelProvider(new WizardNodeLabelProvider());
-
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ viewer.getTree().setLayoutData(gd);
createAllExtentionWizard();
+ desLabel = new Label(main, SWT.NONE);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ desLabel.setLayoutData(gd);
+
viewer.setInput(registedWizard);
if (!registedWizard.isEmpty()) {
this.setSelectedNode((IWizardNode) registedWizard.get(0));
@@ -68,8 +82,13 @@
IStructuredSelection selection = (IStructuredSelection) event
.getSelection();
IWizardNode node = (IWizardNode) selection.getFirstElement();
+ desLabel.setText("");
if (node != null) {
setSelectedNode(node);
+ if(node instanceof TransformSelectWizardNode){
+ String des = ((TransformSelectWizardNode)node).getDescription();
+ desLabel.setText(des);
+ }
IStrucutredDataCreationWizard wizard = (IStrucutredDataCreationWizard) node
.getWizard();
TransformDataSelectionWizard pw = (TransformDataSelectionWizard) getWizard();
@@ -129,12 +148,17 @@
wn.setWizard(wizard);
wn.setName(viewerInitor.getName());
wn.setIconPath(viewerInitor.getWizardIconPath());
+ wn.setDescription(viewerInitor.getDescription());
this.registedWizard.add(wn);
}
}
public TransformDataWizardSelectionPage(String pageName) {
super(pageName);
+
+ setDescription("Select the transform data type");
+ setTitle("Data Type Selection");
+
}
public void activeSelectionWizard() {
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformSelectWizardNode.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformSelectWizardNode.java 2008-10-08
08:11:10 UTC (rev 10730)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformSelectWizardNode.java 2008-10-08
08:27:25 UTC (rev 10731)
@@ -24,6 +24,15 @@
String name = "";
String iconPath = null;
String pluginID = null;
+ String description = "";
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
public String getPluginID() {
return pluginID;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.xml/plugin.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.xml/plugin.xml 2008-10-08 08:11:10 UTC
(rev 10730)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.xml/plugin.xml 2008-10-08 08:27:25 UTC
(rev 10731)
@@ -6,8 +6,9 @@
<viewerInitor
contentProvider="org.jboss.tools.smooks.xml.ui.XMLStructuredDataContentProvider"
creationWizard="org.jboss.tools.smooks.xml.ui.XMLStructuredDataWizard"
+ description="XML data type comes from any .xml file."
labelProvider="org.jboss.tools.smooks.xml.ui.XMLStructuredDataLabelProvider"
- name="XML"
+ name="XML Data Type"
typeID="org.jboss.tools.smooks.xml.viewerInitor.xml">
</viewerInitor>
</extension>
Show replies by date