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

Bug 324965

Summary: [Edit] Close Compare Editor when cancelled during initialization stage
Product: [Eclipse Project] Platform Reporter: Tomasz Zarna <tomasz.zarna>
Component: CompareAssignee: Tomasz Zarna <tomasz.zarna>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: kazm
Version: 3.7   
Target Milestone: 3.7 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Intiliazing job's name improved
none
Closing editor when cancelled during init
none
Retrieving log entries none

Description Tomasz Zarna CLA 2010-09-10 09:20:03 EDT
The compare editor opens with "Initializing..." label and stays with it even when Cancel is pressed at that time. We should either open the editor with no diffs displayed (it has been cancelled before we got to the point they are computed) (attachment 176547 [details]) or close the editor. I'd prefer the later.

See also bug 322329, comment 4 and bug 322329, comment 15.

Screenshot: attachment 176444 [details]
Comment 1 Tomasz Zarna CLA 2010-09-10 12:28:47 EDT
Created attachment 178630 [details]
Intiliazing job's name improved

The job that initialize the Compare editor will now inform which editor is starting. This will improve the way these jobs are presented in the Progress view. This is crucial for the scenario from bug 322329, comment 9: many compare editors opened at once.
Comment 2 Tomasz Zarna CLA 2010-09-10 12:29:49 EDT
Created attachment 178631 [details]
Closing editor when cancelled during init

A copy of attachment 176444 [details] from bug 322329.
Comment 3 Tomasz Zarna CLA 2010-11-04 11:47:28 EDT
Krzysztof, could you check if the patch is any good?
Comment 4 Krzysztof Kazmierczyk CLA 2010-11-08 18:40:17 EST
Tom, I have reviewed and tested the patch. The patch looks good a solves the issue.

One thing which is confusing me is that I was able to reproduce the issue only using your suggestion from bug 322329, comment 4. I cannot reproduce it in non debug mode as I always have hourglass cursor when I want to click on window from comment 0. Were you able to reproduce this bug in non debug mode? It is rather minor issue but it might be a little confusing for the user that they can never click any buttons on this window.
Comment 5 Tomasz Zarna CLA 2010-11-12 10:04:03 EST
Created attachment 182999 [details]
Retrieving log entries

(In reply to comment #4)
> Were you able to reproduce this bug in non debug mode? 

Yup. I'm working from home today using a limited Internet connection. When opening a comparison for a file shared in a remote repository I can easily cancel opening the editor when log entries are being fetched[1].

[1] I think the code is here: org.eclipse.team.internal.ui.Utils.updateLabels(SyncInfo, CompareConfiguration, IProgressMonitor), so it is called from org.eclipse.team.ui.synchronize.SaveableCompareEditorInput.prepareInput(IProgressMonitor)
Comment 6 Tomasz Zarna CLA 2010-11-30 11:34:34 EST
Both patches applied to HEAD. Available in builds >=N20101130-2000.
Comment 7 Krzysztof Kazmierczyk CLA 2010-12-06 09:05:09 EST
verified in N20101204-2000
Comment 8 Tomasz Zarna CLA 2010-12-07 06:31:45 EST
Thanks Kazik, I've verified the fix in I20101206-1800 as well.