From jbosstools-commits at lists.jboss.org Fri Sep 7 11:18:57 2007 Content-Type: multipart/mixed; boundary="===============0091644859589124471==" MIME-Version: 1.0 From: jbosstools-commits at lists.jboss.org To: jbosstools-commits at lists.jboss.org Subject: [jbosstools-commits] JBoss Tools SVN: r3492 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core: server and 1 other directory. Date: Fri, 07 Sep 2007 11:18:57 -0400 Message-ID: --===============0091644859589124471== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: rob.stryker(a)jboss.com Date: 2007-09-07 11:18:57 -0400 (Fri, 07 Sep 2007) New Revision: 3492 Removed: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/e= clipse/as/core/launch/IJBossServerLaunchDefaults.java trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/e= clipse/as/core/launch/ServerLaunchDefaults.java Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/e= clipse/as/core/server/JBossServer.java Log: Organized imports in previously-refactored JBossServer class Deleted unused files that broke build. = Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss= /ide/eclipse/as/core/launch/IJBossServerLaunchDefaults.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/= eclipse/as/core/launch/IJBossServerLaunchDefaults.java 2007-09-07 14:46:02 = UTC (rev 3491) +++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/= eclipse/as/core/launch/IJBossServerLaunchDefaults.java 2007-09-07 15:18:57 = UTC (rev 3492) @@ -1,45 +0,0 @@ -/* - * JBoss, Home of Professional Open Source - * Copyright 2006, JBoss Inc., and individual contributors as indicated - * by the @authors tag. See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ -package org.jboss.ide.eclipse.as.core.launch; - -import java.util.List; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; - -/** - * Setting launch defaults. Each server can have it's own implementation - * @author Rob Stryker - * - */ -public interface IJBossServerLaunchDefaults { - public String getStartArgs(); - public String getStopArgs(); - public String getVMArgs(); - public List getRuntimeClasspath(String action); - public String getStartJar(); - public String getShutdownJar(); - public String getStartMainType(); - public String getStopMainType(); - = - public void fillDefaults(ILaunchConfigurationWorkingCopy wc) throws CoreE= xception; -} Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss= /ide/eclipse/as/core/launch/ServerLaunchDefaults.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/= eclipse/as/core/launch/ServerLaunchDefaults.java 2007-09-07 14:46:02 UTC (r= ev 3491) +++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/= eclipse/as/core/launch/ServerLaunchDefaults.java 2007-09-07 15:18:57 UTC (r= ev 3492) @@ -1,293 +0,0 @@ -/** - * JBoss, a Division of Red Hat - * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as= indicated - * by the @authors tag. See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ -package org.jboss.ide.eclipse.as.core.launch; - -import java.io.File; -import java.io.FilenameFilter; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.Path; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -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.IServer; -import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime; -import org.jboss.ide.eclipse.as.core.server.JBossServer; - -/** - * A class of launch defaults including how to start, stop, and twiddle a - * server. - * = - * @author Rob Stryker - * = - */ -public class ServerLaunchDefaults implements IJBossServerLaunchDefaults { - - public void fillDefaults(ILaunchConfigurationWorkingCopy wc) - throws CoreException { - // TODO Auto-generated method stub - = - } - - public List getRuntimeClasspath(String action) { - // TODO Auto-generated method stub - return null; - } - - public String getShutdownJar() { - // TODO Auto-generated method stub - return null; - } - - public String getStartArgs() { - // TODO Auto-generated method stub - return null; - } - - public String getStartJar() { - // TODO Auto-generated method stub - return null; - } - - public String getStartMainType() { - // TODO Auto-generated method stub - return null; - } - - public String getStopArgs() { - // TODO Auto-generated method stub - return null; - } - - public String getStopMainType() { - // TODO Auto-generated method stub - return null; - } - - public String getVMArgs() { - // TODO Auto-generated method stub - return null; - } - -// /* -// * Can be overwritten by subclasses -// */ -// protected String startMainType =3D "org.jboss.Main"; -// protected String defaultShutdownArgs =3D "-S"; -// protected String runJar =3D "bin" + File.separator + "run.jar"; -// protected IServer server; -// protected IJBossServerRuntime runtime; -// protected JBossServer jbServer; -// -// public ServerLaunchDefaults(IServer server) { -// this.server =3D server; -// } -// -// protected JBossServer getJBServer() { -// if (jbServer =3D=3D null) { -// try { -// jbServer =3D (JBossServer) server.loadAdapter(JBossServer.class, -// new NullProgressMonitor()); -// } catch (Exception e) { -// } -// } -// return jbServer; -// } -// -// protected IJBossServerRuntime getRuntime() { -// if (runtime =3D=3D null) { -// try { -// runtime =3D (IJBossServerRuntime) server.getRuntime() -// .loadAdapter(IJBossServerRuntime.class, -// new NullProgressMonitor()); -// } catch (Exception e) { -// } -// } -// return runtime; -// } -// -// public void fillDefaults(ILaunchConfigurationWorkingCopy workingCopy) -// throws CoreException { -// IJBossServerRuntime runtime =3D getRuntime(); -// String argsKey =3D IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGU= MENTS; -// String vmArgsKey =3D IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMEN= TS; -// -// String START_SUFFIX =3D JBossServerStartupLaunchConfiguration.PRGM_ARG= S_START_SUFFIX; -// String STOP_SUFFIX =3D JBossServerStartupLaunchConfiguration.PRGM_ARGS= _STOP_SUFFIX; -// -// // START items -// workingCopy.setAttribute(argsKey + START_SUFFIX, getStartArgs()); -// workingCopy.setAttribute(vmArgsKey + START_SUFFIX, getVMArgs()); -// -// // STOP items -// workingCopy.setAttribute(argsKey + STOP_SUFFIX, getStopArgs()); -// workingCopy.setAttribute(vmArgsKey + STOP_SUFFIX, getVMArgs()); -// -// /* Now add in the main types */ -// String mainKey =3D IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NA= ME; -// workingCopy.setAttribute(mainKey + START_SUFFIX, getStartMainType()); -// workingCopy.setAttribute(mainKey + STOP_SUFFIX, getStopMainType()); -// -// String wdKey =3D IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECT= ORY; -// String wdVal =3D getServerHome() + Path.SEPARATOR + "bin"; -// workingCopy.setAttribute(wdKey + START_SUFFIX, wdVal); -// workingCopy.setAttribute(wdKey + STOP_SUFFIX, wdVal); -// -// workingCopy -// .setAttribute( -// IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, -// false); -// String cpKey =3D IJavaLaunchConfigurationConstants.ATTR_CLASSPATH; -// workingCopy.setAttribute(cpKey + START_SUFFIX, -// getRuntimeClasspath(JBossServerStartupLaunchConfiguration.START)); -// workingCopy.setAttribute(cpKey + STOP_SUFFIX, -// getRuntimeClasspath(JBossServerStartupLaunchConfiguration.STOP)); -// } -// -// public String getStartArgs() { -// IJBossServerRuntime rt =3D getRuntime(); -// if (rt !=3D null) { -// return "--configuration=3D" + rt.getJBossConfiguration(); -// } -// return ""; -// } -// -// public String getServerHome() { -// return server.getRuntime().getLocation().toOSString(); -// } -// -// public String getConfigurationPath() { -// try { -// return getServerHome() + Path.SEPARATOR + "server" + Path.SEPARATOR -// + getRuntime().getJBossConfiguration(); -// } catch (Exception e) { -// } -// return ""; -// } -// -// public String getStartJar() { -// return getServerHome() + Path.SEPARATOR + runJar; -// } -// -// public String getShutdownJar() { -// return getServerHome() + Path.SEPARATOR + shutdownJar; -// } -// -// public String getStartMainType() { -// return startMainType; -// } -// -// public String getStopMainType() { -// return stopMainType; -// } -// -// public String getStopArgs() { -// return defaultShutdownArgs; -// } -// -// public String getVMArgs() { -// return defaultVMArgs; -// } -// -// public List getRuntimeClasspath(String action) { -// String serverHome =3D getServerHome(); -// ArrayList classpath =3D new ArrayList(); -// -// if (action.equals(JBossServerStartupLaunchConfiguration.START)) { -// classpath.add(JavaRuntime.newArchiveRuntimeClasspathEntry(new Path( -// getStartJar()))); -// } else if (action.equals(JBossServerStartupLaunchConfiguration.STOP)) { -// classpath.add(JavaRuntime.newArchiveRuntimeClasspathEntry(new Path( -// getShutdownJar()))); -// } -// ArrayList runtimeClassPaths =3D convertClasspath(classpath, runtime -// .getVM()); -// return runtimeClassPaths; -// } -// -// private ArrayList convertClasspath(ArrayList cp, IVMInstall vmInstall) { -// if (vmInstall !=3D null) { -// try { -// cp -// .add(JavaRuntime -// .newRuntimeContainerClasspathEntry( -// new Path(JavaRuntime.JRE_CONTAINER) -// .append( -// "org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType= ") -// .append(vmInstall.getName()), -// IRuntimeClasspathEntry.BOOTSTRAP_CLASSES)); -// } catch (Exception e) { -// // ignore -// } -// -// IPath jrePath =3D new Path(vmInstall.getInstallLocation() -// .getAbsolutePath()); -// if (jrePath !=3D null) { -// IPath toolsPath =3D jrePath.append("lib").append("tools.jar"); -// if (toolsPath.toFile().exists()) { -// cp.add(JavaRuntime -// .newArchiveRuntimeClasspathEntry(toolsPath)); -// } -// } -// } -// -// Iterator cpi =3D cp.iterator(); -// ArrayList list =3D new ArrayList(); -// while (cpi.hasNext()) { -// IRuntimeClasspathEntry entry =3D (IRuntimeClasspathEntry) cpi.next(); -// try { -// list.add(entry.getMemento()); -// } catch (Exception e) { -// // Trace.trace(Trace.SEVERE, "Could not resolve classpath entry: -// // " + entry, e); -// } -// } -// -// return list; -// } -// -// private void addDirectory(String serverHome, ArrayList classpath, -// String dirName) { -// String libPath =3D serverHome + File.separator + dirName; -// File libDir =3D new File(libPath); -// File libs[] =3D libDir.listFiles(new FilenameFilter() { -// public boolean accept(File dir, String name) { -// return (name !=3D null && name.endsWith("jar")); -// } -// }); -// -// if (libs =3D=3D null) -// return; -// -// for (int i =3D 0; i < libs.length; i++) { -// classpath.add(JavaRuntime.newArchiveRuntimeClasspathEntry(new Path( -// libPath + File.separator + libs[i].getName()))); -// } -// } // end method -} Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jbos= s/ide/eclipse/as/core/server/JBossServer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/= eclipse/as/core/server/JBossServer.java 2007-09-07 14:46:02 UTC (rev 3491) +++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/= eclipse/as/core/server/JBossServer.java 2007-09-07 15:18:57 UTC (rev 3492) @@ -34,7 +34,6 @@ import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Status; import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants; import org.eclipse.jst.server.core.IWebModule; import org.eclipse.wst.server.core.IModule; import org.eclipse.wst.server.core.IRuntime; @@ -44,9 +43,6 @@ import org.eclipse.wst.server.core.model.IURLProvider; import org.eclipse.wst.server.core.model.ServerDelegate; import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin; -import org.jboss.ide.eclipse.as.core.launch.IJBossServerLaunchDefaults; -import org.jboss.ide.eclipse.as.core.launch.JBossServerStartupLaunchConfig= uration; -import org.jboss.ide.eclipse.as.core.launch.ServerLaunchDefaults; import org.jboss.ide.eclipse.as.core.model.descriptor.XPathModel; import org.jboss.ide.eclipse.as.core.model.descriptor.XPathQuery; import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime; --===============0091644859589124471==--