Author: adietish
Date: 2011-06-28 06:49:28 -0400 (Tue, 28 Jun 2011)
New Revision: 32395
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7RuntimeLaunchConfigBuilder.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java
Log:
[JBIDE-9215] removed unneeded class and static constant
Deleted:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7RuntimeLaunchConfigBuilder.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7RuntimeLaunchConfigBuilder.java 2011-06-28
10:26:05 UTC (rev 32394)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7RuntimeLaunchConfigBuilder.java 2011-06-28
10:49:28 UTC (rev 32395)
@@ -1,91 +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.core.server.internal.v7;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
-import
org.jboss.ide.eclipse.as.core.server.internal.launch.AbstractJBossLaunchConfigType;
-import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
-import org.jboss.ide.eclipse.as.core.util.JBoss7RuntimeClasspathUtil;
-
-public class JBoss7RuntimeLaunchConfigBuilder {
-
- private ILaunchConfigurationWorkingCopy launchConfig;
- private IJBossServerRuntime jbossRuntime;
-
- public JBoss7RuntimeLaunchConfigBuilder(ILaunchConfigurationWorkingCopy launchConfig,
IJBossServerRuntime runtime) {
- this.launchConfig = launchConfig;
- this.jbossRuntime = runtime;
- }
-
- public JBoss7RuntimeLaunchConfigBuilder setVmContainer() {
- IVMInstall vmInstall = jbossRuntime.getVM();
- if (vmInstall != null) {
- setVmContainer(JavaRuntime.newJREContainerPath(vmInstall).toPortableString());
- }
- return this;
- }
-
- public JBoss7RuntimeLaunchConfigBuilder setVmContainer(String vmPath) {
- launchConfig.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, vmPath);
- return this;
- }
-
- public JBoss7RuntimeLaunchConfigBuilder setDefaultArguments() {
- launchConfig.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
- jbossRuntime.getDefaultRunArgs());
- launchConfig.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
- jbossRuntime.getDefaultRunVMArgs());
- return this;
- }
-
- public JBoss7RuntimeLaunchConfigBuilder setClassPath(IServer server) throws
CoreException {
- return setClassPath(JBoss7RuntimeClasspathUtil.getClasspath(server,
jbossRuntime.getVM()));
- }
-
- public JBoss7RuntimeLaunchConfigBuilder setClassPath(List<String> entries) throws
CoreException {
- launchConfig.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER,
- JBoss7ServerBehavior.DEFAULT_CP_PROVIDER_ID);
- launchConfig.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, entries);
- launchConfig.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH,
false);
- return this;
- }
-
- public JBoss7RuntimeLaunchConfigBuilder setMainType(String mainType) {
- launchConfig.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, mainType);
- return this;
- }
-
- public JBoss7RuntimeLaunchConfigBuilder setWorkingDirectory(IRuntime runtime) {
- setWorkingDirectory(runtime.getLocation().append(IJBossRuntimeResourceConstants.BIN).toString());
- return this;
- }
-
- public JBoss7RuntimeLaunchConfigBuilder setWorkingDirectory(String directory) {
- launchConfig.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, directory);
- return this;
- }
-
- public void setServerId(IServer server) {
- launchConfig.setAttribute(AbstractJBossLaunchConfigType.SERVER_ID, server.getId());
- }
-}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java 2011-06-28
10:26:05 UTC (rev 32394)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java 2011-06-28
10:49:28 UTC (rev 32395)
@@ -49,8 +49,6 @@
private IDebugEventSetListener serverProcessListener;
private PollThread pollThread;
- public static final String DEFAULT_CP_PROVIDER_ID =
"org.jboss.ide.eclipse.as.core.server.internal.launch.serverClasspathProvider";
//$NON-NLS-1$
-
private static HashMap<String, Class> delegateClassMap;
static {
delegateClassMap = new HashMap<String, Class>();