Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkkomissarchik2010-08-26 19:13:13 +0000
committerkkomissarchik2010-08-26 19:13:13 +0000
commit7d1a00d1c52c80b5b41f1481068aa5467d3f3172 (patch)
treecd278dea938d9b989ca65d2abfe2a508dfb7776a /plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse
parent54a84f36fadfb179fd10a9d94b1edabd004e3d41 (diff)
downloadwebtools.javaee-7d1a00d1c52c80b5b41f1481068aa5467d3f3172.tar.gz
webtools.javaee-7d1a00d1c52c80b5b41f1481068aa5467d3f3172.tar.xz
webtools.javaee-7d1a00d1c52c80b5b41f1481068aa5467d3f3172.zip
[318068] Aggregate Deployment Assembly fixes for Helios SR1
Diffstat (limited to 'plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse')
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/CustomWebProjectReferenceWizardFragment.java38
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/Messages.java4
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebDependencyPropertyPage.java21
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebModuleDependencyPageProvider.java20
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/messages.properties4
5 files changed, 49 insertions, 38 deletions
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 3867fd1a0..347ec9bda 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
@@ -1,5 +1,5 @@
/******************************************************************************
- * Copyright (c) 2009 Red Hat, IBM
+ * Copyright (c) 2009 Red Hat and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* Rob Stryker - initial implementation and ongoing maintenance
* Chuck Bridgham - Ongoing improvements
+ * Konstantin Komissarchik - misc. UI cleanup
******************************************************************************/
package org.eclipse.jst.servlet.ui.internal;
@@ -20,9 +21,6 @@ import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
@@ -36,7 +34,6 @@ public class CustomWebProjectReferenceWizardFragment extends ProjectReferenceWiz
public CustomWebProjectReferenceWizardFragment() {
super();
- // TODO Auto-generated constructor stub
}
private boolean isWebLib = true;
@@ -46,19 +43,24 @@ public class CustomWebProjectReferenceWizardFragment extends ProjectReferenceWiz
public Composite createComposite(Composite parent, IWizardHandle handle) {
Composite c = new Composite(parent, SWT.NONE);
- c.setLayout(new FormLayout());
+
+ final GridLayout gl = new GridLayout();
+ gl.marginWidth = 0;
+ gl.marginHeight = 0;
+
+ c.setLayout(gl);
Composite tableComp = super.createComposite(c, handle);
+ tableComp.setLayoutData(new GridData(GridData.FILL_BOTH));
// make button
button = new Button(c, SWT.CHECK);
- button.setText(Messages.CustomWebProjectReferenceWizardFragment_0);
- button.setToolTipText(Messages.CustomWebProjectReferenceWizardFragment_1);
- FormData buttonData = new FormData();
- buttonData.bottom = new FormAttachment(100,-5);
- buttonData.left = new FormAttachment(0,5);
- buttonData.right = new FormAttachment(100,-5);
- button.setLayoutData(buttonData);
+ button.setText(Messages.CustomWebProjectReferenceWizardFragment);
+
+ final GridData gd = new GridData();
+ gd.horizontalIndent = 5;
+ button.setLayoutData(gd);
+
button.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
@@ -68,16 +70,6 @@ public class CustomWebProjectReferenceWizardFragment extends ProjectReferenceWiz
});
button.setSelection(true);
- FormData tableData = new FormData();
- tableData.width = 570;
- tableData.height = 180;
- tableData.top = new FormAttachment(0,5);
- tableData.bottom = new FormAttachment(button,-5);
- tableData.left = new FormAttachment(0,5);
- tableData.right = new FormAttachment(100,-5);
- tableComp.setLayoutData(tableData);
- handle.setTitle(org.eclipse.wst.common.componentcore.ui.Messages.ProjectReferenceTitle);
- handle.setDescription(Messages.WebProjectReferenceDescription);
return c;
}
diff --git a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/Messages.java b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/Messages.java
index a95abf582..4add98cc0 100644
--- a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/Messages.java
+++ b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/Messages.java
@@ -10,9 +10,7 @@ public class Messages extends NLS {
public static String DeploymentAssembly;
public static String WebDeploymentAssembly;
public static String ManifestEntries;
- public static String CustomWebProjectReferenceWizardFragment_0;
- public static String CustomWebProjectReferenceWizardFragment_1;
- public static String WebProjectReferenceDescription;
+ public static String CustomWebProjectReferenceWizardFragment;
static {
// initialize resource bundle
diff --git a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebDependencyPropertyPage.java b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebDependencyPropertyPage.java
index fc5b1a405..c53e02f11 100644
--- a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebDependencyPropertyPage.java
+++ b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebDependencyPropertyPage.java
@@ -1,5 +1,5 @@
/******************************************************************************
- * Copyright (c) 2009 Red Hat
+ * Copyright (c) 2010 Red Hat and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,9 +7,12 @@
*
* Contributors:
* Rob Stryker - initial implementation and ongoing maintenance
+ * Konstantin Komissarchik - misc. UI cleanup
******************************************************************************/
package org.eclipse.jst.servlet.ui.internal;
+import java.util.List;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.jst.j2ee.internal.J2EEConstants;
import org.eclipse.jst.j2ee.internal.ui.J2EEModuleDependenciesPropertyPage;
@@ -44,13 +47,19 @@ public class WebDependencyPropertyPage extends J2EEModuleDependenciesPropertyPag
}
@Override
- protected ReferenceExtension[] filterReferenceTypes(ReferenceExtension[] defaults) {
+ protected void filterReferenceTypes( final List<ReferenceExtension> extensions )
+ {
// Replace the default one with our own custom one, in class CustomWebProjectReferenceWizardFragment
- for( int i = 0; i < defaults.length; i++ ) {
- if( defaults[i].getId().equals("org.eclipse.wst.common.componentcore.ui.newProjectReference")) { //$NON-NLS-1$
- defaults[i] = DependencyPageExtensionManager.getManager().findReferenceExtension("org.eclipse.jst.servlet.ui.internal.CustomWebProjectReferenceWizardFragment"); //$NON-NLS-1$
+
+ for( int i = 0, n = extensions.size(); i < n; i++ )
+ {
+ final ReferenceExtension ext = extensions.get( i );
+
+ if( ext.getId().equals( "org.eclipse.wst.common.componentcore.ui.newProjectReference" ) ) //$NON-NLS-1$
+ {
+ extensions.set( i, DependencyPageExtensionManager.getManager().findReferenceExtension( "org.eclipse.jst.servlet.ui.internal.CustomWebProjectReferenceWizardFragment" ) ); //$NON-NLS-1$
}
}
- return defaults;
}
+
}
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 fe1abfc6b..05e08da90 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
@@ -1,5 +1,5 @@
/******************************************************************************
- * Copyright (c) 2009 Red Hat, IBM
+ * Copyright (c) 2010 Red Hat and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* Rob Stryker - initial implementation and ongoing maintenance
* Chuck Bridgham - Additional support
+ * Konstantin Komissarchik - misc. UI cleanup
******************************************************************************/
package org.eclipse.jst.servlet.ui.internal;
@@ -16,7 +17,9 @@ import org.eclipse.jst.common.internal.modulecore.util.JavaModuleComponentUtilit
import org.eclipse.jst.common.ui.internal.assembly.wizard.ManifestModuleDependencyControl;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
@@ -71,16 +74,27 @@ public class WebModuleDependencyPageProvider implements IDependencyPageProvider
controls[1] = pages[1];
TabItem tab = new TabItem(folder, SWT.NONE);
- tab.setControl(controls[0].createContents(folder));
+ tab.setControl(create(controls[0],folder));
tab.setText(Messages.DeploymentAssembly);
tab = new TabItem(folder, SWT.NONE);
- tab.setControl(controls[1].createContents(folder));
+ tab.setControl(create(controls[1],folder));
tab.setText(Messages.ManifestEntries);
folder.setSelection(0);
return folder;
}
+ private static Control create( final IModuleDependenciesControl control,
+ final Composite parent )
+ {
+ final Composite composite = new Composite( parent, SWT.NONE );
+ composite.setLayout( new GridLayout() );
+ final Composite inner = control.createContents( composite );
+ inner.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+
+ return composite;
+ }
+
public String getPageTitle(IProject project) {
return Messages.WebDeploymentAssembly;
}
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 a4aa9c18e..7c20ede26 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,6 +1,4 @@
-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
+CustomWebProjectReferenceWizardFragment=Assemble projects into the &WEB-INF/lib folder of the web application
DeploymentAssembly=Deployment Assembly
WebDeploymentAssembly=Web Deployment Assembly
ManifestEntries=Manifest Entries

Back to the top