Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2007-11-01 21:30:09 +0000
committerSusan Franklin2007-11-01 21:30:09 +0000
commit73a252762ce2f8ae709c4934520e55855ef87f6c (patch)
tree2448382dd1876dee08358d8d777f3b2d34d3e775
parenta326accea9259f6c2fde22a21d291eb215366b4d (diff)
downloadrt.equinox.p2-73a252762ce2f8ae709c4934520e55855ef87f6c.tar.gz
rt.equinox.p2-73a252762ce2f8ae709c4934520e55855ef87f6c.tar.xz
rt.equinox.p2-73a252762ce2f8ae709c4934520e55855ef87f6c.zip
log a warning if no SELF profile is found
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties3
3 files changed, 11 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java
index 61eaf454b..972f6f4b0 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java
@@ -83,4 +83,5 @@ public class ProvSDKMessages extends NLS {
public static String AutomaticUpdatesJob_Updates;
public static String AutomaticUpdatesDialog_ClickToReviewDownloaded;
public static String AutomaticUpdatesDialog_ClickToReviewNotDownloaded;
+ public static String ProvSDKUIActivator_NoSelfProfile;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java
index 9804ce409..e0f9b1612 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.sdk;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.IProfileRegistry;
import org.eclipse.equinox.p2.engine.Profile;
@@ -18,6 +20,7 @@ import org.eclipse.equinox.p2.ui.model.ProfileFactory;
import org.eclipse.equinox.p2.ui.operations.ProvisioningUtil;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.ui.statushandlers.StatusManager;
import org.osgi.framework.BundleContext;
/**
@@ -99,6 +102,7 @@ public class ProvSDKUIActivator extends AbstractUIPlugin {
// Get the profile of the running system.
profile = ProvisioningUtil.getProfile(IProfileRegistry.SELF);
if (profile == null) {
+ StatusManager.getManager().handle(getNoSelfProfileStatus(), StatusManager.LOG);
Profile[] profiles = (Profile[]) new AllProfiles().getChildren(null);
if (profiles.length > 0)
return profiles[0];
@@ -111,4 +115,8 @@ public class ProvSDKUIActivator extends AbstractUIPlugin {
static void setScheduler(AutomaticUpdateScheduler scheduler) {
ProvSDKUIActivator.scheduler = scheduler;
}
+
+ static IStatus getNoSelfProfileStatus() {
+ return new Status(IStatus.WARNING, PLUGIN_ID, ProvSDKMessages.ProvSDKUIActivator_NoSelfProfile);
+ }
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties
index ece72a675..03658bf01 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties
@@ -66,4 +66,5 @@ AutomaticUpdatesPreferencePage_downloadAndNotify=Download new &updates automatic
AutomaticUpdatesDialog_ClickToReviewDownloaded=Software updates have been downloaded.\nClick here to <a>Review and Install Updates</a>.
AutomaticUpdatesDialog_ClickToReviewNotDownloaded=Updates are available for your software.\nClick here to <a>Review and Install Updates</a>.
AutomaticUpdatesPreferencePage_at=at
-AutomaticUpdatesJob_Updates=Updates \ No newline at end of file
+AutomaticUpdatesJob_Updates=Updates
+ProvSDKUIActivator_NoSelfProfile=Could not locate the running profile instance

Back to the top