Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Printing with RCP
Printing with RCP [message #220491] Mon, 31 July 2006 20:31 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:DND between two GEF viewers
Next Topic:Editparts, Figures and children
Goto Forum:
  


Current Time: Mon Jan 20 15:48:29 GMT 2025

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

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

Back to the top