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;
IEditorInput input= null;
try {
- input= getEditorInput(inputElement);
+ input = getEditorInput(inputElement);
} catch (JavaModelException x) {
PHPeclipsePlugin.log(x.getStatus());
}
}
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 {