X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/EditorUtility.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/EditorUtility.java index b593805..097261a 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/EditorUtility.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/EditorUtility.java @@ -33,6 +33,7 @@ import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.ide.IDE; import org.eclipse.ui.part.FileEditorInput; import org.eclipse.ui.texteditor.ITextEditor; @@ -66,7 +67,7 @@ public class EditorUtility { IEditorInput input= null; try { - input= getEditorInput(inputElement); + input = getEditorInput(inputElement); } catch (JavaModelException x) { PHPeclipsePlugin.log(x.getStatus()); } @@ -121,15 +122,15 @@ public class EditorUtility { } private static IEditorPart openInEditor(IFile file, boolean activate) throws PartInitException { - if (file != null) { - IWorkbenchPage p= PHPeclipsePlugin.getActivePage(); - if (p != null) { - IEditorPart editorPart= p.openEditor(file, null, activate); - initializeHighlightRange(editorPart); - return editorPart; - } - } - return null; + if (file != null) { + IWorkbenchPage p= PHPeclipsePlugin.getActivePage(); + if (p != null) { + IEditorPart editorPart= IDE.openEditor(p, file, activate); + initializeHighlightRange(editorPart); + return editorPart; + } + } + return null; } private static IEditorPart openInEditor(IEditorInput input, String editorID, boolean activate) throws PartInitException {