JBoss Tools SVN: r32810 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-11 08:05:48 -0400 (Mon, 11 Jul 2011)
New Revision: 32810
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java
Log:
[JBIDE-9215] added #getModulesPath()
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java 2011-07-11 11:58:39 UTC (rev 32809)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java 2011-07-11 12:05:48 UTC (rev 32810)
@@ -127,9 +127,12 @@
}
public static IRuntimeClasspathEntry getModulesClasspathEntry(IServer server) throws CoreException {
+ return JavaRuntime.newArchiveRuntimeClasspathEntry(getModulesPath(server));
+ }
+
+ public static IPath getModulesPath(IServer server) throws CoreException {
IPath runtimeLocation = server.getRuntime().getLocation();
- IPath modulesLocation = runtimeLocation.append(IJBossRuntimeResourceConstants.JBOSS7_MODULES_JAR);
- return JavaRuntime.newArchiveRuntimeClasspathEntry(modulesLocation);
+ return runtimeLocation.append(IJBossRuntimeResourceConstants.JBOSS7_MODULES_JAR);
}
public static void addDirectory(String serverHome, List<IRuntimeClasspathEntry> classpath, String dirName) {
14 years, 9 months
JBoss Tools SVN: r32809 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-11 07:58:39 -0400 (Mon, 11 Jul 2011)
New Revision: 32809
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/JBoss7RuntimeClasspathUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java
Log:
[JBIDE-9215] renamed IJBossRuntimeResourceConstants.JBOSS_MODULES_JAR to IJBossRuntimeResourceConstants.JBOSS7_MODULES_JAR
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java 2011-07-11 10:21:13 UTC (rev 32808)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java 2011-07-11 11:58:39 UTC (rev 32809)
@@ -46,7 +46,7 @@
public static final String START_JAR = "run.jar"; //$NON-NLS-1$
public static final String START_JAR_LOC = BIN + Path.SEPARATOR + START_JAR;
public static final String TOOLS_JAR = "tools.jar"; //$NON-NLS-1$
- public static final String JBOSS_MODULES_JAR = "jboss-modules.jar"; //$NON-NLS-1$
+ public static final String JBOSS7_MODULES_JAR = "jboss-modules.jar"; //$NON-NLS-1$
public static final String LOGGING_PROPERTIES = "logging.properties"; //$NON-NLS-1$
public static final String JSF_LIB = "jsf-libs"; //$NON-NLS-1$
public static final String JBOSSWEB_TOMCAT55_SAR = "jbossweb-tomcat55.sar"; //$NON-NLS-1$
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/JBoss7RuntimeClasspathUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/JBoss7RuntimeClasspathUtil.java 2011-07-11 10:21:13 UTC (rev 32808)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/JBoss7RuntimeClasspathUtil.java 2011-07-11 11:58:39 UTC (rev 32809)
@@ -36,7 +36,7 @@
@Deprecated
public static IRuntimeClasspathEntry getModulesClasspathEntry(IServer server) throws CoreException {
IPath runtimeLocation = server.getRuntime().getLocation();
- IPath modulesLocation = runtimeLocation.append(IJBossRuntimeResourceConstants.JBOSS_MODULES_JAR);
+ IPath modulesLocation = runtimeLocation.append(IJBossRuntimeResourceConstants.JBOSS7_MODULES_JAR);
return JavaRuntime.newArchiveRuntimeClasspathEntry(modulesLocation);
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java 2011-07-11 10:21:13 UTC (rev 32808)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java 2011-07-11 11:58:39 UTC (rev 32809)
@@ -74,7 +74,29 @@
addCPEntry(serverHome.append(relative), list);
}
- public static List<String> toStrings(List<IRuntimeClasspathEntry> cp) {
+ public static List<String> toStrings(List<?> cp) {
+ Iterator<?> cpi = cp.iterator();
+ ArrayList<String> list = new ArrayList<String>();
+ while (cpi.hasNext()) {
+ Object entry = cpi.next();
+ if (entry instanceof IRuntimeClasspathEntry) {
+ try {
+ list.add(((IRuntimeClasspathEntry) entry).getMemento());
+ } catch (Exception e) {
+ // Trace.trace(Trace.SEVERE, "Could not resolve classpath entry:
+ // " + entry, e);
+ }
+ } else if (entry instanceof String) {
+ list.add((String) entry);
+ } else if (entry != null){
+ list.add(entry.toString());
+ }
+ }
+
+ return list;
+ }
+
+ public static List<String> toString(List<IRuntimeClasspathEntry> cp) {
Iterator<IRuntimeClasspathEntry> cpi = cp.iterator();
ArrayList<String> list = new ArrayList<String>();
while (cpi.hasNext()) {
@@ -106,7 +128,7 @@
public static IRuntimeClasspathEntry getModulesClasspathEntry(IServer server) throws CoreException {
IPath runtimeLocation = server.getRuntime().getLocation();
- IPath modulesLocation = runtimeLocation.append(IJBossRuntimeResourceConstants.JBOSS_MODULES_JAR);
+ IPath modulesLocation = runtimeLocation.append(IJBossRuntimeResourceConstants.JBOSS7_MODULES_JAR);
return JavaRuntime.newArchiveRuntimeClasspathEntry(modulesLocation);
}
14 years, 9 months
JBoss Tools SVN: r32808 - in trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core: src/org/jboss/ide/eclipse/as/classpath/core/ejb3 and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-07-11 06:21:13 -0400 (Mon, 11 Jul 2011)
New Revision: 32808
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
Log:
JBIDE-9324 removal of unneeded class, cleanup, removal of warnings
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/plugin.xml 2011-07-11 10:20:00 UTC (rev 32807)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/plugin.xml 2011-07-11 10:21:13 UTC (rev 32808)
@@ -115,19 +115,8 @@
<factory class="org.jboss.ide.eclipse.as.classpath.core.runtime.ProjectRuntimeClasspathProvider$Factory"/>
<type class="org.eclipse.jst.common.project.facet.core.IClasspathProvider"/>
</adapter>
-
-
</extension>
-
- <extension
- point="org.eclipse.jdt.core.classpathContainerInitializer">
- <classpathContainerInitializer
- class="org.jboss.ide.eclipse.as.classpath.core.runtime.WebtoolsProjectJBossClasspathContainerInitializer"
- id="org.jboss.ide.eclipse.as.classpath.core.runtime.ProjectInitializer"/>
- </extension>
-
-
-
+
<extension point="org.eclipse.jst.server.core.runtimeClasspathProviders">
<runtimeClasspathProvider
id="org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget"
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java 2011-07-11 10:20:00 UTC (rev 32807)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java 2011-07-11 10:21:13 UTC (rev 32808)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
+ * Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -11,11 +11,10 @@
package org.jboss.ide.eclipse.as.classpath.core.ejb3;
+import java.io.FileNotFoundException;
+
import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.wst.server.core.IRuntime;
-import org.jboss.ide.eclipse.as.classpath.core.runtime.WebtoolsProjectJBossClasspathContainerInitializer.WebtoolsProjectJBossClasspathContainer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
@@ -34,26 +33,24 @@
}
public static boolean verify(IRuntime rt) {
+ IJBossServerRuntime jbRuntime = (IJBossServerRuntime)rt.loadAdapter(IJBossServerRuntime.class, null);
+ if( jbRuntime == null )
+ return false;
if( definitelySupports(rt))
return true;
-
- IJBossServerRuntime ajbsr = (IJBossServerRuntime)rt.loadAdapter(IJBossServerRuntime.class, null);
- // i refuse to verify. if they say they support, believe them
- if( ajbsr == null ) return true;
+ if( rt.getRuntimeType().getVersion().equals(IJBossToolingConstants.V3_2))
+ return false;
- // one of ours. verify
- IPath path = new Path("org.jboss.ide.eclipse.as.core.runtime.ProjectInitializer"); //$NON-NLS-1$
- path = path.append(rt.getId()).append("jst.ejb").append("3.0"); //$NON-NLS-1$ //$NON-NLS-2$
-
- WebtoolsProjectJBossClasspathContainer container =
- new WebtoolsProjectJBossClasspathContainer(path);
- IClasspathEntry[] entries = container.getClasspathEntries();
- if( entries.length == 0 ) return false;
- IPath p;
- for( int i = 0; i < entries.length; i++ ) {
- p = entries[i].getPath();
- if( !p.toFile().exists())
- return false;
+ IPath serverHome = rt.getLocation();
+ IPath configPath = jbRuntime.getConfigurationFullPath();
+
+ try {
+ if( rt.getRuntimeType().getVersion().equals(IJBossToolingConstants.V4_0))
+ EJB3ClasspathContainer.get40Jars(serverHome, configPath);
+ else if( rt.getRuntimeType().getVersion().equals(IJBossToolingConstants.V4_2))
+ EJB3ClasspathContainer.get42Jars(serverHome, configPath);
+ } catch(FileNotFoundException fnfe) {
+ return false;
}
return true;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java 2011-07-11 10:20:00 UTC (rev 32807)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java 2011-07-11 10:21:13 UTC (rev 32808)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
+ * Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -119,8 +119,8 @@
return new IClasspathEntry[]{};
}
- protected static IClasspathEntry[] get40Jars(IPath homePath, IPath configPath) throws FileNotFoundException {
- ArrayList list = new ArrayList();
+ public static IClasspathEntry[] get40Jars(IPath homePath, IPath configPath) throws FileNotFoundException {
+ ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
// path roots
IPath deploy = configPath.append(DEPLOY);
@@ -141,8 +141,8 @@
return (IClasspathEntry[]) list.toArray(new IClasspathEntry[list.size()]);
}
- protected static IClasspathEntry[] get42Jars(IPath homePath, IPath configPath) throws FileNotFoundException {
- ArrayList list = new ArrayList();
+ public static IClasspathEntry[] get42Jars(IPath homePath, IPath configPath) throws FileNotFoundException {
+ ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
// path roots
IPath deploy = configPath.append(DEPLOY);
@@ -213,7 +213,6 @@
}
protected static IClasspathEntry getEntry(IPath path) throws FileNotFoundException {
- System.out.println("ls " + path.toOSString().substring(45)); //$NON-NLS-1$
if( !path.toFile().exists())
throw new FileNotFoundException();
return JavaRuntime.newArchiveRuntimeClasspathEntry(path).getClasspathEntry();
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 2011-07-11 10:20:00 UTC (rev 32807)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2011-07-11 10:21:13 UTC (rev 32808)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
+ * Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -11,7 +11,7 @@
package org.jboss.ide.eclipse.as.classpath.core.runtime;
-import java.text.MessageFormat;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -27,6 +27,8 @@
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jst.common.project.facet.core.IClasspathProvider;
import org.eclipse.jst.common.project.facet.core.JavaFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
@@ -36,7 +38,8 @@
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.ide.eclipse.as.classpath.core.ClasspathCorePlugin;
import org.jboss.ide.eclipse.as.classpath.core.Messages;
-import org.jboss.ide.eclipse.as.classpath.core.runtime.WebtoolsProjectJBossClasspathContainerInitializer.WebtoolsProjectJBossClasspathContainer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.util.IWTPConstants;
/**
* This class acts as a front to add whatever entries are available
@@ -46,7 +49,6 @@
*
*/
public class ProjectRuntimeClasspathProvider implements IClasspathProvider {
- public static final String CONTAINER_ID = "org.jboss.ide.eclipse.as.classpath.core.runtime.ProjectInitializer"; //$NON-NLS-1$
private IRuntimeComponent rc;
public ProjectRuntimeClasspathProvider() {
@@ -56,43 +58,59 @@
this.rc = rc;
}
- public List getClasspathEntries(final IProjectFacetVersion fv) {
- IPath path = null;
+ public List<IClasspathEntry> getClasspathEntries(final IProjectFacetVersion fv) {
if( fv.getProjectFacet().equals(JavaFacet.FACET)) {
- path = new Path(CONTAINER_ID);
- path = path.append(rc.getProperty("id")); //$NON-NLS-1$
- path = path.append(fv.getProjectFacet().getId());
- path = path.append(fv.getVersionString());
- IClasspathEntry[] entries =
- new WebtoolsProjectJBossClasspathContainer(path).getClasspathEntries();
- return Arrays.asList(entries);
+ return getJavaClasspathEntries();
} 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);
+ return getClientAllClasspathEntry();
}
- if( path != null ) {
- IClasspathEntry cpentry = JavaCore.newContainerEntry(path);
- return Collections.singletonList(cpentry);
- }
return Collections.emptyList();
}
+ private List<IClasspathEntry> getJavaClasspathEntries() {
+ String runtimeId = rc.getProperty("id"); //$NON-NLS-1$
+ if( runtimeId != null ) {
+ IRuntime runtime = ServerCore.findRuntime(runtimeId);
+ if( runtime != null ) {
+ IJBossServerRuntime jbsRuntime = (IJBossServerRuntime)runtime.loadAdapter(IJBossServerRuntime.class, null);
+ IVMInstall vmInstall = jbsRuntime.getVM();
+ if (vmInstall != null) {
+ String name = vmInstall.getName();
+ String typeId = vmInstall.getVMInstallType().getId();
+ IClasspathEntry[] entries = new IClasspathEntry[] {
+ JavaCore.newContainerEntry(new Path(JavaRuntime.JRE_CONTAINER)
+ .append(typeId).append(name))
+ };
+ return Arrays.asList(entries);
+ }
+ }
+ }
+ return new ArrayList<IClasspathEntry>();
+ }
+
+ private List<IClasspathEntry> getClientAllClasspathEntry() {
+ String id = rc.getProperty("id"); //$NON-NLS-1$
+ IPath containerPath = new Path("org.eclipse.jst.server.core.container") //$NON-NLS-1$
+ .append("org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget"); //$NON-NLS-1$
+ IClasspathEntry cpentry = JavaCore.newContainerEntry(containerPath.append(id));
+ return Collections.singletonList(cpentry);
+ }
+
// Bad name, I know, but checks if this is
// an ear, war, ejb, or other top level facet
protected boolean isPrimaryFacet(IProjectFacet facet) {
- return facet.getId().equals(WebtoolsProjectJBossClasspathContainerInitializer.FACET_WEB)
- || facet.getId().equals(WebtoolsProjectJBossClasspathContainerInitializer.FACET_EJB)
- || facet.getId().equals(WebtoolsProjectJBossClasspathContainerInitializer.FACET_EAR)
- || facet.getId().equals(WebtoolsProjectJBossClasspathContainerInitializer.FACET_CONNECTOR)
- || facet.getId().equals(WebtoolsProjectJBossClasspathContainerInitializer.FACET_APP_CLIENT);
+ return facet.getId().equals(IWTPConstants.FACET_WEB)
+ || facet.getId().equals(IWTPConstants.FACET_EJB)
+ || facet.getId().equals(IWTPConstants.FACET_EAR)
+ || facet.getId().equals(IWTPConstants.FACET_CONNECTOR)
+ || facet.getId().equals(IWTPConstants.FACET_APP_CLIENT);
}
// Also a bad name, but facets the server automatically knows
// how to provide classpath entries for
protected boolean isSecondaryFacet(IProjectFacet facet) {
- return facet.getId().equals(WebtoolsProjectJBossClasspathContainerInitializer.FACET_JSF)
- || facet.getId().equals(WebtoolsProjectJBossClasspathContainerInitializer.FACET_JPA);
+ return facet.getId().equals(IWTPConstants.FACET_JSF)
+ || facet.getId().equals(IWTPConstants.FACET_JPA);
}
public static final class Factory implements IAdapterFactory {
@@ -128,10 +146,8 @@
if( rt == null )
throw new CoreException(
new Status( IStatus.ERROR, ClasspathCorePlugin.PLUGIN_ID,
- MessageFormat
- .format(
- Messages.ProjectRuntimeClasspathProvider_runtime_does_not_exist,
- path.segment(1))));
+ Messages.bind(Messages.ProjectRuntimeClasspathProvider_runtime_does_not_exist,
+ path.segment(1))));
}
public IClasspathEntry[] getClasspathEntries() {
@@ -139,7 +155,7 @@
}
public String getDescription() {
- return MessageFormat.format(Messages.ProjectRuntimeClasspathProvider_all_jboss_libraries_description, (rt == null ? "null" : rt.getName())); //$NON-NLS-1$
+ return Messages.bind(Messages.ProjectRuntimeClasspathProvider_all_jboss_libraries_description, (rt == null ? "null" : rt.getName())); //$NON-NLS-1$
}
public int getKind() {
Deleted: 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 2011-07-11 10:20:00 UTC (rev 32807)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java 2011-07-11 10:21:13 UTC (rev 32808)
@@ -1,297 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.ide.eclipse.as.classpath.core.runtime;
-
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.ClasspathContainerInitializer;
-import org.eclipse.jdt.core.IClasspathContainer;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jst.common.project.facet.core.JavaFacet;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.ServerCore;
-import org.jboss.ide.eclipse.as.classpath.core.ClasspathConstants;
-import org.jboss.ide.eclipse.as.classpath.core.Messages;
-import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
-
-/**
- * This is a class that would ultimately try to respond to different facets
- * by providing different jars to the classpath, jars specific to the added
- * facet.
- *
- * It is currently only used by the EJB30SupportVerifier, or by
- * the ProjectRuntimeClasspathProvider (front) when the added facet
- * is jst.java.
- *
- * @author Rob Stryker
- *
- */
-public class WebtoolsProjectJBossClasspathContainerInitializer extends
- ClasspathContainerInitializer implements ClasspathConstants {
- public static IProjectFacet getSafeFacet(String id) {
- return ProjectFacetsManager.isProjectFacetDefined(id) ? ProjectFacetsManager.getProjectFacet(id) : null;
- }
-
-// @Deprecated public static final IProjectFacet WEB_FACET = getSafeFacet(FACET_WEB);
-// @Deprecated public static final IProjectFacet EJB_FACET = getSafeFacet(FACET_EJB);
-// @Deprecated public static final IProjectFacet EAR_FACET = getSafeFacet(FACET_EAR);
-// @Deprecated public static final IProjectFacet UTILITY_FACET = getSafeFacet(FACET_UTILITY);
-// @Deprecated public static final IProjectFacet CONNECTOR_FACET = getSafeFacet(FACET_CONNECTOR);
-// @Deprecated public static final IProjectFacet APP_CLIENT_FACET = getSafeFacet(FACET_APP_CLIENT);
-//
-// @Deprecated public static final IProjectFacet JSF_FACET = getSafeFacet(FACET_JSF);
-// @Deprecated public static final IProjectFacet JPA_FACET = getSafeFacet(FACET_JPA);
-
-
- public WebtoolsProjectJBossClasspathContainerInitializer() {
- // TODO Auto-generated constructor stub
- }
-
- public void initialize(IPath containerPath, IJavaProject project)
- throws CoreException {
- WebtoolsProjectJBossClasspathContainer container = new WebtoolsProjectJBossClasspathContainer(containerPath);
-
- JavaCore.setClasspathContainer(containerPath,
- new IJavaProject[] {project}, new IClasspathContainer[] {container}, null);
- }
-
- public IClasspathEntry[] getEntries(IPath path) {
- return new WebtoolsProjectJBossClasspathContainer(path).getClasspathEntries();
- }
-
-
-
-
- public static class WebtoolsProjectJBossClasspathContainer implements IClasspathContainer {
- private IPath path;
- private IClasspathEntry[] entries = null;
-
- public WebtoolsProjectJBossClasspathContainer(IPath path) {
- this.path = path;
- }
-
- public String getDescription() {
- if( path.segmentCount() < 4 ) return Messages.WebtoolsProjectJBossClasspathContainerInitializer_jboss_runtimes;
- String pathSegments = path.segment(2) + " : " + path.segment(3); //$NON-NLS-1$
- return MessageFormat.format(Messages.WebtoolsProjectJBossClasspathContainerInitializer_jboss_runtimes_path, pathSegments);
- }
-
- public int getKind() {
- return IClasspathContainer.K_APPLICATION;
- }
-
- public IPath getPath() {
- return path;
- }
-
-
-
- public IClasspathEntry[] getClasspathEntries() {
- if( entries == null ) {
- loadClasspathEntries();
- if( entries == null )
- return new IClasspathEntry[0];
- }
- return entries;
- }
-
- private void loadClasspathEntries() {
- if( path.segmentCount() < 4 ) return;
- String runtimeId = path.segment(1);
- String facetId = path.segment(2);
- String facetVersion = path.segment(3);
-
-
- if( runtimeId == null ) return;
-
- IRuntime runtime = ServerCore.findRuntime(runtimeId);
- if( runtime == null ) return;
-
- IJBossServerRuntime jbRuntime = (IJBossServerRuntime)runtime.loadAdapter(IJBossServerRuntime.class, null);
-
- if( jbRuntime != null ) {
-
- String serverHome = runtime.getLocation().toOSString();
- String configName = jbRuntime.getJBossConfiguration();
-
- String jbossVersion = jbRuntime.getRuntime().getRuntimeType().getVersion();
-
- entries = loadClasspathEntries2(runtimeId, facetId, facetVersion,
- serverHome, configName, jbossVersion, jbRuntime);
- }
- }
-
- protected IClasspathEntry[] loadClasspathEntries2(String runtimeId, String facetId,
- String facetVersion, String serverHome, String configName, String jbVersion,
- IJBossServerRuntime jbsRuntime) {
- if( ProjectFacetsManager.getProjectFacet(facetId).equals(JavaFacet.FACET)) {
- return loadJREClasspathEntries(jbsRuntime);
- } else if(V5_0.equals(jbVersion)) {
- return loadClasspathEntriesDefault(facetId, facetVersion, serverHome, configName);
- } else if( V4_2.equals(jbVersion)) {
- return loadClasspathEntries42(facetId, facetVersion, serverHome, configName);
- } else if( V4_0.equals(jbVersion)) {
- return loadClasspathEntries40(facetId, facetVersion, serverHome, configName);
- } else if( V3_2.equals(jbVersion))
- return loadClasspathEntries32( facetId, facetVersion, serverHome, configName);
- return loadClasspathEntriesDefault(facetId, facetVersion, serverHome, configName);
- }
-
- protected boolean isEjb30(String facetId, String facetVersion) {
- if( facetId.equals(FACET_EJB) && facetVersion.equals(V3_0))
- return true;
- return false;
- }
-
- protected IClasspathEntry getEntry(IPath path) {
- return JavaRuntime.newArchiveRuntimeClasspathEntry(path).getClasspathEntry();
- }
- protected IClasspathEntry[] getEntries(IPath folder) {
- String[] files = folder.toFile().list();
- ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
- for( int i = 0; i < files.length; i++ ) {
- if( files[i].endsWith(EXT_JAR)) {
- list.add(getEntry(folder.append(files[i])));
- }
- }
- return list.toArray(new IClasspathEntry[list.size()]);
- }
- protected IClasspathEntry[] loadJREClasspathEntries(IJBossServerRuntime jbsRuntime) {
- IVMInstall vmInstall = jbsRuntime.getVM();
- if (vmInstall != null) {
- String name = vmInstall.getName();
- String typeId = vmInstall.getVMInstallType().getId();
- return new IClasspathEntry[] { JavaCore.newContainerEntry(new Path(JavaRuntime.JRE_CONTAINER).append(typeId).append(name)) };
- }
- return null;
- }
-
- protected IClasspathEntry[] loadClasspathEntries42(String facetId, String facetVersion, String serverHome, String configName) {
- IPath homePath = new Path(serverHome);
- IPath configPath = homePath.append(SERVER).append(configName);
- ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
- if (facetId.equals(FACET_WEB)) {
- IPath jsfDir = configPath.append(DEPLOY).append(JBOSS_WEB_DEPLOYER).append(JSF_LIB);
- list.add(getEntry(configPath.append(LIB).append(JSP_API_JAR)));
- list.add(getEntry(homePath.append(CLIENT).append(SERVLET_API_JAR)));
- list.add(getEntry(jsfDir.append(JSF_API_JAR)));
- list.add(getEntry(jsfDir.append(JSF_IMPL_JAR)));
- } else if( facetId.equals(FACET_EJB) && !isEjb30(facetId, facetVersion)) {
- list.add(getEntry(homePath.append(CLIENT).append(JBOSS_J2EE_JAR)));
- } else if( isEjb30(facetId, facetVersion)) {
- // path roots
- IPath deploy = configPath.append(DEPLOY);
- IPath deployer = deploy.append(EJB3_DEPLOYER);
- IPath aopDeployer = deploy.append(AOP_JDK5_DEPLOYER);
- IPath client = homePath.append(CLIENT);
-
- list.add(getEntry(configPath.append(LIB).append(JBOSS_EJB3X_JAR)));
- list.add(getEntry(deployer.append(JBOSS_EJB3_JAR)));
- list.add(getEntry(deployer.append(JBOSS_ANNOTATIONS_EJB3_JAR)));
-
- // aop
- list.add(getEntry(aopDeployer.append(AOP_JDK5_DEPLOYER)));
- list.add(getEntry(aopDeployer.append(JBOSS_ASPECT_LIBRARY_JDK5_0)));
-
- // hibernate
- list.add(getEntry(homePath.append(CLIENT).append(HIBERNATE_CLIENT_JAR)));
-
- // persistence jar
- list.add(getEntry(client.append(EJB3_PERSISTENCE_JAR)));
-
- } else if( facetId.equals(FACET_EAR)) {
- list.add(getEntry(homePath.append(CLIENT).append(JBOSS_J2EE_JAR)));
- } else if( facetId.equals(FACET_APP_CLIENT)) {
- list.add(getEntry(homePath.append(CLIENT).append(JBOSSALL_CLIENT_JAR)));
- }
- return list.toArray(new IClasspathEntry[list.size()]);
- }
-
- protected IClasspathEntry[] loadClasspathEntries40(String facetId, String facetVersion, String serverHome, String configName) {
- IPath homePath = new Path(serverHome);
- IPath configPath = homePath.append(SERVER).append(configName);
- ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
- if (facetId.equals(FACET_WEB)) {
- IPath jsfDir = configPath.append(DEPLOY).append(JBOSSWEB_TOMCAT55_SAR).append(JSF_LIB);
- list.add(getEntry(configPath.append(LIB).append(JAVAX_SERVLET_JSP_JAR)));
- list.add(getEntry(homePath.append(CLIENT).append(JAVAX_SERVLET_JAR)));
- list.addAll(Arrays.asList(getEntries(jsfDir)));
- } else if( facetId.equals(FACET_EJB) && !isEjb30(facetId, facetVersion)) {
- list.add(getEntry(homePath.append(CLIENT).append(JBOSS_J2EE_JAR)));
- } else if( isEjb30(facetId, facetVersion)) {
- // path roots
- IPath deploy = configPath.append(DEPLOY);
- IPath deployer = deploy.append(EJB3_DEPLOYER);
- IPath aopDeployer = deploy.append(AOP_JDK5_DEPLOYER);
-
- // ejb3
- list.add(getEntry(deployer.append(JBOSS_EJB3X_JAR)));
- list.add(getEntry(deployer.append(JBOSS_EJB3_JAR)));
- list.add(getEntry(deployer.append(JBOSS_ANNOTATIONS_EJB3_JAR)));
-
- // aop
- list.add(getEntry(aopDeployer.append(JBOSS_AOP_JDK5_JAR)));
- list.add(getEntry(aopDeployer.append(JBOSS_ASPECT_LIBRARY_JDK5_0)));
-
- // hibernate
- list.add(getEntry(homePath.append(CLIENT).append(HIBERNATE_CLIENT_JAR)));
-
- } else if( facetId.equals(FACET_EAR)) {
- list.add(getEntry(homePath.append(CLIENT).append(JBOSS_J2EE_JAR)));
- } else if( facetId.equals(FACET_APP_CLIENT)) {
- list.add(JavaRuntime.newArchiveRuntimeClasspathEntry(homePath.append(CLIENT).append(JBOSSALL_CLIENT_JAR)).getClasspathEntry());
- }
- return list.toArray(new IClasspathEntry[list.size()]);
- }
-
-
- protected IClasspathEntry[] loadClasspathEntries32(String facetId, String facetVersion, String serverHome, String configName) {
- IPath homePath = new Path(serverHome);
- IPath configPath = homePath.append(SERVER).append(configName);
- ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
- if (facetId.equals(FACET_WEB)) {
- IPath p = configPath.append(DEPLOY).append(JBOSSWEB_TOMCAT_50_SAR);
- list.add(getEntry(p.append(JSP_API_JAR)));
- list.add(getEntry(p.append(SERVLET_API_JAR)));
- } else if( (facetId.equals(FACET_EJB) && !isEjb30(facetId, facetVersion))
- || facetId.equals(FACET_EAR) ) {
- list.add(getEntry(homePath.append(CLIENT).append(JBOSS_J2EE_JAR)));
- } else if( facetId.equals(FACET_APP_CLIENT)) {
- list.add(getEntry(homePath.append(CLIENT).append(JBOSSALL_CLIENT_JAR)));
- }
- return list.toArray(new IClasspathEntry[list.size()]);
- }
- protected IClasspathEntry[] loadClasspathEntriesDefault(String facetId, String facetVersion, String serverHome, String configName) {
- return new IClasspathEntry[0];
- }
-
- protected IClasspathEntry[] pathsAsEntries(IPath[] paths) {
- IClasspathEntry[] entries = new IClasspathEntry[paths.length];
- for( int i = 0; i < paths.length; i++ )
- entries[i] = getEntry(paths[i]);
- return entries;
- }
-
- }
-
-}
14 years, 9 months
JBoss Tools SVN: r32807 - workspace/grid/bpel-examples.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-07-11 06:20:00 -0400 (Mon, 11 Jul 2011)
New Revision: 32807
Modified:
workspace/grid/bpel-examples/HelloWorld.zip
Log:
JBIDE-9304: cleanup the bpel examples
Modified: workspace/grid/bpel-examples/HelloWorld.zip
===================================================================
(Binary files differ)
14 years, 9 months
JBoss Tools SVN: r32806 - workspace/grid/bpel-examples.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-07-11 06:18:05 -0400 (Mon, 11 Jul 2011)
New Revision: 32806
Modified:
workspace/grid/bpel-examples/HelloWorld.zip
Log:
JBIDE-9304: cleanup the bpel examples
Modified: workspace/grid/bpel-examples/HelloWorld.zip
===================================================================
(Binary files differ)
14 years, 9 months
JBoss Tools SVN: r32805 - trunk/maven/plugins/org.jboss.tools.maven.ui.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2011-07-11 06:10:53 -0400 (Mon, 11 Jul 2011)
New Revision: 32805
Modified:
trunk/maven/plugins/org.jboss.tools.maven.ui/plugin.xml
Log:
JBIDE-8969 : new key binding to open the profile selection : Ctrl+Alt+P, to avoid conflict with other m2e key binding (Shift+Ctrl+P = add Maven plugin)
Modified: trunk/maven/plugins/org.jboss.tools.maven.ui/plugin.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.ui/plugin.xml 2011-07-11 10:10:43 UTC (rev 32804)
+++ trunk/maven/plugins/org.jboss.tools.maven.ui/plugin.xml 2011-07-11 10:10:53 UTC (rev 32805)
@@ -56,7 +56,7 @@
commandId="org.jboss.tools.maven.ui.commands.selectMavenProfileCommand"
contextId="org.eclipse.ui.contexts.window"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Ctrl+Shift+P">
+ sequence="Ctrl+Alt+P">
</key>
</extension>
14 years, 9 months
JBoss Tools SVN: r32804 - workspace/grid/bpel-examples.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-07-11 06:10:43 -0400 (Mon, 11 Jul 2011)
New Revision: 32804
Modified:
workspace/grid/bpel-examples/HelloWorld.zip
Log:
JBIDE-9304: cleanup the bpel examples
Modified: workspace/grid/bpel-examples/HelloWorld.zip
===================================================================
(Binary files differ)
14 years, 9 months
JBoss Tools SVN: r32803 - workspace/grid/bpel-examples.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-07-11 06:08:24 -0400 (Mon, 11 Jul 2011)
New Revision: 32803
Modified:
workspace/grid/bpel-examples/HelloWorld.zip
Log:
JBIDE-9304: cleanup the bpel examples
Modified: workspace/grid/bpel-examples/HelloWorld.zip
===================================================================
(Binary files differ)
14 years, 9 months
JBoss Tools SVN: r32802 - workspace/grid/bpel-examples.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-07-11 06:04:41 -0400 (Mon, 11 Jul 2011)
New Revision: 32802
Modified:
workspace/grid/bpel-examples/HelloWorld.zip
Log:
JBIDE-9304: cleanup the bpel examples
Modified: workspace/grid/bpel-examples/HelloWorld.zip
===================================================================
(Binary files differ)
14 years, 9 months
JBoss Tools SVN: r32801 - workspace/grid/bpel-examples.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-07-11 06:02:48 -0400 (Mon, 11 Jul 2011)
New Revision: 32801
Modified:
workspace/grid/bpel-examples/HelloWorld.zip
Log:
JBIDE-9304: cleanup the bpel examples
Modified: workspace/grid/bpel-examples/HelloWorld.zip
===================================================================
(Binary files differ)
14 years, 9 months