Bug 131820

Summary: [Workbench] IWorkbenchPage doesn't provide openEditor(EditorInput, editorId, activate, matchFlags)
Product: [Eclipse Project] Platform Reporter: Alberto Ricart <aricart>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P5 Keywords: helpwanted
Version: 3.1.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Alberto Ricart CLA 2006-03-14 16:50:04 EST
Neither IDE.openEditor nor IWorkbenchPage provide access to 
WorkbenchPage#openEditor(EditorInput, editorId, activate, matchFlags). This handy internal method enables client code to open editors and specify whether both the path and editor id should be matched, before returning an existing editor. The currently public implementation simply matches on the path, and if the file is already opened it returns that editor even if the ID is incorrect.

While for most applications the above is the correct behaviour, for some it doesn't work. On our case, we have custom EMF editors that are backed by a custom file buffer implementation that allows concurrent editing of a file by tools and editors. So opening multiple editors on the same file is handled correctly.

The trouble is that the API provided by IDE or IWorkbenchPage implementers doesn't expose the functionality we require to open the desired editor on the already opened file, so the only workaround is to use WorkbenchPage#openEditor(EditorInput, editorId, activate, matchFlags) to accomplish this.

We would like the IDE class to add a method that exposes this functionality in a way that we can count on in future versions of eclipse.
Comment 1 Tod Creasey CLA 2007-06-18 15:58:58 EDT
We are not currently planning to address this but please feel free to supply a patch
Comment 2 Eclipse Webmaster CLA 2019-09-06 16:10:50 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.