diff options
| author | Vikas Chandra | 2016-11-02 06:32:17 +0000 |
|---|---|---|
| committer | Vikas Chandra | 2016-11-02 06:32:17 +0000 |
| commit | 0ab09598b514065ee4883963a58599849766bcee (patch) | |
| tree | a3dd095efe151df8dcd4189aba019409e532765f | |
| parent | d6b1a3e01280e09298da4b6b89932266db1b92cd (diff) | |
| download | eclipse.pde.ui-0ab09598b514065ee4883963a58599849766bcee.tar.gz eclipse.pde.ui-0ab09598b514065ee4883963a58599849766bcee.tar.xz eclipse.pde.ui-0ab09598b514065ee4883963a58599849766bcee.zip | |
Revert "Revert "Comment 9 of Bug 475797 - [patch] Target platform misses bundle after version of workspace bundle gets changed ""Y20161103-1000
This reverts commit 7ced01e4580a51e3a2c632fa798269fcf3725c55.
| -rw-r--r-- | ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginModelManager.java | 23 |
1 files changed, 20 insertions, 3 deletions
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 cf5c62ae5c..155dfc6906 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 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 @@ -917,8 +917,25 @@ public class PluginModelManager implements IModelProviderListener { break; } } - if (isActive) - fState.addBundle(model, true); + if (isActive) { + // refresh everything related to this bundle model id + fEntries.remove(newID); + fState.removeBundleDescription(desc); + for (int i = 0; i < fExternalManager.getAllModels().length; i++) { + IPluginModelBase modelExternal = fExternalManager.getAllModels()[i]; + if (modelExternal.getPluginBase().getId().equals(newID)) { + addToTable(fEntries, new IPluginModelBase[] { modelExternal }); + } + } + IPluginModelBase[] models = fWorkspaceManager.getPluginModels(); + for (int i = 0; i < models.length; i++) { + IPluginModelBase modelWorkspace = models[i]; + if (modelWorkspace.getPluginBase().getId().equals(newID)) { + addToTable(fEntries, new IPluginModelBase[] { modelWorkspace }); + addWorkspaceBundleToState(fEntries, modelWorkspace); + } + } + } } else // if the target plug-in has become disabled/unchecked, remove its bundle // description from the state |
