Community
Participate
Working Groups
DW (5/18/01 8:58:12 AM) Can we re-use editors? And just re-set the input? Can we look at editor IDs? DW (5/18/01 1:37:06 PM) EditorPart.setInput(IEditorInput) is not part of the API - just the implementation. DW (6/19/01 9:37:28 AM) Requires API request/change from workbench. DS (8/3/2001 3:39:38 PM) @see 1GHWE4M: ITPUI:ALL - Reuse of editors: changing the input
The debugger had its own editor re-use algorithm in 1.0. In 2.0, we will simply use the workbench's editor re-use policy. No special algorithm.
Fixed. Re-assigning for verification.
Please verify
I can't seem to get any editor reuse in the Debug Perspective.
Editors are shared between perspectives, and the max number of open editors is as defined by the workbench preference.
Test case: Set # of shared editors in workbench prefs to 1. Create two classes as follows: public class Main { public static void main(String[] args) { Main main = new Main(); main.run(); } public void run() { int i = 0; // Set breakpoint here while (true) { Message message = new Message(i); message.print(); i++; } } } and public class Message { private int value; public Message(int value) { this.value = value; } public void print() { System.out.println("value = " + value); } } Set a breakpoint where indicated in Main. Close all editors in debug persp. Debug. When breakpoint is hit, Main pops up in an editor. Step into Message.print(). Run To Return. If the toolbar action for Run to Return was clicked, everything is fine. However, if the F7 key was used, when control returns to Main, a second editor is opened on Main. This is repeatable.
Re-assigning to Platform UI, as the code the debugger uses to open editors is the same irrespective of key press or tool click.
This should be resolved in this release.
Pls investigate.
The current implementation would not re-use the active editor. Changed and released.
*** Bug 2676 has been marked as a duplicate of this bug. ***
Changed to reuse active editors as well. PS: I have "moved" the API set/getEditorReuseThreshold from IWorkbenchPage to IPageLayout. The debugger could overwrite the threshold to "1".