diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinition.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinition.java index 81fd1120b1..26e6fa3ccf 100644 --- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinition.java +++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinition.java @@ -819,6 +819,7 @@ public NameVersionDescriptor[] getImplicitDependencies() { @Override public void setImplicitDependencies(NameVersionDescriptor[] bundles) { + incrementSequenceNumber(); if (bundles != null && bundles.length == 0) { bundles = null; } diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ImplicitDependenciesSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ImplicitDependenciesSection.java index 40f1aed30a..11fabdbc34 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ImplicitDependenciesSection.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ImplicitDependenciesSection.java @@ -217,9 +217,9 @@ protected void handleAdd() { if (currentBundles != null) { allDependencies.addAll(Arrays.asList(currentBundles)); } - getTarget().setImplicitDependencies(allDependencies.toArray(new NameVersionDescriptor[allDependencies.size()])); markDirty(); - refresh(); + getTarget().setImplicitDependencies(allDependencies.toArray(new NameVersionDescriptor[allDependencies.size()])); + updateUI(); } } @@ -260,26 +260,30 @@ private void handleRemove() { bundles.remove(removeBundle); } } - getTarget().setImplicitDependencies(bundles.toArray((new NameVersionDescriptor[bundles.size()]))); markDirty(); - refresh(); + getTarget().setImplicitDependencies(bundles.toArray((new NameVersionDescriptor[bundles.size()]))); + updateUI(); } } private void handleRemoveAll() { - getTarget().setImplicitDependencies(null); markDirty(); - refresh(); + getTarget().setImplicitDependencies(null); + updateUI(); } @Override public void refresh() { // TODO Try to retain selection during refresh, add and remove operations + updateUI(); + super.refresh(); + } + + protected void updateUI() { fViewer.setInput(getTarget()); fViewer.refresh(); updateButtons(); updateCount(); - super.refresh(); } }