Bug 56323 [implementation] NPE when opening file from reprository view
20040325 Got this NPE when opening an editor from the rep view java.lang.NullPointerException at java.lang.Throwable.<init>(Throwable.java) at java.lang.Throwable.<init>(Throwable.java) at java.lang.NullPointerException.<init>(NullPointerException.java:60) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.activeJavaEditorChanged(ASTProvider.java:210) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.access$0(ASTProvider.java:199) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider$ActivationListener.partVisible(ASTProvider.java:102) at org.eclipse.ui.internal.PartListenerList2$7.run(PartListenerList2.java:175) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java) at org.eclipse.core.runtime.Platform.run(Platform.java) at org.eclipse.ui.internal.PartListenerList2.firePartVisible(PartListenerList2.java) at org.eclipse.ui.internal.WWinPartService$1.partVisible(WWinPartService.java:68) at org.eclipse.ui.internal.PartListenerList2$7.run(PartListenerList2.java:175) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java) at org.eclipse.core.runtime.Platform.run(Platform.java) at org.eclipse.ui.internal.PartListenerList2.firePartVisible(PartListenerList2.java) at org.eclipse.ui.internal.WorkbenchPage$1.propertyChange(WorkbenchPage.java) at org.eclipse.ui.internal.LayoutPart.setVisible(LayoutPart.java) at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:309) at org.eclipse.ui.internal.PresentableEditorPart.setVisible(PresentableEditorPart.java:93) at org.eclipse.ui.internal.presentations.BasicStackPresentation.selectPart(BasicStackPresentation.java:652) at org.eclipse.ui.internal.EditorWorkbook.setSelection(EditorWorkbook.java:777) at org.eclipse.ui.internal.EditorWorkbook.setVisibleEditor(EditorWorkbook.java:1118) at org.eclipse.ui.internal.EditorPresentation.setVisibleEditor(EditorPresentation.java:287) at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1048) at org.eclipse.ui.internal.WorkbenchPage.bringToTop(WorkbenchPage.java:586) at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:454) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2142) at org.eclipse.ui.internal.WorkbenchPage.access$6(WorkbenchPage.java:2071) at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2058) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2053) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2036) at org.eclipse.team.internal.ccvs.ui.actions.OpenRemoteFileAction$1.run(OpenRemoteFileAction.java:101) at org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager.run(RepositoryManager.java:741) at org.eclipse.team.internal.ccvs.ui.actions.CVSAction$1.run(CVSAction.java:225) at org.eclipse.team.internal.ccvs.ui.actions.CVSAction$2.run(CVSAction.java:244) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java) at org.eclipse.team.internal.ccvs.ui.actions.CVSAction.run(CVSAction.java:241) at org.eclipse.team.internal.ccvs.ui.actions.OpenRemoteFileAction.execute(OpenRemoteFileAction.java:73) at org.eclipse.team.internal.ccvs.ui.actions.CVSAction.run(CVSAction.java:52) at org.eclipse.team.internal.ccvs.ui.repo.RemoteViewPart.handleDoubleClick(RemoteViewPart.java:397) at org.eclipse.team.internal.ccvs.ui.repo.RemoteViewPart.access$1(RemoteViewPart.java:387) at org.eclipse.team.internal.ccvs.ui.repo.RemoteViewPart$8.doubleClick(RemoteViewPart.java:305) at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:381) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java) at org.eclipse.core.runtime.Platform.run(Platform.java) at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:379) at org.eclipse.jface.viewers.StructuredViewer.handleDoubleSelect(StructuredViewer.java:598) at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:693) at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:187) at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1562) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1536) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:257) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:90) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:288) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:232) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:116) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41) at java.lang.reflect.Method.invoke(Method.java:386) at org.eclipse.core.launcher.Main.basicRun(Main.java:315) at org.eclipse.core.launcher.Main.run(Main.java:740) at org.eclipse.core.launcher.Main.main(Main.java:724)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ASTProvider.java
/*
		 * @see org.eclipse.ui.IPartListener2#partActivated(org.eclipse.ui.IWorkbenchPartReference)
		 */
		public void partActivated(IWorkbenchPartReference ref) {
			if (isJavaEditor(ref) && !isActiveEditor(ref))
				activeJavaEditorChanged(ref.getPart(true));
		}
		
		/*
		 * @see org.eclipse.ui.IPartListener2#partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference)
		 */
		public void partBroughtToTop(IWorkbenchPartReference ref) {
			if (isJavaEditor(ref) && !isActiveEditor(ref))
				activeJavaEditorChanged(ref.getPart(true));
		}
		
		/*
		 * @see org.eclipse.ui.IPartListener2#partClosed(org.eclipse.ui.IWorkbenchPartReference)
		 */
		public void partClosed(IWorkbenchPartReference ref) {
			if (isActiveEditor(ref))
				activeJavaEditorChanged(null);
		}
		
		/*
		 * @see org.eclipse.ui.IPartListener2#partDeactivated(org.eclipse.ui.IWorkbenchPartReference)
		 */
		public void partDeactivated(IWorkbenchPartReference ref) {
		}