Search code examples
eclipseeclipse-rcpe4

Toolbar in Part Descriptor in eclipse 4


I am new to Eclipse E4. I have a model fragment in which I have added a part descriptor. Now the par is displaying without any issues.

Now I want to add some action items to the part descriptor.

How to do it in a Pure E4 way. Please help.

Thanks & Regards, Chinniah


Solution

  • For the Toolbar you check the 'ToolBar' check box on the Part Descriptor.

    A 'Toolbar' child will appear in the Part Descriptor. You can add direct or handled toolitems to the toolbar.

    If you add 'handled' toolitems you will also need to define a command and handler.

    Handlers can be defined in the Part Descriptor or globally.

    Commands are defined globally. You do this in a fragment by adding a fragment that add to the 'commands' feature name of the main application element.