eclipse plugin: fix the editor when eclipse has lost focus...

...and no default workbench page available
This commit is contained in:
Timotei Dolean 2010-07-18 14:50:26 +00:00
parent 83f876b27f
commit 93df96c6a0

View File

@ -21,7 +21,6 @@ import org.eclipse.ui.texteditor.AbstractTextEditor;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditor;
import wesnoth_eclipse_plugin.Activator;
import wesnoth_eclipse_plugin.Logger;
public class EditorUtils
@ -48,8 +47,7 @@ public class EditorUtils
public static IEditorPart getEditedFile()
{
return Activator.getDefault().getWorkbench().
getActiveWorkbenchWindow().getPages()[0].getActiveEditor();
return WorkspaceUtils.getWorkbenchWindow().getPages()[0].getActiveEditor();
}
public static void openEditor(IFile file, boolean activatePage)