Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329754 - [Presentations] Misplaced view toolbar
Summary: [Presentations] Misplaced view toolbar
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Eric Moffatt CLA
QA Contact: Eric Moffatt CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 394391
  Show dependency tree
 
Reported: 2010-11-09 05:41 EST by heiko.eichberger CLA
Modified: 2012-11-15 14:57 EST (History)
5 users (show)

See Also:


Attachments
An example project to reproduce the bug. (114.10 KB, application/zip)
2010-11-09 05:42 EST, heiko.eichberger CLA
no flags Details
Screen cap of the RCPMail application (45.20 KB, image/png)
2010-11-12 03:10 EST, heiko.eichberger CLA
no flags Details
A zoomed screen cap of the RCPMail application (2.59 KB, image/png)
2010-11-12 03:10 EST, heiko.eichberger CLA
no flags Details
Ensure that the newly created toolbar is not visible (872 bytes, patch)
2011-01-31 14:58 EST, Eric Moffatt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 !