Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal')
-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
3 files changed, 45 insertions, 4 deletions
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
+

Back to the top