geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r353864 - in /geronimo/devtools/trunk/modules/eclipse-plugin/plugins: org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/ org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/ org.apache.geronimo.ui/src/or...
Date Sun, 04 Dec 2005 15:40:24 GMT
Author: sppatel
Date: Sun Dec  4 07:40:17 2005
New Revision: 353864

URL: http://svn.apache.org/viewcvs?rev=353864&view=rev
Log:
fix program arguments being overwritten by genericserverbehavior

Modified:
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/SetConsoleLogLevelCommand.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServerEditorLogLevelSection.java

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java?rev=353864&r1=353863&r2=353864&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java
Sun Dec  4 07:40:17 2005
@@ -44,7 +44,12 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.IVMInstall;
 import org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour;
+import org.eclipse.jst.server.generic.core.internal.GenericServerRuntime;
 import org.eclipse.wst.server.core.IModule;
 import org.eclipse.wst.server.core.IServer;
 
@@ -292,5 +297,13 @@
 	public String getRMINamingPort() {
 		return GeronimoConnectionFactory.getInstance().getRMINamingPort(getServer());
 	}
+	
+	public void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy workingCopy, IProgressMonitor
monitor) throws CoreException {
+        String existingVMArgs = workingCopy.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,(String)null);
+        if(existingVMArgs !=null) {
+            workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,existingVMArgs);
+        }
+	}
+		
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/SetConsoleLogLevelCommand.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/SetConsoleLogLevelCommand.java?rev=353864&r1=353863&r2=353864&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/SetConsoleLogLevelCommand.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/SetConsoleLogLevelCommand.java
Sun Dec  4 07:40:17 2005
@@ -53,9 +53,7 @@
 	 */
 	public void execute() {
 		try {
-			oldValue = getLaunchConfiguration().getAttribute(
-					IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
-					NONE);
+			oldValue = getCurrentValue();
 			if (oldValue != value) {
 				getLaunchConfiguration()
 						.setAttribute(
@@ -68,6 +66,12 @@
 		}
 	}
 
+	public String getCurrentValue() throws CoreException {
+		return getLaunchConfiguration().getAttribute(
+				IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
+				NONE);
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -87,7 +91,7 @@
 			throws CoreException {
 		if (wc == null) {
 			Server s = (Server) server.getAdapter(Server.class);
-			ILaunchConfiguration launchConfig = s.getLaunchConfiguration(false,
+			ILaunchConfiguration launchConfig = s.getLaunchConfiguration(true,
 					null);
 			wc = launchConfig.getWorkingCopy();
 		}

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServerEditorLogLevelSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServerEditorLogLevelSection.java?rev=353864&r1=353863&r2=353864&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServerEditorLogLevelSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServerEditorLogLevelSection.java
Sun Dec  4 07:40:17 2005
@@ -17,6 +17,7 @@
 
 import org.apache.geronimo.ui.commands.SetConsoleLogLevelCommand;
 import org.apache.geronimo.ui.internal.Messages;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
@@ -66,6 +67,19 @@
 
 		info = toolkit.createButton(composite, Messages.info, SWT.RADIO);
 		debug = toolkit.createButton(composite, Messages.debug, SWT.RADIO);
+		
+		SetConsoleLogLevelCommand cmd = new SetConsoleLogLevelCommand(server, null);
+		try {
+			String value = cmd.getCurrentValue();
+			if(value.indexOf("-vv") != -1) {
+				debug.setSelection(true);
+			} else {
+				info.setSelection(true);
+			}
+		} catch (CoreException e1) {
+			e1.printStackTrace();
+		}
+	
 
 		info.addSelectionListener(new SelectionListener() {
 



Mime
View raw message