ViewPart with Toolbar [message #1065544] |
Wed, 26 June 2013 12:46 |
Sascha Smoo Messages: 56 Registered: November 2012 |
Member |
|
|
Hello,
I've got a custom ViewPart in my RAP Application and I'm trying to add a Button to the Toolbar of this view by using the following code:
@Override
public void createPartControl(Composite parent) {
IToolBarManager toolBarManager = getViewSite().getActionBars()
.getToolBarManager();
toolBarManager.add(new Action("ModeSwitch") {
private static final long serialVersionUID = 7203102815117067524L;
@Override
public void run() {
// TODO mach etwas
}
});
}
But the toolbar does not appear at all. Am I missing something here?
Greetings,
Sascha
[Updated on: Wed, 26 June 2013 12:46] Report message to a moderator
|
|
|
|
|
|
Re: ViewPart with Toolbar [message #1065690 is a reply to message #1065561] |
Thu, 27 June 2013 07:39 |
Sascha Smoo Messages: 56 Registered: November 2012 |
Member |
|
|
Ok, the problem is indeed the theme. When deactivating the theme the button shows up. But I don't know why, I just copied the fancy example rap theme to my own project and manipulated it to my needs. Any ideas on this?
One problem I can see is that my PresentationFactory has Warnings cause there are access restrictions for IToolBarManager2 Interfaces.
Greetings,
Sascha
[Updated on: Thu, 27 June 2013 08:07] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02633 seconds