Bug 220215 - [hovers] Bad API: IInformationControlExtension5#allowMoveIntoControl()
Summary: [hovers] Bad API: IInformationControlExtension5#allowMoveIntoControl()
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M6   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-25 11:01 EST by Markus Keller CLA
Modified: 2008-03-22 04:11 EDT (History)
1 user (show)

See Also:
daniel_megert: review+


Attachments
Fix (38.55 KB, patch)
2008-03-18 13:57 EDT, Markus Keller CLA
no flags Details | Diff
Fix2 (45.06 KB, patch)
2008-03-20 06:08 EDT, Markus Keller CLA
no flags Details | Diff
Fix3 (38.67 KB, patch)
2008-03-21 07:19 EDT, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2008-02-25 11:01:21 EST
I20080222-1622

IInformationControlExtension5#allowMoveIntoControl() is a bad API, since it relies on ITextHoverExtension2#getInformationPresenterControlCreator() to supply an appropriate control creator. If a control creator is not available we currently fall back to a default information control (in AbstractTextEditor and in StickyHoverManager), which will render garbage if the input is not HTML text.

Should get rid of ITextHoverExtension2#getInformationPresenterControlCreator() and   add IInformationControlExtension5#getInformationPresenterControlCreator() instead. The only necessary bug compatibility fallback will be the check for IInformationProviderExtension2 in the F2 code if the info control does not implement IInformationControlExtension5.
Comment 1 Markus Keller CLA 2008-03-18 13:57:36 EDT
Created attachment 92825 [details]
Fix
Comment 2 Markus Keller CLA 2008-03-20 06:08:57 EDT
Created attachment 93014 [details]
Fix2
Comment 3 Dani Megert CLA 2008-03-20 10:05:42 EDT
Patch committed.
Comment 4 Markus Keller CLA 2008-03-21 07:19:46 EDT
Created attachment 93118 [details]
Fix3

Here's the final patch for the new hovers APIs. It
- gets rid of ITextHoverExtension2#getInformationPresenterControlCreator(),
- streamlines enablement of the "enrich" feature by merging the two settings into one, and
- installs StickyHoverManager all the time, which also allows F2 to keep the size when enriching hovers (but keeps the fallback to the old method for compatibility)
Comment 5 Dani Megert CLA 2008-03-22 04:11:08 EDT
It's really nice now. Thanks for all this.
Fixed in HEAD.
Available in builds >= I20080323-200.