aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2018-06-12 08:40:55 -0400
committerAndrey Loskutov2018-06-12 09:20:09 -0400
commit1b8faf587e61f1bf23eb1a72da326da079208788 (patch)
tree2e26a94786757aeeed29ec588fa7d3d1982216df
parent63b4996be49c2ec3b535fc70d0c227b5db4a45d8 (diff)
downloadeclipse.platform.debug-1b8faf587e61f1bf23eb1a72da326da079208788.zip
eclipse.platform.debug-1b8faf587e61f1bf23eb1a72da326da079208788.tar.gz
eclipse.platform.debug-1b8faf587e61f1bf23eb1a72da326da079208788.tar.xz
Bug 535809 - ElementContentProvider jobs have no family
Added family to all jobs and cleaned up the code a bit. Change-Id: I777599bce7f347a07d0d2c7051fdd695204a9e46 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java33
1 files changed, 18 insertions, 15 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java
index 2ffe8c6..ba68b99 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java
@@ -30,12 +30,24 @@ public abstract class ElementContentProvider implements IElementContentProvider
protected static final Object[] EMPTY = new Object[0];
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider#updateChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IElementRequestMonitor)
- */
+ protected abstract class ElementContentProviderJob extends Job {
+
+ public ElementContentProviderJob(String name) {
+ super(name);
+ setSystem(true);
+ setUser(false);
+ }
+
+ @Override
+ public boolean belongsTo(Object family) {
+ return family == ElementContentProvider.class;
+ }
+
+ }
+
@Override
public void update(final IChildrenUpdate[] updates) {
- Job job = new Job("children update") { //$NON-NLS-1$
+ Job job = new ElementContentProviderJob("Debug children update") { //$NON-NLS-1$
@Override
protected IStatus run(IProgressMonitor monitor) {
for (int i = 0; i < updates.length; i++) {
@@ -48,17 +60,13 @@ public abstract class ElementContentProvider implements IElementContentProvider
return Status.OK_STATUS;
}
};
- job.setSystem(true);
job.setRule(getRule(updates));
job.schedule();
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider#update(org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate)
- */
@Override
public void update(final IChildrenCountUpdate[] updates) {
- Job job = new Job("child count update") { //$NON-NLS-1$
+ Job job = new ElementContentProviderJob("Debug child count update") { //$NON-NLS-1$
@Override
protected IStatus run(IProgressMonitor monitor) {
for (int i = 0; i < updates.length; i++) {
@@ -71,7 +79,6 @@ public abstract class ElementContentProvider implements IElementContentProvider
return Status.OK_STATUS;
}
};
- job.setSystem(true);
job.setRule(getRule(updates));
job.schedule();
}
@@ -192,12 +199,9 @@ public abstract class ElementContentProvider implements IElementContentProvider
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider#update(org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate[])
- */
@Override
public void update(final IHasChildrenUpdate[] updates) {
- Job job = new Job("has children update") { //$NON-NLS-1$
+ Job job = new ElementContentProviderJob("Debug has children update") { //$NON-NLS-1$
@Override
protected IStatus run(IProgressMonitor monitor) {
for (int i = 0; i < updates.length; i++) {
@@ -210,7 +214,6 @@ public abstract class ElementContentProvider implements IElementContentProvider
return Status.OK_STATUS;
}
};
- job.setSystem(true);
job.setRule(getRule(updates));
job.schedule();
}