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

Bug 326521

Summary: Convert line delimiter action enablement is broken
Product: [Eclipse Project] Platform Reporter: Anton Leherbauer <aleherb+eclipse>
Component: UIAssignee: Dani Megert <daniel_megert>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bokowski, daniel_megert, mober.at+eclipse
Version: 3.6   
Target Milestone: 3.7 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 201650    
Bug Blocks: 331303    

Description Anton Leherbauer CLA 2010-09-29 08:16:48 EDT
Build id: I20100608-0911

Steps to reproduce:
1) Open any text file
2) Activate e.g. Problems view
3) Activate editor again without changing the selection
-> All actions under File > Convert Line Delimiters To > are disabled

Usually the actions are already disabled after step 1.
Changing the selection in the editor enables them again.

This worked with Galileo.
Comment 1 Anton Leherbauer CLA 2010-09-29 10:06:03 EDT
In FileBufferOperationAction.selectionChanged() the part returned from window.getPartService().getActivePart() is the previously active one.
That's why the selection event is ignored when switching from a view to an editor.

With Galileo, the returned part is the currently active one.  Looks like a regression in the part service?
Comment 2 Martin Oberhuber CLA 2010-09-29 10:07:50 EDT
CQ:WIND00234739
Comment 3 Dani Megert CLA 2010-09-29 10:08:44 EDT
> With Galileo, the returned part is the currently active one.  Looks like a
> regression in the part service?
Yep, I'm on it.
Comment 4 Dani Megert CLA 2010-09-29 10:13:43 EDT
Caused by change in WWinPartService.
Comment 5 Dani Megert CLA 2010-09-29 10:25:30 EDT
Fixed by reverting change on WWinPartService.
Comment 6 Paul Webster CLA 2010-10-26 07:19:25 EDT
In I20101025-1300
PW
Comment 7 Martin Oberhuber CLA 2010-11-08 09:31:11 EST
Thanks for fixing this in Indigo. Could a backport of the fix to 3.6.2 be considered?

Thanks, Martin
Comment 8 Dani Megert CLA 2010-11-08 09:45:00 EST
Two changes are needed to fix this in 3.6.2:
- apply my changes made in BuildUtilities rev. 1.10
- revert the change in WWinPartService

Those changes look safe to me. Boris?
Comment 9 Boris Bokowski CLA 2010-11-26 13:04:02 EST
(In reply to comment #8)
> Two changes are needed to fix this in 3.6.2:
> - apply my changes made in BuildUtilities rev. 1.10
> - revert the change in WWinPartService
> 
> Those changes look safe to me. Boris?

Would you be able to attach a patch, please? (Open a clone of this bug to track the 3.6.2 work)
Comment 10 Martin Oberhuber CLA 2010-11-29 04:30:06 EST
(In reply to comment #9)
> Would you be able to attach a patch, please?

Done, created bug 331303 for the backport and attached a patch.

BTW, Looking at CVS comments it seems that the regression was introduced by the fix for bug 201650.