Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@novell.com>2009-04-20 19:39:25 +0400
committerLluis Sanchez <lluis@novell.com>2009-04-20 19:39:25 +0400
commitfd674b22bb1c27d39dd4c7a93bbe197bc3143cf8 (patch)
tree134f98275e2d2c52687eba6fd79fe8fc0d8d1164 /extras/MonoDevelop.Profiling
parent5779dff8aa2a6ac8be13bdddadeb409f2572daee (diff)
* MonoDevelop.Profiling/AbstractProfiler.cs:
* MonoDevelop.Profiling/ProfilingOperations.cs: * MonoDevelop.Profiling/MonoProfilerExecutionHandler.cs: * MonoDevelop.Profiling/ProcessProfilerExecutionHandler.cs: Track api changes done in IExecutionHandler. svn path=/trunk/monodevelop/; revision=132180
Diffstat (limited to 'extras/MonoDevelop.Profiling')
-rw-r--r--extras/MonoDevelop.Profiling/MonoDevelop.Profiling/AbstractProfiler.cs15
-rw-r--r--extras/MonoDevelop.Profiling/MonoDevelop.Profiling/ChangeLog8
-rw-r--r--extras/MonoDevelop.Profiling/MonoDevelop.Profiling/MonoProfilerExecutionHandler.cs18
-rw-r--r--extras/MonoDevelop.Profiling/MonoDevelop.Profiling/ProcessProfilerExecutionHandler.cs10
-rw-r--r--extras/MonoDevelop.Profiling/MonoDevelop.Profiling/ProfilingOperations.cs4
5 files changed, 40 insertions, 15 deletions
diff --git a/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/AbstractProfiler.cs b/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/AbstractProfiler.cs
index c12ca4ac07..24c78b4507 100644
--- a/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/AbstractProfiler.cs
+++ b/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/AbstractProfiler.cs
@@ -225,16 +225,15 @@ namespace MonoDevelop.Profiling
this.profiler = profiler;
}
- public bool CanExecute (string command)
+ public bool CanExecute (ExecutionCommand command)
{
- string ext = System.IO.Path.GetExtension (command).ToLower ();
- return ext == ".exe" || ext == ".dll";
+ return command is DotNetExecutionCommand;
}
- public IProcessAsyncOperation Execute (string command, string arguments, string workingDirectory, IDictionary<string, string> environmentVariables, IConsole console)
+ public IProcessAsyncOperation Execute (ExecutionCommand command, IConsole console)
{
MonoProfilerExecutionHandler h = new MonoProfilerExecutionHandler (profiler);
- return h.Execute (command, arguments, workingDirectory, environmentVariables, console);
+ return h.Execute (command, console);
}
}
@@ -249,15 +248,15 @@ namespace MonoDevelop.Profiling
this.process = process;
}
- public bool CanExecute (string command)
+ public bool CanExecute (ExecutionCommand command)
{
return true;
}
- public IProcessAsyncOperation Execute (string command, string arguments, string workingDirectory, IDictionary<string, string> environmentVariables, IConsole console)
+ public IProcessAsyncOperation Execute (ExecutionCommand command, IConsole console)
{
ProcessProfilerExecutionHandler h = new ProcessProfilerExecutionHandler (profiler, process);
- return h.Execute (command, arguments, workingDirectory, environmentVariables, console);
+ return h.Execute (command, console);
}
}
}
diff --git a/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/ChangeLog b/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/ChangeLog
index 89a5f6e58d..0323816f8b 100644
--- a/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/ChangeLog
+++ b/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-20 Lluis Sanchez Gual <lluis@novell.com>
+
+ * AbstractProfiler.cs:
+ * ProfilingOperations.cs:
+ * MonoProfilerExecutionHandler.cs:
+ * ProcessProfilerExecutionHandler.cs: Track api changes done
+ in IExecutionHandler.
+
2009-04-15 Lluis Sanchez Gual <lluis@novell.com>
* MonoDevelop.Profiling.addin.xml: Bump MD version.
diff --git a/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/MonoProfilerExecutionHandler.cs b/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/MonoProfilerExecutionHandler.cs
index 3b0e64fb18..65def31c69 100644
--- a/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/MonoProfilerExecutionHandler.cs
+++ b/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/MonoProfilerExecutionHandler.cs
@@ -44,18 +44,28 @@ namespace MonoDevelop.Profiling
this.profiler = profiler;
}
- public override IProcessAsyncOperation Execute (string command, string arguments, string workingDirectory, IDictionary<string, string> environmentVariables, IConsole console)
+ public override IProcessAsyncOperation Execute (ExecutionCommand command, IConsole console)
{
+ DotNetExecutionCommand dotcmd = (DotNetExecutionCommand) command;
+
string tempFile = Path.GetTempFileName ();
- string snapshotFile = profiler.GetSnapshotFileName (workingDirectory, tempFile);
+ string snapshotFile = profiler.GetSnapshotFileName (dotcmd.Command, tempFile);
+
+ string args = string.Format ("--profile={2}:{3} --debug \"{0}\" {1}", dotcmd.Command, dotcmd.Arguments, profiler.Identifier, tempFile);
+ NativeExecutionCommand cmd = new NativeExecutionCommand ("mono", args, dotcmd.WorkingDirectory, dotcmd.EnvironmentVariables);
- string args = string.Format ("--profile={2}:{3} --debug \"{0}\" {1}", command, arguments, profiler.Identifier, tempFile);
- IProcessAsyncOperation pao = base.Execute ("mono", args, workingDirectory, environmentVariables, console);
+ IProcessAsyncOperation pao = base.Execute (cmd, console);
ProfilingService.ActiveProfiler = profiler;
ProfilingContext profContext = new ProfilingContext (pao, snapshotFile);
profiler.Start (profContext);
return pao;
}
+
+ public override bool CanExecute (ExecutionCommand command)
+ {
+ return command is DotNetExecutionCommand;
+ }
+
}
} \ No newline at end of file
diff --git a/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/ProcessProfilerExecutionHandler.cs b/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/ProcessProfilerExecutionHandler.cs
index fa07758e2d..f799c8ce6f 100644
--- a/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/ProcessProfilerExecutionHandler.cs
+++ b/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/ProcessProfilerExecutionHandler.cs
@@ -49,12 +49,13 @@ namespace MonoDevelop.Profiling
this.process = process;
}
- public override IProcessAsyncOperation Execute (string command, string arguments, string workingDirectory, IDictionary<string, string> environmentVariables, IConsole console)
+ public override IProcessAsyncOperation Execute (ExecutionCommand command, IConsole console)
{
DummyProcessAsyncOperation dpao = new DummyProcessAsyncOperation (process);
string profilerIdentifier, tempFile, snapshotFile;
ProfilingService.GetProfilerInformation (process.Id, out profilerIdentifier, out tempFile);
- snapshotFile = profiler.GetSnapshotFileName (workingDirectory, tempFile);
+ DotNetExecutionCommand dotcmd = (DotNetExecutionCommand) command;
+ snapshotFile = profiler.GetSnapshotFileName (dotcmd.WorkingDirectory, tempFile);
ProfilingService.ActiveProfiler = profiler;
ProfilingContext profContext = new ProfilingContext (dpao, snapshotFile);
@@ -62,5 +63,10 @@ namespace MonoDevelop.Profiling
return dpao;
}
+
+ public override bool CanExecute (ExecutionCommand command)
+ {
+ return command is DotNetExecutionCommand;
+ }
}
} \ No newline at end of file
diff --git a/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/ProfilingOperations.cs b/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/ProfilingOperations.cs
index 8cc0fe16f3..993a541d4b 100644
--- a/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/ProfilingOperations.cs
+++ b/extras/MonoDevelop.Profiling/MonoDevelop.Profiling/ProfilingOperations.cs
@@ -91,7 +91,9 @@ namespace MonoDevelop.Profiling
string workingDir = ProfilingService.GetProcessDirectory (process.Id);
IExecutionHandler handler = profiler.GetProcessExecutionHandlerFactory (process);
- return handler.Execute (null, null, workingDir, null, null /*context.ConsoleFactory.CreateConsole (true)*/);
+ DotNetExecutionCommand cmd = new DotNetExecutionCommand ();
+ cmd.WorkingDirectory = workingDir;
+ return handler.Execute (cmd, null /*context.ConsoleFactory.CreateConsole (true)*/);
}
public static void RestoreWorkbenchContext ()