Author: dgolovin
Date: 2007-07-30 22:45:59 -0400 (Mon, 30 Jul 2007)
New Revision: 2745
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/templates/war/
trunk/seam/plugins/org.jboss.tools.seam.core/templates/war/META-INF/
trunk/seam/plugins/org.jboss.tools.seam.core/templates/war/META-INF/MANIFEST.MF
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/browser/wtp/RunOnServerContext.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ejb/ejbModule/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/IParameter.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFofrmWizard.java
Log:
http://jira.jboss.org/jira/browse/EXIN-221
fix Form/Action Wizard to work with EAR/WAR Seam Project configuration
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/browser/wtp/RunOnServerContext.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/browser/wtp/RunOnServerContext.java 2007-07-31
02:14:29 UTC (rev 2744)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/browser/wtp/RunOnServerContext.java 2007-07-31
02:45:59 UTC (rev 2745)
@@ -74,6 +74,8 @@
if(p != null && (!p.exists() || !p.isOpen())) p = null;
IModule ms = null;
try {
+ // TODO Ear project can contain several Web modules, so when ear is selected several
options can be shown in
+ // in menu now it throws exception Invalid Artifact Edit access
ms = ServerUtil.getModule(p);
} catch (Exception e) {
// ignore
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java 2007-07-31
02:14:29 UTC (rev 2744)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java 2007-07-31
02:45:59 UTC (rev 2745)
@@ -37,6 +37,8 @@
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.internal.core.SeamResourceVisitor;
+import org.jboss.tools.seam.internal.core.project.facet.AntCopyUtils.FileSet;
+import org.jboss.tools.seam.internal.core.project.facet.AntCopyUtils.FileSetFileFilter;
public class SeamFacetInstallDelegete extends Object implements IDelegate {
@@ -123,7 +125,8 @@
.include("jboss-seam.jar")
.include("jbpm.*\\.jar")
.include("security\\.drl")
- .include("stringtemplate.*\\.jar");
+ .include("stringtemplate.*\\.jar")
+ .include("testng-.*\\.jar");
public static AntCopyUtils.FileSet JBOSS_EAR_CONTENT_META_INF = new
AntCopyUtils.FileSet()
.include("META-INF/application\\.xml")
@@ -174,6 +177,7 @@
IVirtualFolder webRootFolder = com.getRootFolder().getFolder(new Path("/"));
IVirtualFolder srcRootFolder = com.getRootFolder().getFolder(new
Path("/WEB-INF/classes"));
IContainer folder = webRootFolder.getUnderlyingFolder();
+ edit.dispose();
model.setProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME, project.getName());
final File webContentFolder = folder.getLocation().toFile();
@@ -183,7 +187,7 @@
webInfClassesMetaInf.mkdirs();
final File webLibFolder = new File(webContentFolder,WEB_LIBRARIES_RELATED_PATH);
final File srcFolder = srcRootFolder.getUnderlyingFolder().getLocation().toFile();
- final File srcWebInf = new File(srcFolder, "META-INF");
+ final File webMetaInf = new File(webContentFolder, "META-INF");
final String seamHomePath =
model.getProperty(ISeamFacetDataModelProperties.JBOSS_SEAM_HOME).toString();
@@ -256,9 +260,6 @@
if(jdbcDriverFile.exists())
AntCopyUtils.copyFileToFolder(jdbcDriverFile, webLibFolder, true);
-
- // TODO may be generate RHDS studio feature to show it on projects view
-
//
********************************************************************************************
// Handle WAR/EAR configurations
//
********************************************************************************************
@@ -310,8 +311,12 @@
AntCopyUtils.copyFiles(seamHomeFolder,webLibFolder,new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_EAR_CONFIG).dir(seamHomeFolder)));
AntCopyUtils.copyFiles(seamLibFolder,webLibFolder,new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_EAR_CONFIG).dir(seamLibFolder)));
AntCopyUtils.copyFiles(droolsLibFolder,webLibFolder,new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_EAR_CONFIG).dir(droolsLibFolder)));
-
- Job create = new Job("New WTP") {
+ try {
+ AntCopyUtils.copyFileToFolder(new
File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"war/META-INF/MANIFEST.MF"),
webMetaInf, new FilterSetCollection(projectFilterSet), true);
+ } catch (IOException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ }
+ Job create = new Job("Creating EAR and EJB modules") {
@Override
protected IStatus run(IProgressMonitor monitor) {
@@ -322,37 +327,8 @@
filterSet.addFilter("projectName", project.getName());
filterSet.addFilter("runtimeName",
WtpUtils.getServerRuntimename(project));
- File earContentsFolder = new
File(ear.getLocation().toFile(),"EarContent");
- File earContentsMetaInfFolder = new File(earContentsFolder,"META-INF");
-
- AntCopyUtils.copyFilesAndFolders(
- seamGenResFolder,
- earContentsFolder,
- new AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_META_INF_SET).dir(seamGenResFolder)),
- viewFilterSetCollection,true);
-
- // Copy configuration files from template
- AntCopyUtils.copyFilesAndFolders(
- new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"ear"),
- ear.getLocation().toFile(),
- new FilterSetCollection(filterSet), true);
+ IProject ejb =
WtpUtils.createEclipseProject(model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME)+"-ejb",
monitor);
- // Fill ear contents
- AntCopyUtils.copyFiles(seamHomeFolder,earContentsFolder,new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamHomeFolder)));
- AntCopyUtils.copyFiles(seamLibFolder,earContentsFolder,new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)));
- AntCopyUtils.copyFiles(droolsLibFolder,earContentsFolder,new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(droolsLibFolder)));
- AntCopyUtils.copyFiles(seamLibFolder,earContentsFolder,new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)));
- AntCopyUtils.copyFiles(seamGenResFolder,earContentsFolder,new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamGenResFolder)));
-
- //
********************************************************************************************
- // Copy JDBC driver if there is any
- //
********************************************************************************************
- if(jdbcDriverFile.exists())
- AntCopyUtils.copyFileToFolder(jdbcDriverFile, earContentsFolder, true);
-
- IProject ejb =
WtpUtils.createEclipseProject(model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME)+"-ejb",
monitor);
-
-
AntCopyUtils.copyFilesAndFolders(
new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"ejb"),
ejb.getLocation().toFile(),
@@ -394,9 +370,39 @@
new File(ejb.getLocation().toFile(),ejb.getName()+".launch"),
new FilterSetCollection(projectFilterSet), true);
- ear.refreshLocal(IResource.DEPTH_INFINITE, monitor);
ejb.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ File earContentsFolder = new
File(ear.getLocation().toFile(),"EarContent");
+ File earContentsMetaInfFolder = new File(earContentsFolder,"META-INF");
+
+ AntCopyUtils.copyFilesAndFolders(
+ seamGenResFolder,
+ earContentsFolder,
+ new AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_META_INF_SET).dir(seamGenResFolder)),
+ viewFilterSetCollection,true);
+
+ // Copy configuration files from template
+ AntCopyUtils.copyFilesAndFolders(
+ new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"ear"),
+ ear.getLocation().toFile(),
+ new FilterSetCollection(filterSet), true);
+
+ // Fill ear contents
+ AntCopyUtils.copyFiles(seamHomeFolder,earContentsFolder,new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamHomeFolder)));
+ AntCopyUtils.copyFiles(seamLibFolder,earContentsFolder,new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)));
+ AntCopyUtils.copyFiles(droolsLibFolder,earContentsFolder,new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(droolsLibFolder)));
+ AntCopyUtils.copyFiles(seamLibFolder,earContentsFolder,new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)));
+ AntCopyUtils.copyFiles(seamGenResFolder,earContentsFolder,new
AntCopyUtils.FileSetFileFilter(new
AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamGenResFolder)));
+
+ //
********************************************************************************************
+ // Copy JDBC driver if there is any
+ //
********************************************************************************************
+ if(jdbcDriverFile.exists())
+ AntCopyUtils.copyFileToFolder(jdbcDriverFile, earContentsFolder, true);
+
+
+ ear.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
} catch (CoreException e) {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java 2007-07-31
02:14:29 UTC (rev 2744)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java 2007-07-31
02:45:59 UTC (rev 2745)
@@ -29,6 +29,8 @@
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathContainer;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.jboss.tools.seam.core.SeamCorePlugin;
/**
@@ -97,18 +99,14 @@
public static String getServerRuntimename(IProject project) {
IJavaProject javaProject = JavaCore.create(project);
+
if(javaProject!=null) {
try {
- IClasspathEntry[] entries = javaProject.getRawClasspath();
- IClasspathContainer container =
JavaCore.getClasspathContainer(Path.ROOT.append("org.eclipse.jst.server.core.container"),
javaProject);
- for (IClasspathEntry classpathEntry : entries) {
- if(Path.ROOT.append("org.eclipse.jst.server.core.container").isPrefixOf(classpathEntry.getPath()))
{
- return classpathEntry.getPath().lastSegment();
- }
- }
- System.out.println(container.getPath().lastSegment());
- } catch (JavaModelException e) {
- SeamCorePlugin.getPluginLog().logError(e);
+ IFacetedProject facetedProject = ProjectFacetsManager.create(project);
+ return facetedProject.getPrimaryRuntime().getName();
+ } catch (CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
}
}
return "";
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ejb/ejbModule/META-INF/MANIFEST.MF
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ejb/ejbModule/META-INF/MANIFEST.MF 2007-07-31
02:14:29 UTC (rev 2744)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ejb/ejbModule/META-INF/MANIFEST.MF 2007-07-31
02:45:59 UTC (rev 2745)
@@ -1,2 +1,3 @@
Manifest-Version: 1.0
-Class-Path: jboss-seam.jar
+Class-Path: jboss-seam.jar
+ testng-4.5.1-jdk15.jar
Added: trunk/seam/plugins/org.jboss.tools.seam.core/templates/war/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/war/META-INF/MANIFEST.MF
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/templates/war/META-INF/MANIFEST.MF 2007-07-31
02:45:59 UTC (rev 2745)
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Class-Path: jboss-seam.jar
+ @projectName(a)-ejb.jar
+
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/IParameter.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/IParameter.java 2007-07-31
02:14:29 UTC (rev 2744)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/IParameter.java 2007-07-31
02:45:59 UTC (rev 2745)
@@ -28,5 +28,6 @@
public static String SEAM_PROJECT_LOCATION_PATH = "seam.project.location";
public static String SEAM_PROJECT_WEBCONTENT_PATH =
"seam.project.webcontent";
+ public static String SEAM_EAR_PROJECT_LOCATION_PATH =
"seam.ear.project.location";
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java 2007-07-31
02:14:29 UTC (rev 2744)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java 2007-07-31
02:45:59 UTC (rev 2745)
@@ -66,13 +66,13 @@
// initialize war files mapping
ACTION_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/src/ActionJavaBean.java",
- "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" +
IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java/"});
+ "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" +
IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java"});
ACTION_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/test/ActionTest.java",
- "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH + "}/${"+
IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.java/"});
+ "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH + "}/${"+
IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.java"});
ACTION_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/test/testng.xml",
- "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH + "}/${"+
IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.xml/"});
+ "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH + "}/${"+
IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.xml"});
ACTION_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/view/action.xhtml",
"${" + IParameter.SEAM_PROJECT_WEBCONTENT_PATH + "}/${" +
IParameter.SEAM_PAGE_NAME +"}.xhtml"});
@@ -80,12 +80,16 @@
// initialize ear files mapping
ACTION_EAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/src/ActionBean.java",
- "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" +
IParameter.SEAM_BEAN_NAME +"}.java/"});
+ "${" + IParameter.SEAM_EAR_PROJECT_LOCATION_PATH +
"}/ejbModule/${" + ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH +
"}/${" + IParameter.SEAM_BEAN_NAME +"}.java"});
ACTION_EAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/src/Action.java",
- "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" +
IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java/"});
- ACTION_EAR_MAPPING.add(ACTION_WAR_MAPPING.get(1));
- ACTION_EAR_MAPPING.add(ACTION_WAR_MAPPING.get(2));
+ "${" + IParameter.SEAM_EAR_PROJECT_LOCATION_PATH +
"}/ejbModule/${" + ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH +
"}/${" + IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java"});
+ ACTION_EAR_MAPPING.add(new String[]{
+ "${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/test/ActionTest.java",
+ "${" + IParameter.SEAM_EAR_PROJECT_LOCATION_PATH +
"}/ejbModule/${" + ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH +
"}/${"+ IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.java"});
+ ACTION_EAR_MAPPING.add(new String[]{
+ "${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/test/testng.xml",
+ "${" + IParameter.SEAM_EAR_PROJECT_LOCATION_PATH +
"}/ejbModule/${" + ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH +
"}/${"+ IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.xml"});
ACTION_EAR_MAPPING.add(ACTION_WAR_MAPPING.get(3));
}
};
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2007-07-31
02:14:29 UTC (rev 2744)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2007-07-31
02:45:59 UTC (rev 2745)
@@ -90,11 +90,11 @@
vars.put(ISeamFacetDataModelProperties.SEAM_PROJECT_INSTANCE,project);
vars.put(IParameter.SEAM_PROJECT_LOCATION_PATH,project.getLocation().toFile().toString());
vars.put(IParameter.SEAM_PROJECT_WEBCONTENT_PATH,webRootContainer.getLocation().toFile().toString());
+ vars.put(IParameter.SEAM_EAR_PROJECT_LOCATION_PATH,project.getLocation().removeLastSegments(1).append(project.getName()+"-ejb").toFile().toString());
vars.put(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH,
actionFolder.replace('.','/'));
vars.put(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME, actionFolder);
vars.put(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH,
testFolder.replace('.','/'));
vars.put(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME, testFolder);
-
List<String[]> fileMapping = getFileMappings(vars);
List<String[]> fileMappingCopy = applayVariables(fileMapping,vars);
FilterSetCollection filters = getFilterSetCollection(vars);
@@ -105,7 +105,8 @@
AntCopyUtils.copyFileToFile(new File(mapping[0]),new File(mapping[1]),filters,true);
}
- project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ project.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, monitor);
+
} catch (CoreException e) {
SeamCorePlugin.getPluginLog().logError(e);
} catch (BackingStoreException e) {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFofrmWizard.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFofrmWizard.java 2007-07-31
02:14:29 UTC (rev 2744)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFofrmWizard.java 2007-07-31
02:45:59 UTC (rev 2745)
@@ -82,13 +82,13 @@
static {
FORM_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/src/FormActionJavaBean.java",
- "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" +
IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java/"});
+ "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" +
IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java"});
FORM_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/test/FormTest.java",
- "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH + "}/${"+
IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.java/"});
+ "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH + "}/${"+
IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.java"});
FORM_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/test/testng.xml",
- "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH + "}/${"+
IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.xml/"});
+ "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH + "}/${"+
IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.xml"});
FORM_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/view/form.xhtml",
"${" + IParameter.SEAM_PROJECT_WEBCONTENT_PATH + "}/${" +
IParameter.SEAM_PAGE_NAME +"}.xhtml"});
@@ -96,12 +96,16 @@
// initialize ear files mapping
FORM_EAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/src/FormActionBean.java",
- "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" +
IParameter.SEAM_BEAN_NAME +"}.java/"});
+ "${" + IParameter.SEAM_EAR_PROJECT_LOCATION_PATH +
"}/ejbModule/${" + ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH +
"}/${" + IParameter.SEAM_BEAN_NAME +"}.java"});
FORM_EAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/src/FormAction.java",
- "${" + IParameter.SEAM_PROJECT_LOCATION_PATH + "}/src/${" +
ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" +
IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java/"});
- FORM_EAR_MAPPING.add(FORM_WAR_MAPPING.get(1));
- FORM_EAR_MAPPING.add(FORM_WAR_MAPPING.get(2));
+ "${" + IParameter.SEAM_EAR_PROJECT_LOCATION_PATH +
"}/ejbModule/${" + ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH +
"}/${" + IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java"});
+ FORM_EAR_MAPPING.add(new String[]{
+ "${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/test/FormTest.java",
+ "${" + IParameter.SEAM_EAR_PROJECT_LOCATION_PATH +
"}/ejbModule/${" + ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH +
"}/${"+ IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.java"});
+ FORM_EAR_MAPPING.add(new String[]{
+ "${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME +
"}/seam-gen/test/testng.xml",
+ "${" + IParameter.SEAM_EAR_PROJECT_LOCATION_PATH +
"}/ejbModule/${" + ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH +
"}/${"+ IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.xml"});
FORM_EAR_MAPPING.add(FORM_WAR_MAPPING.get(3));
}
};