Author: dgolovin
Date: 2007-09-21 21:17:12 -0400 (Fri, 21 Sep 2007)
New Revision: 3766
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/SeamBaseWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectSelectionDialog.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-906
test project is created for WAR and EAR seam deployment configurations
The bas sequence look like this for both deployment types:
1. Create Seam WEB Project
2. Create Action or Form
3. Open test-src folder in test project
4. Find test class or test xml file.
5. In context menu on navigator select Run AS/Test NG Test for test class Run As/Test NG
test suite for xml
6. test NG should show Test NG View with green bar on top, that means all test passed
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-09-22
01:17:08 UTC (rev 3765)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2007-09-22
01:17:12 UTC (rev 3766)
@@ -68,7 +68,7 @@
params.get(IParameter.SEAM_PROJECT_NAME).getValueAsString());
Map<String, Object> vars = new HashMap<String, Object>();
- IEclipsePreferences seamFacetPrefs = SeamCorePlugin.getSeamFacetPreferences(project);
+ IEclipsePreferences seamFacetPrefs = SeamCorePlugin.getSeamPreferences(project);
try {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java 2007-09-22
01:17:08 UTC (rev 3765)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java 2007-09-22
01:17:12 UTC (rev 3766)
@@ -186,7 +186,7 @@
IResource project = getSelectedProject();
- String type =
SeamCorePlugin.getSeamFacetPreferences(project.getProject()).get(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,"war");
+ String type =
SeamCorePlugin.getSeamPreferences(project.getProject()).get(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,"war");
getEditor(IParameter.SEAM_BEAN_NAME).setEnabled(!isWar());
@@ -268,7 +268,7 @@
public boolean isWar() {
if(getSelectedProject()==null ||
- SeamCorePlugin.getSeamFacetPreferences(getSelectedProject().getProject())==null) return
true;
- return
"war".equals(SeamCorePlugin.getSeamFacetPreferences(getSelectedProject().getProject()).get(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,"war"));
+ SeamCorePlugin.getSeamPreferences(getSelectedProject().getProject())==null) return
true;
+ return
"war".equals(SeamCorePlugin.getSeamPreferences(getSelectedProject().getProject()).get(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,"war"));
}
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2007-09-22
01:17:08 UTC (rev 3765)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2007-09-22
01:17:12 UTC (rev 3766)
@@ -95,7 +95,7 @@
wc.setAttribute(HibernateLaunchConstants.ATTR_USE_OWN_TEMPLATES, true);
SeamRuntime seamRt = SeamRuntimeManager.getInstance().getDefaultRuntime();
- String runtimeName = SeamCorePlugin.getSeamFacetPreferences(project)
+ String runtimeName = SeamCorePlugin.getSeamPreferences(project)
.get(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,"");
if(!"".equals(runtimeName)) {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectSelectionDialog.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectSelectionDialog.java 2007-09-22
01:17:08 UTC (rev 3765)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectSelectionDialog.java 2007-09-22
01:17:12 UTC (rev 3766)
@@ -24,6 +24,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.dialogs.ListDialog;
import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.project.facet.SeamFacetPreference;
import org.jboss.tools.seam.internal.core.SeamProject;
@@ -48,7 +49,9 @@
ArrayList<IProject> seamProjects = new ArrayList<IProject>();
for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) {
try {
- if(project.hasNature(SeamProject.NATURE_ID) &&
SeamCorePlugin.getSeamFacetPreferences(project)!=null) {
+ if(project.hasNature(SeamProject.NATURE_ID)
+ && SeamCorePlugin.getSeamPreferences(project)!=null
+ && project.getAdapter(IFacetedProject.class)!=null) {
seamProjects.add(project);
}
} catch (CoreException e) {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2007-09-22
01:17:08 UTC (rev 3765)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2007-09-22
01:17:12 UTC (rev 3766)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.seam.ui.wizard;
+import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import org.eclipse.core.runtime.Platform;
@@ -84,8 +85,14 @@
}
return null;
}
-
-
+
+
+ @Override
+ protected String getFinalPerspectiveID() {
+ // TODO Auto-generated method stub
+ return "org.jboss.tools.seam.ui.SeamPerspective";
+ }
+
protected IFacetedProjectTemplate getTemplate() {
return ProjectFacetsManager.getTemplate("template.jst.seam"); //$NON-NLS-1$
}