Community
Participate
Working Groups
When the SourceLookupFacility reuses an already open editor (openEditor method calls setInput), the new IEditiorInput is not added to the workbench's editor history. If a page.openEditor is called, then the workbench editor history is updated. Problem can be demonstrated with the JDT. To recreate the problem: Make sure the Run/Debug preferences is set to reuse editors Set a breakpoint somewhere in a Java program (The breakpoint will need to be several calls deep through different classes). Close All Editors (Open and close enough editors on class files you will not be debugging, to fill up the MRU with irrelevant files) Execute the Java program and hit the breakpoint. The file with the breakpoint should be opened automatically. Notice that the file should have been added to the MRU (under the File menu) Now using the Debug View, click back into the stack frame to a method that is in another class. The editor should switch to that class. Check the MRU list. It should not be showing the 2nd class like I think it should. Basically, SourceLookupFacility.openEditor(...) will call setInput on the editor directly if it is an IReusableEditor and it is already opened. This bypasses the IWorkbenchPage.openEditor call. If the IWorkbenchPage.openEditor call was made, then eventually the workbench's EditorHistory would be modified. The IWorkbenchPage interface defines a reuseEditor() method that I think should be being called instead.
Using IWorkbenchPage.reuseEditor(...) lead me to this error: Problem detected with part org.eclipse.debug.ui.sourcelookup.CommonSourceNotFoundEditor (class = org.eclipse.debug.ui.sourcelookup.CommonSourceNotFoundEditor): Editor is not firing a PROP_INPUT event in response to IReusableEditor.setInput(...)
Fixed in SourceLookupFacility and CommonSourceNotFoundEditor.
fixed, pending verification
Doesn't seem to be working when you select another frame. The following simple exmaple demonstrates: public class C1 { public void foo() { System.out.println("breakpoint"); //breakpoint here } } public class C2 { public static void main(String[] args) { C1 c1 = new C1(); c1.foo(); } } Run C2 following the steps above, and notice that if you select the stack frame for C2 while suspended at C1, the C2 editor is not added to the MRU editor list. As we are now using the workbench page's method I'll kick it over to them for comment.
Punting to Boris
Cannot reproduce. WorkbenchPage.reuseEditor() was changed as part of the fix for bug 165970, which might have fixed the issue described here as well.
I have retested this myself again using the 3.4 codebase. The problem is still present and easily reproducable. NOTE: You must have the debug preference 'Reuse editor when displaying source code' set to checked. Reopening the issue.
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.