Bug 466609 - [Contributions] Status bar contributions are cut off
Summary: [Contributions] Status bar contributions are cut off
Status: CLOSED DUPLICATE of bug 471313
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: PC Windows 7
: P3 major with 5 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-06 12:00 EDT by Rüdiger Herrmann CLA
Modified: 2017-08-25 03:27 EDT (History)
9 users (show)

See Also:


Attachments
Statusbar contribution in 4.5 M7 (1.20 KB, image/png)
2015-05-06 12:00 EDT, Rüdiger Herrmann CLA
no flags Details
Statusbar contribution in 4.4 (1.42 KB, image/png)
2015-05-06 12:01 EDT, Rüdiger Herrmann CLA
no flags Details
example project (3.81 KB, application/zip)
2015-05-06 18:01 EDT, Andrey Loskutov CLA
no flags Details
Trim cut-off viPlugin Win7 (1.34 KB, image/png)
2015-06-09 17:58 EDT, Michael Bartl CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rüdiger Herrmann CLA 2015-05-06 12:00:08 EDT
With 4.5 M7, control contributions to the status bar are only partially shown or do not appear at all. The same extension/code works with 4.4 and 3.8. IIRC, 4.5 M6 didn't have this bug either.

See also the attached screenshots of the lower-left corner of the workbench window.

The extension is defined as this:
  <extension point="org.eclipse.ui.menus">
     <menuContribution
           locationURI="toolbar:org.eclipse.ui.trim.status">
        <toolbar id="com.example.toolbar" label="Test">
            <control
                class="com.codeaffine.StatusContributionItem"
                id="com.example.control">
            </control>
        </toolbar>
     </menuContribution>
  </extension>

and the StatusContributionItem is this:
  public class StatusContributionItem extends WorkbenchWindowControlContribution {
    @Override
    protected Control createControl( Composite parent ) {
      Composite result = new Composite( parent, SWT.NONE );
      result.setLayout( new FillLayout() );
      Label label = new Label( result, SWT.NONE );
      label.setText( "Hello World" );
      return result;
    }
  }
Comment 1 Rüdiger Herrmann CLA 2015-05-06 12:00:50 EDT
Created attachment 253238 [details]
Statusbar contribution in 4.5 M7
Comment 2 Rüdiger Herrmann CLA 2015-05-06 12:01:09 EDT
Created attachment 253239 [details]
Statusbar contribution in 4.4
Comment 3 Andrey Loskutov CLA 2015-05-06 18:01:11 EDT
Created attachment 253255 [details]
example project

I can't reproduce on 4.5 head. Can you attach something similar to the example I've attached (based on your code), where we can see the problem?
Comment 4 Rüdiger Herrmann CLA 2015-05-06 18:55:31 EDT
(In reply to Andrey Loskutov from comment #3)
> Created attachment 253255 [details]
> example project
> 
> I can't reproduce on 4.5 head. Can you attach something similar to the
> example I've attached (based on your code), where we can see the problem?

Thanks for looking into this. I am afraid, I can't provide much more insight. The attached project is sufficient to reproduce the problem on my system (Win 7). The target platform contains the Platform SDK 4.5M7. I am launching with a clean workspace and configuration area, the attached projects is the only one in the workspace.

To ensure that there are no unwanted side-effects, I switched to a new workspace and
1. imported the attached project
2. created a target platform file that contains 'Platform SDK 4.5M7'
3. set the above target platform
4. launched with 'all workspace and target plug-ins'
-> the problem appears as desribed
Comment 5 Rüdiger Herrmann CLA 2015-06-08 19:10:02 EDT
This regression is still apparent in the I20150603-2000 build from the http://download.eclipse.org/eclipse/updates/4.5milestones p2 repository and can be reproduced with the attached project.

Am I the only one seeing this?
Comment 6 Michael Bartl CLA 2015-06-09 17:54:05 EDT
You are not the only one. I'm the author of viPlugin and a user just dropped me a note with the exact same problem. Tried everything, but can't get the Label and Text widget to completely show (even the trim handle is cut off). Please fix before 4.5 is released, because I will otherwise be flooded with support emails...
Comment 7 Michael Bartl CLA 2015-06-09 17:58:08 EDT
Created attachment 254257 [details]
Trim cut-off viPlugin Win7
Comment 8 Andrey Loskutov CLA 2015-06-09 18:17:50 EDT
(In reply to Michael Bartl from comment #6)
> Please fix before 4.5 is released, because I will otherwise be flooded with
> support emails...

I think even if you could bisect platform UI repo and find the offending commit, backing it out (or fixing the issue) will be probably not possible for 4.5. We are in RC4 time, see https://www.eclipse.org/eclipse/development/plans/freeze_plan_4_5.php#RC4

But if you could point to the commit which breaks the status bar, the fix could eventually be already in 4.5.1.
Comment 9 Michael Bartl CLA 2015-06-09 18:21:12 EDT
I know where we are in the release plan and it was mentioned at 4.5M7 time. I have thousands of customers that will not be able to use viPlugin with 4.5 then and will wait for 4.5.1... that's sad news.
Comment 10 Lars Vogel CLA 2015-06-09 19:13:46 EDT
(In reply to Michael Bartl from comment #9)
> I know where we are in the release plan and it was mentioned at 4.5M7 time.
> I have thousands of customers that will not be able to use viPlugin with 4.5
> then and will wait for 4.5.1... that's sad news.

Sorry for that. If you can help with finding the evil commit it is more likely that we will be able to solve that in 4.5.1.
Comment 11 Derek Morris CLA 2015-08-05 03:47:40 EDT
Is anybody looking into this? I am having exact same problem.

It has also been reported in this bugzilla
https://bugs.eclipse.org/bugs/show_bug.cgi?id=471326
Which shows the problem in the example Mail application.
Comment 12 Rüdiger Herrmann CLA 2015-10-14 15:40:28 EDT
After debugging the workbench source code for a while I came up with still no clue what change could have caused this regression. 

But bug 183003 ([Trim] widget contributions are of fixed heights) describes a similar behavior. Comment #21 desribes a workaround that worked for me.

Not sure why this worked in 4.4 and now isn't working any more.
Comment 13 Laurent Redor CLA 2017-04-28 03:32:33 EDT
This problem is awlays here. No news about it?

@Rüdiger: Can you precise the workaround you talk about in comment 12, inspired from bug 183003 comment 21. I think it is a good idea to complete the example of the initial description with the workaround? Thanks in advance.
Comment 14 Laurent Redor CLA 2017-04-28 03:32:52 EDT
This problem is awlays here. No news about it?

@Rüdiger: Can you precise the workaround you talk about in comment 12, inspired from bug 183003 comment 21. I think it is a good idea to complete the example of the initial description with the workaround? Thanks in advance.
Comment 15 Laurent Redor CLA 2017-04-28 05:40:38 EDT
I've finally used the workaround of bug 471313 comment 12.
Comment 16 Andrey Loskutov CLA 2017-05-02 03:04:35 EDT

*** This bug has been marked as a duplicate of bug 471313 ***