|
From: Christopher W. <caw...@us...> - 2006-03-30 03:09:34
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv922/src/org/rubypeople/rdt/internal/ui/rubyeditor Modified Files: EditorUtility.java Log Message: Index: EditorUtility.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/EditorUtility.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EditorUtility.java 28 Mar 2006 23:15:48 -0000 1.1 --- EditorUtility.java 30 Mar 2006 03:09:31 -0000 1.2 *************** *** 39,43 **** /** ! * Opens a Java editor for an element (IJavaElement, IFile, IStorage...) * @return the IEditorPart or null if wrong element type or opening failed */ --- 39,43 ---- /** ! * Opens a Ruby editor for an element (IJavaElement, IFile, IStorage...) * @return the IEditorPart or null if wrong element type or opening failed */ *************** *** 59,62 **** --- 59,74 ---- } + private static IEditorPart openInEditor(IFile file, boolean activate) throws PartInitException { + if (file != null) { + IWorkbenchPage p= RubyPlugin.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 { if (input != null) { |