geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r989524 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.st.ui/ org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/ org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/...
Date Thu, 26 Aug 2010 08:15:41 GMT
Author: delos
Date: Thu Aug 26 08:15:40 2010
New Revision: 989524

URL: http://svn.apache.org/viewvc?rev=989524&view=rev
Log:
GERONIMODEVTOOLS-669 Modification to VM arguements is lost

Removed:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerVMArgsSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerVMArgsSection.java
Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoLaunchConfigurationTabGroup.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoLaunchConfigurationTabGroup.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml?rev=989524&r1=989523&r2=989524&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml Thu
Aug 26 08:15:40 2010
@@ -176,17 +176,6 @@
     </extension>
     
     <extension point="org.eclipse.wst.server.ui.editorPageSections">
-        <section id="org.apache.server.geronimo.vmargs" order="40"
-            insertionId="org.eclipse.wst.server.editor.overview.right"
-            typeIds="org.apache.geronimo.server.11,
-                     org.apache.geronimo.server.20,
-                     org.apache.geronimo.server.21,
-                     org.apache.geronimo.server.22"
-            class="org.apache.geronimo.st.ui.sections.ServerVMArgsSection">
-        </section>
-    </extension>
-    
-    <extension point="org.eclipse.wst.server.ui.editorPageSections">
         <section id="org.apache.server.geronimo.testenv" order="20"
             insertionId="org.eclipse.wst.server.editor.overview.left"
             typeIds="org.apache.geronimo.server.11,

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoLaunchConfigurationTabGroup.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoLaunchConfigurationTabGroup.java?rev=989524&r1=989523&r2=989524&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoLaunchConfigurationTabGroup.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoLaunchConfigurationTabGroup.java
Thu Aug 26 08:15:40 2010
@@ -16,6 +16,9 @@
  */
 package org.apache.geronimo.st.ui.internal;
 
+import org.apache.geronimo.st.core.GeronimoServerDelegate;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
 import org.eclipse.debug.ui.CommonTab;
 import org.eclipse.debug.ui.EnvironmentTab;
@@ -24,6 +27,11 @@ import org.eclipse.debug.ui.ILaunchConfi
 import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
 import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
 import org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerUtil;
 import org.eclipse.wst.server.ui.ServerLaunchConfigurationTab;
 
 /**
@@ -53,5 +61,22 @@ public class GeronimoLaunchConfiguration
 		tabs[5].setLaunchConfigurationDialog(dialog);
 		setTabs(tabs);
 	}
+	
+    public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+        //need to save all values to Geronimo-specific arguments. Eg, VMArguments
+         try {
+             super.performApply(configuration);
+             
+             IServer server = ServerUtil.getServer(configuration);
+             GeronimoServerDelegate sd = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+             String oldValue = sd.getVMArgs();
+             String newValue = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
oldValue);
+             sd.setVMArgs(newValue);     
+                       
+         } catch (CoreException e) {
+        	  MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+         }
+         
+     }
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml?rev=989524&r1=989523&r2=989524&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml
Thu Aug 26 08:15:40 2010
@@ -158,14 +158,6 @@
     </extension>
     
     <extension point="org.eclipse.wst.server.ui.editorPageSections">
-        <section id="org.apache.server.geronimo.vmargs" order="40"
-            insertionId="org.eclipse.wst.server.editor.overview.right"
-            typeIds="org.apache.geronimo.server.30"
-            class="org.apache.geronimo.st.v30.ui.sections.ServerVMArgsSection">
-        </section>
-    </extension>
-    
-    <extension point="org.eclipse.wst.server.ui.editorPageSections">
         <section id="org.apache.server.geronimo.testenv" order="20"
             insertionId="org.eclipse.wst.server.editor.overview.left"
             typeIds="org.apache.geronimo.server.30"

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoLaunchConfigurationTabGroup.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoLaunchConfigurationTabGroup.java?rev=989524&r1=989523&r2=989524&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoLaunchConfigurationTabGroup.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoLaunchConfigurationTabGroup.java
Thu Aug 26 08:15:40 2010
@@ -16,6 +16,9 @@
  */
 package org.apache.geronimo.st.v30.ui.internal;
 
+import org.apache.geronimo.st.v30.core.GeronimoServerDelegate;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
 import org.eclipse.debug.ui.CommonTab;
 import org.eclipse.debug.ui.EnvironmentTab;
@@ -24,6 +27,11 @@ import org.eclipse.debug.ui.ILaunchConfi
 import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
 import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
 import org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerUtil;
 import org.eclipse.wst.server.ui.ServerLaunchConfigurationTab;
 
 /**
@@ -53,5 +61,22 @@ public class GeronimoLaunchConfiguration
         tabs[5].setLaunchConfigurationDialog(dialog);
         setTabs(tabs);
     }
+    
+    public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+        //need to save all values to Geronimo-specific arguments. Eg, VMArguments
+         try {
+             super.performApply(configuration);
+             
+             IServer server = ServerUtil.getServer(configuration);
+             GeronimoServerDelegate sd = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+             String oldValue = sd.getVMArgs();
+             String newValue = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
oldValue);
+             sd.setVMArgs(newValue);     
+                       
+         } catch (CoreException e) {
+        	  MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+         }
+         
+     }
 
 }



Mime
View raw message