Bug 184334 - [Trim] [RCP] [JFace] Can StatusLineManager be made to be more extensible?
Summary: [Trim] [RCP] [JFace] Can StatusLineManager be made to be more extensible?
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2.2   Edit
Hardware: PC All
: P3 enhancement with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-26 17:00 EDT by Damian Biollo CLA
Modified: 2019-09-06 15:35 EDT (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 Damian Biollo CLA 2007-04-26 17:00:03 EDT
I think a few small changes to the StatusLineManager and the StatusLine classes would make it much easier to customize (instead of re-write) the status bar in RCP applications.

In my app, everything about the status bar is fine, except that I need to tweak the layout manager (for example, to make the message label smaller and another control bigger). Simply applying a new layout (such as RowLayout) to the existing StatusLine control doesn't quite work because their are some internal state variables in StatusLine (such as fProgressIsVisible and fCancelButtonIsVisible) which are required to correctly show or hide controls.

The other issue is with StatusLineManager, which makes it impossible to override createControl without re-implementing the entire class. The internal member "statusLine" is declared private and there is no way to assign it from a subclass.

As it is right now, I need to make a duplicate copy of both classes in order to make a small tweak to the layout. 


For my scenario, two simple changes would be sufficient to improve the extensibility of the status bar:

1. Make StatusLine public. Currently it is package protected.
2. Add a protected function createStatusLine to StatusLineManager and call it from createControl:

    public Control createControl(Composite parent, int style) {
        if (!statusLineExist() && parent != null) {
            statusLine = createStatusLine ();
            update(false);
        }
        return statusLine;
    }

protected StatusLine createStatusLine () {
   return new StatusLine(parent, style);
}


This would allow one to provide a subclass of StatusLine as the implementation control.
Comment 1 Eclipse Webmaster CLA 2019-09-06 15:35:30 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.