Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNitin Dahyabhai2020-12-27 23:15:13 +0000
committerNitin Dahyabhai2021-01-07 23:35:59 +0000
commit4fbc8f4136ca948afa030f2b742ed371a4dbdeaf (patch)
tree41aeae10a9ba4744cd074e01e1eaa132bff825d0
parent74f3ce14dd73360b9895eef1c94f59a5f9e3b4f2 (diff)
downloadwebtools.javaee-4fbc8f4136ca948afa030f2b742ed371a4dbdeaf.tar.gz
webtools.javaee-4fbc8f4136ca948afa030f2b742ed371a4dbdeaf.tar.xz
webtools.javaee-4fbc8f4136ca948afa030f2b742ed371a4dbdeaf.zip
[417874] Create a WebContent link to the dynamic web project's
actual web content folder, for easier navigation. Signed-off-by: Nitin Dahyabhai <thatnitind@gmail.com> Change-Id: I1273e1b6592e8e00fa45ef91df45a2489489a639
-rw-r--r--docs/org.eclipse.jst.j2ee.doc.user/.project2
-rw-r--r--docs/org.eclipse.jst.j2ee.doc.user/topics/tcreatingawebproject.dita6
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java9
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java4
4 files changed, 12 insertions, 9 deletions
diff --git a/docs/org.eclipse.jst.j2ee.doc.user/.project b/docs/org.eclipse.jst.j2ee.doc.user/.project
index 86d94083c..ac1280e18 100644
--- a/docs/org.eclipse.jst.j2ee.doc.user/.project
+++ b/docs/org.eclipse.jst.j2ee.doc.user/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>Copy of org.eclipse.jst.j2ee.doc.user</name>
+ <name>org.eclipse.jst.j2ee.doc.user</name>
<comment></comment>
<projects>
</projects>
diff --git a/docs/org.eclipse.jst.j2ee.doc.user/topics/tcreatingawebproject.dita b/docs/org.eclipse.jst.j2ee.doc.user/topics/tcreatingawebproject.dita
index 434fa96c3..eb8930054 100644
--- a/docs/org.eclipse.jst.j2ee.doc.user/topics/tcreatingawebproject.dita
+++ b/docs/org.eclipse.jst.j2ee.doc.user/topics/tcreatingawebproject.dita
@@ -52,12 +52,12 @@ Root:</uicontrol> field, specify a folder for your source files or
accept the default value.</cmd></step>
<step><cmd>In the <uicontrol>Content Directory:</uicontrol> field,
specify a folder for your source files or accept the default value
-(WebContent).</cmd></step>
+(src/main/webapp).</cmd></step>
<step><cmd>In the <uicontrol>Java Source Directory</uicontrol> field,
specify a folder for your source files or accept the default value
-(src).</cmd></step>
+(src/main/java).</cmd></step>
<step><cmd>In the <uicontrol>Output Folder:</uicontrol> field, specify
-a folder for your output files or accept the default value (WebContent/WEB-INF/classes).</cmd>
+a folder for your output files or accept the default value (build/classes).</cmd>
<info></info></step>
<step><cmd>Click <uicontrol>Finish</uicontrol>.</cmd></step>
</steps>
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java
index ae858db27..b346f98f6 100644
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java
+++ b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java
@@ -1,5 +1,5 @@
/******************************************************************************
- * Copyright (c) 2005, 2011 BEA Systems, Inc. and others
+ * Copyright (c) 2005, 2021 BEA Systems, Inc. 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
@@ -23,6 +23,7 @@ import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
@@ -142,7 +143,11 @@ public final class WebFacetInstallDelegate extends J2EEFacetInstallDelegate impl
WebArtifactEdit.createDeploymentDescriptor(project, nVer);
}
}
-
+
+ if (!contentdir.equals(pjpath.addTrailingSeparator().append("WebContent"))) { //$NON-NLS-1$
+ project.getFolder("WebContent").createLink(new Path("PROJECT_LOC").append(contentdir.removeFirstSegments(1)), IResource.NONE, null); //$NON-NLS-1$//$NON-NLS-2$
+ }
+
// Set entries for src folders
final IVirtualFolder jsrc = c.getRootFolder().getFolder("/WEB-INF/classes"); //$NON-NLS-1$
final IClasspathEntry[] cp = jproj.getRawClasspath();
diff --git a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java
index f0aa9788a..a29364949 100644
--- a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java
+++ b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2020 IBM Corporation 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
@@ -118,7 +118,6 @@ public class J2EEPreferences {
/**
* @return
- * @deprecated
*/
public String getStaticWebContentFolderName() {
return getString(Keys.STATIC_WEB_CONTENT);
@@ -148,7 +147,6 @@ public class J2EEPreferences {
/**
* @param value
- * @deprecated
*/
public void setStaticWebContentFolderName(String value) {
getInstancePreferenceNode(J2EEPlugin.PLUGIN_ID).put(Keys.STATIC_WEB_CONTENT, value);

Back to the top