Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Adding a Tool Control to Eclipse IDE status bar doesn't work (Handled/Direct Toolitem does)
Adding a Tool Control to Eclipse IDE status bar doesn't work (Handled/Direct Toolitem does) [message #1723992] Fri, 19 February 2016 15:03 Go to next message
Andreas Sewe is currently offline Andreas SeweFriend
Messages: 111
Registered: June 2013
Senior Member
Hi,

I successfully managed to add a tool bar trim contribution to the Eclipse IDE's (extended element ID: org.eclipse.e4.legacy.ide.application) status bar (parent ID org.eclipse.ui.trim.status). Unfortunately, only Handled Toolitems and Direct Toolitems show up in the status bar. If I use a Tool Control instead, it is just not created:

public class ToolControl {

    @PostConstruct
    public void createControls(Composite parent) {
        Button button = new Button(parent, SWT.PUSH);
        button.setText("Test");
    }
}

The @PostConstruct method is never called, even though the toolbar is rendered. What am I doing wrong? (FYI, my target platform is based on Neon M5.)

Is this bug 475254?
Re: Adding a Tool Control to Eclipse IDE status bar doesn't work (Handled/Direct Toolitem does) [message #1723996 is a reply to message #1723992] Fri, 19 February 2016 15:12 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 853
Registered: July 2009
Senior Member
First, make sure you have a dependency to the package javax.annotation.
Your POJO may consume the wrong PostConstruct (from JRE).
Re: Adding a Tool Control to Eclipse IDE status bar doesn't work (Handled/Direct Toolitem does) [message #1724397 is a reply to message #1723996] Tue, 23 February 2016 16:31 Go to previous message
Andreas Sewe is currently offline Andreas SeweFriend
Messages: 111
Registered: June 2013
Senior Member
Erdal Karaca wrote on Fri, 19 February 2016 10:12
First, make sure you have a dependency to the package javax.annotation.
Your POJO may consume the wrong PostConstruct (from JRE).

You are right. An Import-Package: javax.inject solved the problem. Must jave gotten @PostConstruct from the wrong bundle. Thank you.
Previous Topic:spell check
Next Topic:Include plugin-external file to exported product
Goto Forum:
  


Current Time: Tue Sep 22 06:09:48 GMT 2020

Powered by FUDForum. Page generated in 0.01925 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top