Bug 46818 - [RCP] IDE should have exact equivalents for old openEditor methods
Summary: [RCP] IDE should have exact equivalents for old openEditor methods
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
: 52658 58745 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-17 21:53 EST by Nick Edgar CLA
Modified: 2007-06-19 16:18 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Edgar CLA 2003-11-17 21:53:55 EST
build N20031117

The IDE class now has openEditor(IWorkbenchPage, IFile, boolean) and the 
equivalent method that takes an IMarker.  However, pre-RCP, all the openEditor 
methods on IWorkbenchPage had special handling for IFileEditorInputs.
Also, callers of the old openEditor(IFile) method should not be forced to add 
an extra argument for activation.

IDE should have direct equivalents for the old methods so that any call of the 
form:
page.openEditor([args])
can now do:
IDE.openEditor(page, [args])
and get the same behaviour as before.

See bug 46395 for more context.
Comment 1 Tod Creasey CLA 2004-02-20 12:23:45 EST
*** Bug 52658 has been marked as a duplicate of this bug. ***
Comment 2 Nick Edgar CLA 2004-03-09 11:35:35 EST
The compatibility fragment should also be updated to call these directly rather 
than doing any mapping itself.
Comment 3 Douglas Pollock CLA 2004-03-25 10:30:51 EST
This is not on the list for M8.  Deferring.... 
Comment 4 Andrew Eidsness CLA 2004-05-06 14:19:25 EDT
The API for IDE and what each method calls is now:

openEditor(IWorkbenchPage page,
           IEditorInput input,
           String editorId)
    -> page.openEditor(input, editorId);

openEditor(IWorkbenchPage page,
           IEditorInput input,
           String editorId,
           boolean activate)
    -> page.openEditor(input, editorId, activate);

openEditor(IWorkbenchPage page,
           IFile input)
    -> page.openEditor(new FileEditorInput(input),
                       getEditorDescriptor(input).getId());

openEditor(IWorkbenchPage page,
           IFile input,
           String editorId)
    -> page.openEditor(new FileEditorInput(input), editorId);

openEditor(IWorkbenchPage page,
           IFile input,
           String editorId,
           boolean activate)
    -> page.openEditor(new FileEditorInput(input), editorId, activate);

openEditor(IWorkbenchPage page,
           IMarker marker)
    -> this.openEditor(page, marker, true);

I didn't change the two existing methods:

openEditor(IWorkbenchPage page,
           IFile input,
           boolean activate)
 
openEditor(IWorkbenchPage page,
           IMarker marker,
           boolean activate)

The test cases have been updated.

This bug is still open because the 3.0 functions don't remember default editor 
changes in the same way as the 2.1 couterparts.
Comment 5 Andrew Eidsness CLA 2004-05-06 14:23:55 EDT
Also, the compatibility bundle still needs to be updated.
Comment 6 Nick Edgar CLA 2004-05-07 16:17:20 EDT
The API work has been done.  Still some implementation aspects to address as 
noted above.
Comment 7 Andrew Eidsness CLA 2004-05-18 17:02:52 EDT
The API is done, the behaviour for default selection needs to be fixed for 3.0.
Comment 8 Michael Van Meekeren CLA 2004-05-25 15:01:18 EDT
For R3.0, we can live without the old behaviour of remembering the last editor 
used to open the file when using the openEditor(IEditorInput, ...) APIs.

That is, we shouldn't jump through hoops to get the compatibility fragment to 
work in ths case.  Could still have the IDE.openEditor equivalent provide the 
old behaviour.
Comment 9 Nick Edgar CLA 2004-06-22 14:03:38 EDT
We're missing an equivalent for the old IWorkbenchPage.openSystemEditor(IFile)
method (discovered by Jeem in bug 67950 comment #5).
Comment 10 Andrew Eidsness CLA 2004-08-30 16:46:45 EDT
*** Bug 58745 has been marked as a duplicate of this bug. ***
Comment 11 Nick Edgar CLA 2005-04-19 16:59:31 EDT
Not for 3.1
Comment 12 Nick Edgar CLA 2006-03-15 11:24:10 EST
Reassigning bugs in component areas that are changing ownership.
Comment 13 Boris Bokowski CLA 2007-06-19 16:18:02 EDT
Closing stale bug.