summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2013-07-31 18:02:31 (EDT)
committerCurtis Windatt2013-07-31 18:02:31 (EDT)
commit0c954a833ad91a188c6f1899aaf5fe838d5ef7bb (patch)
tree361676604405539b1a01b8d2b7e63443a81f841b
parentbabf8d486119cf88563851ee8a2a216caa679023 (diff)
downloadeclipse.pde.ui-0c954a833ad91a188c6f1899aaf5fe838d5ef7bb.zip
eclipse.pde.ui-0c954a833ad91a188c6f1899aaf5fe838d5ef7bb.tar.gz
eclipse.pde.ui-0c954a833ad91a188c6f1899aaf5fe838d5ef7bb.tar.bz2
Bug 413450 - A message should be generated if PlatformAdmin is not
-rw-r--r--ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECoreMessages.java2
-rw-r--r--ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginModelManager.java9
-rw-r--r--ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/pderesources.properties1
3 files changed, 12 insertions, 0 deletions
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECoreMessages.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECoreMessages.java
index 1094fdb..4c84c34 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECoreMessages.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECoreMessages.java
@@ -305,6 +305,8 @@ public class PDECoreMessages extends NLS {
public static String PluginModelManager_0;
public static String PluginModelManager_1;
+ public static String PluginModelManager_PlatformAdminMissingErrorMessage;
+
public static String PluginParser_EclipseConverterMissingAttribute;
public static String XMLTextChangeListener_editNames_addAttribute;
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginModelManager.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginModelManager.java
index 50d5ced..228cefa 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginModelManager.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginModelManager.java
@@ -51,6 +51,7 @@ public class PluginModelManager implements IModelProviderListener {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
protected IStatus run(IProgressMonitor monitor) {
try {
boolean more = false;
@@ -504,6 +505,14 @@ public class PluginModelManager implements IModelProviderListener {
if (fEntries != null)
return;
+ // Check if PlatformAdmin service is available (Bug 413450)
+ PlatformAdmin pAdmin = Platform.getPlatformAdmin();
+ if (pAdmin == null) {
+ PDECore.logErrorMessage(PDECoreMessages.PluginModelManager_PlatformAdminMissingErrorMessage);
+ fEntries = Collections.emptyMap();
+ return;
+ }
+
long startTime = System.currentTimeMillis();
// Cannot assign to fEntries here - will create a race condition with isInitialized()
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/pderesources.properties b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/pderesources.properties
index bef1fde..d739135 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/pderesources.properties
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/pderesources.properties
@@ -233,6 +233,7 @@ PluginConverter_EclipseConverterErrorCreatingBundleManifest=Error creating bundl
PluginConverter_EclipseConverterErrorParsingPluginManifest=Error parsing plug-in manifest file {0} at {1}.
PluginModelManager_0=Target Platform
PluginModelManager_1=Updating plug-in dependencies
+PluginModelManager_PlatformAdminMissingErrorMessage=The Plug-in Development Environment requires the PlatformAdmin service to operate. Please install the compatibility fragment 'org.eclipse.osgi.compatibility.state'.
PluginParser_EclipseConverterMissingAttribute=Error parsing {0} manifest. Missing attribute "{1}" in element "{2}".
# {0} will be a product id, this string will be the name of a p2 repository