mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-30 21:03:28 +00:00
eclipse plugin: fix the editor when eclipse has lost focus...
...and no default workbench page available
This commit is contained in:
parent
83f876b27f
commit
93df96c6a0
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user