Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329754

Summary: [Presentations] Misplaced view toolbar
Product: [Eclipse Project] Platform Reporter: heiko.eichberger
Component: UIAssignee: Eric Moffatt <emoffatt>
Status: VERIFIED FIXED QA Contact: Eric Moffatt <emoffatt>
Severity: normal    
Priority: P3 CC: daniel.stein, daniel_megert, jessev, pwebster, remy.suen
Version: 3.6.1   
Target Milestone: 3.7 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 394391    
Attachments:
Description Flags
An example project to reproduce the bug.
none
Screen cap of the RCPMail application
none
A zoomed screen cap of the RCPMail application
none
Ensure that the newly created toolbar is not visible none

Description heiko.eichberger CLA 2010-11-09 05:41:28 EST
Build Identifier: 20100917-0705

In our RCP application we initialize all views of a perspective to display the correct view titles when changing the locale. We do this on part activation where we call "page.findView" or "page.getViews". With this the "createPartControl" method of each view will be called and each view will be initialized (also with its toolbar, etc.).

We had no problem with Eclipse 3.3, but now when upgrading to Eclipse 3.6.1 we got a problem with the proceeding mentioned above. With Eclipse 3.6.1 the toolbar of each view toolbar which is in the background after startup will be displayed above the view title bar of the view located in the upper left corner.

Reproducible: Always

Steps to Reproduce:
1. Create a project e.g. like the RCP mail template project.
2. Create another view with a view toolbar.
3. Add the view to the folder layout.
4. Start the application.
Comment 1 heiko.eichberger CLA 2010-11-09 05:42:41 EST
Created attachment 182694 [details]
An example project to reproduce the bug.
Comment 2 Eric Moffatt CLA 2010-11-11 14:44:45 EST
Could you provide a screen cap of what you're seeing ?

BTW, I'm having some issues running your example, not sure why yet. A freshly generated RCPMail product runs and the launch configs look the same. Is it possible that your ZIP may be missing a file ?
Comment 3 heiko.eichberger CLA 2010-11-12 03:09:15 EST
Hi Eric,

I've attached 2 screen caps of the application.

The ZIP file should contain everything. Beside a new generated RCPMail project there should be another file: AnotherView.java. This ViewPart has been added to the perspective (Perspective.java) and the views extension in the plugin.xml.

I hope this helps you to reproduce it.

Regards,

Heiko

> Could you provide a screen cap of what you're seeing ?
> 
> BTW, I'm having some issues running your example, not sure why yet. A freshly
> generated RCPMail product runs and the launch configs look the same. Is it
> possible that your ZIP may be missing a file ?
Comment 4 heiko.eichberger CLA 2010-11-12 03:10:05 EST
Created attachment 182962 [details]
Screen cap of the RCPMail application
Comment 5 heiko.eichberger CLA 2010-11-12 03:10:41 EST
Created attachment 182963 [details]
A zoomed screen cap of the RCPMail application
Comment 6 Remy Suen CLA 2010-11-18 09:55:57 EST
Reproduced on my end with code from HEAD.
Comment 7 Daniel Stein CLA 2010-12-14 08:51:27 EST
We have a similiar problem. We have a workaround for the problem. Perhaps this workaround works for you as well. See bug 304196
Comment 8 Eric Moffatt CLA 2011-01-31 14:58:31 EST
Created attachment 188000 [details]
Ensure that the newly created toolbar is not visible


Note that the code that calls this, PartPane#createControl, explicitly sets its created control's visibility to false so this code just ensures that the TB is not visible either...
Comment 9 Eric Moffatt CLA 2011-01-31 15:01:38 EST
The base cause for this is the 'findView' code in the advisor's perspective activation listener. While suspect (newer code is recommended to use 'findViewReference') there are other calls that can explicitly cause a view to be created without being 'on top' (i.e. 'ShowView(.., CREATE')).

I've kicked around the UI with a variety of 'inner' setups and have seen no instances of *missing* TBs (which is what we'd get if the TB wasn't correctly being made visible as needed).
Comment 10 Eric Moffatt CLA 2011-01-31 15:58:43 EST
Committed in >20100131. Applied the patch.
Comment 11 Jesse CLA 2011-03-10 17:32:14 EST
VERIFIED on build I20110307-2110. I don't see any ghostly toolbars.
Comment 12 Eric Moffatt CLA 2012-11-15 14:57:10 EST
Thanks Jesse !