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

Bug 337719

Summary: [implementation] AbstractTextEditor does not prompt when out of sync in MultiPageEditorPart
Product: [Eclipse Project] Platform Reporter: Nick Sandonato <nsand.dev>
Component: TextAssignee: Nick Sandonato <nsand.dev>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: browe, daniel_megert, remy.suen
Version: 3.6.2   
Target Milestone: 3.6.2+   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch daniel_megert: iplog+, daniel_megert: review-

Description Nick Sandonato CLA 2011-02-21 09:22:08 EST
Created attachment 189409 [details]
patch

When an AbstractTextEditor is embedded as a page in a MultiPageEditorPart, the AbstractTextEditor is currently not updated as to when it has been activated. This leads to never prompting to replace the editor contents in the case of the file changing on the filesystem.

It may be useful to check if the active part can adapt to AbstractTextEditor in addition to the active part being the AbstractTextEditor.
Comment 1 Dani Megert CLA 2011-02-22 06:35:47 EST
Thanks for the patch Nick. Next time please also add your name to the copyright section (see HEAD how to do it).

Fixed in HEAD.
Available in builds >= I201102022-0800.
Comment 2 Dani Megert CLA 2011-02-22 06:47:52 EST
I also added a 'null' check for complete safety.
Comment 3 Dani Megert CLA 2011-02-22 06:58:26 EST
The fix causes an NPE on exit. Fixed in HEAD.
Comment 4 Billy Rowe CLA 2011-03-15 12:09:04 EDT
Rational Application Developer needs a fix in the 3.6.2 stream. Could this be backported please?
Comment 5 Dani Megert CLA 2011-03-16 12:30:32 EDT
(In reply to comment #4)
> Rational Application Developer needs a fix in the 3.6.2 stream. Could this be
> backported please?
Done.