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

Bug 325960

Summary: [Compatibility] Editor is not shown when asked by the debugger if it is opened in another perspective but not in the shared area
Product: [Eclipse Project] e4 Reporter: Hitesh <hsoliwal>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3 CC: remy.suen
Version: 1.0   
Target Milestone: 4.1 M3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Screenshot on switch
none
Screenshot before switch none

Description Hitesh CLA 2010-09-22 09:18:30 EDT
Created attachment 179378 [details]
Screenshot on switch

See attached screenshot.
Comment 1 Hitesh CLA 2010-09-22 09:20:04 EDT
Created attachment 179379 [details]
Screenshot before switch

This could be a difference in where the active editor is placed currently. Switching back to the current perspective reveals the breakpoint.
Comment 2 Remy Suen CLA 2010-09-22 09:43:02 EDT
What are you double-clicking on (from the bug's summary) exactly?
Comment 3 Remy Suen CLA 2010-09-22 09:51:39 EDT
(In reply to comment #1)
> This could be a difference in where the active editor is placed currently.

We're talking about the problem where you have the editor for the file with the breakpoint in question open but it is outside of the shared area _and_ you have the preference to automatically switch to the 'Debug' perspective when a breakpoint is hit and the editor doesn't show up in the 'Debug' perspective, correct?
Comment 4 Hitesh CLA 2010-09-22 10:20:27 EDT
(In reply to comment #3)
> (In reply to comment #1)
> > This could be a difference in where the active editor is placed currently.
> 
> We're talking about the problem where you have the editor for the file with the
> breakpoint in question open but it is outside of the shared area _and_ you have
> the preference to automatically switch to the 'Debug' perspective when a
> breakpoint is hit and the editor doesn't show up in the 'Debug' perspective,
> correct?

The point that editor is not being shown and highlighting the breakpoint line after switching to debug perspective is well communicated by the two screen shots.

Nonetheless, it makes sense now to share details. Normally, by default, when the debugger hits a breakpoint, the editor is opened (activated)
and the corresponding line is highlighted. This can also happen when you
*double-click* a stackframe in the *debug view*. 

The switch to 'Debug Perspective' is *by default* set to *true*. There is prompting, but that is a different point, although most likely to be set to 'Do not prompt again'. 
 
If the active editor (target file) happened to be open on a partstack other than the shared one. Then the editor, for some unknown reason, will not show-up in 'Debug Perspective' even after  *double-clicking* on a stackframe in the debug view. 

Please do let me know if would like to have any more details on this.
Comment 5 Remy Suen CLA 2010-09-22 11:18:09 EDT
(In reply to comment #4)
> The point that editor is not being shown and highlighting the breakpoint line
> after switching to debug perspective is well communicated by the two screen
> shots.

That's what it looked like to me but I like to make sure so I don't fix something that the reporter wasn't actually reporting about. ;) It sounds like we're on the same page though, good.

Thread [main] (Suspended (breakpoint at line 540 in WorkbenchPage))	
	WorkbenchPage.bringToTop(IWorkbenchPart) line: 540	
	SourceLookupFacility.openEditor(ISourceLookupResult, IWorkbenchPage) line: 270	
	SourceLookupFacility.display(ISourceLookupResult, IWorkbenchPage) line: 219	
	DebugUITools.displaySource(ISourceLookupResult, IWorkbenchPage) line: 792	
	StackFrameSourceDisplayAdapter$SourceDisplayJob.runInUIThread(IProgressMonitor) line: 155	
	UIJob$1.run() line: 95
Comment 6 Remy Suen CLA 2010-09-22 12:11:44 EDT
Thanks for the bug report, Hitesh. I've committed a workaround for this problem which will be rolled back when implementing bug 325986.
Comment 7 Remy Suen CLA 2010-10-26 09:49:41 EDT
Verified on Windows XP with I20101025-1602.