Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/CustomWebProjectReferenceWizardFragment.java81
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/Messages.java1
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/messages.properties1
3 files changed, 3 insertions, 80 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 347ec9bda..e6df993f7 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 and Others
+ * Copyright (c) 2010, 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
@@ -10,6 +10,7 @@
* Chuck Bridgham - Ongoing improvements
* Konstantin Komissarchik - misc. UI cleanup
******************************************************************************/
+
package org.eclipse.jst.servlet.ui.internal;
import org.eclipse.core.resources.IProject;
@@ -18,85 +19,11 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jst.j2ee.internal.J2EEConstants;
import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
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.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.ui.internal.propertypage.ProjectReferenceWizardFragment;
-import org.eclipse.wst.common.componentcore.ui.internal.taskwizard.IWizardHandle;
import org.eclipse.wst.common.componentcore.ui.propertypage.IReferenceWizardConstants;
public class CustomWebProjectReferenceWizardFragment extends ProjectReferenceWizardFragment {
- public CustomWebProjectReferenceWizardFragment() {
- super();
- }
-
- private boolean isWebLib = true;
- private Button button;
-
- @Override
- public Composite createComposite(Composite parent, IWizardHandle handle) {
-
- Composite c = new Composite(parent, SWT.NONE);
-
- 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);
-
- final GridData gd = new GridData();
- gd.horizontalIndent = 5;
- button.setLayoutData(gd);
-
- button.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- public void widgetSelected(SelectionEvent e) {
- handleEdit();
- }
- });
- button.setSelection(true);
-
- return c;
- }
-
- public Composite createTableColumnComposite(Composite parent) {
- Composite aButtonColumn = new Composite(parent, SWT.NONE);
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- aButtonColumn.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- //data.minimumHeight = 500;
- //data.minimumWidth = 400;
- aButtonColumn.setLayoutData(data);
- return aButtonColumn;
- }
-
- protected void handleEdit() {
- isWebLib = button.getSelection();
- }
-
- @Override
- protected String getArchiveName(IProject proj, IVirtualComponent comp) {
- return super.getArchiveName(proj, comp);
- }
-
@Override
public void performFinish(IProgressMonitor monitor) throws CoreException {
for (int i = 0; i < selected.length; i++) {
@@ -104,9 +31,7 @@ public class CustomWebProjectReferenceWizardFragment extends ProjectReferenceWiz
if(JavaEEProjectUtilities.getJ2EEProjectType(proj).equals("")) //$NON-NLS-1$
J2EEProjectUtilities.createFlexJavaProjectForProjectOperation(proj).execute(monitor, null);
}
- String location = "/"; //$NON-NLS-1$
- if(isWebLib) location += J2EEConstants.WEB_INF_LIB;
- getTaskModel().putObject(IReferenceWizardConstants.DEFAULT_LIBRARY_LOCATION, location);
+ getTaskModel().putObject(IReferenceWizardConstants.DEFAULT_LIBRARY_LOCATION, "/" + J2EEConstants.WEB_INF_LIB); //$NON-NLS-1$
super.performFinish(monitor);
}
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 4add98cc0..189ab7260 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,7 +10,6 @@ public class Messages extends NLS {
public static String DeploymentAssembly;
public static String WebDeploymentAssembly;
public static String ManifestEntries;
- 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/messages.properties b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/messages.properties
index 7c20ede26..ef43508e0 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,3 @@
-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