Contributing to the / Trim Status Bar in Eclipse RCP

I have a requirement to show a status indicator in the status bar of an Eclipse application. I cannot contribute through ApplicationWindowAdviser (another team owns the main product), but I am sure that I can contribute through the extension point. Despite the fact that I have many search engines, I can not find anything, describing how to do it.

+6
eclipse-rcp
source share
3 answers

In the org.eclipse.ui.menuContributions extensions use "toolbar: org.eclipse.ui.trim.status" as locationURI. You can add commands / custom controls to the status bar.

+8
source share

Possible solution to verify:
You can define fragment to add functionality to the main product. ( see here for another example).

The idea is to add functionality to the main plugin. Perhaps your contribution can then be combined with this core product.

+1
source share

Firstly, adding a status bar to application.e4xmi (application> Windows and dialogs> cropped window> TrimBars> WindowTrim (bottom)> toolbar> tool management)

Create a .java class and specify the address in the toolbar (uri class).

e4 the implementation of the status bar is different from the implementation of e3. In e4, you can use eventbroker to send text (info) to the status bar.

@Inject private IEventBroker eventBroker; private static final String STATUSBAR ="statusbar"; @Inject @Optional public void getEvent(@UIEventTopic(STATUSBAR) String message) { updateInterface(message); } @PostConstruct public void createControls(Composite parent) { .... \\ swt definitions eg label } public void updateInterface(String message) { try{ Display.getDefault().asyncExec(new Runnable() { @Override public void run() { try{ label.setText(message); } catch(Exception exc){ System.out.println(exc); } } }); } catch(Exception exception){ System.out.println(exception); } } 

Also, be sure to add eventbrokersender to another java class.

 @Inject private IEventBroker eventBroker; private static final String STATUSBAR ="statusbar"; eventBroker.send(STATUSBAR, "status bar test message.."); 
0
source share

All Articles