JBoss Tools SVN: r10793 - trunk/documentation/guides/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-13 09:42:56 -0400 (Mon, 13 Oct 2008)
New Revision: 10793
Modified:
trunk/documentation/guides/GettingStartedGuide/en/modules/first_seam.xml
trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-443 - updating the chapters according to Shaun Appleton comments;
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/first_seam.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/first_seam.xml 2008-10-13 13:42:04 UTC (rev 10792)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/first_seam.xml 2008-10-13 13:42:56 UTC (rev 10793)
@@ -446,7 +446,7 @@
<property>Run As... > Run On Server</property>
</emphasis> which will show the appropriate url in the browser. Alternatively you can
manually enter <emphasis>
- <property>http://localhost/workshop/myAction.seam</property>
+ <property>http://localhost:8080/workshop/myAction.seam</property>
</emphasis> into a browser.</para>
<figure>
@@ -764,9 +764,9 @@
<section id="use_hibernate_tools">
<title>Use Hibernate Tools to Query Data via JPA</title>
- <para>Now, it’s time to write some JPA queries using the Hibernate Tools perspective in JBoss
- Developer Studio.</para>
- <para>In the upper right corner of the workbench there is a small <property>>></property>,
+ <para>Now, it's time to write some JPA queries using the Hibernate perspective in <property>JBoss
+ Developer Studio</property>.</para>
+ <para>In the upper right corner of the workbench there is a small icon (see the figure below),
click on it and choose <property>Hibernate</property>.</para>
<figure>
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml 2008-10-13 13:42:04 UTC (rev 10792)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml 2008-10-13 13:42:56 UTC (rev 10793)
@@ -16,25 +16,29 @@
who for some reason cannot use Seam.</para>
</note>
- <para>In this chapter you'll find out how to create a simple <ulink url="http://java.sun.com/products/jsp/">JSP</ulink> application using the JBoss
- Developer Studio. The application will show a classic "Hello World!" on
- the page.</para>
- <para>We'll assume that you have already launched JBoss Developer Studio and also that
- the Web Development perspective is the current perspective. If not, make it active by
- selecting <emphasis>
+ <para>In this chapter you'll find out how to create a simple <ulink
+ url="http://java.sun.com/products/jsp/">JSP</ulink> application using the
+ <property>JBoss Developer Studio</property>. The application will show a classic
+ "Hello World!" on the page.</para>
+ <para>We'll assume that you have already launched <property>JBoss Developer
+ Studio</property> and also that the <property>Web Development</property> perspective is the
+ current perspective. If not, make it active by selecting <emphasis>
<property>Window > Open Perspective > Web Development</property>
</emphasis> from the menu bar or by selecting <emphasis>
<property>Window > Open Perspective > Other...</property>
</emphasis> from the menu bar and then selecting Web Development from the Select Perspective
dialog box.</para>
+
<section id="SettingUpTheProject">
<?dbhtml filename="SettingUpTheProject.html"?>
<title>Setting Up the Project</title>
- <para>The main purpose of this section is to tell you about creation a Dynamic Web Project.</para>
+ <para>We are going to start with the creating a Dynamic Web Project with a minimal
+ structure, i.e. with just required facets. Thus this section will perform you all
+ necessary steps on how to do this.</para>
<itemizedlist>
<listitem>
<para>Go to the menu bar and select <emphasis>
- <property>File > New > Project...</property>
+ <property>File > New > Other...</property>
</emphasis></para>
</listitem>
<listitem>
@@ -52,7 +56,9 @@
<para>Enter "jspHello" as a project name</para>
</listitem>
<listitem>
- <para>Leave everything else as is, and click <emphasis>
+ <para>Then select <emphasis>
+ <property>Minimal Configuration</property>
+ </emphasis> from the list of possible configurations and click <emphasis>
<property>Finish</property>
</emphasis></para>
</listitem>
@@ -65,7 +71,11 @@
</imageobject>
</mediaobject>
</figure>
- <para>A jspHello node should appear in the upper-left Package Explorer view.</para>
+
+ <para>The <emphasis>
+ <property>jspHello</property>
+ </emphasis> node should appear in the upper-left <property>Package Explorer</property>
+ view.</para>
<figure>
<title>New Web Project</title>
<mediaobject>
@@ -77,15 +87,15 @@
</section>
<section id="CreatingJSPPage">
- <?dbhtml filename="CreatingJSPPage.html"?>
- <title>Creating JSP Page</title>
+ <?dbhtml filename="CreatingJSPPage.html"?>
+ <title>Creating JSP Page</title>
<para>This section covers all the points how to create, edit and then preview JSP page.</para>
<para>In our simple application we need to create only one JSP page which displays a
- "Hello World!" message.</para>
+ <emphasis>"Hello World!"</emphasis> message.</para>
<itemizedlist>
<listitem>
- <para>Right click <emphasis><property>WebContent > New > JSP</property>.
- </emphasis></para>
+ <para>Right click <emphasis><property>WebContent > New >
+ JSP</property>. </emphasis></para>
</listitem>
<listitem>
<para>Type "hello.jsp" for a file name and click the <emphasis>
@@ -111,12 +121,14 @@
</imageobject>
</mediaobject>
</figure>
- <para>Our hello.jsp page will now appear in Project Explorer.</para>
+ <para>Our <emphasis>
+ <property>hello.jsp</property>
+ </emphasis> page will now appear in <property>Project Explorer</property>.</para>
<section id="EditingJSPPage">
<?dbhtml filename="EditingJSPPage.html"?>
<title>Editing a JSP Page</title>
<para>Let's now make a little change so that a jsp page displays
- "Hello World!" message.</para>
+ <emphasis>"Hello World!"</emphasis> message.</para>
<itemizedlist>
<listitem>
<para>Insert this line inside the <emphasis role="bold">
@@ -138,7 +150,9 @@
</imageobject>
</mediaobject>
</figure>
- <para>After changes made your hello.jsp page should look like this:</para>
+ <para>After changes made your <emphasis>
+ <property>hello.jsp</property>
+ </emphasis> page should look like this:</para>
<figure>
<title>Hello.jsp Page</title>
<mediaobject>
@@ -147,27 +161,38 @@
</imageobject>
</mediaobject>
</figure>
+
+ <para>This line will actually output <emphasis>"Hello
+ World!"</emphasis> message in the <property>Console</property>. To make the
+ message displayed in the Browser, just replace this line with the simple
+ <emphasis>Hello World!</emphasis>.</para>
</section>
<section id="WebXML">
<?dbhtml filename="WebXML.html"?>
<title>web.xml file</title>
- <para>When you are creating web project the wizard creates the web.xml for you
- automatically. The web.xml file editor provided by JBoss Developer Studio is
- available in two modes: <property>tree</property> and <property>source</property>.</para>
+ <para>When you are creating web project the wizard creates the <emphasis>
+ <property>web.xml</property>
+ </emphasis> for you automatically. The <property>web.xml file editor</property>
+ provided by <property>JBoss Developer Studio</property> is available in two modes:
+ <property>Tree</property> and <property>Source</property>.</para>
<figure>
<title>Web.xml in Design and Source Mode</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_6.png" scale="90"/>
+ <imagedata fileref="images/jsp_application/jsp_application_6.png" scale="90"
+ />
</imageobject>
</mediaobject>
</figure>
- <para>Both modes are fully synchronized. Let's add mapping to our hello.jsp
- page in web.xml file.</para>
+ <para>Both modes are fully synchronized. Let's add mapping to our <emphasis>
+ <property>hello.jsp</property>
+ </emphasis> page in <emphasis>
+ <property>web.xml</property>
+ </emphasis> file.</para>
<itemizedlist>
<listitem>
- <para>Switch to <property>source</property> mode.</para>
+ <para>Switch to <property>Source</property> tab.</para>
</listitem>
<listitem>
<para>Add the next code into <emphasis role="bold">
@@ -177,8 +202,8 @@
</itemizedlist>
<programlisting role="XML"><![CDATA[<welcome-file>hello.jsp</welcome-file>
]]></programlisting>
- <para>If you come back to design mode you will see that the changes made are
- automatically reflected in that mode.</para>
+ <para>If you come back to <property>Tree</property> mode you will see that the changes
+ made are automatically reflected in that mode.</para>
<para>Actually you don't really need to do any configurations right now.</para>
</section>
@@ -186,16 +211,18 @@
<?dbhtml filename="DeployTheProject.html"?>
<title>Deploying the project</title>
<para>While creating any web project you could experience a pain writing ant scripts and
- managing the packaging even when writing the most trivial web
- applications. With JBoss Developer Studio you are saved from such a pain. All you
- need is to start JBoss server and launch your application in your favorite browser.</para>
- <para>You can also create a war archive with JBDS's Archive Tools and export it
- to any web server.</para>
+ managing the packaging even when writing the most trivial web applications. With
+ <property>JBoss Developer Studio</property> you are saved from such a pain. All
+ you need is to start <property>JBoss Server</property> and launch your application
+ in your favorite browser.</para>
+ <para>You can also create a war archive with <ulink
+ url="&aslink;#Project_archivesView">JBDS's Archive Tools</ulink>
+ and export it to any web server.</para>
<section id="WarConfig">
<?dbhtml filename="WarConfig.html"?>
<title>WAR Config</title>
- <para>Project archives managing is available through <property>Project
- archives</property> view.</para>
+ <para>Project archives managing is available through <ulink
+ url="&aslink;#Project_archivesView">Project Archives view</ulink>.</para>
<itemizedlist>
<listitem>
<para>Select <emphasis>
@@ -207,7 +234,8 @@
<para>Select a project in Package Explorer you want to be archived</para>
</listitem>
</itemizedlist>
- <para>In Project Archives you will see available archive types for the project:</para>
+ <para>In <property>Project Archives</property> you will see available archive types
+ for the project:</para>
<figure>
<title>Project Archives</title>
<mediaobject>
@@ -223,7 +251,8 @@
</emphasis> option to create war archive</para>
</listitem>
</itemizedlist>
- <para>In the dialog New WAR you can see automatically selected default values</para>
+ <para>In the <property>New WAR</property> dialog you can see automatically selected
+ default values.</para>
<figure>
<title>New WAR Archive</title>
<mediaobject>
@@ -250,9 +279,10 @@
</listitem>
<listitem>
<para>Click <emphasis>
- <property>Finish</property>.
- </emphasis> The <emphasis>.war</emphasis> file will appear in Package
- Explorer and in Project archives view as structure tree: <figure>
+ <property>Finish</property>. </emphasis> The
+ <emphasis>.war</emphasis> file will appear in <property>Package
+ Explorer</property> and also in <property>Project Archives</property>
+ view as structure tree: <figure>
<title>Archive is Created</title>
<mediaobject>
<imageobject>
@@ -268,21 +298,20 @@
<imageobject>
<imagedata
fileref="images/jsp_application/jsp_application_12.png"
- />
+ />
</imageobject>
</mediaobject>
</figure>
</para>
</listitem>
</itemizedlist>
- <para>Via Project archives view you could now edit your archive, add new folders,
- publish to server, and so on:</para>
+ <para>Via <property>Project Archives</property> view you could now edit your
+ archive, add new folders, publish to server, and so on:</para>
<figure>
<title>Configure Archive</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_13.png"
- />
+ <imagedata fileref="images/jsp_application/jsp_application_13.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -291,10 +320,11 @@
<section id="AutoRedeploy">
<?dbhtml filename="AutoRedeploy.html"?>
<title>Auto redeploy</title>
- <para>When you are creating a web application and register it on JBoss server it is
- automatically deployed into <emphasis>/deploy</emphasis> directory of the
- server. JBDS comes with the feature of auto-redeploy. It means that you
- don't need to restart JBoss. Any changes made in the application in
+ <para>When you are creating a web application and register it on <property>JBoss
+ Server</property> it is automatically deployed into
+ <emphasis>/deploy</emphasis> directory of the server. JBDS comes with the
+ feature of auto-redeploy. It means that you don't need to restart
+ <property>JBoss Server</property>. Any changes made in the application in
exploded format will trigger a redeployment on the server.</para>
</section>
</section>
@@ -302,12 +332,15 @@
<section id="Previewtab">
<?dbhtml filename="Previewtab.html"?>
<title>JSP Page Preview</title>
- <para>JBDS comes with JSP design-time preview features. When designing JSP pages you can
- easily preview how they will look during runtime. You can even attach your
- stylesheet to the preview.</para>
+ <para><property>JBDS</property> comes with JSP design-time preview features. When
+ designing JSP pages you can easily preview how they will look during runtime. You
+ can even <ulink url="&jsflink;#el_exp_para">attach your stylesheet to the
+ Preview</ulink>.</para>
<itemizedlist>
<listitem>
- <para>Make a little change to hello.jsp page, e.g. put this code snippet:</para>
+ <para>Make a little change to <emphasis>
+ <property>hello.jsp</property>
+ </emphasis> page, e.g. put this code snippet:</para>
</listitem>
</itemizedlist>
<programlisting role="XML"><![CDATA[<%= new java.util.Date() %>
@@ -319,8 +352,8 @@
</emphasis> button.</para>
</listitem>
<listitem>
- <para>Switch to Preview page by clicking Preview tab at the bottom of the page.
- You will see how the page will look at runtime.</para>
+ <para>Switch to Preview page by clicking <property>Preview</property> tab at the
+ bottom of the page. You will see how the page will look at runtime.</para>
</listitem>
</itemizedlist>
<!-- <figure>
@@ -336,12 +369,13 @@
<section id="LaunchingTheProject">
<?dbhtml filename="LaunchingTheProject.html"?>
<title>Launch JSP Project</title>
- <para>Let's now launch our project on server. We'll use JBoss server
- that is shipped with JBoss Developer Studio.</para>
+ <para>Let's now launch our project on server. We'll use
+ <property>JBoss Server</property> that is shipped with <property>JBoss Developer
+ Studio</property>. You can do it by performing one of the following actions:</para>
<itemizedlist>
<listitem>
- <para>Start JBoss server from JBoss Server view by clicking the Start
- icon.</para>
+ <para>Start JBoss Server from <ulink url="&aslink;#JBossServerView">JBoss
+ Server view</ulink> by clicking the Start icon.</para>
</listitem>
</itemizedlist>
<figure>
@@ -355,12 +389,14 @@
<itemizedlist>
<listitem>
<para>Click the Run icon or right click your project folder and select <emphasis>
- <property>Run As > Run on Server</property>.
- </emphasis> If you haven't made any changes in web.xml file or
- cleared it out you can launch the application by right clicking the
- hello.jsp page and selecting <emphasis>
- <property>Run on the Server</property>.
- </emphasis></para>
+ <property>Run As > Run on Server</property>. </emphasis> If you
+ haven't made any changes in <emphasis>
+ <property>web.xml</property>
+ </emphasis> file or cleared it out you can launch the application by right
+ clicking the <emphasis>
+ <property>hello.jsp</property>
+ </emphasis> page and selecting <emphasis>
+ <property>Run on the Server</property>. </emphasis></para>
</listitem>
</itemizedlist>
<figure>
@@ -371,7 +407,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>You should see the next page in a browser :</para>
+ <para>You should see the next page in a Browser :</para>
<figure>
<title>Running Project</title>
<mediaobject>
@@ -381,6 +417,10 @@
</mediaobject>
</figure>
</section>
+ <para>Thus with the help of this chapter you've learnt how to organize a Dynamic
+ Web Project with a minimal configuration, add any staff to it (in our case it's
+ just one jsp page) and deploy and run it on the <property>JBoss Server</property>
+ shipped with <property>JBDS</property>.</para>
</section>
</chapter>
16 years, 3 months
JBoss Tools SVN: r10792 - trunk/documentation/guides/GettingStartedGuide/en/images/jsp_application.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-13 09:42:04 -0400 (Mon, 13 Oct 2008)
New Revision: 10792
Modified:
trunk/documentation/guides/GettingStartedGuide/en/images/jsp_application/jsp_application_1.png
trunk/documentation/guides/GettingStartedGuide/en/images/jsp_application/jsp_application_17.png
Log:
https://jira.jboss.org/jira/browse/JBDS-443 - changing the screens to new ones;
Modified: trunk/documentation/guides/GettingStartedGuide/en/images/jsp_application/jsp_application_1.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en/images/jsp_application/jsp_application_17.png
===================================================================
(Binary files differ)
16 years, 3 months
JBoss Tools SVN: r10790 - in trunk/vpe/plugins: org.jboss.tools.vpe.resref and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-10-13 08:55:28 -0400 (Mon, 13 Oct 2008)
New Revision: 10790
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeCSSFileValidator.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeCSSReferenceSupport.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/plugin.xml
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java
trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta
Log:
=JBIDE-2828, validation for css file was added
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta 2008-10-13 11:51:31 UTC (rev 10789)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta 2008-10-13 12:55:28 UTC (rev 10790)
@@ -35,7 +35,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport"
displayName="Add CSS Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPECSSReference">
<AttributeData AttributeName="location"/>
@@ -45,7 +45,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport"
displayName="Edit CSS Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPECSSReference">
<AttributeData AttributeName="location"/>
@@ -85,7 +85,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport"
displayName="Add CSS Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPECSSReferenceExt">
<AttributeData AttributeName="location"/>
@@ -95,7 +95,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport"
displayName="Edit CSS Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPECSSReferenceExt">
<AttributeData AttributeName="location"/>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/plugin.xml 2008-10-13 11:51:31 UTC (rev 10789)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/plugin.xml 2008-10-13 12:55:28 UTC (rev 10790)
@@ -6,5 +6,7 @@
class="org.jboss.tools.vpe.resref.core.VpeAddReferenceSupport"/>
<xclass id="org.jboss.tools.vpe.resref.core.VpeELReferenceSupport"
class="org.jboss.tools.vpe.resref.core.VpeELReferenceSupport"/>
+ <xclass id="org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport"
+ class="org.jboss.tools.vpe.resref.core.VpeCSSReferenceSupport"/>
</extension>
</plugin>
Added: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeCSSFileValidator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeCSSFileValidator.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeCSSFileValidator.java 2008-10-13 12:55:28 UTC (rev 10790)
@@ -0,0 +1,53 @@
+/*******************************************************************************
+* Copyright (c) 2007 Red Hat, Inc.
+* Distributed under license by Red Hat, Inc. All rights reserved.
+* This program is 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:
+* Red Hat, Inc. - initial API and implementation
+******************************************************************************/
+package org.jboss.tools.vpe.resref.core;
+
+import java.io.File;
+import java.util.Properties;
+
+import org.eclipse.osgi.util.NLS;
+import org.jboss.tools.common.meta.action.impl.DefaultWizardDataValidator;
+import org.jboss.tools.common.meta.action.impl.SpecialWizardSupport;
+import org.jboss.tools.jst.web.messages.xpl.WebUIMessages;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class VpeCSSFileValidator extends DefaultWizardDataValidator {
+
+ /**
+ *
+ * @param support
+ * @param step
+ */
+ public VpeCSSFileValidator(SpecialWizardSupport support, int step) {
+ super.setSupport(support, step);
+ }
+ /* (non-Javadoc)
+ * @see org.jboss.tools.common.meta.action.impl.DefaultWizardDataValidator#validate(java.util.Properties)
+ */
+ @Override
+ public void validate(Properties data) {
+
+ super.validate(data);
+
+ if( (getErrorMessage()!=null) ||
+ (getWarningMessage()!=null)) {
+ return;
+ }
+ String location = (String) data.get("location"); //$NON-NLS-1$
+ if(!new File(location).isFile()) {
+ message = NLS.bind(WebUIMessages.FILE_DOESNOT_EXIST,location);
+ }
+
+ }
+}
Added: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeCSSReferenceSupport.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeCSSReferenceSupport.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeCSSReferenceSupport.java 2008-10-13 12:55:28 UTC (rev 10790)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+* Copyright (c) 2007 Red Hat, Inc.
+* Distributed under license by Red Hat, Inc. All rights reserved.
+* This program is 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:
+* Red Hat, Inc. - initial API and implementation
+******************************************************************************/
+package org.jboss.tools.vpe.resref.core;
+
+import org.jboss.tools.common.meta.action.impl.WizardDataValidator;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class VpeCSSReferenceSupport extends VpeAddReferenceSupport{
+
+ private WizardDataValidator wizardDataValidator;
+ /* (non-Javadoc)
+ * @see org.jboss.tools.common.meta.action.impl.SpecialWizardSupport#getValidator(int)
+ */
+ @Override
+ public WizardDataValidator getValidator(int step) {
+ if(this.wizardDataValidator==null) {
+
+ this.wizardDataValidator = new VpeCSSFileValidator(this, step);
+ }
+ return this.wizardDataValidator;
+ }
+
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java 2008-10-13 11:51:31 UTC (rev 10789)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java 2008-10-13 12:55:28 UTC (rev 10790)
@@ -23,9 +23,10 @@
*/
public class VpeElVariableValidator extends DefaultWizardDataValidator {
-
/**
*
+ * @param support
+ * @param step
*/
public VpeElVariableValidator(SpecialWizardSupport support, int step) {
super.setSupport(support, step);
16 years, 3 months
JBoss Tools SVN: r10789 - workspace/snjeza/seam-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-13 07:51:31 -0400 (Mon, 13 Oct 2008)
New Revision: 10789
Added:
workspace/snjeza/seam-examples/.project
workspace/snjeza/seam-examples/dvdstore-ear.zip
workspace/snjeza/seam-examples/dvdstore-ejb.zip
workspace/snjeza/seam-examples/dvdstore.zip
Log:
Adding Seam dvdstore projects
Added: workspace/snjeza/seam-examples/.project
===================================================================
--- workspace/snjeza/seam-examples/.project (rev 0)
+++ workspace/snjeza/seam-examples/.project 2008-10-13 11:51:31 UTC (rev 10789)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>seam-examples</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
Added: workspace/snjeza/seam-examples/dvdstore-ear.zip
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/seam-examples/dvdstore-ear.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/snjeza/seam-examples/dvdstore-ejb.zip
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/seam-examples/dvdstore-ejb.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/snjeza/seam-examples/dvdstore.zip
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/seam-examples/dvdstore.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 3 months
JBoss Tools SVN: r10788 - workspace/examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-13 07:38:54 -0400 (Mon, 13 Oct 2008)
New Revision: 10788
Modified:
workspace/examples/projectExamples.xml
Log:
Modified: workspace/examples/projectExamples.xml
===================================================================
--- workspace/examples/projectExamples.xml 2008-10-13 11:34:48 UTC (rev 10787)
+++ workspace/examples/projectExamples.xml 2008-10-13 11:38:54 UTC (rev 10788)
@@ -2,17 +2,43 @@
<project>
<category>Seam</category>
<name>dvdstore</name>
- <shortDescription>Seam DVD Store Example</shortDescription>
+ <shortDescription>Seam DVD Store Example - WAR</shortDescription>
<description>This example demonstrates the use of Seam with jBPM
pageflow and business process management. It runs on JBoss AS and
Tomcat.</description>
- <size>10000000</size>
+ <size>962000</size>
<url>
http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/seam-examples/...
</url>
</project>
<project>
+ <category>Seam</category>
+ <name>dvdstore-ejb</name>
+ <shortDescription>Seam DVD Store Example - EJB</shortDescription>
+ <description>This example demonstrates the use of Seam with jBPM
+ pageflow and business process management. It runs on JBoss AS and
+ Tomcat.</description>
+ <size>589000</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/seam-examples/...
+ </url>
+ </project>
+
+ <project>
+ <category>Seam</category>
+ <name>dvdstore-ear</name>
+ <shortDescription>Seam DVD Store Example - EAR</shortDescription>
+ <description>This example demonstrates the use of Seam with jBPM
+ pageflow and business process management. It runs on JBoss AS and
+ Tomcat.</description>
+ <size>5700000</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/seam-examples/...
+ </url>
+ </project>
+
+ <project>
<category>Portlet</category>
<name>TestJavaPortlet</name>
<shortDescription>JBoss Java Portlet Example</shortDescription>
16 years, 3 months
JBoss Tools SVN: r10786 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-10-13 06:24:17 -0400 (Mon, 13 Oct 2008)
New Revision: 10786
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java
Log:
JBIDE-2837
I add two linkbutton on the wizard page , they allow user to select the data model.
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-10-13 10:16:38 UTC (rev 10785)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-10-13 10:24:17 UTC (rev 10786)
@@ -900,6 +900,8 @@
if (dialog.open() == org.eclipse.jface.dialogs.Dialog.OK) {
sourceDataTypeID = wizard.getSourceDataTypeID();
targetDataTypeID = wizard.getTargetDataTypeID();
+ sourceTreeViewerInputModel = wizard.getSourceTreeViewerInputContents();
+ targetTreeViewerInputModel = wizard.getTargetTreeViewerInputContents();
this.getSmooksConfigurationFileGenerateContext()
.setSourceDataTypeID(sourceDataTypeID);
this.getSmooksConfigurationFileGenerateContext()
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizard.java 2008-10-13 10:16:38 UTC (rev 10785)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizard.java 2008-10-13 10:24:17 UTC (rev 10786)
@@ -10,16 +10,22 @@
******************************************************************************/
package org.jboss.tools.smooks.ui.editors;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
/**
* @author Dart Peng<br>
* Date : Sep 5, 2008
*/
-public class TypeIDSelectionWizard extends Wizard {
+public class TypeIDSelectionWizard extends Wizard implements INewWizard {
private String sourceDataTypeID = null;
private String targetDataTypeID = null;
+ private Object sourceTreeViewerInputContents;
+ private Object targetTreeViewerInputContents;
private TypeIDSelectionWizardPage page = null;
+ private IStructuredSelection selection;
public String getSourceDataTypeID() {
return sourceDataTypeID;
}
@@ -36,6 +42,7 @@
public void addPages(){
if(page == null){
page = new TypeIDSelectionWizardPage("TypeID Selection",false);
+ page.setSelection(selection);
this.addPage(page);
}
super.addPages();
@@ -51,7 +58,27 @@
if(sid == null || tid == null) return false;
this.sourceDataTypeID = sid;
this.targetDataTypeID = tid;
+ setSourceTreeViewerInputContents(page.getSourceTreeViewerInputContents());
+ setTargetTreeViewerInputContents(page.getTargetTreeViewerInputContents());
return true;
}
+ public Object getSourceTreeViewerInputContents() {
+ return sourceTreeViewerInputContents;
+ }
+ public void setSourceTreeViewerInputContents(
+ Object sourceTreeViewerInputContents) {
+ this.sourceTreeViewerInputContents = sourceTreeViewerInputContents;
+ }
+ public Object getTargetTreeViewerInputContents() {
+ return targetTreeViewerInputContents;
+ }
+ public void setTargetTreeViewerInputContents(
+ Object targetTreeViewerInputContents) {
+ this.targetTreeViewerInputContents = targetTreeViewerInputContents;
+ }
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.selection = selection;
+ if(page != null) page.setSelection(selection);
+ }
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizardPage.java 2008-10-13 10:16:38 UTC (rev 10785)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizardPage.java 2008-10-13 10:24:17 UTC (rev 10786)
@@ -14,6 +14,8 @@
import java.util.Iterator;
import java.util.List;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.ICheckStateListener;
@@ -24,8 +26,7 @@
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.IWizardNode;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardSelectionPage;
+import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
@@ -34,10 +35,14 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.forms.events.HyperlinkEvent;
+import org.eclipse.ui.forms.events.IHyperlinkListener;
+import org.eclipse.ui.forms.widgets.Hyperlink;
import org.jboss.tools.smooks.analyzer.AnalyzerFactory;
import org.jboss.tools.smooks.analyzer.DataTypeID;
import org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard;
import org.jboss.tools.smooks.ui.IViewerInitor;
+import org.jboss.tools.smooks.ui.StructuredDataCreationWizardDailog;
import org.jboss.tools.smooks.ui.ViewerInitorStore;
import org.jboss.tools.smooks.ui.wizards.TransformSelectWizardNode;
@@ -45,11 +50,21 @@
* @author Dart Peng<br>
* Date : Sep 5, 2008
*/
-public class TypeIDSelectionWizardPage extends WizardSelectionPage {
+public class TypeIDSelectionWizardPage extends WizardPage {
+ /**
+ * @deprecated
+ */
protected IStrucutredDataCreationWizard sourceWizard;
+ /**
+ * @deprecated
+ */
protected IStrucutredDataCreationWizard targetWizard;
+ private Object sourceTreeViewerInputContents;
+
+ private Object targetTreeViewerInputContents;
+
protected CheckboxTableViewer source;
protected CheckboxTableViewer target;
private List sourceList;
@@ -58,6 +73,10 @@
private IStructuredSelection selection;
private boolean showDataSelectPage = false;
+ private Hyperlink sourceDataLink;
+
+ private Hyperlink targetDataLink;
+
public IStructuredSelection getSelection() {
return selection;
}
@@ -87,41 +106,53 @@
this.showDataSelectPage = showDataSelectPage;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.WizardSelectionPage#getNextPage()
- */
- public IWizardPage getNextPage() {
- if (this.getSelectedNode() == null) {
- return null;
- }
+ // public boolean canFlipToNextPage() {
+ // if (!showDataSelectPage) {
+ // return isPageComplete() && getNextPage() != null;
+ // }
+ // return super.canFlipToNextPage();
+ // }
- boolean isCreated = getSelectedNode().isContentCreated();
+ // /*
+ // * (non-Javadoc)
+ // *
+ // * @see org.eclipse.jface.wizard.WizardSelectionPage#getNextPage()
+ // */
+ // public IWizardPage getNextPage() {
+ // if (!showDataSelectPage) {
+ // if (this.getWizard() != null) {
+ // return this.getWizard().getNextPage(this);
+ // }
+ // }
+ // if (this.getSelectedNode() == null) {
+ // return null;
+ // }
+ //
+ // boolean isCreated = getSelectedNode().isContentCreated();
+ //
+ // IWizard wizard = getSelectedNode().getWizard();
+ //
+ // if (wizard == null) {
+ // setSelectedNode(null);
+ // return null;
+ // }
+ // if (!isCreated) {
+ // if (wizard instanceof IStrucutredDataCreationWizard) {
+ // String targetID = getDataTypeID(target);
+ // if (targetID != null) {
+ // ((IStrucutredDataCreationWizard) wizard)
+ // .setNextDataCreationWizardNode(this
+ // .getSourceWizard(targetID));
+ // }
+ // }
+ // if (wizard instanceof INewWizard) {
+ // ((INewWizard) wizard).init(null, selection);
+ // }
+ // wizard.addPages();
+ // }
+ // return wizard.getStartingPage();
+ // }
- IWizard wizard = getSelectedNode().getWizard();
-
- if (wizard == null) {
- setSelectedNode(null);
- return null;
- }
- if (!isCreated) {
- if (wizard instanceof IStrucutredDataCreationWizard) {
- String targetID = getDataTypeID(target);
- if (targetID != null) {
- ((IStrucutredDataCreationWizard) wizard)
- .setNextDataCreationWizardNode(this
- .getSourceWizard(targetID));
- }
- }
- if (wizard instanceof INewWizard) {
- ((INewWizard) wizard).init(null, selection);
- }
- wizard.addPages();
- }
- return wizard.getStartingPage();
- }
-
/*
* (non-Javadoc)
*
@@ -150,9 +181,96 @@
target.setInput(sourceList);
initViewer();
+ sourceDataLink = new Hyperlink(mainComposite, SWT.NONE);
+ sourceDataLink.setText("Source Model Select:Empty");
+ sourceDataLink.addHyperlinkListener(new IHyperlinkListener() {
+
+ public void linkActivated(HyperlinkEvent e) {
+ openSourceWizard();
+ }
+
+ public void linkEntered(HyperlinkEvent e) {
+
+ }
+
+ public void linkExited(HyperlinkEvent e) {
+
+ }
+
+ });
+ targetDataLink = new Hyperlink(mainComposite, SWT.NONE);
+ targetDataLink.setText("Target Model Select:Empty");
+ targetDataLink.addHyperlinkListener(new IHyperlinkListener() {
+
+ public void linkActivated(HyperlinkEvent e) {
+ openTargetWizard();
+ }
+
+ public void linkEntered(HyperlinkEvent e) {
+
+ }
+
+ public void linkExited(HyperlinkEvent e) {
+
+ }
+
+ });
+
this.setControl(mainComposite);
}
+ protected void openTargetWizard() {
+ targetTreeViewerInputContents = getReturnObjectFromWizard(getTargetID());
+ resetLinkText();
+ }
+
+ protected IWizard getWizardViaDataID(String dataID) {
+ if (dataID == null)
+ return null;
+ IWizardNode wn = getSourceWizard(dataID);
+ // setSelectedNode(wn);
+ IWizard sw = wn.getWizard();
+ if (sw instanceof IStrucutredDataCreationWizard) {
+ // ((IStrucutredDataCreationWizard)sw).i
+ }
+ if (sw instanceof INewWizard) {
+ ((INewWizard) sw).init(null, this.getSelection());
+ }
+ return sw;
+ }
+
+ protected Object getReturnObjectFromWizard(String dataID) {
+ IWizard wizard = getWizardViaDataID(dataID);
+ if (wizard != null) {
+ StructuredDataCreationWizardDailog dialog = new StructuredDataCreationWizardDailog(
+ getShell(), wizard);
+ if (dialog.open() == Dialog.OK) {
+ return dialog.getCurrentCreationWizard()
+ .getTreeViewerInputContents();
+ }
+ } else {
+ MessageDialog.openInformation(getShell(), "Info",
+ "Please select the data type first");
+ }
+
+ return null;
+ }
+
+ protected void openSourceWizard() {
+ sourceTreeViewerInputContents = getReturnObjectFromWizard(getSourceID());
+ resetLinkText();
+ }
+
+ private void resetLinkText() {
+ if (sourceTreeViewerInputContents != null) {
+ sourceDataLink.setText("Source Model Select");
+ }
+
+ if (targetTreeViewerInputContents != null) {
+ targetDataLink.setText("Target Model Select");
+ }
+ }
+
protected String getDataTypeID(CheckboxTableViewer viewer) {
Object[] objs = viewer.getCheckedElements();
if (objs == null)
@@ -231,31 +349,35 @@
if (viewer == source) {
String sourceID = getDataTypeID(source);
- IWizardNode wn = getSourceWizard(sourceID);
- setSelectedNode(wn);
setSourceID(sourceID);
- IWizard sw = wn.getWizard();
- if (sw instanceof IStrucutredDataCreationWizard) {
- setSourceWizard((IStrucutredDataCreationWizard) sw);
- }
+ // TODO don't use that to display the source selection
+ // wizard page.
+ // IWizardNode wn = getSourceWizard(sourceID);
+ // setSelectedNode(wn);
+ // IWizard sw = wn.getWizard();
+ // if (sw instanceof IStrucutredDataCreationWizard) {
+ // setSourceWizard((IStrucutredDataCreationWizard) sw);
+ // }
}
if (viewer == target) {
- IWizardNode node = getSelectedNode();
+ // IWizardNode node = getSelectedNode();
String targetID = getDataTypeID(target);
- IWizardNode targetNode = getSourceWizard(targetID);
- IWizard tnw = targetNode.getWizard();
- if (tnw instanceof IStrucutredDataCreationWizard) {
- setTargetWizard((IStrucutredDataCreationWizard) tnw);
- }
- if (node != null) {
- IWizard wizard = node.getWizard();
- if (wizard != null
- && wizard instanceof IStrucutredDataCreationWizard) {
- ((IStrucutredDataCreationWizard) wizard)
- .setNextDataCreationWizardNode(targetNode);
- }
- }
+ // TODO don't use that to display the target selection
+ // wizard page.
+ // IWizardNode targetNode = getSourceWizard(targetID);
+ // IWizard tnw = targetNode.getWizard();
+ // if (tnw instanceof IStrucutredDataCreationWizard) {
+ // setTargetWizard((IStrucutredDataCreationWizard) tnw);
+ // }
+ // if (node != null) {
+ // IWizard wizard = node.getWizard();
+ // if (wizard != null
+ // && wizard instanceof IStrucutredDataCreationWizard) {
+ // ((IStrucutredDataCreationWizard) wizard)
+ // .setNextDataCreationWizardNode(targetNode);
+ // }
+ // }
setTargetID(targetID);
}
}
@@ -327,4 +449,22 @@
public void setTargetWizard(IStrucutredDataCreationWizard targetWizard) {
this.targetWizard = targetWizard;
}
+
+ public Object getSourceTreeViewerInputContents() {
+ return sourceTreeViewerInputContents;
+ }
+
+ public void setSourceTreeViewerInputContents(
+ Object sourceTreeViewerInputContents) {
+ this.sourceTreeViewerInputContents = sourceTreeViewerInputContents;
+ }
+
+ public Object getTargetTreeViewerInputContents() {
+ return targetTreeViewerInputContents;
+ }
+
+ public void setTargetTreeViewerInputContents(
+ Object targetTreeViewerInputContents) {
+ this.targetTreeViewerInputContents = targetTreeViewerInputContents;
+ }
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java 2008-10-13 10:16:38 UTC (rev 10785)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java 2008-10-13 10:24:17 UTC (rev 10786)
@@ -59,7 +59,8 @@
page = new SmooksConfigFileNewWizardPage("newSmooksFile1",
getSelection());
addPage(page);
- typeIDPage = new TypeIDSelectionWizardPage("", true);
+ // TODO don't use the WizardSelectionPage
+ typeIDPage = new TypeIDSelectionWizardPage("", false);
typeIDPage.setSelection(selection);
addPage(typeIDPage);
}
@@ -131,29 +132,9 @@
try {
SmooksFileEditorInput input = new SmooksFileEditorInput(
file);
- IStrucutredDataCreationWizard sourceWizard = typeIDPage
- .getSourceWizard();
+ input.setSourceTreeViewerInputContents(typeIDPage.getSourceTreeViewerInputContents());
+ input.setTargetTreeViewerInputContents(typeIDPage.getTargetTreeViewerInputContents());
- IStrucutredDataCreationWizard targetWizard = typeIDPage
- .getTargetWizard();
-
- if (sourceWizard != null) {
- if (((IWizard) sourceWizard).getPageCount() != 0) {
- if (((IWizard) sourceWizard).performFinish())
- input
- .setSourceTreeViewerInputContents(sourceWizard
- .getTreeViewerInputContents());
- }
- }
- if (targetWizard != null) {
- if (((IWizard) targetWizard).getPageCount() != 0) {
- if (((IWizard) targetWizard).performFinish())
- input
- .setTargetTreeViewerInputContents(targetWizard
- .getTreeViewerInputContents());
- }
- }
-
IDE.openEditor(page, input, SmooksFormEditor.EDITOR_ID,
true);// openEditor(page, file, true);
} catch (PartInitException e) {
16 years, 3 months
JBoss Tools SVN: r10785 - in trunk: struts/docs/struts_tools_ref_guide/en/modules and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-13 06:16:38 -0400 (Mon, 13 Oct 2008)
New Revision: 10785
Modified:
trunk/jsf/docs/jsf_tools_ref_guide/en/modules/introduction.xml
trunk/struts/docs/struts_tools_ref_guide/en/modules/introduction.xml
trunk/struts/docs/struts_tools_tutorial/en/modules/introduction.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-418
links are fixed, as well as a table column text alignment
Modified: trunk/jsf/docs/jsf_tools_ref_guide/en/modules/introduction.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en/modules/introduction.xml 2008-10-13 08:01:29 UTC (rev 10784)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en/modules/introduction.xml 2008-10-13 10:16:38 UTC (rev 10785)
@@ -106,7 +106,7 @@
</section>
<section>
<title>Other relevant resources on the topic</title>
- <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://www.jboss.com/products/devstudio/docs">here</ulink>.</para>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://docs.jboss.org/tools/">here</ulink>.</para>
<para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
</section>
</chapter>
Modified: trunk/struts/docs/struts_tools_ref_guide/en/modules/introduction.xml
===================================================================
--- trunk/struts/docs/struts_tools_ref_guide/en/modules/introduction.xml 2008-10-13 08:01:29 UTC (rev 10784)
+++ trunk/struts/docs/struts_tools_ref_guide/en/modules/introduction.xml 2008-10-13 10:16:38 UTC (rev 10785)
@@ -38,7 +38,7 @@
<colspec colnum="1" align="left" colwidth="2*"/>
<colspec colnum="2" colwidth="4*"/>
- <colspec colnum="3" colwidth="2*"/>
+ <colspec colnum="3" align="left" colwidth="2*"/>
<thead>
<row>
@@ -102,7 +102,7 @@
<section>
<title>Other relevant resources on the topic</title>
- <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://www.jboss.com/products/devstudio/docs">here</ulink>.</para>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://docs.jboss.org/tools/">here</ulink>.</para>
<para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
</section>
Modified: trunk/struts/docs/struts_tools_tutorial/en/modules/introduction.xml
===================================================================
--- trunk/struts/docs/struts_tools_tutorial/en/modules/introduction.xml 2008-10-13 08:01:29 UTC (rev 10784)
+++ trunk/struts/docs/struts_tools_tutorial/en/modules/introduction.xml 2008-10-13 10:16:38 UTC (rev 10785)
@@ -27,7 +27,7 @@
<section>
<title>Other relevant resources on the topic</title>
- <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://www.jboss.com/products/devstudio/docs">here</ulink>.</para>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://docs.jboss.org/tools/">here</ulink>.</para>
<para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
</section>
16 years, 3 months
JBoss Tools SVN: r10784 - in trunk/smooks/plugins: org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-10-13 04:01:29 -0400 (Mon, 13 Oct 2008)
New Revision: 10784
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/JavaBeanConfigWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/NewJavaBeanStrucutredDataWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IStrucutredDataCreationWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFileEditorInput.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.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/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/AbstractStructuredDdataWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xsd/ui/XSDStructuredDataWizard.java
Log:
JBIDE-2837
Change the new wizard codes, but ... something seams that can't run well...
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/JavaBeanConfigWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/JavaBeanConfigWizardPage.java 2008-10-11 15:42:39 UTC (rev 10783)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/JavaBeanConfigWizardPage.java 2008-10-13 08:01:29 UTC (rev 10784)
@@ -11,25 +11,31 @@
package org.jboss.tools.smooks.javabean.ui;
import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardNode;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardSelectionPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.INewWizard;
import org.jboss.tools.smooks.javabean.model.JavaBeanModel;
+import org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard;
/**
* @author Dart Peng
*
* @CreateTime Jul 21, 2008
*/
-public class JavaBeanConfigWizardPage extends WizardPage implements
+public class JavaBeanConfigWizardPage extends WizardSelectionPage implements
SelectionListener {
-
+
TreeViewer treeViewer;
Text classText = null;
@@ -47,8 +53,41 @@
public JavaBeanConfigWizardPage(IJavaProject selection) {
super("beansearchwizardpage");
this.project = selection;
+ setPageComplete(true);
}
+
+ public void activeNextWizardNode(IWizardNode node){
+ setSelectedNode(node);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.wizard.WizardSelectionPage#getNextPage()
+ */
+ public IWizardPage getNextPage() {
+ if (this.getSelectedNode() == null) {
+ return null;
+ }
+ boolean isCreated = getSelectedNode().isContentCreated();
+
+ IWizard wizard = getSelectedNode().getWizard();
+
+ if (wizard == null) {
+ setSelectedNode(null);
+ return null;
+ }
+ if (!isCreated) {
+ if (wizard instanceof INewWizard) {
+ StructuredSelection selection = new StructuredSelection(project);
+ ((INewWizard) wizard).init(null, selection);
+ }
+ wizard.addPages();
+ }
+ return wizard.getStartingPage();
+ }
+
protected void initilize() {
}
@@ -109,13 +148,14 @@
if (project == null) {
error = "Please select a Java project.";
}
+ setPageComplete(error == null);
this.setErrorMessage(error);
}
- public JavaBeanConfigWizardPage(String pageName, String title,
- ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
+// public JavaBeanConfigWizardPage(String pageName, String title,
+// ImageDescriptor titleImage) {
+// super(pageName, title, titleImage);
+// }
public JavaBeanConfigWizardPage(String pageName) {
super(pageName);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/NewJavaBeanStrucutredDataWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/NewJavaBeanStrucutredDataWizard.java 2008-10-11 15:42:39 UTC (rev 10783)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/NewJavaBeanStrucutredDataWizard.java 2008-10-13 08:01:29 UTC (rev 10784)
@@ -15,12 +15,18 @@
import java.util.Properties;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.internal.core.JavaProject;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizardNode;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
import org.jboss.tools.smooks.javabean.JavaBeanActivator;
import org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard;
@@ -28,11 +34,11 @@
* @author Dart Peng
* @Date Aug 5, 2008
*/
-public class NewJavaBeanStrucutredDataWizard extends Wizard implements IStrucutredDataCreationWizard{
+public class NewJavaBeanStrucutredDataWizard extends Wizard implements IStrucutredDataCreationWizard,INewWizard{
JavaBeanConfigWizardPage page = null;
IJavaProject project = null;
Object result = null;
-
+ IWizardNode wizard;
Properties properties = new Properties();
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#addPages()
@@ -42,6 +48,9 @@
super.addPages();
if(page == null){
page = new JavaBeanConfigWizardPage(project);
+ if(this.wizard != null){
+ page.activeNextWizardNode(wizard);
+ }
this.addPage(page);
}
}
@@ -81,4 +90,24 @@
return this.properties;
}
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ if(selection != null){
+ Object obj = selection.getFirstElement();
+ if(obj instanceof JavaProject){
+ this.project = (JavaProject)obj;
+ }
+ if(obj instanceof IResource){
+ IProject project = ((IResource)obj).getProject();
+ this.project = JavaCore.create(project);
+ }
+ }
+ }
+
+ public void setNextDataCreationWizardNode(IWizardNode wizard) {
+ this.wizard = wizard;
+ if(page != null){
+ page.activeNextWizardNode(this.wizard);
+ }
+ }
+
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IStrucutredDataCreationWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IStrucutredDataCreationWizard.java 2008-10-11 15:42:39 UTC (rev 10783)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IStrucutredDataCreationWizard.java 2008-10-13 08:01:29 UTC (rev 10784)
@@ -13,6 +13,7 @@
import java.util.Properties;
import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardNode;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
@@ -30,4 +31,6 @@
public Properties getProperties();
+ public void setNextDataCreationWizardNode(IWizardNode wizardNode);
+
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFileEditorInput.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFileEditorInput.java 2008-10-11 15:42:39 UTC (rev 10783)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFileEditorInput.java 2008-10-13 08:01:29 UTC (rev 10784)
@@ -27,6 +27,26 @@
private List targetModel = new ArrayList();
+ private Object sourceRoot = null;
+
+ private Object targetRoot = null;
+
+ public Object getSourceTreeViewerInputContents() {
+ return sourceRoot;
+ }
+
+ public void setSourceTreeViewerInputContents(Object sourceRoot) {
+ this.sourceRoot = sourceRoot;
+ }
+
+ public Object getTargetTreeViewerInputContents() {
+ return targetRoot;
+ }
+
+ public void setTargetTreeViewerInputContents(Object targetRoot) {
+ this.targetRoot = targetRoot;
+ }
+
public SmooksFileEditorInput(IFile file) {
super(file);
}
@@ -58,7 +78,5 @@
public void setTargetModel(List targetModel) {
this.targetModel = targetModel;
}
-
-
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java 2008-10-11 15:42:39 UTC (rev 10783)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java 2008-10-13 08:01:29 UTC (rev 10784)
@@ -47,6 +47,7 @@
*/
public class SmooksFormEditor extends FormEditor implements
ITabbedPropertySheetPageContributor {
+
SmooksGraphicalFormPage graphicalPage = null;
private TabbedPropertySheetPage tabbedPropertySheetPage;
private SmooksNormalContentEditFormPage normalPage;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-10-11 15:42:39 UTC (rev 10783)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-10-13 08:01:29 UTC (rev 10784)
@@ -258,7 +258,8 @@
Composite rootMainControl = form.getBody();
form.setText("Data Mapping Page");
Section section = this.createPageSectionHeader(rootMainControl,
- Section.TITLE_BAR | Section.DESCRIPTION , "Mapping Graph Edit Panel",
+ Section.TITLE_BAR | Section.DESCRIPTION,
+ "Mapping Graph Edit Panel",
"Edit the source and target assosiation");
Composite mappingMainComposite = toolkit.createComposite(section);
GridLayout gly = new GridLayout();
@@ -453,9 +454,7 @@
protected void initTargetTreeViewer() {
if (this.targetTreeViewerInputModel != null) {
- List list = new ArrayList();
- list.add(targetTreeViewerInputModel);
- targetViewer.setInput(list);
+ targetViewer.setInput(targetTreeViewerInputModel);
}
}
@@ -475,9 +474,7 @@
protected void initSourceTreeViewer() {
if (this.sourceTreeViewerInputModel != null) {
- List list = new ArrayList();
- list.add(sourceTreeViewerInputModel);
- sourceViewer.setInput(list);
+ sourceViewer.setInput(sourceTreeViewerInputModel);
}
}
@@ -862,10 +859,10 @@
.getInstance().getTargetModelAnalyzer(targetDataTypeID);
IMappingAnalyzer connectionAnalyzer = AnalyzerFactory.getInstance()
.getMappingAnalyzer(sourceDataTypeID, targetDataTypeID);
- if (sourceModelAnalyzer != null)
+ if (sourceModelAnalyzer != null && sourceTreeViewerInputModel == null)
sourceTreeViewerInputModel = sourceModelAnalyzer
.buildSourceInputObjects(graph, listType, file);
- if (targetModelAnalyzer != null)
+ if (targetModelAnalyzer != null && targetTreeViewerInputModel == null)
targetTreeViewerInputModel = targetModelAnalyzer
.buildTargetInputObjects(graph, listType, file);
if (connectionAnalyzer != null) {
@@ -953,6 +950,13 @@
smooksResource = ((SmooksFormEditor) parentEditor)
.getSmooksResource();
}
+ if (input instanceof SmooksFileEditorInput) {
+ this.sourceTreeViewerInputModel = ((SmooksFileEditorInput) input)
+ .getSourceTreeViewerInputContents();
+
+ this.targetTreeViewerInputModel = ((SmooksFileEditorInput) input)
+ .getTargetTreeViewerInputContents();
+ }
// }
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizard.java 2008-10-11 15:42:39 UTC (rev 10783)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizard.java 2008-10-13 08:01:29 UTC (rev 10784)
@@ -35,7 +35,7 @@
public void addPages(){
if(page == null){
- page = new TypeIDSelectionWizardPage("TypeID Selection");
+ page = new TypeIDSelectionWizardPage("TypeID Selection",false);
this.addPage(page);
}
super.addPages();
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizardPage.java 2008-10-11 15:42:39 UTC (rev 10783)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizardPage.java 2008-10-13 08:01:29 UTC (rev 10784)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.smooks.ui.editors;
+import java.util.Collection;
import java.util.Iterator;
import java.util.List;
@@ -17,11 +18,14 @@
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.jface.wizard.IWizardNode;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardSelectionPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
@@ -29,24 +33,39 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.ui.INewWizard;
import org.jboss.tools.smooks.analyzer.AnalyzerFactory;
import org.jboss.tools.smooks.analyzer.DataTypeID;
+import org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard;
+import org.jboss.tools.smooks.ui.IViewerInitor;
+import org.jboss.tools.smooks.ui.ViewerInitorStore;
+import org.jboss.tools.smooks.ui.wizards.TransformSelectWizardNode;
/**
* @author Dart Peng<br>
* Date : Sep 5, 2008
*/
-public class TypeIDSelectionWizardPage extends WizardPage {
+public class TypeIDSelectionWizardPage extends WizardSelectionPage {
+ protected IStrucutredDataCreationWizard sourceWizard;
+ protected IStrucutredDataCreationWizard targetWizard;
+
protected CheckboxTableViewer source;
protected CheckboxTableViewer target;
private List sourceList;
private String sourceID = null;
private String targetID = null;
-
-
-
+ private IStructuredSelection selection;
+ private boolean showDataSelectPage = false;
+ public IStructuredSelection getSelection() {
+ return selection;
+ }
+
+ public void setSelection(IStructuredSelection selection) {
+ this.selection = selection;
+ }
+
public String getSourceID() {
return sourceID;
}
@@ -63,13 +82,49 @@
this.targetID = targetID;
}
- public TypeIDSelectionWizardPage(String pageName) {
+ public TypeIDSelectionWizardPage(String pageName, boolean showDataSelectPage) {
super(pageName);
+ this.showDataSelectPage = showDataSelectPage;
}
/*
* (non-Javadoc)
*
+ * @see org.eclipse.jface.wizard.WizardSelectionPage#getNextPage()
+ */
+ public IWizardPage getNextPage() {
+ if (this.getSelectedNode() == null) {
+ return null;
+ }
+
+ boolean isCreated = getSelectedNode().isContentCreated();
+
+ IWizard wizard = getSelectedNode().getWizard();
+
+ if (wizard == null) {
+ setSelectedNode(null);
+ return null;
+ }
+ if (!isCreated) {
+ if (wizard instanceof IStrucutredDataCreationWizard) {
+ String targetID = getDataTypeID(target);
+ if (targetID != null) {
+ ((IStrucutredDataCreationWizard) wizard)
+ .setNextDataCreationWizardNode(this
+ .getSourceWizard(targetID));
+ }
+ }
+ if (wizard instanceof INewWizard) {
+ ((INewWizard) wizard).init(null, selection);
+ }
+ wizard.addPages();
+ }
+ return wizard.getStartingPage();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent) {
@@ -78,8 +133,7 @@
gl.numColumns = 2;
gl.makeColumnsEqualWidth = true;
mainComposite.setLayout(gl);
- sourceList = AnalyzerFactory.getInstance()
- .getRegistrySourceIDList();
+ sourceList = AnalyzerFactory.getInstance().getRegistrySourceIDList();
Label sl = new Label(mainComposite, SWT.NONE);
sl.setText("Source Data Type ID List : ");
@@ -95,7 +149,7 @@
source.setInput(sourceList);
target.setInput(sourceList);
initViewer();
-
+
this.setControl(mainComposite);
}
@@ -124,7 +178,8 @@
}
protected boolean initViewerCheckState(String id, CheckboxTableViewer viewer) {
- if(id == null) return false;
+ if (id == null)
+ return false;
List l = (List) viewer.getInput();
for (Iterator iterator = l.iterator(); iterator.hasNext();) {
DataTypeID dti = (DataTypeID) iterator.next();
@@ -136,6 +191,27 @@
return false;
}
+ private IWizardNode getSourceWizard(String id) {
+ Collection<IViewerInitor> viewers = ViewerInitorStore.getInstance()
+ .getViewerInitorCollection();
+ for (Iterator iterator = viewers.iterator(); iterator.hasNext();) {
+ IViewerInitor viewerInitor = (IViewerInitor) iterator.next();
+ if (viewerInitor.getTypeID().equals(id)) {
+ TransformSelectWizardNode wn = new TransformSelectWizardNode();
+ IStrucutredDataCreationWizard wizard = viewerInitor
+ .getStructuredDataLoadWizard();
+ if (wizard == null)
+ return null;
+ wn.setWizard(wizard);
+ wn.setName(viewerInitor.getName());
+ wn.setIconPath(viewerInitor.getWizardIconPath());
+ wn.setDescription(viewerInitor.getDescription());
+ return wn;
+ }
+ }
+ return null;
+ }
+
protected CheckboxTableViewer createTableViewer(Composite parent) {
final CheckboxTableViewer viewer = CheckboxTableViewer.newCheckList(
parent, SWT.FULL_SELECTION);
@@ -152,13 +228,35 @@
viewer.setChecked(event.getElement(), true);
fireEvent = true;
}
-
- if(viewer == source){
- setSourceID(getDataTypeID(source));
+
+ if (viewer == source) {
+ String sourceID = getDataTypeID(source);
+ IWizardNode wn = getSourceWizard(sourceID);
+ setSelectedNode(wn);
+ setSourceID(sourceID);
+ IWizard sw = wn.getWizard();
+ if (sw instanceof IStrucutredDataCreationWizard) {
+ setSourceWizard((IStrucutredDataCreationWizard) sw);
+ }
}
-
- if(viewer == target){
- setTargetID(getDataTypeID(target));
+
+ if (viewer == target) {
+ IWizardNode node = getSelectedNode();
+ String targetID = getDataTypeID(target);
+ IWizardNode targetNode = getSourceWizard(targetID);
+ IWizard tnw = targetNode.getWizard();
+ if (tnw instanceof IStrucutredDataCreationWizard) {
+ setTargetWizard((IStrucutredDataCreationWizard) tnw);
+ }
+ if (node != null) {
+ IWizard wizard = node.getWizard();
+ if (wizard != null
+ && wizard instanceof IStrucutredDataCreationWizard) {
+ ((IStrucutredDataCreationWizard) wizard)
+ .setNextDataCreationWizardNode(targetNode);
+ }
+ }
+ setTargetID(targetID);
}
}
@@ -166,9 +264,9 @@
TableColumn nameColumn = new TableColumn(viewer.getTable(), SWT.NONE);
nameColumn.setWidth(100);
nameColumn.setText("Name");
-// TableColumn idColumn = new TableColumn(viewer.getTable(), SWT.NONE);
-// idColumn.setWidth(100);
-// idColumn.setText("ID");
+ // TableColumn idColumn = new TableColumn(viewer.getTable(), SWT.NONE);
+ // idColumn.setWidth(100);
+ // idColumn.setText("ID");
viewer.setContentProvider(new TypeIDContentProvider());
viewer.setLabelProvider(new TypeIDLabelProvider());
return viewer;
@@ -205,12 +303,28 @@
switch (columnIndex) {
case 0:
return ((DataTypeID) element).getName();
-// case 1:
-// return ((DataTypeID) element).getId();
+ // case 1:
+ // return ((DataTypeID) element).getId();
}
}
return "";
}
}
+
+ public IStrucutredDataCreationWizard getSourceWizard() {
+ return sourceWizard;
+ }
+
+ public void setSourceWizard(IStrucutredDataCreationWizard sourceWizard) {
+ this.sourceWizard = sourceWizard;
+ }
+
+ public IStrucutredDataCreationWizard getTargetWizard() {
+ return targetWizard;
+ }
+
+ public void setTargetWizard(IStrucutredDataCreationWizard targetWizard) {
+ this.targetWizard = targetWizard;
+ }
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java 2008-10-11 15:42:39 UTC (rev 10783)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java 2008-10-13 08:01:29 UTC (rev 10784)
@@ -13,6 +13,7 @@
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
@@ -21,6 +22,9 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
import org.jboss.tools.smooks.graphical.util.GraphicalInformationSaver;
+import org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard;
+import org.jboss.tools.smooks.ui.editors.SmooksFileEditorInput;
+import org.jboss.tools.smooks.ui.editors.SmooksFormEditor;
import org.jboss.tools.smooks.ui.editors.TypeIDSelectionWizardPage;
/**
@@ -55,7 +59,8 @@
page = new SmooksConfigFileNewWizardPage("newSmooksFile1",
getSelection());
addPage(page);
- typeIDPage = new TypeIDSelectionWizardPage("");
+ typeIDPage = new TypeIDSelectionWizardPage("", true);
+ typeIDPage.setSelection(selection);
addPage(typeIDPage);
}
@@ -124,7 +129,33 @@
IWorkbenchPage page = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage();
try {
- IDE.openEditor(page, file, true);
+ SmooksFileEditorInput input = new SmooksFileEditorInput(
+ file);
+ IStrucutredDataCreationWizard sourceWizard = typeIDPage
+ .getSourceWizard();
+
+ IStrucutredDataCreationWizard targetWizard = typeIDPage
+ .getTargetWizard();
+
+ if (sourceWizard != null) {
+ if (((IWizard) sourceWizard).getPageCount() != 0) {
+ if (((IWizard) sourceWizard).performFinish())
+ input
+ .setSourceTreeViewerInputContents(sourceWizard
+ .getTreeViewerInputContents());
+ }
+ }
+ if (targetWizard != null) {
+ if (((IWizard) targetWizard).getPageCount() != 0) {
+ if (((IWizard) targetWizard).performFinish())
+ input
+ .setTargetTreeViewerInputContents(targetWizard
+ .getTreeViewerInputContents());
+ }
+ }
+
+ IDE.openEditor(page, input, SmooksFormEditor.EDITOR_ID,
+ true);// openEditor(page, file, true);
} catch (PartInitException e) {
}
}
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-11 15:42:39 UTC (rev 10783)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformSelectWizardNode.java 2008-10-13 08:01:29 UTC (rev 10784)
@@ -12,7 +12,6 @@
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.IWizardNode;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
/**
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java 2008-10-11 15:42:39 UTC (rev 10783)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java 2008-10-13 08:01:29 UTC (rev 10784)
@@ -8,12 +8,12 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.emf.common.ui.dialogs.WorkspaceResourceDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardNode;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardSelectionPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -28,16 +28,15 @@
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.jboss.tools.smooks.xsd.model.XSDStructuredModelContentProvider;
-import org.jboss.tools.smooks.xsd.model.XSDStructuredModelLabelProvider;
+import org.eclipse.ui.INewWizard;
/**
*
* @author Dart Peng Date : 2008-8-13
*/
-public abstract class AbstractFileSelectionWizardPage extends WizardPage
+public abstract class AbstractFileSelectionWizardPage extends WizardSelectionPage
implements SelectionListener {
-
+ protected IStructuredSelection selection;
protected Object returnObject = null;
protected Text fileText;
protected Composite fileTextComposite;
@@ -46,12 +45,6 @@
protected boolean reasourceLoaded = false;
private Button workspaceBrowseButton;
- public AbstractFileSelectionWizardPage(String pageName, String title,
- ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- // TODO Auto-generated constructor stub
- }
-
public AbstractFileSelectionWizardPage(String pageName) {
super(pageName);
// TODO Auto-generated constructor stub
@@ -69,7 +62,33 @@
public String getFilePath(){
return fileText.getText();
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.wizard.WizardSelectionPage#getNextPage()
+ */
+ public IWizardPage getNextPage() {
+ if (this.getSelectedNode() == null) {
+ return null;
+ }
+ boolean isCreated = getSelectedNode().isContentCreated();
+
+ IWizard wizard = getSelectedNode().getWizard();
+
+ if (wizard == null) {
+ setSelectedNode(null);
+ return null;
+ }
+ if (!isCreated) {
+ if (wizard instanceof INewWizard) {
+ ((INewWizard) wizard).init(null, getSelection());
+ }
+ wizard.addPages();
+ }
+ return wizard.getStartingPage();
+ }
+
/*
* (non-Javadoc)
*
@@ -245,6 +264,10 @@
return xsdComposite;
}
+
+ public void activeNextWizardNode(IWizardNode node){
+ setSelectedNode(node);
+ }
abstract protected Object loadedTheObject(String path) throws Exception;
@@ -324,4 +347,12 @@
this.tableViewer = tableViewer;
}
+ public IStructuredSelection getSelection() {
+ return selection;
+ }
+
+ public void setSelection(IStructuredSelection selection) {
+ this.selection = selection;
+ }
+
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/AbstractStructuredDdataWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/AbstractStructuredDdataWizard.java 2008-10-11 15:42:39 UTC (rev 10783)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/AbstractStructuredDdataWizard.java 2008-10-13 08:01:29 UTC (rev 10784)
@@ -3,9 +3,13 @@
*/
package org.jboss.tools.smooks.xml;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizardNode;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
import org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard;
/**
@@ -13,9 +17,14 @@
*
*/
public abstract class AbstractStructuredDdataWizard extends Wizard implements
- IStrucutredDataCreationWizard {
+ IStrucutredDataCreationWizard ,INewWizard{
+ protected IWorkbench workbench;
+
+ protected IStructuredSelection selection;
+
protected AbstractFileSelectionWizardPage page = null;
protected Object xsdElement = null;
+ protected IWizardNode strucutredDataCreationWizardNode;
/**
*
*/
@@ -27,6 +36,8 @@
public void addPages() {
if(page == null){
page = createAbstractFileSelectionWizardPage();
+ page.setSelection(this.selection);
+ page.activeNextWizardNode(strucutredDataCreationWizardNode);
}
this.addPage(page);
}
@@ -50,5 +61,17 @@
public void init(IEditorSite site, IEditorInput input) {
}
+ public void setNextDataCreationWizardNode(IWizardNode wizardNode) {
+ strucutredDataCreationWizardNode = wizardNode;
+ if(page != null){
+ page.activeNextWizardNode(strucutredDataCreationWizardNode);
+ }
+ }
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.workbench = workbench;
+ this.selection = selection;
+ }
+
+
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizard.java 2008-10-11 15:42:39 UTC (rev 10783)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizard.java 2008-10-13 08:01:29 UTC (rev 10784)
@@ -21,6 +21,8 @@
* @Date Aug 18, 2008
*/
public class XMLStructuredDataWizard extends AbstractStructuredDdataWizard {
+
+
Properties properties = new Properties();
String filePath = null;
@@ -49,5 +51,4 @@
public Properties getProperties() {
return properties;
}
-
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizardPage.java 2008-10-11 15:42:39 UTC (rev 10783)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizardPage.java 2008-10-13 08:01:29 UTC (rev 10784)
@@ -3,7 +3,6 @@
*/
package org.jboss.tools.smooks.xml.ui;
-import org.eclipse.jface.resource.ImageDescriptor;
import org.jboss.tools.smooks.xml.AbstractFileSelectionWizardPage;
import org.jboss.tools.smooks.xml.model.DocumentObject;
import org.jboss.tools.smooks.xml.model.XMLObjectAnalyzer;
@@ -14,11 +13,6 @@
public class XMLStructuredDataWizardPage extends
AbstractFileSelectionWizardPage {
- public XMLStructuredDataWizardPage(String pageName, String title,
- ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- setPageText();
- }
public XMLStructuredDataWizardPage(String pageName) {
super(pageName);
@@ -38,10 +32,8 @@
*/
@Override
protected Object loadedTheObject(String path) throws Exception {
-
XMLObjectAnalyzer analyzer = new XMLObjectAnalyzer();
DocumentObject doc = analyzer.analyze(path);
-
return doc;
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xsd/ui/XSDStructuredDataWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xsd/ui/XSDStructuredDataWizard.java 2008-10-11 15:42:39 UTC (rev 10783)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xsd/ui/XSDStructuredDataWizard.java 2008-10-13 08:01:29 UTC (rev 10784)
@@ -12,6 +12,7 @@
import java.util.Properties;
+import org.eclipse.jface.wizard.IWizardNode;
import org.jboss.tools.smooks.xml.AbstractFileSelectionWizardPage;
import org.jboss.tools.smooks.xml.AbstractStructuredDdataWizard;
import org.jboss.tools.smooks.xml.XmlActivator;
@@ -21,6 +22,7 @@
* @Date Aug 18, 2008
*/
public class XSDStructuredDataWizard extends AbstractStructuredDdataWizard {
+ IWizardNode wizard;
Properties properties = new Properties();
/* (non-Javadoc)
* @see org.jboss.tools.smooks.xml.AbstractStructuredDdataWizard#createAbstractFileSelectionWizardPage()
@@ -39,5 +41,4 @@
public Properties getProperties() {
return this.properties;
}
-
}
16 years, 3 months