Author: adietish
Date: 2010-09-02 13:10:37 -0400 (Thu, 02 Sep 2010)
New Revision: 24670
Modified:
trunk/gwt/plugins/org.jboss.tools.gwt.core/plugin.xml
trunk/gwt/plugins/org.jboss.tools.gwt.core/src/org/jboss/tools/gwt/core/GWTInstallFacetDelegate.java
trunk/gwt/plugins/org.jboss.tools.gwt.core/src/org/jboss/tools/gwt/core/util/ProjectUtils.java
Log:
[JBIDE-6954] added runtime extension, fixes missing web content folder
Modified: trunk/gwt/plugins/org.jboss.tools.gwt.core/plugin.xml
===================================================================
--- trunk/gwt/plugins/org.jboss.tools.gwt.core/plugin.xml 2010-09-02 16:44:36 UTC (rev
24669)
+++ trunk/gwt/plugins/org.jboss.tools.gwt.core/plugin.xml 2010-09-02 17:10:37 UTC (rev
24670)
@@ -57,5 +57,15 @@
</config-factory>
</action>
</extension>
-
+ <extension
point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <supported>
+ <runtime-component
+ any="true">
+ </runtime-component>
+ <facet
+ id="jboss.gwt"
+ version="[1.3.3">
+ </facet>
+ </supported>
+ </extension>
</plugin>
Modified:
trunk/gwt/plugins/org.jboss.tools.gwt.core/src/org/jboss/tools/gwt/core/GWTInstallFacetDelegate.java
===================================================================
---
trunk/gwt/plugins/org.jboss.tools.gwt.core/src/org/jboss/tools/gwt/core/GWTInstallFacetDelegate.java 2010-09-02
16:44:36 UTC (rev 24669)
+++
trunk/gwt/plugins/org.jboss.tools.gwt.core/src/org/jboss/tools/gwt/core/GWTInstallFacetDelegate.java 2010-09-02
17:10:37 UTC (rev 24670)
@@ -67,8 +67,8 @@
addNature(javaProject, monitor);
addClasspathContainer(javaProject, monitor);
- IPath webContentPath = ProjectHome.getFirstWebContentPath(project);
-// IPath webContentPath =
ProjectUtils.getWebContentRootPath(javaProject.getProject());
+// IPath webContentPath = ProjectHome.getFirstWebContentPath(project);
+ IPath webContentPath = ProjectUtils.getWebContentRootPath(javaProject.getProject());
Assert.isTrue(webContentPath != null && !webContentPath.isEmpty(),
MessageFormat
.format("no web content folder was found in project {0}",
javaProject.getElementName()));
Modified:
trunk/gwt/plugins/org.jboss.tools.gwt.core/src/org/jboss/tools/gwt/core/util/ProjectUtils.java
===================================================================
---
trunk/gwt/plugins/org.jboss.tools.gwt.core/src/org/jboss/tools/gwt/core/util/ProjectUtils.java 2010-09-02
16:44:36 UTC (rev 24669)
+++
trunk/gwt/plugins/org.jboss.tools.gwt.core/src/org/jboss/tools/gwt/core/util/ProjectUtils.java 2010-09-02
17:10:37 UTC (rev 24670)
@@ -81,27 +81,27 @@
javaProject.setRawClasspath(newClasspath, monitor);
}
-// /**
-// * Returns the path of the web content folder in the given project. The path
-// * returned is relative to the workspace.
-// *
-// * @param project
-// * the project to return the web content folder for
-// * @return the path of the web content folder (relative to the workspace)
-// */
-// public static IPath getWebContentRootPath(IProject project) {
-// if (!ModuleCoreNature.isFlexibleProject(project)) {
-// return project.getFullPath();
-// }
-// IPath path = null;
-// IVirtualComponent component = ComponentCore.createComponent(project);
-// if (component != null && component.exists()) {
-// path = component.getRootFolder().getWorkspaceRelativePath();
-// } else {
-// path = project.getFullPath();
-// }
-// return path;
-// }
+ /**
+ * Returns the path of the web content folder in the given project. The path
+ * returned is relative to the workspace.
+ *
+ * @param project
+ * the project to return the web content folder for
+ * @return the path of the web content folder (relative to the workspace)
+ */
+ public static IPath getWebContentRootPath(IProject project) {
+ if (!ModuleCoreNature.isFlexibleProject(project)) {
+ return project.getFullPath();
+ }
+ IPath path = null;
+ IVirtualComponent component = ComponentCore.createComponent(project);
+ if (component != null && component.exists()) {
+ path = component.getRootFolder().getWorkspaceRelativePath();
+ } else {
+ path = project.getFullPath();
+ }
+ return path;
+ }
/**
* Unzips the given ZipInputStream to the given folder.
Show replies by date