Author: akazakov
Date: 2008-07-11 14:56:27 -0400 (Fri, 11 Jul 2008)
New Revision: 9123
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamCoreConstants.java
trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
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/SeamWizardFactory.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2486 Fixed
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-07-11 15:59:59
UTC (rev 9122)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF 2008-07-11 18:56:27
UTC (rev 9123)
@@ -46,7 +46,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.common.frameworks;bundle-version="1.1.200"
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/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2008-07-11 15:59:59 UTC (rev
9122)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2008-07-11 18:56:27 UTC (rev
9123)
@@ -52,7 +52,7 @@
<and>
<requires
facet="jst.web"
- version="[2.4">
+ version="[2.5">
</requires>
<requires
facet="jst.jsf"
@@ -72,7 +72,7 @@
<and>
<requires
facet="jst.web"
- version="[2.4">
+ version="[2.5">
</requires>
<requires
facet="jst.jsf"
@@ -143,32 +143,15 @@
facet="jst.java"/>
<fixed
facet="jst.web"/>
- <fixed
+ <!--fixed
facet="jst.seam"/>
<fixed
- facet="jst.jsf"/>
+ facet="jst.jsf"/-->
<preset
id="jst.seam.preset">
</preset>
</template>
- <preset
- id="jst.seam.preset">
- <label>
- Dynamic Web Project with Seam 1.2
- </label>
- <facet
- id="jst.java"
- version="5.0"/>
- <facet
- id="jst.web"
- version="2.5"/>
- <facet
- id="jst.jsf"
- version="1.2"/>
- <facet
- id="jst.seam"
- version="1.2"/>
- </preset>
+
<template
id="template.jst.seam2">
<label>
@@ -178,33 +161,42 @@
facet="jst.java"/>
<fixed
facet="jst.web"/>
- <fixed
+ <!--fixed
facet="jst.seam"/>
<fixed
- facet="jst.jsf"/>
+ facet="jst.jsf"/-->
<preset
id="jst.seam2.preset">
</preset>
</template>
- <preset
- id="jst.seam2.preset">
- <label>
- Dynamic Web Project with Seam 2.0 (technology preview)
- </label>
- <facet
- id="jst.java"
- version="5.0"/>
- <facet
- id="jst.web"
- version="2.5"/>
- <facet
- id="jst.jsf"
- version="1.2"/>
- <facet
- id="jst.seam"
- version="2.0"/>
- </preset>
</extension>
+
+ <extension
+ point="org.eclipse.wst.common.project.facet.core.presets">
+ <static-preset
+ id="jst.seam.preset">
+ <label>Dynamic Web Project with Seam 1.2</label>
+ <facet id="jst.java" version="5.0" />
+ <facet id="jst.web" version="2.5"/>
+ <facet id="jst.jsf" version="1.2" />
+ <facet id="jst.seam" version="2.0" />
+ <description>
+ Configures a Dynamic Web application to use Seam v1.2
+ </description>
+ </static-preset>
+ <static-preset
+ id="jst.seam2.preset">
+ <label>Dynamic Web Project with Seam 2.0 (technology preview)</label>
+ <facet id="jst.java" version="5.0" />
+ <facet id="jst.web" version="2.5"/>
+ <facet id="jst.jsf" version="1.2" />
+ <facet id="jst.seam" version="2.0" />
+ <description>
+ Configures a Dynamic Web application to use Seam v2.0
+ </description>
+ </static-preset>
+ </extension>
+
<extension
point="org.eclipse.wst.common.project.facet.core.runtimes">
<supported>
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java 2008-07-11
15:59:59 UTC (rev 9122)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java 2008-07-11
18:56:27 UTC (rev 9123)
@@ -8,7 +8,7 @@
static {
NLS.initializeMessages(BUNDLE_NAME, SeamCoreMessages.class);
}
-
+
public static String SeamCoreBuilder_1;
public static String ANT_COPY_UTILS_COPY_FAILED;
public static String ANT_COPY_UTILS_COULD_NOT_FIND_FOLDER;
@@ -38,5 +38,4 @@
public static String SEAM_FACET_INSTALL_ABSTRACT_DELEGATE_ERRORS_OCCURED = null;
public static String SEAM_FACET_INSTALL_ABSTRACT_DELEGATE_CHECK_ERROR_LOG_VIEW;
public static String SEAM_FACET_INSTALL_ABSTRACT_DELEGATE_ERROR;
-
-}
+}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2008-07-11
15:59:59 UTC (rev 9122)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2008-07-11
18:56:27 UTC (rev 9123)
@@ -26,4 +26,4 @@
ERROR_JBOSS_AS_TARGET_SERVER_NO_SERVERS_DEFINED=There are no available Target Service for
selected Target Runtime
ERROR_JBOSS_AS_TARGET_SERVER_INCOMPATIBLE=Target Server is incompatible with Target
Runtime selected
ERROR_JBOSS_AS_TARGET_RUNTIME_IS_EMPTY=Target Runtime cannot be empty
-ERROR_JBOSS_AS_TARGET_RUNTIME_UNKNOWN=Unknown Target Runtime
+ERROR_JBOSS_AS_TARGET_RUNTIME_UNKNOWN=Unknown Target Runtime
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamCoreConstants.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamCoreConstants.java 2008-07-11
15:59:59 UTC (rev 9122)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamCoreConstants.java 2008-07-11
18:56:27 UTC (rev 9123)
@@ -22,4 +22,13 @@
*/
String SEAM_CORE_FACET_ID = "jst.seam"; //$NON-NLS-1$
-}
+ /**
+ * Seam 1.2 Facet Version constant
+ */
+ String SEAM_CORE_FACET_VERSION_12 = "1.2"; //$NON-NLS-1$
+
+ /**
+ * Seam 2.0 Facet Version constant
+ */
+ String SEAM_CORE_FACET_VERSION_20 = "2.0"; //$NON-NLS-1$
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2008-07-11 15:59:59
UTC (rev 9122)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2008-07-11 18:56:27
UTC (rev 9123)
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Seam GUI Tools
-Bundle-SymbolicName: org.jboss.tools.seam.ui; singleton:=true
+Bundle-SymbolicName: org.jboss.tools.seam.ui;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: org.jboss.tools.seam.ui.SeamGuiPlugin
Bundle-Localization: plugin
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2008-07-11
15:59:59 UTC (rev 9122)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2008-07-11
18:56:27 UTC (rev 9123)
@@ -215,6 +215,8 @@
public static String SEAM_PROJECT_WIZARD_PAGE1_SELECT_NEW_FILE_CONTAINER;
+ public static String SEAM_PROJECT_WIZARD_PAGE1_SEAM_FACET_MUST_BE_SPECIFIED;
+
public static String SEAM_PROJECT_WIZARD_PAGE1_THIS_WIZARD_CREATES_A_NEW_FILE;
public static String SEAM_PROJECT_WIZARD_SEAM_WEB_PROJECT;
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2008-07-11
15:59:59 UTC (rev 9122)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2008-07-11
18:56:27 UTC (rev 9123)
@@ -10,6 +10,7 @@
SEAM_INSTALL_WIZARD_PAGE_CONFIGURE_SEAM_FACET_SETTINGS=Configure Seam Facet Settings
SEAM_INSTALL_WIZARD_PAGE_CANNOT_USE_SELECTED_DEPLOYMENT6=''{0}''
deployment cannot be used, because selected Server Runtime ''{1}''
doesn't support EJB 3.0 and EAR 5.0 modules
SEAM_PROJECT_WIZARD_PAGE1_FILE_NAME_MUST_BE_SPECIFIED=File name must be specified
+SEAM_PROJECT_WIZARD_PAGE1_SEAM_FACET_MUST_BE_SPECIFIED=Seam facet must be enabled
SEAM_PROJECT_SELECTION_DIALOG_SELECT_SEAM_WEB_PROJECT=Select Seam Web Project
SEAM_PROJECT_WIZARD_CREATE_STANDALONE_SEAM_WEB_PROJECT=Create standalone Seam Web
Project
SEAM_INSTALL_WIZARD_PAGE_SEAM_RUNTIME=Seam Runtime:
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 2008-07-11
15:59:59 UTC (rev 9122)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2008-07-11
18:56:27 UTC (rev 9123)
@@ -29,16 +29,19 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IFacetedProjectTemplate;
+import org.eclipse.wst.common.project.facet.core.IFacetedProjectWorkingCopy;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
import org.eclipse.wst.server.ui.ServerUIUtil;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.project.facet.SeamProjectPreferences;
+import org.jboss.tools.seam.internal.core.project.facet.ISeamCoreConstants;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import
org.jboss.tools.seam.internal.core.project.facet.SeamFacetProjectCreationDataModelProvider;
import org.jboss.tools.seam.ui.ISeamHelpContextIds;
@@ -52,7 +55,6 @@
*/
public class SeamProjectWizard extends WebProjectWizard {
-
public SeamProjectWizard() {
super();
setWindowTitle(SeamUIMessages.SEAM_PROJECT_WIZARD_NEW_SEAM_PROJECT);
@@ -86,8 +88,7 @@
if (control != null)
control.setVisible(false);
}
-
-
+
Control findControlByClass(Composite comp, Class claz) {
for (Control child : comp.getChildren()) {
if(child.getClass()==claz) {
@@ -99,8 +100,7 @@
}
return null;
}
-
-
+
Control findGroupByText(Composite comp, String text) {
for (Control child : comp.getChildren()) {
if(child instanceof Group && ((Group)child).getText().equals(text)) {
@@ -113,7 +113,6 @@
return null;
}
-
@Override
protected String getFinalPerspectiveID() {
return "org.jboss.tools.seam.ui.SeamPerspective"; //$NON-NLS-1$
@@ -122,7 +121,7 @@
protected IFacetedProjectTemplate getTemplate() {
return ProjectFacetsManager.getTemplate("template.jst.seam"); //$NON-NLS-1$
}
-
+
/* (non-Javadoc)
* @see
org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard#performFinish()
*/
@@ -132,19 +131,19 @@
page.finishPressed();
return super.performFinish();
}
-
+
class SeamWebProjectFirstPage extends WebProjectFirstPage {
@Override
protected String getInfopopID() {
return ISeamHelpContextIds.NEW_SEAM_PROJECT;
}
-
+
public SeamWebProjectFirstPage(IDataModel model, String pageName ) {
super(model, pageName);
}
protected Combo matchedServerTargetCombo;
-
+
protected Composite createTopLevelComposite(Composite parent) {
Composite top = new Composite(parent, SWT.NONE);
top.setLayout(new GridLayout());
@@ -157,7 +156,6 @@
return top;
}
-
protected void createSeamServerTargetComposite(Composite parent) {
// super.createServerTargetComposite(parent);
Group group = new Group(parent, SWT.NONE);
@@ -182,7 +180,7 @@
if (matchedServerTargetCombo.getSelectionIndex() == -1 &&
matchedServerTargetCombo.getVisibleItemCount() != 0)
matchedServerTargetCombo.select(0);
}
-
+
protected String[] getValidationPropertyNames() {
String[] superProperties = super.getValidationPropertyNames();
List list = Arrays.asList(superProperties);
@@ -196,7 +194,30 @@
public boolean launchNewServerWizard(Shell shell, IDataModel model) {
return launchNewServerWizard(shell, model, null);
}
-
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
+ */
+ @Override
+ public boolean isPageComplete() {
+ if(super.isPageComplete()) {
+ IProjectFacet pFacet =
ProjectFacetsManager.getProjectFacet(ISeamCoreConstants.SEAM_CORE_FACET_ID);
+ IFacetedProjectWorkingCopy fProject = getFacetedProjectWorkingCopy();
+ if(fProject!=null) {
+ IProjectFacetVersion seamFacet = fProject.getProjectFacetVersion(pFacet);
+ if(seamFacet==null) {
+
this.setErrorMessage(SeamUIMessages.SEAM_PROJECT_WIZARD_PAGE1_SEAM_FACET_MUST_BE_SPECIFIED);
+ return false;
+ } else {
+ this.setErrorMessage(null);
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+
public boolean launchNewServerWizard(Shell shell, IDataModel model, String
serverTypeID) {
DataModelPropertyDescriptor[] preAdditionDescriptors =
model.getValidPropertyDescriptors(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_SERVER);
IRuntime rt =
(IRuntime)model.getProperty(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_RUNTIME);
@@ -232,7 +253,7 @@
}
if (preAddition == null && postAddition != null &&
postAddition.length == 1)
newAddition = postAddition[0];
-
+
model.notifyPropertyChange(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_SERVER,
IDataModel.VALID_VALUES_CHG);
if (newAddition != null)
model.setProperty(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_SERVER,
newAddition);
@@ -241,17 +262,17 @@
}
return isOK;
}
-
+
public boolean internalLaunchNewServerWizard(Shell shell, IDataModel model) {
return launchNewServerWizard(shell, model, getModuleTypeID());
}
-
+
public void restoreDefaultSettings() {
super.restoreDefaultSettings();
String lastServerName = SeamProjectPreferences
.getStringPreference(SeamProjectPreferences.SEAM_LAST_SERVER_NAME);
-
+
if (lastServerName != null && lastServerName.length() > 0) {
SeamFacetProjectCreationDataModelProvider.setServerName(model,lastServerName);
}
@@ -266,6 +287,5 @@
serverName);
}
}
-
}
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardFactory.java 2008-07-11
15:59:59 UTC (rev 9122)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardFactory.java 2008-07-11
18:56:27 UTC (rev 9123)
@@ -390,11 +390,15 @@
/* (non-Javadoc)
* @see
org.eclipse.datatools.connectivity.IProfileListener#profileAdded(org.eclipse.datatools.connectivity.IConnectionProfile)
*/
- public void profileAdded(IConnectionProfile profile) {
- connProfileSelEditor.setValue(profile.getName());
- ((ITaggedFieldEditor) ((CompositeEditor) connProfileSelEditor)
- .getEditors().get(1)).setTags(getConnectionProfileNameList()
- .toArray(new String[0]));
+ public void profileAdded(final IConnectionProfile profile) {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ connProfileSelEditor.setValue(profile.getName());
+ ((ITaggedFieldEditor) ((CompositeEditor) connProfileSelEditor)
+ .getEditors().get(1)).setTags(getConnectionProfileNameList()
+ .toArray(new String[0]));
+ }
+ });
validator.validate(profile.getName(), null);
}