Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329246

Summary: OpenBreakpointMarkerAction class gets the Editor ID and then doesn't consider it when opening the editor
Product: [Eclipse Project] Platform Reporter: Antoaneta Petrova <antoaneta.petrova>
Component: DebugAssignee: Platform-Debug-Inbox <platform-debug-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: darin.eclipse, pawel.1.piech, petar.petrov, pwebster, remy.suen
Version: 3.6Flags: pawel.1.piech: review+
Target Milestone: 3.7 M4   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Antoaneta Petrova CLA 2010-11-02 06:17:20 EDT
Build Identifier: 20100617-1415

Invoking run() method of the OpenBreakpointMarkerAction class takes the target editor id, but the doesn't use it. It just calls WorkbenchPage .openEditor(IEditorInput input, String editorId) method, which then calls openEditor(final IEditorInput input,final String editorID, final boolean activate, final int matchFlags) and uses MATCH_INPUT constant, therefore the editor id, which is specified, is no longer considered. This ends with opening the wrong editor for the breakpoint marker.




Reproducible: Always

Steps to Reproduce:
Invoking run() method of the OpenBreakpointMarkerAction class takes the target editor id, but the doesn't use it. It just calls WorkbenchPage .openEditor(IEditorInput input, String editorId) method, which then calls openEditor(final IEditorInput input,final String editorID, final boolean activate, final int matchFlags) and uses MATCH_INPUT constant, therefore the editor id, which is specified, is no longer considered. This ends with opening the wrong editor for the breakpoint marker.
Comment 1 Darin Wright CLA 2010-11-02 09:50:08 EDT
The API being used on IWorkbench page will re-use an existing editor if one is already open on the same editor input. We could call an alternate API that opens a new editor based on the editor input and editor ID.
Comment 2 Darin Wright CLA 2010-11-02 11:03:12 EDT
Fixed in HEAD.
Comment 3 Pawel Piech CLA 2011-05-06 17:34:01 EDT
Reviewed.