Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Grunberg2011-12-16 16:42:17 +0000
committerRoland Grunberg2011-12-16 19:17:57 +0000
commitcc74a23bc9a8ca6a10f28b04cac82f2fbb523cd7 (patch)
tree251b30630c8f39d5584449b0a85e5a0d57b4f337
parentdf8f3625428b6d1631ac0d8aa7c707e79ccfb974 (diff)
downloadorg.eclipse.linuxtools-cc74a23bc9a8ca6a10f28b04cac82f2fbb523cd7.tar.gz
org.eclipse.linuxtools-cc74a23bc9a8ca6a10f28b04cac82f2fbb523cd7.tar.xz
org.eclipse.linuxtools-cc74a23bc9a8ca6a10f28b04cac82f2fbb523cd7.zip
Fix issues arising from no project being associated with certain
oprofile interactions. 2011-12-16 Roland Grunberg <rgrunber@redhat.com> * src/org/eclipse/linuxtools/oprofile/core/Oprofile.java (static initializer): In some cases we may have no project to set but we may still need to have the oprofile module loaded. In these cases, allow loading if possible. * src/org/eclipse/linuxtools/oprofile/launch/launching/OprofileManualLaunchConfigurationDelegate.java (preExec): Set the current project for manual launches.
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/ChangeLog7
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/Oprofile.java4
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/ChangeLog5
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/launching/OprofileManualLaunchConfigurationDelegate.java4
4 files changed, 17 insertions, 3 deletions
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/ChangeLog b/oprofile/org.eclipse.linuxtools.oprofile.core/ChangeLog
index ee7b2d0d56..0a0a49afe2 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/ChangeLog
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/ChangeLog
@@ -1,3 +1,10 @@
+2011-12-16 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/oprofile/core/Oprofile.java
+ (static initializer): In some cases we may have no project to set
+ but we may still need to have the oprofile module loaded. In these
+ cases allow loading, if possible.
+
2011-12-04 Rafael Teixeira <rafaelmt@linux.vnet.ibm.com>
* META-INF/MANIFEST.MF: Add org.eclipse.linuxtools.tools.launch.core
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/Oprofile.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/Oprofile.java
index f87a368104..34e29299a0 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/Oprofile.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/Oprofile.java
@@ -45,9 +45,7 @@ public class Oprofile
// Make sure that oprofile is ready to go
static {
- if(_currentProject != null){
- initializeOprofileModule();
- }
+ initializeOprofileModule();
}
/**
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/ChangeLog b/oprofile/org.eclipse.linuxtools.oprofile.launch/ChangeLog
index 7eb3e1274b..535af261e7 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/ChangeLog
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-16 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/oprofile/launch/launching/OprofileManualLaunchConfigurationDelegate.java
+ (preExec): Set the current project for manual launches.
+
2011-09-21 Roland Grunberg <rgrunber@redhat.com>
* src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileSetupTab.java:
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/launching/OprofileManualLaunchConfigurationDelegate.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/launching/OprofileManualLaunchConfigurationDelegate.java
index 682e1872ea..8b01c8eb67 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/launching/OprofileManualLaunchConfigurationDelegate.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/launching/OprofileManualLaunchConfigurationDelegate.java
@@ -23,6 +23,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.linuxtools.oprofile.core.OpcontrolException;
+import org.eclipse.linuxtools.oprofile.core.Oprofile;
import org.eclipse.linuxtools.oprofile.core.OprofileCorePlugin;
import org.eclipse.linuxtools.oprofile.core.daemon.OprofileDaemonEvent;
import org.eclipse.linuxtools.oprofile.launch.OprofileLaunchMessages;
@@ -45,6 +46,9 @@ import org.eclipse.ui.PlatformUI;
public class OprofileManualLaunchConfigurationDelegate extends AbstractOprofileLaunchConfigurationDelegate {
@Override
protected boolean preExec(LaunchOptions options, OprofileDaemonEvent[] daemonEvents) {
+ // Set current project to allow using the oprofile path that
+ // was chosen for the project
+ Oprofile.setCurrentProject(getProject());
// //set up the oprofile daemon
// try {
// //kill the daemon (it shouldn't be running already, but to be safe)

Back to the top