KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > kelp > eclipse > ui > launcher > EnhydraClassPathTab


1 package org.enhydra.kelp.eclipse.ui.launcher;
2
3 import org.eclipse.core.runtime.CoreException;
4 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
5 import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
6 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
7 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
8 import org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab;
9 import org.enhydra.tool.ToolBoxInfo;
10 import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
11 import java.util.List JavaDoc;
12 import java.util.ArrayList JavaDoc;
13 import org.eclipse.debug.core.ILaunchConfiguration;
14 /**
15  * @author Administrator
16  *
17  * To change this generated comment edit the template variable "typecomment":
18  * Window>Preferences>Java>Templates.
19  * To enable and disable the creation of type comments go to
20  * Window>Preferences>Java>Code Generation.
21  */

22 public class EnhydraClassPathTab extends JavaClasspathTab {
23 // private static final String ENHYDRA_PROGRAM_ARGUMENTS = "conf/multiserver.conf";
24

25   /**
26    * Constructor for EnhydraArgumentsTab.
27    */

28   public EnhydraClassPathTab() {
29     super();
30   }
31
32
33   /**
34    * @see org.eclipse.debug.ui.setDefaults(ILaunchConfigurationWorkingCopy configuration)
35    */

36   public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
37     super.setDefaults(configuration);
38     String JavaDoc progArgs = "";
39     String JavaDoc workDir = "";
40     String JavaDoc prjName = "";
41
42     System.out.println("ATTR_VM_ARGUMENTS="+IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS);
43
44 // IRuntimeClasspathEntry[] entries = IRuntimeClasspathEntry.USER_CLASSES;
45
// setClasspathEntries(entries);
46
/*
47     try {
48       //24.03.2003
49       configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, "-Denhydra.home="+"\""+ToolBoxInfo.getEnhydraRoot()+"\"");
50
51       prjName = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, EMPTY_STRING);
52       // Program arguments defaults to ENHYDRA_PROGRAM_ARGUMENTS
53       progArgs = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, EMPTY_STRING);
54       if (progArgs.compareTo(ENHYDRA_PROGRAM_ARGUMENTS) != 0)
55         configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ENHYDRA_PROGRAM_ARGUMENTS);
56       // Work directory defaults to <project name>/output
57       workDir = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, EMPTY_STRING);
58       if (progArgs.compareTo(EMPTY_STRING) == 0) {
59         prjName = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, EMPTY_STRING);
60         configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, prjName.concat("/output"));
61       }
62
63     } catch (CoreException e) {
64       JDIDebugUIPlugin.log(e);
65     }
66 */

67   }
68 }
Popular Tags