Author: adietish
Date: 2011-05-02 14:15:46 -0400 (Mon, 02 May 2011)
New Revision: 30999
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBossRuntimeClasspathUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBossRuntimeLaunchConfigBuilder.java
Log:
[JBIDE-8793] extracted methods to util class
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java 2011-05-02
18:10:44 UTC (rev 30998)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java 2011-05-02
18:15:46 UTC (rev 30999)
@@ -231,7 +231,7 @@
protected static IRuntimeClasspathEntry getRunJarRuntimeCPEntry(IServer server) throws
CoreException {
if (server.getServerType().getId().endsWith("70")) { //$NON-NLS-1$
- return JBossRuntimeClasspathUtil.getRunJarRuntimeCPEntry(server);
+ return JBossRuntimeClasspathUtil.getModulesClasspathEntry(server);
} else {
IPath containerPath = new Path(RunJarContainerWrapper.ID).append(server.getName());
return JavaRuntime.newRuntimeContainerClasspathEntry(containerPath,
IRuntimeClasspathEntry.USER_CLASSES);
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBossRuntimeClasspathUtil.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBossRuntimeClasspathUtil.java 2011-05-02
18:10:44 UTC (rev 30998)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBossRuntimeClasspathUtil.java 2011-05-02
18:15:46 UTC (rev 30999)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.core.server.internal.v7;
import java.util.ArrayList;
@@ -19,16 +29,17 @@
public static List<String> getClasspath(IServer server, IVMInstall vmInstall)
throws CoreException {
List<IRuntimeClasspathEntry> classpath = new
ArrayList<IRuntimeClasspathEntry>();
- classpath.add(getRunJarRuntimeCPEntry(server));
+ classpath.add(getModulesClasspathEntry(server));
AbstractJBossLaunchConfigType.addJREEntry(classpath, vmInstall);
List<String> runtimeClassPaths =
AbstractJBossLaunchConfigType.convertClasspath(classpath);
return runtimeClassPaths;
}
- public static IRuntimeClasspathEntry getRunJarRuntimeCPEntry(IServer server) throws
CoreException {
- IPath location = server.getRuntime().getLocation();
+ public static IRuntimeClasspathEntry getModulesClasspathEntry(IServer server) throws
CoreException {
+ IPath runtimeLocation = server.getRuntime().getLocation();
+ IPath modulesLocation = runtimeLocation.append(JBOSS_MODULES_JAR);
IClasspathEntry entry =
- JavaRuntime.newArchiveRuntimeClasspathEntry(location.append(JBOSS_MODULES_JAR)).getClasspathEntry();
+ JavaRuntime.newArchiveRuntimeClasspathEntry(modulesLocation).getClasspathEntry();
return new RuntimeClasspathEntry(entry);
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBossRuntimeLaunchConfigBuilder.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBossRuntimeLaunchConfigBuilder.java 2011-05-02
18:10:44 UTC (rev 30998)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBossRuntimeLaunchConfigBuilder.java 2011-05-02
18:15:46 UTC (rev 30999)
@@ -1,15 +1,21 @@
+/*******************************************************************************
+ * 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.core.server.internal.v7;
-import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.internal.launching.RuntimeClasspathEntry;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
import org.eclipse.jdt.launching.IVMInstall;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.wst.server.core.IRuntime;