m_L_z
m_L_z

Reputation: 21

e4 Toolbar at Top Position invisible

I have a question regarding e4 rcp applications.

I am creating an Eclipse e4 RCP project which uses the compatibilty layer. Basically I created an 3.x RCP project, a product and an Application.e4xmi to use e4 features in my 3.x RCP project. I did this to be able to use the compatibilty layer for stuff like the project explorer, the console etc....

I started with that tutorial: http://dirksmetric.wordpress.com/2012/08/01/tutorial-eclipse-rcp-e4-with-3-x-views-like-project-explorer-properties-etc/ and now I'm migrating my own plugins from 3.x to e4.

Till now that worked out pretty well. I can still use a multiparteditor from 3.x but also dependency injection for some parts. Now I'm facing a rather odd problem. My Application has a Trimmed Window with a Main menu some parts and then there are the TrimBars...my problem.

The toolbar I create there is not shown if I choose the 'top' side...every other side is working. In a pure e4 Application that is working fine. I'm not sure why...maybe you have an idea. Thx.

Upvotes: 0

Views: 592

Answers (2)

Paranoja
Paranoja

Reputation: 101

After you have created your RCP application, you should have class ApplicationWorkbenchWindowAdvisor (extends WorkbenchWindowAdvisor) created for you. It has preWindowOpen() method overridden with IWorkbenchWindowConfigurer.setShowCoolBar(false). Change it to true:

public void preWindowOpen() {
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.setInitialSize(new Point(400, 300));
    configurer.setShowCoolBar(true);
    configurer.setShowStatusLine(false);
    configurer.setTitle("RCP Application");
}

Upvotes: 2

Eric Moffatt
Eric Moffatt

Reputation: 257

Make sure that your XMI file defines the 'TOP' TrimBar with the id 'org.eclipse.ui.main.menu', there's currently some dependency on the handling code that requires this (i.e. it finds the trim bar by ID rather than position).

Upvotes: 0

Related Questions