Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcanderson2010-04-07 15:35:56 +0000
committercanderson2010-04-07 15:35:56 +0000
commit758b85cec78af1cdcc5d051a710bdd133e90278a (patch)
tree09ab80988c251ac44207da3eb40239ccef244ee5
parentb4ff4cb9d8b80da26c7d1b1df19bf8217d51841c (diff)
downloadwebtools.javaee-758b85cec78af1cdcc5d051a710bdd133e90278a.tar.gz
webtools.javaee-758b85cec78af1cdcc5d051a710bdd133e90278a.tar.xz
webtools.javaee-758b85cec78af1cdcc5d051a710bdd133e90278a.zip
[308282] [UI]Additional changes to Module assembly
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEDependencyPageProvider.java46
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/Messages.java1
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/messages.properties2
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/CustomWebProjectReferenceWizardFragment.java5
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebModuleDependencyPageProvider.java8
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/messages.properties1
7 files changed, 56 insertions, 10 deletions
diff --git a/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF
index 06b630e15..95cceea86 100644
--- a/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF
@@ -74,6 +74,7 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)",
org.eclipse.jst.jee;bundle-version="[1.0.0,1.1.0)",
org.eclipse.jst.common.project.facet.ui;bundle-version="[1.3.1,2.0.0)",
org.eclipse.jst.common.project.facet.core;bundle-version="[1.3.100,2.0.0)",
- org.eclipse.wst.common.modulecore.ui;bundle-version="1.0.0"
+ org.eclipse.wst.common.modulecore.ui;bundle-version="1.0.0",
+ org.eclipse.jst.common.ui;bundle-version="1.0.0"
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEDependencyPageProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEDependencyPageProvider.java
index 39a230c16..1167506fa 100644
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEDependencyPageProvider.java
+++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEDependencyPageProvider.java
@@ -11,8 +11,14 @@
package org.eclipse.jst.j2ee.internal.ui;
import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.common.internal.modulecore.util.JavaModuleComponentUtility;
+import org.eclipse.jst.common.ui.internal.assembly.wizard.ManifestModuleDependencyControl;
import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
import org.eclipse.wst.common.componentcore.ui.propertypage.IDependencyPageProvider;
import org.eclipse.wst.common.componentcore.ui.propertypage.IModuleDependenciesControl;
@@ -22,6 +28,8 @@ import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
public class J2EEDependencyPageProvider implements IDependencyPageProvider {
+ private IModuleDependenciesControl[] controls;
+
public boolean canHandle(IFacetedProject project) {
return isJavaEENotEarWeb(project);
}
@@ -37,17 +45,47 @@ public class J2EEDependencyPageProvider implements IDependencyPageProvider {
public IModuleDependenciesControl[] createPages(IFacetedProject project,
ModuleAssemblyRootPage parent) {
+ if( isStandalone(project.getProject()))
+ return new IModuleDependenciesControl[] {
+ new J2EEModuleDependenciesPropertyPage(project.getProject(), parent)};
+
return new IModuleDependenciesControl[] {
- new J2EEModuleDependenciesPropertyPage(project.getProject(), parent) };
+ new J2EEModuleDependenciesPropertyPage(project.getProject(), parent),
+ new ManifestModuleDependencyControl(project.getProject(), parent)};
}
+
+ /*
+ * This now allows extenders to say whether this project is standalone or not
+ */
+ protected boolean isStandalone(IProject project) {
+ return JavaModuleComponentUtility.findParentProjects(project).length == 0;
+ }
- public Composite createRootControl(
- IFacetedProject project,
- IModuleDependenciesControl[] pages,
+ public Composite createRootControl(IFacetedProject project,IModuleDependenciesControl[] pages,
Composite parent) {
+
+ if( isStandalone(project.getProject()))
return pages[0].createContents(parent);
+ final TabFolder folder = new TabFolder(parent, SWT.LEFT);
+ folder.setLayoutData(new GridData(GridData.FILL_BOTH));
+ folder.setFont(parent.getFont());
+
+ // Create the two tabs
+ controls = new IModuleDependenciesControl[2];
+ controls[0] = pages[0];
+ controls[1] = pages[1];
+
+ TabItem tab = new TabItem(folder, SWT.NONE);
+ tab.setControl(controls[0].createContents(folder));
+ tab.setText(Messages.J2EEDependencyPageProvider_4);
+ tab = new TabItem(folder, SWT.NONE);
+ tab.setControl(controls[1].createContents(folder));
+ tab.setText(Messages.J2EEDependencyPageProvider_5);
+
+ folder.setSelection(0);
+ return folder;
}
protected boolean isWeb(IFacetedProject project) {
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/Messages.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/Messages.java
index be03bb648..649a90c59 100644
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/Messages.java
+++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/Messages.java
@@ -9,6 +9,7 @@ public class Messages extends NLS {
public static String J2EEDependencyPageProvider_2;
public static String J2EEDependencyPageProvider_3;
public static String J2EEDependencyPageProvider_4;
+ public static String J2EEDependencyPageProvider_5;
public static String J2EEModuleDependenciesPropertyPage_0;
public static String J2EEModuleDependenciesPropertyPage_1;
public static String J2EEModuleDependenciesPropertyPage_2;
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/messages.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/messages.properties
index 16cab6c58..8890bd3ef 100644
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/messages.properties
+++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/messages.properties
@@ -3,6 +3,7 @@ J2EEDependencyPageProvider_1=EJB Deployment Assembly
J2EEDependencyPageProvider_2=Application Client Deployment Assembly
J2EEDependencyPageProvider_3=Connector Deployment Assembly
J2EEDependencyPageProvider_4=Deployment Assembly
+J2EEDependencyPageProvider_5=Manifest Entries
J2EEModuleDependenciesPropertyPage_0=Add EJB Module Folder...
J2EEModuleDependenciesPropertyPage_1=Add App Client Module Folder...
J2EEModuleDependenciesPropertyPage_2=Add Connector Module Folder...
@@ -10,3 +11,4 @@ J2EEModuleDependenciesPropertyPage_3=Assemble packaging structure for this EJB p
J2EEModuleDependenciesPropertyPage_4=Assemble packaging structure for this Application Client project
J2EEModuleDependenciesPropertyPage_5=Assemble packaging structure for this Connector project
J2EEModuleDependenciesPropertyPage_6=Derived References
+
diff --git a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/CustomWebProjectReferenceWizardFragment.java b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/CustomWebProjectReferenceWizardFragment.java
index c91a2c8a2..a68d2ab4a 100644
--- a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/CustomWebProjectReferenceWizardFragment.java
+++ b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/CustomWebProjectReferenceWizardFragment.java
@@ -78,6 +78,7 @@ public class CustomWebProjectReferenceWizardFragment extends ProjectReferenceWiz
button = new Button(parent, SWT.CHECK);
button.setText(Messages.getString("CustomWebProjectReferenceWizardFragment.0")); //$NON-NLS-1$
+ button.setToolTipText(Messages.getString("CustomWebProjectReferenceWizardFragment.1")); //$NON-NLS-1$
button.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
button.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
@@ -87,6 +88,7 @@ public class CustomWebProjectReferenceWizardFragment extends ProjectReferenceWiz
handleEdit();
}
});
+ button.setSelection(true);
}
// public Composite createButtonColumnComposite(Composite parent) {
// Composite aButtonColumn = new Composite(parent, SWT.NONE);
@@ -143,11 +145,12 @@ public class CustomWebProjectReferenceWizardFragment extends ProjectReferenceWiz
public void performFinish(IProgressMonitor monitor) throws CoreException {
for (int i = 0; i < selected.length; i++) {
IProject proj = selected[i];
- if(!JavaEEProjectUtilities.isUtilityProject(proj))
+ if(JavaEEProjectUtilities.getJ2EEProjectType(proj).equals("")) //$NON-NLS-1$
{
J2EEProjectUtilities.createFlexJavaProjectForProjectOperation(proj).execute(monitor, null);
}
}
super.performFinish(monitor);
}
+
}
diff --git a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebModuleDependencyPageProvider.java b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebModuleDependencyPageProvider.java
index 53ed574ba..fe1abfc6b 100644
--- a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebModuleDependencyPageProvider.java
+++ b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebModuleDependencyPageProvider.java
@@ -50,8 +50,8 @@ public class WebModuleDependencyPageProvider implements IDependencyPageProvider
new WebDependencyPropertyPage(project.getProject(), parent)};
return new IModuleDependenciesControl[] {
- new ManifestModuleDependencyControl(project.getProject(), parent),
- new WebDependencyPropertyPage(project.getProject(), parent)
+ new WebDependencyPropertyPage(project.getProject(), parent),
+ new ManifestModuleDependencyControl(project.getProject(), parent)
};
}
@@ -72,10 +72,10 @@ public class WebModuleDependencyPageProvider implements IDependencyPageProvider
TabItem tab = new TabItem(folder, SWT.NONE);
tab.setControl(controls[0].createContents(folder));
- tab.setText(Messages.ManifestEntries);
+ tab.setText(Messages.DeploymentAssembly);
tab = new TabItem(folder, SWT.NONE);
tab.setControl(controls[1].createContents(folder));
- tab.setText(Messages.DeploymentAssembly);
+ tab.setText(Messages.ManifestEntries);
folder.setSelection(0);
return folder;
diff --git a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/messages.properties b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/messages.properties
index fed5f7c9e..e2d263a81 100644
--- a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/messages.properties
+++ b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/messages.properties
@@ -1,4 +1,5 @@
CustomWebProjectReferenceWizardFragment.0=Web Library Reference
+CustomWebProjectReferenceWizardFragment.1=Select this to assemble project reference in "WEB-INF/lib" folder of archive
WebProjectReferenceDescription=Here you can make a project into a reference.\nIf the project is not already a flexible project, it will be converted into one. References are added to the MANIFEST.MF
DeploymentAssembly=Deployment Assembly
WebDeploymentAssembly=Web Deployment Assembly

Back to the top