import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditor;
IEditorPart editor;
ITextEditor textEditor;
if (file != null && file.exists()) {
- editor = page.openEditor(file);
+ editor = IDE.openEditor(page, file, true);
textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
} else {
// Otherwise open the stream directly