summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorCamilo Bernal2013-03-08 16:06:03 (EST)
committer Sami Wagiaalla2013-03-11 10:06:28 (EDT)
commit406a96d7c2e633635a6af9391ce9ef48ea4c62ed (patch)
tree2c421d8deca1c755b00ea521083bdba3ee6c455f
parent465d5fbaa2a77119d72cdd0d99bf08c92206a3a7 (diff)
downloadorg.eclipse.linuxtools-406a96d7c2e633635a6af9391ce9ef48ea4c62ed.zip
org.eclipse.linuxtools-406a96d7c2e633635a6af9391ce9ef48ea4c62ed.tar.gz
org.eclipse.linuxtools-406a96d7c2e633635a6af9391ce9ef48ea4c62ed.tar.bz2
Always set the plug-in working directory during a perf launch.refs/changes/06/11006/2
The working directory is needed when attempting to save a stat or profile session. Change-Id: Ia9144af223606ec23ca6bbf23904ddb3fe513876 Reviewed-on: https://git.eclipse.org/r/11006 Tested-by: Hudson CI Reviewed-by: Sami Wagiaalla <swagiaal@redhat.com> IP-Clean: Sami Wagiaalla <swagiaal@redhat.com> Tested-by: Sami Wagiaalla <swagiaal@redhat.com>
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfLaunchConfigDelegate.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfLaunchConfigDelegate.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfLaunchConfigDelegate.java
index b27dd2d..359d94a 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfLaunchConfigDelegate.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfLaunchConfigDelegate.java
@@ -71,6 +71,14 @@ public class PerfLaunchConfigDelegate extends ProfileLaunchConfigurationDelegate
// Program args from launch config.
String arguments[] = getProgramArgumentsArray(config);
+ // Get working directory
+ File wd = getWorkingDirectory(config);
+ if (wd == null) {
+ wd = new File(System.getProperty("user.home", ".")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ IPath workingDir = Path.fromOSString(wd.toURI().getPath());
+ PerfPlugin.getDefault().setWorkingDir(workingDir);
+
if (config.getAttribute(PerfPlugin.ATTR_ShowStat,
PerfPlugin.ATTR_ShowStat_default)) {
@@ -100,12 +108,6 @@ public class PerfLaunchConfigDelegate extends ProfileLaunchConfigurationDelegate
PerfPlugin.getDefault().setStatData(sd);
StatView.refreshView();
} else {
- //Get working directory
- File wd = getWorkingDirectory( config );
- if ( wd == null ) {
- wd = new File( System.getProperty( "user.home", "." ) ); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
ArrayList<String> command = new ArrayList<String>();
// Get the base commandline string (with flags/options based on config)
command.addAll(Arrays.asList(PerfCore.getRecordString(config)));
@@ -164,8 +166,6 @@ public class PerfLaunchConfigDelegate extends ProfileLaunchConfigurationDelegate
}
}
- //(Only for testing this line..) PerfCore.Report(config, null, null, null, "/home/thavidu/dev/eclipse-oprof2-workspace/org.eclipse.linuxtools.internal.perf.tests/resources/perf.data");
- IPath workingDir = Path.fromOSString(wd.toURI().getPath());
PerfCore.Report(config, getEnvironment(config), workingDir, monitor, null, print);
PerfCore.RefreshView(renderProcessLabel(exePath.toOSString()));