Community
Participate
Working Groups
I20040310 1. open a Java or Text editor 2. start incremental find (Ctrl+J) Observe: the status line items are still OK 3. start typing ==> items get collapsed This worked in all previous releases (including I20040309).
I saw this while working on bug 53748. This is caused by the recent change to Text's StatusLineContributionItem (by us) to create two controls (a separator Label and a CLabel) and a completely bogus update() implementation in StatusLineManager that doesn't handle this, and many other cases. I've changed update() to be a naive, brute force algorithm. An incremental algorithm is just not possible with the current JFace API it uses, IContributionItem.fill(Composite), since this does not take the index at which to insert the new controls. This should not be a performance hit since StatusLineManager is not called frequently, and it typically contains only a few contribution items.
With this fix, the status indicators (Writable, Insert, <line>:<col>) appear OK. The Writable indicator was previously collapsed. Incremental search appears OK and does not disappear when extra chars typed, but goes blank when the match fails. Investigating...
Fix to update() released. The problem with the error text not showing up is due to the contribution items getting recreated more frequently with the new algorithm. IncrementalFind forces an update on the status line manager, which previously tried to reuse contribution items. This optimization has been removed for now. Note that this only affects a full update. Regular status line indicator changes, e.g. on caret position changes, have no performance hit. StatusLineContribution.fill(Composite) only sets the plain text, not the error text. The fix is to replace: if (fText != null) fLabel.setText(fText); with: updateMessageLabel(); Moving to Text.
Applied Nick's patch
start verifying.
Works in I2004032400010 + plug-in export for I200403240800