Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/launch/ProviderLaunchConfigurationDelegate.java5
-rw-r--r--profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/launch/ProviderLaunchShortcut.java8
2 files changed, 10 insertions, 3 deletions
diff --git a/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/launch/ProviderLaunchConfigurationDelegate.java b/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/launch/ProviderLaunchConfigurationDelegate.java
index b43f889535..9783b9e76d 100644
--- a/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/launch/ProviderLaunchConfigurationDelegate.java
+++ b/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/launch/ProviderLaunchConfigurationDelegate.java
@@ -61,10 +61,9 @@ public abstract class ProviderLaunchConfigurationDelegate extends
*/
public static String getProviderIdToRun(String type) {
// Look in the preferences for a provider
- String providerId = ConfigurationScope.INSTANCE.getNode(
- type).get(
+ String providerId = ConfigurationScope.INSTANCE.getNode(type).get(
AbstractProviderPreferencesPage.PREFS_KEY, "");
- if (providerId.equals("")) {
+ if (providerId.equals("") || getConfigurationDelegateFromId(providerId) == null) {
// Get highest priority provider
providerId = ProfileLaunchConfigurationTabGroup
.getHighestProviderId(type);
diff --git a/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/launch/ProviderLaunchShortcut.java b/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/launch/ProviderLaunchShortcut.java
index e048d9fef2..323f6014dd 100644
--- a/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/launch/ProviderLaunchShortcut.java
+++ b/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/launch/ProviderLaunchShortcut.java
@@ -33,6 +33,14 @@ public abstract class ProviderLaunchShortcut extends ProfileLaunchShortcut {
@Override
protected ILaunchConfiguration findLaunchConfiguration(IBinary bin, String mode) {
+ String type = getProfilingType();
+
+ // check that there exists a provider for the given profiling type
+ if (ProviderLaunchConfigurationDelegate.getProviderIdToRun(type) == null) {
+ handleFail(Messages.ProviderLaunchShortcut_0 + " " + type);
+ return null;
+ }
+
// create a launch configuration based on the shortcut
ILaunchConfiguration config = createConfiguration(bin, false);
boolean exists = false;

Back to the top