Bug 55451 Assertion Failed in ASTProvider
plugin export 20040319 1. Browse into CVS of org.eclipse.swt (win32), and open TableItem.java 2. Endless repretitions of error dialogs org.eclipse.jface.text.Assert$AssertionFailedException: Assertion failed: at java.lang.Throwable.<init>(Throwable.java) at java.lang.Throwable.<init>(Throwable.java) at org.eclipse.jface.text.Assert$AssertionFailedException.<init>(Assert.java:54) at org.eclipse.jface.text.Assert.isTrue(Assert.java:175) at org.eclipse.jface.text.Assert.isTrue(Assert.java) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:140) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$1.run(SelectionListenerWithASTManager.java:97) at org.eclipse.core.internal.jobs.Worker.run(Worker.java)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/SelectionListenerWithASTManager.java
}
	/**
	 * Unregisters a selection listener.
	 * @param part The editor part the listener was registered.
	 * @param listener The listener to unregister.
	 */
	public void removeListener(IEditorPart part, ISelectionListenerWithAST listener) {
		ISelectionService service= part.getSite().getWorkbenchWindow().getSelectionService();
		WorkbenchWindowListener windowListener= (WorkbenchWindowListener) fListenerGroups.get(service);
		if (windowListener != null) {
			windowListener.uninstall(part, listener);
			if (windowListener.isEmpty()) {
				fListenerGroups.remove(service);
			}
		}
	}
	
	/**
	 * Forces a selection changed event that is sent to all listeners registered to the given editor
	 * part. The event is sent from a background thread: this method call can return before the listeners
	 * are informed.
	 */
	public void forceSelectionChange(IEditorPart part, ITextSelection selection) {
		ISelectionService service= part.getSite().getWorkbenchWindow().getSelectionService();
		WorkbenchWindowListener windowListener= (WorkbenchWindowListener) fListenerGroups.get(service);
		if (windowListener != null) {
			windowListener.doPostSelectionChanged(part, selection);
		}
	}}