Author: rob.stryker(a)jboss.com
Date: 2010-01-11 15:11:23 -0500 (Mon, 11 Jan 2010)
New Revision: 19699
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IWTPConstants.java
Log:
JBIDE-4889 - allowing server provided runtimes for jpa and jsf facets
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2010-01-11
20:04:53 UTC (rev 19698)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2010-01-11
20:11:23 UTC (rev 19699)
@@ -66,7 +66,7 @@
IClasspathEntry[] entries =
new WebtoolsProjectJBossClasspathContainer(path).getClasspathEntries();
return Arrays.asList(entries);
- } else if( isPrimaryFacet(fv.getProjectFacet())) {
+ } else if( isPrimaryFacet(fv.getProjectFacet()) ||
isSecondaryFacet(fv.getProjectFacet())) {
String id = rc.getProperty("id"); //$NON-NLS-1$
IPath containerPath = new
Path("org.eclipse.jst.server.core.container").append("org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget");
//$NON-NLS-1$ //$NON-NLS-2$
path = containerPath.append(id);
@@ -89,6 +89,13 @@
|| facet.equals(del.APP_CLIENT_FACET);
}
+ // Also a bad name, but facets the server automatically knows
+ // how to provide classpath entries for
+ protected boolean isSecondaryFacet(IProjectFacet facet) {
+ WebtoolsProjectJBossClasspathContainerInitializer del = new
WebtoolsProjectJBossClasspathContainerInitializer();
+ return facet.equals(del.JSF_FACET) || facet.equals(del.JPA_FACET);
+ }
+
public static final class Factory implements IAdapterFactory {
private static final Class[] ADAPTER_TYPES = { IClasspathProvider.class };
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java 2010-01-11
20:04:53 UTC (rev 19698)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java 2010-01-11
20:11:23 UTC (rev 19699)
@@ -56,7 +56,10 @@
public static final IProjectFacet CONNECTOR_FACET =
ProjectFacetsManager.getProjectFacet(FACET_CONNECTOR);
public static final IProjectFacet APP_CLIENT_FACET =
ProjectFacetsManager.getProjectFacet(FACET_APP_CLIENT);
+ public static final IProjectFacet JSF_FACET =
ProjectFacetsManager.getProjectFacet(FACET_JSF);
+ public static final IProjectFacet JPA_FACET =
ProjectFacetsManager.getProjectFacet(FACET_JPA);
+
public WebtoolsProjectJBossClasspathContainerInitializer() {
// TODO Auto-generated constructor stub
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IWTPConstants.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IWTPConstants.java 2010-01-11
20:04:53 UTC (rev 19698)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IWTPConstants.java 2010-01-11
20:11:23 UTC (rev 19699)
@@ -21,11 +21,13 @@
public static final String FACET_APP_CLIENT = "jst.appclient";//$NON-NLS-1$
public static final String FACET_ESB = "jst.jboss.esb";//$NON-NLS-1$
+ public static final String FACET_JSF = "jst.jsf"; //$NON-NLS-1$
+ public static final String FACET_JPA = "jpt.jpa"; //$NON-NLS-1$
+
public static final String EXT_JAR = ".jar"; //$NON-NLS-1$
public static final String EXT_ESB = ".esb"; //$NON-NLS-1$
public static final String EXT_RAR = ".rar"; //$NON-NLS-1$
public static final String EXT_WAR = ".war"; //$NON-NLS-1$
public static final String EXT_EAR = ".ear"; //$NON-NLS-1$
public static final String EXT_XML = ".xml"; //$NON-NLS-1$
-
}
Show replies by date