Bug 330864 Add ability to find context for a UI element
bundles/org.eclipse.e4.core.contexts.debug/src/org/eclipse/e4/core/internal/contexts/debug/ui/ContextTreeProvider.java
refreshJob.schedule(REFRESH_DELAY);
				break;
			case DISPOSED :
				for (Iterator<WeakReference<EclipseContext>> i = activeContexts.iterator(); i.hasNext();) {
					WeakReference<EclipseContext> ref = i.next();
					EclipseContext storedRoot = ref.get();
					if (storedRoot == null) {
						i.remove();
						continue;
					}
					if (storedRoot == context) {
						i.remove();
						break;
					}
				}
				if (view != null && refreshJob != null)
					refreshJob.schedule(REFRESH_DELAY);
				break;
		}
	}
	private EclipseContext getRoot(IEclipseContext context) {
		IEclipseContext root = context;
		while (context != null) {
			root = context;
			context = context.getParent();
		}
		return (EclipseContext) root;
	}
}