geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r517834 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/ org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/internal/ org.apache.geronimo.st.v1.core/ org.apache.gero...
Date Tue, 13 Mar 2007 19:55:54 GMT
Author: sppatel
Date: Tue Mar 13 12:55:53 2007
New Revision: 517834

URL: http://svn.apache.org/viewvc?view=rev&rev=517834
Log:
add support for server to be launched in profiling mode

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoLaunchConfigurationDelegate.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/internal/Messages.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/internal/Messages.properties
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/plugin.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v12.core/plugin.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/plugin.xml

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoLaunchConfigurationDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoLaunchConfigurationDelegate.java?view=diff&rev=517834&r1=517833&r2=517834
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoLaunchConfigurationDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoLaunchConfigurationDelegate.java
Tue Mar 13 12:55:53 2007
@@ -33,6 +33,8 @@
 import org.eclipse.jdt.launching.IVMInstall;
 import org.eclipse.jdt.launching.IVMRunner;
 import org.eclipse.jdt.launching.VMRunnerConfiguration;
+import org.eclipse.jst.server.core.internal.JavaServerPlugin;
+import org.eclipse.jst.server.core.internal.ServerProfiler;
 import org.eclipse.wst.server.core.IServer;
 import org.eclipse.wst.server.core.ServerUtil;
 
@@ -77,6 +79,15 @@
 		String pgmArgs = getProgramArguments(configuration);
 		String vmArgs = getVMArguments(configuration);
 		String[] envp = getEnvironment(configuration);
+		
+		if (ILaunchManager.PROFILE_MODE.equals(mode)) {
+			ServerProfiler[] sp = JavaServerPlugin.getServerProfilers();
+			if (sp == null || runner == null) {
+				geronimoServer.stopImpl();
+				throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0, Messages.errorNoProfiler,
null));
+			}
+			vmArgs = vmArgs + " " + sp[0].getVMArgs();
+		}
 
 		ExecutionArguments execArgs = new ExecutionArguments(vmArgs, pgmArgs);
 		Map vmAttributesMap = getVMSpecificAttributesMap(configuration);

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/internal/Messages.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/internal/Messages.java?view=diff&rev=517834&r1=517833&r2=517834
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/internal/Messages.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/internal/Messages.java
Tue Mar 13 12:55:53 2007
@@ -47,5 +47,7 @@
 	public static String missingContent;
 	public static String errorPortInUse;
 	public static String missingServer;
+	
+	public static String errorNoProfiler;
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/internal/Messages.properties
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/internal/Messages.properties?view=diff&rev=517834&r1=517833&r2=517834
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/internal/Messages.properties
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/internal/Messages.properties
Tue Mar 13 12:55:53 2007
@@ -33,4 +33,6 @@
 errorJRE=The JRE could not be found. Edit the server and change the JRE location.
 errorPortInUse=Port {0} required by {1} is already in use. The server may already be running
in another process, or a system process may be using the port. \
 To start this server you will need to stop the other process or change the port number(s).
-missingServer=Server does not exist
\ No newline at end of file
+missingServer=Server does not exist
+
+errorNoProfiler=Could not launch in profiling mode because no profilers are configured.
\ No newline at end of file

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/plugin.xml?view=diff&rev=517834&r1=517833&r2=517834
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/plugin.xml
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/plugin.xml
Tue Mar 13 12:55:53 2007
@@ -43,7 +43,7 @@
             runtimeTypeId="org.apache.geronimo.runtime.10"
             launchConfigId="org.apache.geronimo.st.core.launchConfigurationType"
             behaviourClass="org.apache.geronimo.st.v1.core.GeronimoServerBehaviour"
-            hasConfiguration="false" launchModes="run,debug">
+            hasConfiguration="false" launchModes="run,debug,profile">
         </serverType>
     </extension>
     

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml?view=diff&rev=517834&r1=517833&r2=517834
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml
Tue Mar 13 12:55:53 2007
@@ -43,7 +43,7 @@
             runtimeTypeId="org.apache.geronimo.runtime.11"
             launchConfigId="org.apache.geronimo.st.core.launchConfigurationType"
             behaviourClass="org.apache.geronimo.st.v11.core.GeronimoServerBehaviour"
-            hasConfiguration="false" launchModes="run,debug">
+            hasConfiguration="false" launchModes="run,debug,profile">
         </serverType>
     </extension>
     

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v12.core/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v12.core/plugin.xml?view=diff&rev=517834&r1=517833&r2=517834
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v12.core/plugin.xml
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v12.core/plugin.xml
Tue Mar 13 12:55:53 2007
@@ -43,7 +43,7 @@
             runtimeTypeId="org.apache.geronimo.runtime.12"
             launchConfigId="org.apache.geronimo.st.core.launchConfigurationType"
             behaviourClass="org.apache.geronimo.st.v12.core.GeronimoServerBehaviour"
-            hasConfiguration="false" launchModes="run,debug">
+            hasConfiguration="false" launchModes="run,debug,profile">
         </serverType>
     </extension>
     

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/plugin.xml?view=diff&rev=517834&r1=517833&r2=517834
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/plugin.xml
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/plugin.xml
Tue Mar 13 12:55:53 2007
@@ -43,7 +43,7 @@
             runtimeTypeId="org.apache.geronimo.runtime.20"
             launchConfigId="org.apache.geronimo.st.core.launchConfigurationType"
             behaviourClass="org.apache.geronimo.st.v20.core.GeronimoServerBehaviour"
-            hasConfiguration="false" launchModes="run,debug">
+            hasConfiguration="false" launchModes="run,debug,profile">
         </serverType>
     </extension>
     



Mime
View raw message