Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 54436 - [Contributions] Status line items collapse
Summary: [Contributions] Status line items collapse
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: 3.0 M8   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-11 05:17 EST by Dani Megert CLA
Modified: 2004-03-24 09:16 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2004-03-11 05:17:01 EST
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).
Comment 1 Nick Edgar CLA 2004-03-11 23:53:56 EST
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.
Comment 2 Nick Edgar CLA 2004-03-12 00:04:09 EST
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...
Comment 3 Nick Edgar CLA 2004-03-12 01:51:57 EST
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.
Comment 4 Dani Megert CLA 2004-03-12 10:23:20 EST
Applied Nick's patch
Comment 5 Dani Megert CLA 2004-03-24 04:46:19 EST
start verifying.
Comment 6 Dani Megert CLA 2004-03-24 09:16:27 EST
Works in I2004032400010 + plug-in export for I200403240800