Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikas Chandra2016-11-07 07:39:58 +0000
committerMarkus Keller2016-11-15 18:25:55 +0000
commita67e668fa367982ef6272c38fa44d81488e412e7 (patch)
tree80431a076e75d0872ae16fe1f5715f2b500f8fe6
parent127553cd4c0971437d7ff042a65877c052da20ad (diff)
downloadeclipse.pde.ui-a67e668fa367982ef6272c38fa44d81488e412e7.tar.gz
eclipse.pde.ui-a67e668fa367982ef6272c38fa44d81488e412e7.tar.xz
eclipse.pde.ui-a67e668fa367982ef6272c38fa44d81488e412e7.zip
Bug 475797: [patch] Target platform misses bundle after version of workspace bundle gets changed
For 4.6.2, revert the changes that went into 4.6: Revert "Bug 449102: Target platform bundle ignored when different version available in workspace" This reverts commit 9e0637be15cdc81618ce1319647115c8a5819801. Revert "Bug 449102 - Target platform bundle ignored when different version available in workspace" This reverts commit c80cabd4793ef375355594b0ad82b51a3ac11e05.
-rw-r--r--ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/MinimalState.java7
-rw-r--r--ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginModelManager.java22
2 files changed, 5 insertions, 24 deletions
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/MinimalState.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/MinimalState.java
index 899d8328e6..ccc6154096 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/MinimalState.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/MinimalState.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2015 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -172,11 +172,6 @@ public class MinimalState {
fState.removeBundle(description);
}
- public void updateBundleDescription(BundleDescription description) {
- if (description != null)
- fState.updateBundle(description);
- }
-
public State getState() {
return fState;
}
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 dff784959c..b87167f623 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
@@ -27,7 +27,6 @@ import org.eclipse.pde.core.build.IBuildEntry;
import org.eclipse.pde.core.plugin.*;
import org.eclipse.pde.core.target.*;
import org.eclipse.pde.internal.core.target.P2TargetUtils;
-import org.osgi.framework.Version;
public class PluginModelManager implements IModelProviderListener {
private static final String fExternalPluginListFile = "SavedExternalPluginList.txt"; //$NON-NLS-1$
@@ -691,29 +690,16 @@ public class PluginModelManager implements IModelProviderListener {
}
private synchronized void addWorkspaceBundleToState(Map<String, LocalModelEntry> entries, IPluginModelBase model) {
- IPluginBase pluginBase = model.getPluginBase();
- String id = pluginBase.getId();
+ String id = model.getPluginBase().getId();
if (id == null)
return;
- // Remove target models by the same ID from the state, iff the *.qualifier version from the workspace overrides them.
- // Otherwise, update target models.
- Version version = Version.parseVersion(pluginBase.getVersion());
- boolean isQualifierVersion = "qualifier".equals(version.getQualifier()); //$NON-NLS-1$
+ // remove target models by the same ID from the state, if any
ModelEntry entry = entries.get(id);
if (entry != null) {
IPluginModelBase[] models = entry.getExternalModels();
- for (int i = 0; i < models.length; i++) {
- Version entryVersion = models[i].getBundleDescription().getVersion();
- if (isQualifierVersion
- && version.getMajor() == entryVersion.getMajor()
- && version.getMinor() == entryVersion.getMinor()
- && version.getMicro() == entryVersion.getMicro()) {
- fState.removeBundleDescription(models[i].getBundleDescription());
- } else {
- fState.updateBundleDescription(models[i].getBundleDescription());
- }
- }
+ for (int i = 0; i < models.length; i++)
+ fState.removeBundleDescription(models[i].getBundleDescription());
}
// add new bundle to the state

Back to the top