diff options
| author | Vikas Chandra | 2016-09-22 15:51:16 +0000 |
|---|---|---|
| committer | Vikas Chandra | 2016-09-22 15:51:16 +0000 |
| commit | 8089e3b76a4ecf8b44a43d346f460eb95a40be46 (patch) | |
| tree | f1101971ce38c740c0caf344e6f1a7644d6c71da | |
| parent | 64e7739e11a4196cec2d6ec4c8d61a50b3abe99c (diff) | |
| download | eclipse.pde.ui-8089e3b76a4ecf8b44a43d346f460eb95a40be46.tar.gz eclipse.pde.ui-8089e3b76a4ecf8b44a43d346f460eb95a40be46.tar.xz eclipse.pde.ui-8089e3b76a4ecf8b44a43d346f460eb95a40be46.zip | |
Comment 9 of Bug 475797 - [patch] Target platform misses bundle after
version of workspace bundle gets changed
| -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 86acef46f2..4273a71b1c 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 @@ -925,8 +925,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 |
