/*
* @see IAction#run()
*/
public void run() {
EditPosition editPosition= TextEditorPlugin.getDefault().getLastEditPosition();
if (editPosition == null)
return;
final Position pos= editPosition.getPosition();
if (pos == null || pos.isDeleted)
return;
IWorkbenchWindow window= getWindow();
if (window == null)
return;
IWorkbenchPage page= window.getActivePage();
IEditorPart editor;
try {
editor= page.openEditor(editPosition.getEditorInput(), editPosition.getEditorId());
} catch (PartInitException ex) {
return;
}
// Optimization - could also use else branch