JBoss Tools SVN: r10873 - trunk/documentation/guides/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-16 06:26:40 -0400 (Thu, 16 Oct 2008)
New Revision: 10873
Modified:
trunk/documentation/guides/GettingStartedGuide/en/modules/first_seam.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-446 - updating the section;
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/first_seam.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/first_seam.xml 2008-10-16 10:23:14 UTC (rev 10872)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/first_seam.xml 2008-10-16 10:26:40 UTC (rev 10873)
@@ -23,7 +23,8 @@
<section id="start_dev_db">
<title>Start Development Database</title>
- <para>Before opening the JBoss Developer studio you need to <ulink url="http://anonsvn.jboss.org/repos/jbosstools/trunk/documentation/guides/Gett..."
+ <para>Before opening the JBoss Developer studio you need to <ulink
+ url="http://anonsvn.jboss.org/repos/jbosstools/trunk/documentation/guides/Gett..."
>download</ulink> and start a Workshop Database.</para>
<para>To start the database just run <property>./runDBServer.sh</property> or
<property>runDBServer.bat</property> from the database directory.</para>
@@ -43,8 +44,8 @@
<section id="create_deploy_seam">
<title>Create and deploy Seam Web Project</title>
- <para>Minimize the terminal window and run the JBoss Developer Studio from Applications Menu
- or from the desktop icon.</para>
+ <para>Minimize the terminal window and run the <property>JBoss Developer Studio</property>
+ from Applications Menu or from the desktop icon.</para>
<para>First of all you get the Workspace Launcher. Change the default workspace location if
it's needed. Click on <property>Ok</property>. </para>
@@ -61,12 +62,11 @@
in <link linkend="Welcome">previous</link> chapter. Now select <property>Create
New...</property> icon and then press on <property>Create Seam Project</property> link.</para>
- <para>The New Seam Project wizard is started. You need to enter a name (e.g.,
- "workshop") and a location directory for your new project. The wizard has
- an option for selecting the actual Server (and not just WTP runtime) that will be used for
- the project. This allow the wizard to correctly identify where the needed datasource and
- driver libraries need to go. All settings are already specified. Click on
- <property>Next</property>.</para>
+ <para>The <property>New Seam Project wizard</property> is started. You need to enter a name
+ (e.g., "workshop") and a location directory for your new project. The
+ wizard has an option for selecting the actual Server (and not just WTP runtime) that will be
+ used for the project. This allows the wizard to correctly identify where the needed
+ datasource and driver libraries need to go.</para>
<figure>
<title>New Seam Project Wizard</title>
@@ -77,13 +77,19 @@
</mediaobject>
</figure>
- <para>Next, you will be asked to select the "features" you want to use in your project. This
- allows JBoss Developer Studio to setup the appropriate tooling for your project. Since JBoss
- Seam integrates all popular Java EE frameworks, you can select any combination of
- technologies from the list. Here, for this project, we will select Dynamic Web Module, Java,
- JavaServer Faces (JSF), and Seam Facet for a typical database-driven web application. The
- default project facets should suffice, click on <property>Next</property>.</para>
+ <para>All settings are already specified here, you can just modify the Configuration. Chose needed
+ one from the list of already predefined configurations or click on the <emphasis>
+ <property>Modify...</property>
+ </emphasis> to configure your custom facets pattern.</para>
+ <para>On the hole appeared dialog allows to select the "features" you want to use in your
+ project. Doing this <property>JBoss Developer Studio</property> setups the appropriate
+ tooling for your project. Since JBoss Seam integrates all popular Java EE frameworks, you
+ can select any combination of technologies from the list. Here, for the default
+ configuration, Dynamic Web Module, Java, JavaServer Faces (JSF), and Seam Facet are already
+ selected for a typical database-driven web application. The default project facets should
+ suffice.</para>
+
<figure id="ProjectFacetsSpecifyingScreen">
<title>Project Facets Specifying</title>
<mediaobject>
@@ -93,11 +99,9 @@
</mediaobject>
</figure>
- <para>In the <link linkend="ProjectFacetsSpecifyingScreen">Project Facets Specifying</link>
- form you can also bring up server runtimes panel by clicking <property>Show
- Runtimes</property> in the bottom right corner. This panel shows available server runtimes.
- Then this button will be changed into <property>Hide Runtimes</property> one.</para>
- <para>Click <property>Next</property> to proceed further.</para>
+ <para>In the <property>Project Facets wizard</property> form you can also bring up server
+ runtimes panel by clicking <property> Runtimes</property> tab on the right corner. This
+ panel shows available server runtimes.</para>
<figure>
<title>Runtimes Selecting</title>
@@ -107,7 +111,13 @@
</imageobject>
</mediaobject>
</figure>
-
+
+ <para>Click on <emphasis>
+ <property>Ok</property>
+ </emphasis> and then <emphasis>
+ <property>Next</property>
+ </emphasis> to proceed further.</para>
+
<para>A dynamic web application contains both web pages and Java code. The wizard will ask you
where you want to put those files. You can just leave the default values or choose another
folder.</para>
@@ -764,8 +774,8 @@
<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 perspective in <property>JBoss
- Developer Studio</property>.</para>
+ <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>
16 years, 3 months
JBoss Tools SVN: r10872 - trunk/documentation/guides/GettingStartedGuide/en/images/first_seam.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-16 06:23:14 -0400 (Thu, 16 Oct 2008)
New Revision: 10872
Modified:
trunk/documentation/guides/GettingStartedGuide/en/images/first_seam/first_seam3.png
trunk/documentation/guides/GettingStartedGuide/en/images/first_seam/first_seam4.png
trunk/documentation/guides/GettingStartedGuide/en/images/first_seam/first_seam5.png
Log:
https://jira.jboss.org/jira/browse/JBDS-446 - replacing the screenshots by new ones;
Modified: trunk/documentation/guides/GettingStartedGuide/en/images/first_seam/first_seam3.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en/images/first_seam/first_seam4.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en/images/first_seam/first_seam5.png
===================================================================
(Binary files differ)
16 years, 3 months
JBoss Tools SVN: r10871 - in trunk/smooks/plugins: org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-10-16 05:28:22 -0400 (Thu, 16 Oct 2008)
New Revision: 10871
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IStructuredDataCreationWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/ISmooksDataCreationAddtionWizard.java
Removed:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IStrucutredDataCreationWizard.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
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/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/StructuredDataCreationWizardDailog.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/editors/SmooksGraphicalFormPage.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/TransformDataWizardSelectionPage.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
Log:
JBIDE-2837
1.Modify the SmooksNewConfigFileWizard file , make it can add addition wizard page and show them.
2.Make the TypeID Selection page can load the Wizard instance by the typeID selected by user.
3.check some bugs
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-10-16 08:37:41 UTC (rev 10870)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -648,7 +648,9 @@
buildSourceInputProperties(listType, model, false, isError,
current, classLoader);
}
- return model;
+ List list = new ArrayList();
+ if(model != null) list.add(model);
+ return list;
}
public Object buildSourceInputObjects(GraphInformations graphInfo,
@@ -719,7 +721,9 @@
setSelectorIsUsed(rootClassName);
buildChildrenOfTargetInputModel(listType, rootModel, false,
rootIsError, current, loader);
- return rootModel;
+ List list = new ArrayList();
+ list.add(rootModel);
+ return list;
}
protected void buildChildrenOfTargetInputModel(
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-16 08:37:41 UTC (rev 10870)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/JavaBeanConfigWizardPage.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -11,29 +11,24 @@
package org.jboss.tools.smooks.javabean.ui;
import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
-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.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 WizardSelectionPage implements
+public class JavaBeanConfigWizardPage extends WizardPage implements
SelectionListener {
TreeViewer treeViewer;
@@ -58,38 +53,6 @@
setDescription("Select the JavaBean class");
}
- 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() {
}
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-16 08:37:41 UTC (rev 10870)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/ui/NewJavaBeanStrucutredDataWizard.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -20,7 +20,6 @@
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;
@@ -28,17 +27,16 @@
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.jboss.tools.smooks.javabean.JavaBeanActivator;
-import org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard;
+import org.jboss.tools.smooks.ui.IStructuredDataCreationWizard;
/**
* @author Dart Peng
* @Date Aug 5, 2008
*/
-public class NewJavaBeanStrucutredDataWizard extends Wizard implements IStrucutredDataCreationWizard,INewWizard{
+public class NewJavaBeanStrucutredDataWizard extends Wizard implements IStructuredDataCreationWizard,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()
@@ -48,9 +46,6 @@
super.addPages();
if(page == null){
page = new JavaBeanConfigWizardPage(project);
- if(this.wizard != null){
- page.activeNextWizardNode(wizard);
- }
this.addPage(page);
}
}
@@ -102,12 +97,4 @@
}
}
}
-
- 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/BaseViewerInitor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/BaseViewerInitor.java 2008-10-16 08:37:41 UTC (rev 10870)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/BaseViewerInitor.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -63,9 +63,9 @@
/**
* @return the structuredDataLoadWizard
*/
- public IStrucutredDataCreationWizard getStructuredDataLoadWizard() {
+ public IStructuredDataCreationWizard getStructuredDataLoadWizard() {
try {
- return ((IStrucutredDataCreationWizard) configurationElement
+ return ((IStructuredDataCreationWizard) configurationElement
.createExecutableExtension(SmooksExtensionPointConstants.EXTENTION_POINT_ATTRIBUTE_CREATION_WIZARD));
} catch (CoreException e) {
e.printStackTrace();
Copied: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IStructuredDataCreationWizard.java (from rev 10820, 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/IStructuredDataCreationWizard.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IStructuredDataCreationWizard.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.smooks.ui;
+
+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;
+
+/**
+ * @author Dart Peng
+ * @Date Aug 5, 2008
+ */
+public interface IStructuredDataCreationWizard extends IWizard {
+
+ public Object getTreeViewerInputContents();
+
+ public void init(IEditorSite site, IEditorInput input);
+
+ public String getInputDataTypeID();
+
+ public Properties getProperties();
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IStructuredDataCreationWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: 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-16 08:37:41 UTC (rev 10870)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IStrucutredDataCreationWizard.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.smooks.ui;
-
-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;
-
-/**
- * @author Dart Peng
- * @Date Aug 5, 2008
- */
-public interface IStrucutredDataCreationWizard extends IWizard {
-
- public Object getTreeViewerInputContents();
-
- public void init(IEditorSite site, IEditorInput input);
-
- public String getInputDataTypeID();
-
- public Properties getProperties();
-
- public void setNextDataCreationWizardNode(IWizardNode wizardNode);
-
-}
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-16 08:37:41 UTC (rev 10870)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IViewerInitor.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -25,7 +25,7 @@
String getTypeID();
- IStrucutredDataCreationWizard getStructuredDataLoadWizard();
+ IStructuredDataCreationWizard getStructuredDataLoadWizard();
String getName();
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/StructuredDataCreationWizardDailog.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/StructuredDataCreationWizardDailog.java 2008-10-16 08:37:41 UTC (rev 10870)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/StructuredDataCreationWizardDailog.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -25,10 +25,10 @@
super(parentShell, newWizard);
}
- public IStrucutredDataCreationWizard getCurrentCreationWizard(){
+ public IStructuredDataCreationWizard getCurrentCreationWizard(){
IWizard w = getWizard();
- if(w != null && w instanceof IStrucutredDataCreationWizard){
- return (IStrucutredDataCreationWizard)w;
+ if(w != null && w instanceof IStructuredDataCreationWizard){
+ return (IStructuredDataCreationWizard)w;
}
return null;
}
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-16 08:37:41 UTC (rev 10870)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/ViewerInitorStore.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -43,7 +43,7 @@
return null;
}
- public IStrucutredDataCreationWizard getStructuredDataCreationWizard(String typeID) {
+ public IStructuredDataCreationWizard getStructuredDataCreationWizard(String typeID) {
if (this.getInitorMap() == null)
return null;
IViewerInitor initor = this.getInitorMap().get(typeID);
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-16 08:37:41 UTC (rev 10870)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -112,7 +112,7 @@
import org.jboss.tools.smooks.model.SmooksFactory;
import org.jboss.tools.smooks.model.SmooksResourceListType;
import org.jboss.tools.smooks.model.util.SmooksModelConstants;
-import org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard;
+import org.jboss.tools.smooks.ui.IStructuredDataCreationWizard;
import org.jboss.tools.smooks.ui.IViewerInitor;
import org.jboss.tools.smooks.ui.StructuredDataCreationWizardDailog;
import org.jboss.tools.smooks.ui.gef.editparts.SmooksEditPartFactory;
@@ -454,9 +454,7 @@
protected void initTargetTreeViewer() {
if (this.targetTreeViewerInputModel != null) {
- List arrayList = new ArrayList();
- arrayList.add(targetTreeViewerInputModel);
- targetViewer.setInput(arrayList);
+ targetViewer.setInput(targetTreeViewerInputModel);
}
}
@@ -476,9 +474,7 @@
protected void initSourceTreeViewer() {
if (this.sourceTreeViewerInputModel != null) {
- List arrayList = new ArrayList();
- arrayList.add(sourceTreeViewerInputModel);
- sourceViewer.setInput(arrayList);
+ sourceViewer.setInput(sourceTreeViewerInputModel);
}
}
@@ -993,7 +989,7 @@
StructuredDataCreationWizardDailog dialog = new StructuredDataCreationWizardDailog(
getEditorSite().getShell(), wizard);
if (dialog.open() == WizardDialog.OK) {
- IStrucutredDataCreationWizard cw = dialog
+ IStructuredDataCreationWizard cw = dialog
.getCurrentCreationWizard();
this.getSmooksConfigurationFileGenerateContext().addProperties(
cw.getProperties());
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-16 08:37:41 UTC (rev 10870)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizardPage.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -25,7 +25,9 @@
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.IWizardNode;
+import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
@@ -40,10 +42,11 @@
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.IStructuredDataCreationWizard;
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.ISmooksDataCreationAddtionWizard;
import org.jboss.tools.smooks.ui.wizards.TransformSelectWizardNode;
/**
@@ -51,15 +54,9 @@
* Date : Sep 5, 2008
*/
public class TypeIDSelectionWizardPage extends WizardPage {
- /**
- * @deprecated
- */
- protected IStrucutredDataCreationWizard sourceWizard;
+ protected IWizard sourceDataCreationWizard;
- /**
- * @deprecated
- */
- protected IStrucutredDataCreationWizard targetWizard;
+ protected IWizard targetDataCreationWizard;
private Object sourceTreeViewerInputContents;
@@ -70,6 +67,8 @@
private List sourceList;
private String sourceID = null;
private String targetID = null;
+ private String oldSourceID = null;
+ private String oldTargetID = null;
private IStructuredSelection selection;
private boolean showDataSelectPage = false;
@@ -106,6 +105,91 @@
this.showDataSelectPage = showDataSelectPage;
}
+ @Override
+ public boolean canFlipToNextPage() {
+ if (this.getSourceID() != null || getTargetID() != null) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public IWizardPage getNextPage() {
+ String sourceID = this.getSourceID();
+ String targetID = this.getTargetID();
+ IStructuredDataCreationWizard sourceWizard = null;
+ IStructuredDataCreationWizard targetWizard = null;
+ IWizard rootWizard = getWizard();
+ ISmooksDataCreationAddtionWizard wizard = (ISmooksDataCreationAddtionWizard) rootWizard;
+ if (sourceID == null) {
+ wizard.clearSourceWizardPages();
+ }
+ if (targetID == null) {
+ wizard.clearTargetWizardPages();
+ }
+ if (sourceID != null && (!sourceID.equals(oldSourceID))) {
+ sourceWizard = ViewerInitorStore.getInstance()
+ .getStructuredDataCreationWizard(sourceID);
+ oldSourceID = sourceID;
+ }
+ if (targetID != null && (!targetID.equals(oldTargetID))) {
+ targetWizard = ViewerInitorStore.getInstance()
+ .getStructuredDataCreationWizard(targetID);
+ oldTargetID = targetID;
+ }
+ if (!wizardIsCreated(sourceWizard) && sourceWizard != null) {
+ if (sourceWizard instanceof INewWizard) {
+ ((INewWizard) sourceWizard).init(null, selection);
+ }
+ sourceWizard.addPages();
+ }
+ if (!wizardIsCreated(targetWizard) && targetWizard != null) {
+ if (targetWizard instanceof INewWizard) {
+ ((INewWizard) targetWizard).init(null, selection);
+ }
+ targetWizard.addPages();
+ }
+ addDataCreationPages(sourceWizard, targetWizard);
+ return super.getNextPage();
+ }
+
+ private void addDataCreationPages(IWizard sourceWizard, IWizard targetWizard) {
+ IWizard rootWizard = getWizard();
+ if (rootWizard instanceof ISmooksDataCreationAddtionWizard) {
+ ISmooksDataCreationAddtionWizard wizard = (ISmooksDataCreationAddtionWizard) rootWizard;
+ if (sourceWizard != null) {
+ wizard.clearSourceWizardPages();
+ IWizardPage[] pages = sourceWizard.getPages();
+ for (int i = 0; i < pages.length; i++) {
+ IWizardPage p = pages[i];
+ wizard.addSourceWizardPage(p);
+ p.setWizard(rootWizard);
+ }
+ }
+
+ if (targetWizard != null) {
+ wizard.clearTargetWizardPages();
+ IWizardPage[] pages = targetWizard.getPages();
+ for (int i = 0; i < pages.length; i++) {
+ IWizardPage p = pages[i];
+ wizard.addTargetWizardPage(p);
+ p.setWizard(rootWizard);
+ }
+ }
+ }
+ sourceDataCreationWizard = sourceWizard;
+ targetDataCreationWizard = targetWizard;
+ }
+
+ private boolean wizardIsCreated(IWizard wizard) {
+ if (wizard == null)
+ return false;
+ if (wizard.getPageCount() <= 0) {
+ return false;
+ }
+ return true;
+ }
+
/*
* (non-Javadoc)
*
@@ -151,6 +235,8 @@
}
});
+ // TODO don't show this
+ sourceDataLink.setVisible(false);
targetDataLink = new Hyperlink(mainComposite, SWT.NONE);
targetDataLink.setText("Target Model Select:Empty");
targetDataLink.addHyperlinkListener(new IHyperlinkListener() {
@@ -168,6 +254,8 @@
}
});
+ // TODO don't show this
+ targetDataLink.setVisible(false);
this.setControl(mainComposite);
}
@@ -183,7 +271,7 @@
IWizardNode wn = getSourceWizard(dataID);
// setSelectedNode(wn);
IWizard sw = wn.getWizard();
- if (sw instanceof IStrucutredDataCreationWizard) {
+ if (sw instanceof IStructuredDataCreationWizard) {
// ((IStrucutredDataCreationWizard)sw).i
}
if (sw instanceof INewWizard) {
@@ -269,7 +357,7 @@
IViewerInitor viewerInitor = (IViewerInitor) iterator.next();
if (viewerInitor.getTypeID().equals(id)) {
TransformSelectWizardNode wn = new TransformSelectWizardNode();
- IStrucutredDataCreationWizard wizard = viewerInitor
+ IStructuredDataCreationWizard wizard = viewerInitor
.getStructuredDataLoadWizard();
if (wizard == null)
return null;
@@ -309,6 +397,10 @@
String targetID = getDataTypeID(target);
setTargetID(targetID);
}
+ IWizardContainer container = getContainer();
+ if (container != null) {
+ container.updateButtons();
+ }
}
});
@@ -360,22 +452,7 @@
}
- 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;
- }
-
public Object getSourceTreeViewerInputContents() {
return sourceTreeViewerInputContents;
}
@@ -393,4 +470,12 @@
Object targetTreeViewerInputContents) {
this.targetTreeViewerInputContents = targetTreeViewerInputContents;
}
+
+ public IWizard getSourceDataCreationWizard() {
+ return sourceDataCreationWizard;
+ }
+
+ public IWizard getTargetDataCreationWizard() {
+ return targetDataCreationWizard;
+ }
}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/ISmooksDataCreationAddtionWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/ISmooksDataCreationAddtionWizard.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/ISmooksDataCreationAddtionWizard.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -0,0 +1,26 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.ui.wizards;
+
+import org.eclipse.jface.wizard.IWizardPage;
+
+/**
+ * @author dart
+ *
+ */
+public interface ISmooksDataCreationAddtionWizard {
+
+ public void addSourceWizardPage(IWizardPage page);
+
+ public void removeSourceWIzardPage(IWizardPage page);
+
+ public void clearSourceWizardPages();
+
+ public void addTargetWizardPage(IWizardPage page);
+
+ public void removeTargetWIzardPage(IWizardPage page);
+
+ public void clearTargetWizardPages();
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/ISmooksDataCreationAddtionWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
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-16 08:37:41 UTC (rev 10870)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -4,6 +4,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IFile;
@@ -14,6 +15,8 @@
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.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
@@ -22,6 +25,7 @@
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.IStructuredDataCreationWizard;
import org.jboss.tools.smooks.ui.editors.SmooksFileEditorInput;
import org.jboss.tools.smooks.ui.editors.SmooksFormEditor;
import org.jboss.tools.smooks.ui.editors.TypeIDSelectionWizardPage;
@@ -35,10 +39,15 @@
* the same extension, it will be able to open it.
*/
-public class SmooksConfigFileNewWizard extends Wizard implements INewWizard {
+public class SmooksConfigFileNewWizard extends Wizard implements INewWizard,
+ ISmooksDataCreationAddtionWizard {
private SmooksConfigFileNewWizardPage page;
private TypeIDSelectionWizardPage typeIDPage;
+ private List<IWizardPage> sourceCreationPages = new ArrayList<IWizardPage>();
+
+ private List<IWizardPage> targetCreationPages = new ArrayList<IWizardPage>();
+
private IStructuredSelection selection;
private IWorkbench workbench;
@@ -131,22 +140,39 @@
try {
SmooksFileEditorInput input = new SmooksFileEditorInput(
file);
- Object sourceObj = typeIDPage.getSourceTreeViewerInputContents();
- if(sourceObj instanceof List){
- if(!((List)sourceObj).isEmpty()){
- sourceObj = ((List)sourceObj).get(0);
- }
+ IWizard sourceWizard = typeIDPage
+ .getSourceDataCreationWizard();
+ IWizard targetWizard = typeIDPage
+ .getTargetDataCreationWizard();
+ if (sourceWizard != null) {
+ sourceWizard.performFinish();
}
- input.setSourceTreeViewerInputContents(sourceObj);
-
- Object targetObj = typeIDPage.getSourceTreeViewerInputContents();
- if(targetObj instanceof List){
- if(!((List)targetObj).isEmpty()){
- targetObj = ((List)targetObj).get(0);
- }
+ if (targetWizard != null) {
+ targetWizard.performFinish();
}
- input.setTargetTreeViewerInputContents(targetObj);
+ if (sourceWizard instanceof IStructuredDataCreationWizard) {
+ Object sourceObj = ((IStructuredDataCreationWizard) sourceWizard)
+ .getTreeViewerInputContents();
+// if (sourceObj instanceof List) {
+// if (!((List) sourceObj).isEmpty()) {
+// sourceObj = ((List) sourceObj).get(0);
+// }
+// }
+ input.setSourceTreeViewerInputContents(sourceObj);
+ }
+ if (targetWizard instanceof IStructuredDataCreationWizard) {
+ Object targetObj = ((IStructuredDataCreationWizard) targetWizard)
+ .getTreeViewerInputContents();
+// if (targetObj instanceof List) {
+// if (!((List) targetObj).isEmpty()) {
+// targetObj = ((List) targetObj).get(0);
+// }
+// }
+ input.setTargetTreeViewerInputContents(targetObj);
+
+ }
+
IDE.openEditor(page, input, SmooksFormEditor.EDITOR_ID,
true);// openEditor(page, file, true);
} catch (PartInitException e) {
@@ -184,4 +210,92 @@
public void setSelection(IStructuredSelection selection) {
this.selection = selection;
}
+
+ public void addSourceWizardPage(IWizardPage page) {
+ sourceCreationPages.add(page);
+ page.setTitle("Source Data Selection Page");
+ }
+
+ public void addTargetWizardPage(IWizardPage page) {
+ targetCreationPages.add(page);
+ page.setTitle("Target Data Selection Page");
+ }
+
+ public void clearSourceWizardPages() {
+ // for (Iterator iterator = sourceCreationPages.iterator();
+ // iterator.hasNext();) {
+ // IWizardPage page = (IWizardPage) iterator.next();
+ // if(page != null){
+ // page.dispose();
+ // }
+ // }
+ sourceCreationPages.clear();
+ }
+
+ private IWizardPage getSourceCreationPage(IWizardPage page) {
+ if (page == typeIDPage) {
+ if (sourceCreationPages.isEmpty())
+ return null;
+ return (IWizardPage) sourceCreationPages.get(0);
+ }
+ if (sourceCreationPages.contains(page)) {
+ int i = sourceCreationPages.indexOf(page);
+ if ((i + 1) >= sourceCreationPages.size()) {
+ return null;
+ }
+ return (IWizardPage) sourceCreationPages.get(i + 1);
+ }
+ return null;
+ }
+
+ private IWizardPage getTargetCreationPage(IWizardPage page) {
+ if (page == typeIDPage) {
+ if (targetCreationPages.isEmpty())
+ return null;
+ return (IWizardPage) targetCreationPages.get(0);
+ }
+ if (targetCreationPages.contains(page)) {
+ int i = targetCreationPages.indexOf(page);
+ if ((i + 1) >= targetCreationPages.size()) {
+ return null;
+ }
+ return (IWizardPage) targetCreationPages.get(i + 1);
+ }
+ if (sourceCreationPages.contains(page)) {
+ if (sourceCreationPages.get(sourceCreationPages.size() - 1) == page) {
+ return (IWizardPage) targetCreationPages.get(0);
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public IWizardPage getNextPage(IWizardPage page) {
+ IWizardPage p = getSourceCreationPage(page);
+ if (p != null)
+ return p;
+ p = getTargetCreationPage(page);
+ if (p != null)
+ return p;
+ return super.getNextPage(page);
+ }
+
+ public void clearTargetWizardPages() {
+ // for (Iterator iterator = sourceCreationPages.iterator();
+ // iterator.hasNext();) {
+ // IWizardPage page = (IWizardPage) iterator.next();
+ // if(page != null){
+ // page.dispose();
+ // }
+ // }
+ targetCreationPages.clear();
+ }
+
+ public void removeSourceWIzardPage(IWizardPage page) {
+ sourceCreationPages.remove(page);
+ }
+
+ public void removeTargetWIzardPage(IWizardPage page) {
+ targetCreationPages.remove(page);
+ }
}
\ No newline at end of file
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-16 08:37:41 UTC (rev 10870)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformDataWizardSelectionPage.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -35,7 +35,7 @@
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.IStructuredDataCreationWizard;
import org.jboss.tools.smooks.ui.IViewerInitor;
import org.jboss.tools.smooks.ui.ViewerInitorStore;
@@ -89,7 +89,7 @@
String des = ((TransformSelectWizardNode)node).getDescription();
desLabel.setText(des);
}
- IStrucutredDataCreationWizard wizard = (IStrucutredDataCreationWizard) node
+ IStructuredDataCreationWizard wizard = (IStructuredDataCreationWizard) node
.getWizard();
TransformDataSelectionWizard pw = (TransformDataSelectionWizard) getWizard();
wizard.init(pw.getSite(), pw.getInput());
@@ -141,7 +141,7 @@
for (Iterator iterator = viewers.iterator(); iterator.hasNext();) {
IViewerInitor viewerInitor = (IViewerInitor) iterator.next();
TransformSelectWizardNode wn = new TransformSelectWizardNode();
- IStrucutredDataCreationWizard wizard = viewerInitor
+ IStructuredDataCreationWizard wizard = viewerInitor
.getStructuredDataLoadWizard();
if (wizard == null)
continue;
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-16 08:37:41 UTC (rev 10870)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -7,14 +7,13 @@
import java.util.Collections;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.emf.common.ui.dialogs.WorkspaceResourceDialog;
import org.eclipse.jface.viewers.CheckboxTableViewer;
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.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -35,7 +34,7 @@
*
* @author Dart Peng Date : 2008-8-13
*/
-public abstract class AbstractFileSelectionWizardPage extends WizardSelectionPage
+public abstract class AbstractFileSelectionWizardPage extends WizardPage
implements SelectionListener {
protected IStructuredSelection selection;
protected Object returnObject = null;
@@ -66,33 +65,6 @@
/*
* (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)
- *
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent) {
@@ -262,10 +234,6 @@
return xsdComposite;
}
-
- public void activeNextWizardNode(IWizardNode node){
- setSelectedNode(node);
- }
abstract protected Object loadedTheObject(String path) throws Exception;
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-16 08:37:41 UTC (rev 10870)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.xml/src/org/jboss/tools/smooks/xml/AbstractStructuredDdataWizard.java 2008-10-16 09:28:22 UTC (rev 10871)
@@ -10,14 +10,14 @@
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
-import org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard;
+import org.jboss.tools.smooks.ui.IStructuredDataCreationWizard;
/**
* @author Dart
*
*/
public abstract class AbstractStructuredDdataWizard extends Wizard implements
- IStrucutredDataCreationWizard ,INewWizard{
+ IStructuredDataCreationWizard ,INewWizard{
protected IWorkbench workbench;
protected IStructuredSelection selection;
@@ -37,7 +37,6 @@
if(page == null){
page = createAbstractFileSelectionWizardPage();
page.setSelection(this.selection);
- page.activeNextWizardNode(strucutredDataCreationWizardNode);
}
this.addPage(page);
}
@@ -61,12 +60,6 @@
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;
16 years, 3 months
JBoss Tools SVN: r10870 - trunk/jbpm/plugins/org.jboss.tools.jbpm.convert.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-10-16 04:37:41 -0400 (Thu, 16 Oct 2008)
New Revision: 10870
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/build.properties
Log:
JBIDE-2912: remove bin folder from build.properties
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/build.properties
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/build.properties 2008-10-16 08:17:06 UTC (rev 10869)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/build.properties 2008-10-16 08:37:41 UTC (rev 10870)
@@ -4,5 +4,4 @@
.,\
plugin.xml,\
plugin.properties,\
- lib/dom4j-1.6.1.jar,\
- bin/
+ lib/dom4j-1.6.1.jar
16 years, 3 months
JBoss Tools SVN: r10868 - trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-10-16 04:09:32 -0400 (Thu, 16 Oct 2008)
New Revision: 10868
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/BPMN2JPDL.java
Log:
JBIDE-2911: fix this issue that the generated jpdl decision element's name is null.
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/BPMN2JPDL.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/BPMN2JPDL.java 2008-10-16 07:13:49 UTC (rev 10867)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/BPMN2JPDL.java 2008-10-16 08:09:32 UTC (rev 10868)
@@ -426,7 +426,7 @@
// create a decision
Element decision = DomXmlWriter.addElement(element.getParent(),
B2JMessages.Jpdl_Decision_Element_Name);
- String name = activity.attributeValue(B2JMessages.Dom_Element_Name)
+ String name = TranslateHelper.generateElementName(activity)
+ B2JMessages.Underline + B2JMessages.Loop_Decision;
DomXmlWriter.addAttribute(decision, B2JMessages.Dom_Element_Name, name);
16 years, 3 months
JBoss Tools SVN: r10867 - in trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-10-16 03:13:49 -0400 (Thu, 16 Oct 2008)
New Revision: 10867
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/GraphicalFileGenerator.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java
Log:
JBIDE-2901: fix the issue: not correctly generate jpdl files when multi-pools in a bpmn diagram
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/GraphicalFileGenerator.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/GraphicalFileGenerator.java 2008-10-16 06:02:13 UTC (rev 10866)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/GraphicalFileGenerator.java 2008-10-16 07:13:49 UTC (rev 10867)
@@ -242,4 +242,12 @@
}
+ public List<Document> getGpdDefs() {
+ return gpdDefs;
+ }
+
+ public void setGpdDefs(List<Document> gpdDefs) {
+ this.gpdDefs = gpdDefs;
+ }
+
}
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java 2008-10-16 06:02:13 UTC (rev 10866)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java 2008-10-16 07:13:49 UTC (rev 10867)
@@ -35,20 +35,22 @@
private List<String> strForProcessList = new ArrayList<String>();
private List<String> strForGpdList = new ArrayList<String>();
private List<String> generatedFoldersList = new ArrayList<String>();
+ private List<String> generatedGpdFoldersList = new ArrayList<String>();
public void createGeneratedFile(boolean isOverWrite) {
String[] jpdlFolderNames = new String[this.generatedFoldersList.size()];
- int i = 0;
- for (String name : this.generatedFoldersList) {
- jpdlFolderNames[i] = name;
- i++;
- }
-
String location = super.getContainerPath((IContainer) super
.getTargetLocationSelection().getFirstElement());
+ int i = 0;
if (this.strForProcessList.size() > 0) {
+ // get a jpdl folders array from jpdl folder list
+ for (String name : this.generatedFoldersList) {
+ jpdlFolderNames[i] = name;
+ i++;
+ }
+
i = 0;
String[] strs = new String[strForProcessList.size()];
for (String pro : this.strForProcessList) {
@@ -66,6 +68,12 @@
if (this.strForGpdList.size() > 0) {
i = 0;
+ // get a gpd folders array from gpd folder list
+ for (String name : this.generatedGpdFoldersList) {
+ jpdlFolderNames[i] = name;
+ i++;
+ }
+ i = 0;
String[] strs = new String[strForGpdList.size()];
for (String pro : this.strForGpdList) {
strs[i] = pro;
@@ -105,6 +113,8 @@
warningList.addAll(translator.getWarnings());
errorList.addAll(translator.getErrors());
+
+
// generate jpdl gpd file from *.bpmn_diagram
Document bpmnDiagramDocument = null;
@@ -120,7 +130,11 @@
bpmnFileName);
this.setStrForGpdList(Arrays.asList(generator.translateToStrings()));
-
+
+ for (Document def : generator.getGpdDefs()) {
+ this.generatedGpdFoldersList.add(def.getRootElement().attributeValue(B2JMessages.Dom_Element_Name));
+ }
+
warningList.addAll(generator.getWarnings());
errorList.addAll(generator.getErrors());
16 years, 3 months
JBoss Tools SVN: r10866 - trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-16 02:02:13 -0400 (Thu, 16 Oct 2008)
New Revision: 10866
Modified:
trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test/OpenOnsTest.java
Log:
test for bean property hiperlink added
Modified: trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test/OpenOnsTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test/OpenOnsTest.java 2008-10-15 20:32:43 UTC (rev 10865)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test/OpenOnsTest.java 2008-10-16 06:02:13 UTC (rev 10866)
@@ -344,7 +344,28 @@
String fileName = editor.getEditorInput().getName();
assertTrue("TestBean1.java".equals(fileName));
}
+
+ public void testGetBeanPropertyOpenOn() throws CoreException, BadLocationException {
+ IEditorPart editor = WorkbenchUtils.openEditor(USE_BEAN_TEST_FILE);
+ assertTrue(editor instanceof JSPMultiPageEditor);
+ JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;
+ ISourceViewer viewer = jspMultyPageEditor.getSourceEditor().getTextViewer();
+
+ IRegion reg = new FindReplaceDocumentAdapter(jspMultyPageEditor.getSourceEditor().getTextViewer().getDocument()).find(0,
+ "property1", true, true, false, false);
+ IHyperlink[] links = HyperlinkDetector.getInstance().detectHyperlinks(viewer, reg, false);
+ assertNotNull(links);
+ assertTrue(links.length!=0);
+ //assertNotNull(links[0].getHyperlinkText());
+ assertNotNull(links[0].toString());
+ links[0].open();
+ JobUtils.waitForIdle();
+ editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ String fileName = editor.getEditorInput().getName();
+ assertTrue("TestBean1.java".equals(fileName));
+ }
+
public static final String FORWARD_TEST_FILE = OPENON_TEST_PROJECT + "/WebContent/forwardHiperlinkTests.jsp";
@@ -419,4 +440,5 @@
fileName = editor.getEditorInput().getName();
assertTrue("includeHiperlinkPage1Tests.jsp".equals(fileName));
}
+
}
16 years, 3 months
JBoss Tools SVN: r10865 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server: providers and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-15 16:32:43 -0400 (Wed, 15 Oct 2008)
New Revision: 10865
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/util/
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXViewProvider.java
Log:
JBIDE-2908 - infuriating properties view behavior
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java 2008-10-15 20:25:43 UTC (rev 10864)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java 2008-10-15 20:32:43 UTC (rev 10865)
@@ -27,10 +27,8 @@
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
@@ -39,10 +37,8 @@
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
@@ -62,8 +58,6 @@
import org.jboss.ide.eclipse.as.ui.views.server.extensions.JBossServerViewExtension;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
import org.jboss.ide.eclipse.as.ui.views.server.providers.descriptors.DescriptorXPathPropertySheetPage;
-import org.jboss.ide.eclipse.as.ui.views.server.util.ViewUtilityMethods;
-import org.jboss.tools.as.wst.server.ui.views.server.JBossServerView;
/**
*
@@ -88,18 +82,8 @@
contentProvider = new XPathTreeContentProvider();
labelProvider = new XPathTreeLabelProvider();
createActions();
- addListeners();
}
- protected void addListeners() {
- JBossServerView.addExtensionFrameListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ViewUtilityMethods.activatePropertiesView(propertyPage);
- }
- });
- }
-
public void setActiveCategory(XPathCategory o) {
if( o != null && o != activeCategory) {
activeCategory = o;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXViewProvider.java 2008-10-15 20:25:43 UTC (rev 10864)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXViewProvider.java 2008-10-15 20:32:43 UTC (rev 10865)
@@ -24,7 +24,6 @@
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
@@ -41,7 +40,6 @@
import org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.JBossServerViewExtension;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
-import org.jboss.ide.eclipse.as.ui.views.server.util.ViewUtilityMethods;
import org.jboss.tools.as.wst.server.ui.views.server.JBossServerView;
import org.jboss.tools.as.wst.server.ui.views.server.ExtensionTableViewer.ContentWrapper;
@@ -85,21 +83,6 @@
protected void addListeners() {
- jbossServerViewSelectionListener = new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- Object o = JBossServerView.getDefault()
- .getExtensionFrame().getViewer()
- .getSelectedElement();
- if (o instanceof JMXBean) {
- Display.getDefault().asyncExec(new Runnable() { public void run() {
- ViewUtilityMethods.activatePropertiesView(null);
- }});
- }
- }
- };
-
- JBossServerView.addExtensionFrameListener(jbossServerViewSelectionListener);
-
// make sure we know about server events
serverListener = new JMXServerListener();
UnitedServerListenerManager.getDefault().addListener(serverListener);
16 years, 3 months
JBoss Tools SVN: r10864 - in trunk/seam/plugins/org.jboss.tools.seam.core: src/org/jboss/tools/seam/internal/core/project/facet and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-10-15 16:25:43 -0400 (Wed, 15 Oct 2008)
New Revision: 10864
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2731
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF 2008-10-15 19:42:20 UTC (rev 10863)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF 2008-10-15 20:25:43 UTC (rev 10864)
@@ -47,7 +47,8 @@
org.eclipse.wst.sse.ui,
org.eclipse.jst.jsf.common,
org.eclipse.emf.ecore,
- org.eclipse.jst.j2ee.core
+ org.eclipse.jst.j2ee.core,
+ org.eclipse.jst.jsf.facesconfig;bundle-version="1.1.0"
Provide-Package: org.jboss.tools.seam.core,
org.jboss.tools.seam.internal.core,
org.jboss.tools.seam.internal.core.scanner,
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-10-15 19:42:20 UTC (rev 10863)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-10-15 20:25:43 UTC (rev 10864)
@@ -11,12 +11,25 @@
package org.jboss.tools.seam.internal.core.project.facet;
import java.io.File;
+import java.util.Iterator;
+import org.apache.tools.ant.types.FilterSet;
+import org.apache.tools.ant.types.FilterSetCollection;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.jst.javaee.web.WebApp;
+import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType;
+import org.eclipse.jst.jsf.facesconfig.emf.DefaultLocaleType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.LocaleConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.SupportedLocaleType;
+import org.eclipse.jst.jsf.facesconfig.emf.ViewHandlerType;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
@@ -82,7 +95,19 @@
@Override
protected void doExecuteForEjb(final IProject project, IProjectFacetVersion fv,
IDataModel model, IProgressMonitor monitor) throws CoreException {
- // TODO
+ FilterSet jdbcFilterSet = SeamFacetFilterSetFactory.createJdbcFilterSet(model);
+ FilterSet projectFilterSet = SeamFacetFilterSetFactory.createProjectFilterSet(model);
+ ejbViewFilterSetCollection = new FilterSetCollection();
+ ejbViewFilterSetCollection.addFilterSet(jdbcFilterSet);
+ ejbViewFilterSetCollection.addFilterSet(projectFilterSet);
+
+ super.doExecuteForEjb(project, fv, model, monitor);
+
+ IResource src = getSrcFolder(project);
+ if(src!=null) {
+ File srcFile = src.getLocation().toFile();
+ AntCopyUtils.copyFileToFolder(new File(seamGenResFolder, "security.drl"), srcFile, false); //$NON-NLS-1$
+ }
}
/*
@@ -110,6 +135,84 @@
/*
* (non-Javadoc)
+ * @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#configureFacesConfigXml(org.eclipse.core.resources.IProject, org.eclipse.core.runtime.IProgressMonitor, java.lang.String)
+ */
+ @Override
+ protected void configureFacesConfigXml(final IProject project, IProgressMonitor monitor, String webConfigName) {
+ FacesConfigArtifactEdit facesConfigEdit = null;
+ try {
+ facesConfigEdit = FacesConfigArtifactEdit.getFacesConfigArtifactEditForWrite(project, webConfigName);
+ FacesConfigType facesConfig = facesConfigEdit.getFacesConfig();
+ EList applications = facesConfig.getApplication();
+ ApplicationType applicationType = null;
+ boolean applicationExists = false;
+ if (applications.size() <= 0) {
+ applicationType = FacesConfigFactory.eINSTANCE.createApplicationType();
+ } else {
+ applicationType = (ApplicationType) applications.get(0);
+ applicationExists = true;
+ }
+ boolean localeConfigExists = false;
+ for (Iterator iterator = applications.iterator(); iterator.hasNext();) {
+ ApplicationType application = (ApplicationType) iterator.next();
+ EList localeConfigs = application.getLocaleConfig();
+ if(localeConfigs.size()>0) {
+ localeConfigExists = true;
+ break;
+ }
+ }
+ if (!localeConfigExists) {
+ LocaleConfigType locale = FacesConfigFactory.eINSTANCE.createLocaleConfigType();
+ DefaultLocaleType defaultLocale = FacesConfigFactory.eINSTANCE.createDefaultLocaleType();
+ defaultLocale.setTextContent("en");
+ locale.setDefaultLocale(defaultLocale);
+ SupportedLocaleType supportedLocale = FacesConfigFactory.eINSTANCE.createSupportedLocaleType();
+ supportedLocale.setTextContent("bg");
+ locale.getSupportedLocale().add(supportedLocale);
+ supportedLocale = FacesConfigFactory.eINSTANCE.createSupportedLocaleType();
+ supportedLocale.setTextContent("de");
+ locale.getSupportedLocale().add(supportedLocale);
+ supportedLocale = FacesConfigFactory.eINSTANCE.createSupportedLocaleType();
+ supportedLocale.setTextContent("en");
+ locale.getSupportedLocale().add(supportedLocale);
+ supportedLocale = FacesConfigFactory.eINSTANCE.createSupportedLocaleType();
+ supportedLocale.setTextContent("fr");
+ locale.getSupportedLocale().add(supportedLocale);
+ supportedLocale = FacesConfigFactory.eINSTANCE.createSupportedLocaleType();
+ supportedLocale.setTextContent("tr");
+ locale.getSupportedLocale().add(supportedLocale);
+ applicationType.getLocaleConfig().add(locale);
+ }
+ boolean viewHandlerExists = false;
+ for (Iterator iterator = applications.iterator(); iterator.hasNext();) {
+ ApplicationType application = (ApplicationType) iterator.next();
+ EList viewHandlers = application.getViewHandler();
+ for (Iterator iterator2 = viewHandlers.iterator(); iterator2.hasNext();) {
+ ViewHandlerType viewHandlerType = (ViewHandlerType)iterator2.next();
+ if ("com.sun.facelets.FaceletViewHandler".equals(viewHandlerType.getTextContent().trim())) {
+ viewHandlerExists = true;
+ break;
+ }
+ }
+ }
+ if (!viewHandlerExists) {
+ ViewHandlerType viewHandler = FacesConfigFactory.eINSTANCE.createViewHandlerType();
+ viewHandler.setTextContent("com.sun.facelets.FaceletViewHandler");
+ applicationType.getViewHandler().add(viewHandler);
+ }
+ if (!applicationExists) {
+ facesConfig.getApplication().add(applicationType);
+ }
+ facesConfigEdit.save(monitor);
+ } finally {
+ if (facesConfigEdit != null) {
+ facesConfigEdit.dispose();
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
* @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#configure(org.eclipse.jst.javaee.web.WebApp)
*/
@Override
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-10-15 19:42:20 UTC (rev 10863)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-10-15 20:25:43 UTC (rev 10864)
@@ -38,6 +38,9 @@
import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.datatools.connectivity.IConnectionProfile;
import org.eclipse.datatools.connectivity.ProfileManager;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jst.common.project.facet.core.ClasspathHelper;
import org.eclipse.jst.j2ee.model.IModelProvider;
@@ -104,6 +107,11 @@
public static final String DEV_WAR_PROFILE = "dev-war"; //$NON-NLS-1$
public static final String DEV_EAR_PROFILE = "dev"; //$NON-NLS-1$
+ public static AntCopyUtils.FileSet JBOOS_EJB_WEB_INF_CLASSES_SET = new AntCopyUtils.FileSet()
+ .include("import\\.sql") //$NON-NLS-1$
+ .include("seam\\.properties")
+ .exclude(".*/WEB-INF"); //$NON-NLS-1$
+
public static AntCopyUtils.FileSet VIEW_FILESET = new AntCopyUtils.FileSet()
.include("home\\.xhtml") //$NON-NLS-1$
.include("error\\.xhtml") //$NON-NLS-1$
@@ -258,6 +266,7 @@
protected File seamGenResFolder;
protected File srcFolder;
protected File webContentFolder;
+ protected IPath webContentPath;
protected File webLibFolder;
protected IContainer webRootFolder;
protected File seamGenHomeFolder;
@@ -287,19 +296,8 @@
srcRootFolder = component.getRootFolder().getFolder(new Path("/WEB-INF/classes")); //$NON-NLS-1$
webRootFolder = webRootVirtFolder.getUnderlyingFolder();
- model.setProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME, project.getName());
-
- Boolean dbExists = (Boolean) model.getProperty(ISeamFacetDataModelProperties.DB_ALREADY_EXISTS);
- Boolean dbRecreate = (Boolean) model.getProperty(ISeamFacetDataModelProperties.RECREATE_TABLES_AND_DATA_ON_DEPLOY);
- if (!dbExists && !dbRecreate) {
- model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO, "update"); //$NON-NLS-1$
- } else if (dbExists && !dbRecreate) {
- model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO, "validate"); //$NON-NLS-1$
- } else if (dbRecreate) {
- model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO, "create-drop"); //$NON-NLS-1$
- }
-
webContentFolder = webRootFolder.getLocation().toFile();
+ webContentPath = webRootFolder.getFullPath();
webInfFolder = new File(webContentFolder, "WEB-INF"); //$NON-NLS-1$
webInfClasses = new File(webInfFolder, "classes"); //$NON-NLS-1$
webInfClassesMetaInf = new File(webInfClasses, "META-INF"); //$NON-NLS-1$
@@ -331,11 +329,6 @@
// If seam runtime is null then just modify web.xml and add seam nature.
configureWebXml(project);
}
-
- ClasspathHelper.addClasspathEntries(project, fv);
- createSeamProjectPreferenes(project, model);
- EclipseResourceUtil.addNatureToProject(project, ISeamProject.NATURE_ID);
- project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
/**
@@ -366,7 +359,7 @@
webContentFolder,
new AntCopyUtils.FileSetFileFilter(viewFileSet),
viewFilterSetCollection,
- true);
+ false);
// *******************************************************************
// Copy manifest and configuration resources the same way as view
@@ -378,10 +371,17 @@
AntCopyUtils.copyFileToFile(
componentsFile,
new File(webInfFolder, "components.xml"), //$NON-NLS-1$
- new FilterSetCollection(projectFilterSet), true);
+ new FilterSetCollection(projectFilterSet), false);
+ File facesConfig = new File(webContentFolder, "WEB-INF/faces-config.xml");
+ IPath webConfigPath = webContentPath.append("WEB-INF").append("faces-config.xml");
+ String webConfigName = webConfigPath.removeFirstSegments(1).toString();
+ if(facesConfig.exists()) {
+ configureFacesConfigXml(project, monitor, webConfigName);
+ }
+
AntCopyUtils.copyFilesAndFolders(
- seamGenResFolder, webContentFolder, new AntCopyUtils.FileSetFileFilter(webInfSet), viewFilterSetCollection, true);
+ seamGenResFolder, webContentFolder, new AntCopyUtils.FileSetFileFilter(webInfSet), viewFilterSetCollection, false);
final FilterSetCollection hibernateDialectFilterSet = new FilterSetCollection();
hibernateDialectFilterSet.addFilterSet(jdbcFilterSet);
@@ -394,15 +394,10 @@
if (isWarConfiguration(model)) {
AntCopyUtils.FileSet webInfClassesSet = new AntCopyUtils.FileSet(JBOOS_WAR_WEB_INF_CLASSES_SET).dir(seamGenResFolder);
AntCopyUtils.copyFilesAndFolders(
- seamGenResFolder, srcFolder, new AntCopyUtils.FileSetFileFilter(webInfClassesSet), viewFilterSetCollection, true);
+ seamGenResFolder, srcFolder, new AntCopyUtils.FileSetFileFilter(webInfClassesSet), viewFilterSetCollection, false);
- createComponentsProperties(srcFolder, "", false); //$NON-NLS-1$ //$NON-NLS-2$
+ createComponentsProperties(srcFolder, "", false); //$NON-NLS-1$
- /*AntCopyUtils.copyFileToFolder(
- hibernateConsolePref,
- new File(project.getLocation().toFile(),".settings"), //$NON-NLS-1$
- new FilterSetCollection(projectFilterSet), true);*/
-
// ********************************************************************************************
// Copy seam project indicator
// ********************************************************************************************
@@ -426,33 +421,33 @@
AntCopyUtils.copyFileToFile(
new File(seamGenHomeFolder, "src/Authenticator.java"), //$NON-NLS-1$
new File(actionsSrc,model.getProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME).toString().replace('.', '/') + "/" + "Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- new FilterSetCollection(filtersFilterSet), true);
+ new FilterSetCollection(filtersFilterSet), false);
AntCopyUtils.copyFileToFile(
persistenceFile,
new File(srcFolder, "META-INF/persistence.xml"), //$NON-NLS-1$
- viewFilterSetCollection, true);
+ viewFilterSetCollection, false);
File resources = new File(project.getLocation().toFile(), "resources");
AntCopyUtils.copyFileToFile(
dataSourceDsFile,
new File(resources, project.getName() + "-ds.xml"), //$NON-NLS-1$
- viewFilterSetCollection, true);
+ viewFilterSetCollection, false);
AntCopyUtils.copyFileToFile(
hibernateConsoleLaunchFile,
new File(project.getLocation().toFile(), project.getName() + ".launch"), //$NON-NLS-1$
- viewFilterSetCollection, true);
+ viewFilterSetCollection, false);
AntCopyUtils.copyFileToFolder(
hibernateConsolePropsFile,
project.getLocation().toFile(),
- hibernateDialectFilterSet, true);
+ hibernateDialectFilterSet, false);
WtpUtils.setClasspathEntryAsExported(project, new Path("org.eclipse.jst.j2ee.internal.web.container"), monitor); //$NON-NLS-1$
} else {
// In case of EAR configuration
- AntCopyUtils.copyFileToFolder(new File(seamGenResFolder, "messages_en.properties"), srcFolder, true); //$NON-NLS-1$
+ AntCopyUtils.copyFileToFolder(new File(seamGenResFolder, "messages_en.properties"), srcFolder, false); //$NON-NLS-1$
}
}
@@ -467,6 +462,24 @@
protected abstract void doExecuteForEar(IProject project, IProjectFacetVersion fv,
IDataModel model, IProgressMonitor monitor) throws CoreException;
+ protected IResource getSrcFolder(IProject project) throws JavaModelException {
+ IJavaProject javaProject = EclipseResourceUtil.getJavaProject(project);
+
+ IPackageFragmentRoot[] roots = javaProject.getPackageFragmentRoots();
+ IPackageFragmentRoot src = null;
+ for (int i= 0; i < roots.length; i++) {
+ if (roots[i].getKind() == IPackageFragmentRoot.K_SOURCE) {
+ src = roots[i];
+ }
+ }
+ if(src!=null) {
+ return src.getResource();
+ }
+ return null;
+ }
+
+ protected FilterSetCollection ejbViewFilterSetCollection;
+
/**
*
* @param project
@@ -475,9 +488,71 @@
* @param monitor
* @throws CoreException
*/
- protected abstract void doExecuteForEjb(IProject project, IProjectFacetVersion fv,
- IDataModel model, IProgressMonitor monitor) throws CoreException;
+ protected void doExecuteForEjb(final IProject project, IProjectFacetVersion fv,
+ IDataModel model, IProgressMonitor monitor) throws CoreException {
+ IResource src = getSrcFolder(project);
+ if(src==null) {
+ return;
+ }
+
+ File ejbProjectFolder = project.getLocation().toFile();
+ FilterSet filtersFilterSet = SeamFacetFilterSetFactory.createFiltersFilterSet(model);
+ FilterSet jdbcFilterSet = SeamFacetFilterSetFactory.createJdbcFilterSet(model);
+ FilterSet projectFilterSet = SeamFacetFilterSetFactory.createProjectFilterSet(model);
+
+ if(ejbViewFilterSetCollection==null) {
+ ejbViewFilterSetCollection = new FilterSetCollection();
+ ejbViewFilterSetCollection.addFilterSet(jdbcFilterSet);
+ ejbViewFilterSetCollection.addFilterSet(projectFilterSet);
+ }
+
+ FilterSetCollection hibernateDialectFilterSet = new FilterSetCollection();
+ hibernateDialectFilterSet.addFilterSet(jdbcFilterSet);
+ hibernateDialectFilterSet.addFilterSet(projectFilterSet);
+ hibernateDialectFilterSet.addFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model));
+
+ File srcFile = src.getLocation().toFile();
+ // Copy sources to EJB project in case of EAR configuration
+ AntCopyUtils.copyFileToFile(
+ new File(seamGenHomeFolder, "src/Authenticator.java"), //$NON-NLS-1$
+ new File(srcFile, model.getProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME).toString().replace('.', '/') + "/" + "Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ new FilterSetCollection(filtersFilterSet), false);
+
+ File persistentXml = new File(srcFile, "META-INF/persistence.xml"); //$NON-NLS-1$
+ if(!persistentXml.exists()) {
+ AntCopyUtils.copyFileToFile(persistenceFile, new File(srcFile, "META-INF/persistence.xml"), //$NON-NLS-1$
+ ejbViewFilterSetCollection, false);
+ } else {
+ // TODO modify persistence.xml
+ }
+
+ File componentProperties = new File(srcFile, "components.properties"); //$NON-NLS-1$
+ if(!componentProperties.exists()) {
+ SeamFacetAbstractInstallDelegate.createComponentsProperties(srcFile, project.getName(), false);
+ }
+
+ AntCopyUtils.FileSet ejbSrcResourcesSet = new AntCopyUtils.FileSet(JBOOS_EJB_WEB_INF_CLASSES_SET).dir(seamGenResFolder);
+ AntCopyUtils.copyFilesAndFolders(seamGenResFolder, srcFile, new AntCopyUtils.FileSetFileFilter(ejbSrcResourcesSet), ejbViewFilterSetCollection, false);
+
+ File ejbJarXml = new File(srcFile, "META-INF/ejb-jar.xml");
+ if(!ejbJarXml.exists()) {
+ AntCopyUtils.copyFileToFolder(new File(seamGenResFolder, "META-INF/ejb-jar.xml"), //$NON-NLS-1$
+ new File(srcFile, "META-INF"), ejbViewFilterSetCollection, false); //$NON-NLS-1$
+ } else {
+ // TODO modify ejb-jar.xml
+ }
+ FilterSet ejbFilterSet = new FilterSet();
+ ejbFilterSet.addFilter("projectName", ejbProjectFolder.getName()); //$NON-NLS-1$
+
+ AntCopyUtils.copyFileToFile(hibernateConsoleLaunchFile, new File(
+ ejbProjectFolder, ejbProjectFolder.getName() + ".launch"), //$NON-NLS-1$
+ new FilterSetCollection(ejbFilterSet), false);
+
+ AntCopyUtils.copyFileToFolder(hibernateConsolePropsFile,
+ ejbProjectFolder, hibernateDialectFilterSet, false);
+ }
+
/**
*
* @param project
@@ -494,6 +569,19 @@
IProjectFacetVersion webVersion = facetedProject.getProjectFacetVersion(IJ2EEFacetConstants.DYNAMIC_WEB_FACET);
IProjectFacetVersion earVersion = facetedProject.getProjectFacetVersion(IJ2EEFacetConstants.ENTERPRISE_APPLICATION_FACET);
initDefaultModelValues(model, webVersion!=null);
+
+ model.setProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME, project.getName());
+
+ Boolean dbExists = (Boolean) model.getProperty(ISeamFacetDataModelProperties.DB_ALREADY_EXISTS);
+ Boolean dbRecreate = (Boolean) model.getProperty(ISeamFacetDataModelProperties.RECREATE_TABLES_AND_DATA_ON_DEPLOY);
+ if (!dbExists && !dbRecreate) {
+ model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO, "update"); //$NON-NLS-1$
+ } else if (dbExists && !dbRecreate) {
+ model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO, "validate"); //$NON-NLS-1$
+ } else if (dbRecreate) {
+ model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO, "create-drop"); //$NON-NLS-1$
+ }
+
if(ejbVersion!=null) {
doExecuteForEjb(project, fv, model, monitor);
} else if(webVersion!=null) {
@@ -501,6 +589,11 @@
} else if(earVersion!=null) {
doExecuteForEar(project, fv, model, monitor);
}
+
+ ClasspathHelper.addClasspathEntries(project, fv);
+ createSeamProjectPreferenes(project, model);
+ EclipseResourceUtil.addNatureToProject(project, ISeamProject.NATURE_ID);
+ project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
private void initDefaultModelValues(IDataModel model, boolean warProject) {
@@ -818,7 +911,15 @@
webApp.getContextParams().add(paramValue);
}
}
-
+
+ /**
+ *
+ * @param project
+ * @param monitor
+ * @param webConfigName
+ */
+ abstract protected void configureFacesConfigXml(final IProject project, IProgressMonitor monitor, String webConfigName);
+
protected abstract void configure(WebApp webApp);
protected void configureWebXml(final IProject project) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2008-10-15 19:42:20 UTC (rev 10863)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2008-10-15 20:25:43 UTC (rev 10864)
@@ -11,14 +11,23 @@
package org.jboss.tools.seam.internal.core.project.facet;
import java.io.File;
+import java.util.Iterator;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.jst.javaee.core.DisplayName;
import org.eclipse.jst.javaee.core.JavaeeFactory;
import org.eclipse.jst.javaee.web.Filter;
import org.eclipse.jst.javaee.web.WebApp;
+import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.LifecycleType;
+import org.eclipse.jst.jsf.facesconfig.emf.MessageBundleType;
+import org.eclipse.jst.jsf.facesconfig.emf.PhaseListenerType;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
@@ -106,16 +115,6 @@
/*
* (non-Javadoc)
- * @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#doExecuteForEjb(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, org.eclipse.wst.common.frameworks.datamodel.IDataModel, org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- protected void doExecuteForEjb(final IProject project, IProjectFacetVersion fv,
- IDataModel model, IProgressMonitor monitor) throws CoreException {
- // TODO
- }
-
- /*
- * (non-Javadoc)
* @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#copyFilesToWarProject(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, org.eclipse.wst.common.frameworks.datamodel.IDataModel, org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
@@ -136,6 +135,84 @@
/*
* (non-Javadoc)
+ * @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#configureFacesConfigXml(org.eclipse.core.resources.IProject, org.eclipse.core.runtime.IProgressMonitor, java.lang.String)
+ */
+ @Override
+ protected void configureFacesConfigXml(final IProject project, IProgressMonitor monitor, String webConfigName) {
+ FacesConfigArtifactEdit facesConfigEdit = null;
+ try {
+ facesConfigEdit = FacesConfigArtifactEdit.getFacesConfigArtifactEditForWrite(project, webConfigName);
+ FacesConfigType facesConfig = facesConfigEdit.getFacesConfig();
+ EList applications = facesConfig.getApplication();
+ ApplicationType applicationType = null;
+ boolean applicationExists = false;
+ if (applications.size() <= 0) {
+ applicationType = FacesConfigFactory.eINSTANCE.createApplicationType();
+ } else {
+ applicationType = (ApplicationType) applications.get(0);
+ applicationExists = true;
+ }
+ boolean messageBundleExists = false;
+ for (Iterator iterator = applications.iterator(); iterator.hasNext();) {
+ ApplicationType application = (ApplicationType) iterator.next();
+ EList messageBundles = application.getMessageBundle();
+ for (Iterator iterator2 = messageBundles.iterator(); iterator2.hasNext();) {
+ MessageBundleType messageBundle = (MessageBundleType)iterator2.next();
+ if ("messages".equals(messageBundle.getTextContent().trim())) {
+ messageBundleExists = true;
+ break;
+ }
+ }
+ }
+ if (!messageBundleExists) {
+ MessageBundleType messageBundle = FacesConfigFactory.eINSTANCE.createMessageBundleType();
+ messageBundle.setTextContent("messages");
+ applicationType.getMessageBundle().add(messageBundle);
+ }
+ if (!applicationExists) {
+ facesConfig.getApplication().add(applicationType);
+ }
+ EList lifecycles = facesConfig.getLifecycle();
+ LifecycleType lifecycleType = null;
+ boolean lifecycleExists = false;
+ if (lifecycles.size() <= 0) {
+ lifecycleType = FacesConfigFactory.eINSTANCE.createLifecycleType();
+ } else {
+ lifecycleType = (LifecycleType)lifecycles.get(0);
+ lifecycleExists = true;
+ }
+ boolean phaseListenerExists = false;
+ for (Iterator iterator = lifecycles.iterator(); iterator.hasNext();) {
+ LifecycleType lifecycle = (LifecycleType) iterator.next();
+ EList phaseListeners = lifecycle.getPhaseListener();
+ for (Iterator iterator2 = phaseListeners.iterator(); iterator2.hasNext();) {
+ PhaseListenerType messageBundle = (PhaseListenerType)iterator2.next();
+ if ("org.jboss.seam.jsf.TransactionalSeamPhaseListener".equals(messageBundle.getTextContent().trim()) ||
+ "org.jboss.seam.jsf.SeamPhaseListener".equals(messageBundle.getTextContent().trim())) {
+ phaseListenerExists = true;
+ break;
+ }
+ }
+ }
+ if (!phaseListenerExists) {
+ PhaseListenerType phaseListener = FacesConfigFactory.eINSTANCE.createPhaseListenerType();
+ phaseListener.setTextContent("org.jboss.seam.jsf.TransactionalSeamPhaseListener");
+ lifecycleType.getPhaseListener().add(phaseListener);
+ }
+ if (!lifecycleExists) {
+ facesConfig.getLifecycle().add(lifecycleType);
+ }
+
+ facesConfigEdit.save(monitor);
+ } finally {
+ if (facesConfigEdit != null) {
+ facesConfigEdit.dispose();
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
* @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#configure(org.eclipse.jst.javaee.web.WebApp)
*/
@Override
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2008-10-15 19:42:20 UTC (rev 10863)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2008-10-15 20:25:43 UTC (rev 10864)
@@ -52,11 +52,6 @@
protected static final String DEV_WAR_PROFILE = "dev-war"; //$NON-NLS-1$
protected static final String DEV_EAR_PROFILE = "dev"; //$NON-NLS-1$
- protected static AntCopyUtils.FileSet JBOOS_EJB_WEB_INF_CLASSES_SET = new AntCopyUtils.FileSet()
- .include("import\\.sql") //$NON-NLS-1$
- .include("seam\\.properties")
- .exclude(".*/WEB-INF"); //$NON-NLS-1$
-
private static AntCopyUtils.FileSet JBOSS_TEST_LIB_FILESET = new AntCopyUtils.FileSet()
.include("testng-.*-jdk15\\.jar") //$NON-NLS-1$
.include("myfaces-api-.*\\.jar") //$NON-NLS-1$
@@ -382,7 +377,7 @@
SeamFacetAbstractInstallDelegate.createComponentsProperties(new File(ejbProjectFolder, "ejbModule"), earProjectName, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- AntCopyUtils.FileSet ejbSrcResourcesSet = new AntCopyUtils.FileSet(JBOOS_EJB_WEB_INF_CLASSES_SET).dir(seamGenResFolder);
+ AntCopyUtils.FileSet ejbSrcResourcesSet = new AntCopyUtils.FileSet(SeamFacetAbstractInstallDelegate.JBOOS_EJB_WEB_INF_CLASSES_SET).dir(seamGenResFolder);
AntCopyUtils.copyFilesAndFolders(
seamGenResFolder, new File(ejbProjectFolder, "ejbModule"), new AntCopyUtils.FileSetFileFilter(ejbSrcResourcesSet), viewFilterSetCollection, true); //$NON-NLS-1$
16 years, 3 months