1 package org.enhydra.kelp.eclipse.ui.launcher; 2 3 import org.eclipse.core.runtime.CoreException; 4 import org.eclipse.debug.core.ILaunchConfiguration; 5 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; 6 import org.eclipse.jdt.core.IJavaElement; 7 import org.eclipse.jdt.debug.ui.launchConfigurations.JavaMainTab; 8 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin; 9 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants; 10 import org.eclipse.swt.events.ModifyEvent; 11 import org.eclipse.swt.events.ModifyListener; 12 import org.eclipse.swt.widgets.Composite; 13 14 22 public class EnhydraMainTab extends JavaMainTab { 23 24 private static final String ENHYDRA_MAIN_CLASS = "com.lutris.multiServer.MultiServer"; 25 26 private EnhydraArgumentsTab eArgumentsTab = null; 27 28 31 public EnhydraMainTab() { 32 super(); 33 } 34 35 36 37 40 public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { 41 super.setDefaults(configuration); 42 43 String mainName = ""; 44 45 try { 46 mainName = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, EMPTY_STRING); 48 if (mainName.compareTo(ENHYDRA_MAIN_CLASS) != 0) 49 configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, ENHYDRA_MAIN_CLASS); 50 } catch (CoreException e) { 51 JDIDebugUIPlugin.log(e); 52 } 53 } 54 55 58 public void createControl(Composite parent) { 59 super.createControl(parent); 60 fProjText.addModifyListener(new ModifyListener() { 61 public void modifyText(ModifyEvent e) { 62 UpdateEnhydraArgumentsTab(); 63 } 64 }); 65 } 66 67 70 private void UpdateEnhydraArgumentsTab() { 71 } 75 76 80 public void setEArgumentsTab(EnhydraArgumentsTab eArgumentsTab) { 81 this.eArgumentsTab = eArgumentsTab; 82 } 83 84 } 85 | Popular Tags |