Printing with RCP [message #220491] |
Mon, 31 July 2006 20:31 |
Eclipse User |
|
|
|
Originally posted by: sempai.robert.gmail.com
Hi everyone,
i am having trouble getting printing to work in my GEF RCP application.
i have looked at the logic example and many postings in the newsgroup.
i have the following code in my ActionBarCOntributor:
protected void declareGlobalActionKeys() {
addGlobalActionKey(IWorkbenchActionConstants.PRINT);
}
and have added similar code to my plugin.xml as is in the logic example.
however my print button is not active.
does anyone have any advice or tutorials that can point me in the right
direction. I'm sure that i'm missing somthing simple.
thanks for your help,
Robert
|
|
|
Re: Printing with RCP [message #220577 is a reply to message #220491] |
Wed, 02 August 2006 11:01 |
Eclipse User |
|
|
|
Originally posted by: shruthi.cn.in.bosch.com
Hello,
1) In the class that extends the ActionBarAdvisor, you have to register
the printaction.
protected void makeActions(IWorkbenchWindow window) {
IWorkbenchAction printAction = ActionFactory.PRINT.create(window);
printAction.setEnabled(true);
register(printAction);
}
2) In the contributor class , put this code,
protected void declareGlobalActionKeys() {
addGlobalActionKey(ActionFactory.PRINT.getId());
}
3) in the plugin.xml, add the contributor class name to the contributor
list.
This should work.
Regards
Shruthi
|
|
|
Powered by
FUDForum. Page generated in 0.02693 seconds