Buggy code:
private void lastPartClosePerspective ( ) { } private void init ( WorkbenchWindow w , String layoutID , IAdaptable input ) throws WorkbenchException { } public boolean isPartVisible ( IWorkbenchPart part ) { } public boolean isEditorAreaVisible ( ) { } public boolean isFastView ( IViewReference ref ) { } public IViewReference getActiveFastView ( ) { } protected boolean isSaveNeeded ( ) { } public boolean isZoomed ( ) { } private boolean needToZoomOut ( IWorkbenchPart part ) { } protected void onActivate ( ) { } protected void onDeactivate ( ) { } public void reuseEditor ( IReusableEditor editor , IEditorInput input ) { } public IEditorPart openEditor ( IFile file ) throws PartInitException { } public IEditorPart openEditor ( IFile file , String editorID ) throws PartInitException { } public IEditorPart openEditor ( IFile file , String editorID , boolean activate ) throws PartInitException { } public IEditorPart openEditor ( IMarker marker ) throws PartInitException { } public IEditorPart openEditor ( IMarker marker , boolean activate ) throws PartInitException { } public IEditorPart openEditor ( IEditorInput input , String editorID ) throws PartInitException { } public IEditorPart openEditor ( IEditorInput input , String editorID , boolean activate ) throws PartInitException { } public IEditorPart openInternalEditor ( IEditorInput input , String editorId ) throws PartInitException { } public IEditorPart openInternalEditor ( IMarker marker ) throws PartInitException { } private IEditorPart openMarker ( IMarker marker , boolean activate , boolean forceInternal ) throws PartInitException { } public IEditorPart openInternalEditor ( IFile file ) throws PartInitException { } private IEditorPart openEditor ( final IEditorInput input , final String editorID , final boolean activate , final boolean useEditorID , final IFile file , final boolean forceInternal ) throws PartInitException { } private IEditorPart busyOpenEditor ( IEditorInput input , String editorID , boolean activate , boolean useEditorID , IFile file , boolean forceInternal ) throws PartInitException { } private void showEditor ( boolean activate , IEditorPart editor ) { } public boolean isEditorPinned ( IEditorPart editor ) { } public void openSystemEditor ( IFile input ) throws PartInitException { } private boolean partChangeAffectsZoom ( IWorkbenchPartReference ref ) { } public void removeFastView ( IViewReference ref ) { } public void removePartListener ( IPartListener l ) { } public void removePartListener ( IPartListener2 l ) { } public void removePropertyChangeListener ( IPropertyChangeListener listener ) { } public void removeSelectionListener ( ISelectionListener listener ) { } public void removeSelectionListener ( String partId , ISelectionListener listener ) { } public void removePostSelectionListener ( ISelectionListener listener ) { } public void removePostSelectionListener ( String partId , ISelectionListener listener ) { } public void requestActivation ( IWorkbenchPart part ) { } public void resetPerspective ( ) { } public IStatus restoreState ( IMemento memento , IPerspectiveDescriptor activeDescritor ) { } public boolean saveAllEditors ( boolean confirm ) { } public boolean saveEditor ( org . eclipse . ui . IEditorPart editor , boolean confirm ) { } public void savePerspective ( ) { } public void savePerspectiveAs ( IPerspectiveDescriptor newDesc ) { } protected void saveToolBarLayout ( ) { } public IStatus saveState ( IMemento memento ) { } private void setActivePart ( IWorkbenchPart newPart ) { if ( ( activePart ) == newPart ) return ; boolean markLocation = newPart != ( lastActiveEditor ) ; String label = ( newPart != null ) ? newPart . getTitle ( ) : "none" ; try { UIStats . start ( ACTIVATE_PART , label ) ; Perspective persp = getActivePerspective ( ) ; if ( persp != null ) persp . partActivated ( newPart ) ; IWorkbenchPart oldPart = activePart ; if ( oldPart != null ) { deactivatePart ( oldPart ) ; } activePart = newPart ; if ( newPart != null ) { activationList . setActive ( newPart ) ; if ( newPart instanceof IEditorPart ) { lastActiveEditor = ( ( IEditorPart ) ( newPart ) ) ; IEditorReference ref = ( ( IEditorReference ) ( getReference ( lastActiveEditor ) ) ) ; editorMgr . setVisibleEditor ( ref , true ) ; } } activatePart ( activePart ) ; if ( ( markLocation && ( ( activePart ) != null ) ) && ( ( activePart ) instanceof IEditorPart ) ) <START_BUG> navigationHistory . markEditor ( getActiveEditor ( ) ) ; <END_BUG> if ( oldPart != null ) firePartDeactivated ( oldPart ) ; actionSwitcher . updateActivePart ( newPart ) ; if ( newPart != null ) firePartActivated ( newPart ) ; } finally { UIStats . end ( ACTIVATE_PART , label ) ; } } public void setEditorAreaVisible ( boolean showEditorArea ) { } private void setPerspective ( Perspective newPersp ) { } private void updateVisibility ( Perspective oldPersp , Perspective newPersp ) { } private void activateOldPart ( Perspective newPersp ) { } public void setPerspective ( final IPerspectiveDescriptor desc ) { } protected void setToolBarLayout ( ) { } public void setWorkingSet ( IWorkingSet newWorkingSet ) { } public void showActionSet ( String actionSetID ) { } public IViewPart showView ( final String viewID ) throws PartInitException { } private IViewPart showView ( final String viewID , final boolean activate ) throws PartInitException { } public void toggleFastView ( IViewReference ref ) { } public void toggleZoom ( IWorkbenchPartReference ref ) { } public void updateActionBars ( ) { } private void updateTabList ( IWorkbenchPart part ) { } public void updateTitle ( IViewReference ref ) { } void zoomOut ( ) { } private void zoomOutIfNecessary ( IWorkbenchPart part ) { } public int getEditorReuseThreshold ( ) { } public void setEditorReuseThreshold ( int openEditors ) { } public IEditorReference [ ] getSortedEditors ( ) { } protected IPerspectiveDescriptor [ ] getOpenedPerspectives ( ) { } protected IPerspectiveDescriptor [ ] getSortedPerspectives ( ) { } public IWorkbenchPartReference [ ] getSortedParts ( ) { } public IWorkbenchPartReference getReference ( IWorkbenchPart part ) { } private class ActivationList { List parts = new ArrayList ( ) ;

Fix:
navigationHistory . markEditor ( ( ( IEditorPart ) ( activePart ) ) ) ;