Bug 50000 PostSelectionWithAST causes IllegalArgumentException
I20040113 Opening a class file from a JAR which has no source causes IAE. !ENTRY org.eclipse.core.runtime 4 2 Jan 14, 2004 17:43:55.905 !MESSAGE An internal error occurred during: "Java AST creation". !STACK 0 java.lang.IllegalArgumentException at org.eclipse.jdt.core.dom.AST.parseCompilationUnit(AST.java:528) at org.eclipse.jdt.core.dom.AST.parseCompilationUnit(AST.java:439) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.computeAST(SelectionListenerWithASTManager.java:122) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:133) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$1.run(SelectionListenerWithASTManager.java:93) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:62)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/SelectionListenerWithASTManager.java
public void install(IEditorPart part, ISelectionListenerWithAST listener) {
			if (fPartListeners.isEmpty()) {
				fSelectionService.addPostSelectionListener(this);
			}
			
			PartListenerGroup listenerGroup= (PartListenerGroup) fPartListeners.get(part);
			if (listenerGroup == null) {
				listenerGroup= new PartListenerGroup(part);
				fPartListeners.put(part, listenerGroup);
			}
			listenerGroup.install(listener);
		}
		
		public void uninstall(IEditorPart part, ISelectionListenerWithAST listener) {
			PartListenerGroup listenerGroup= (PartListenerGroup) fPartListeners.get(part);
			if (listenerGroup == null) {
				return;
			}
			listenerGroup.uninstall(listener);
			if (listenerGroup.isEmpty()) {
				fPartListeners.remove(part);
				if (fPartListeners.isEmpty()) {
					fSelectionService.removePostSelectionListener(this);
				}
			}
		}		
		
		/* (non-Javadoc)
		 * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)