Skip to main content
summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorAndrew Gvozdev2011-12-27 14:48:33 -0500
committerAndrew Gvozdev2011-12-27 14:53:05 -0500
commitdc523305ef715aca02dfcb024e774e3c656b9d48 (patch)
treefa863258f3a2e567ded076851685c4ad8dbdc6c2 /build
parent4db83cf4f1c35335ad49ce6ebc89e356d4464923 (diff)
downloadorg.eclipse.cdt-dc523305ef715aca02dfcb024e774e3c656b9d48.tar.gz
org.eclipse.cdt-dc523305ef715aca02dfcb024e774e3c656b9d48.tar.xz
org.eclipse.cdt-dc523305ef715aca02dfcb024e774e3c656b9d48.zip
bug 367559: Double source folder in Make Targets View - handle deletions
in more robust way
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/MakeContentProvider.java27
1 files changed, 10 insertions, 17 deletions
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/MakeContentProvider.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/MakeContentProvider.java
index c135157080..1369e186c1 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/MakeContentProvider.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/MakeContentProvider.java
@@ -333,26 +333,19 @@ public class MakeContentProvider implements ITreeContentProvider, IMakeTargetLis
// Handle removed children. Issue one update for all removals.
affectedChildren = delta.getAffectedChildren(IResourceDelta.REMOVED);
if (affectedChildren.length > 0) {
- final ArrayList<IResource> affected = new ArrayList<IResource>(affectedChildren.length);
for (int i = 0; i < affectedChildren.length; i++) {
if (affectedChildren[i].getResource().getType() == IResource.FOLDER) {
- affected.add(affectedChildren[i].getResource());
- }
- }
- if (!affected.isEmpty()) {
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- if (viewer == null || viewer.getControl() == null || viewer.getControl().isDisposed())
- return;
-
- if (CCorePlugin.showSourceRootsAtTopOfProject()) {
- // that will refresh equal TargetSourceContainer from the tree
- viewer.refresh(new TargetSourceContainer(new CSourceEntry((IFolder) resource, null, 0)));
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ if (viewer == null || viewer.getControl() == null || viewer.getControl().isDisposed())
+ return;
+ // refresh the whole view as deletion may cause parent nodes to get filtered out
+ viewer.refresh();
}
- viewer.refresh(resource);
- }
- });
+ });
+ return;
+ }
}
}

Back to the top