Context menu and Print [message #185149] |
Thu, 23 June 2005 07:44 |
Eclipse User |
|
|
|
Originally posted by: ngocdannytn.sbcglobal.net
Hi,
I tried to add Print action into my context menu as below
GEFActionConstants.addStandardActionGroups(menu);
IAction action;
action = getActionRegistry().getAction(ActionFactory.PRINT.getId());
menu.appendToGroup(GEFActionConstants.GROUP_PRINT, action);
However, the popup menu shows the item with no text/label eventhough
clicking on the menu item still executes the PRINT action. Please help.
Thank you.
Danny
|
|
|
Re: Context menu and Print [message #185192 is a reply to message #185149] |
Thu, 23 June 2005 13:12 |
Eclipse User |
|
|
|
Originally posted by: harsh.ti.com
Replace the following line
action = getActionRegistry().getAction(ActionFactory.PRINT.getId());
with this.
action = getActionRegistry().getAction(GEFActionConstants.PRINT);
Harsh
|
|
|
Re: Context menu and Print [message #185239 is a reply to message #185192] |
Thu, 23 June 2005 18:03 |
Eclipse User |
|
|
|
Originally posted by: ngocdannytn.sbcglobal.net
I used that originally but it was deprecated and it told me to use
ActionFactory.PRINT.getId();
Regards,
Danny
The field IWorkbenchActionConstants.PRINT is deprecated
"Harsh Sabikhi" <harsh@ti.com> wrote in message
news:76aa2faac86317a630e7fa8a7c51c069$1@www.eclipse.org...
> Replace the following line
>
> action = getActionRegistry().getAction(ActionFactory.PRINT.getId());
>
> with this.
>
> action = getActionRegistry().getAction(GEFActionConstants.PRINT);
>
> Harsh
>
|
|
|
Re: Context menu and Print [message #192163 is a reply to message #185149] |
Mon, 15 August 2005 16:40 |
Nick Allen Messages: 23 Registered: July 2009 |
Junior Member |
|
|
On Thu, 23 Jun 2005 00:44:12 -0700, Danny Nguyen wrote:
> However, the popup menu shows the item with no text/label eventhough
> clicking on the menu item still executes the PRINT action. Please help.
Danny, did you ever find a solution to your problem?
I am having the same problem with Cut, Copy, and Paste actions that I am
trying to contribute to the context menu. When I add the same actions
to the toolbar or a menu, the cut, copy, paste images appear as normal.
|
|
|
Re: Context menu and Print [message #192170 is a reply to message #192163] |
Mon, 15 August 2005 17:13 |
Nick Allen Messages: 23 Registered: July 2009 |
Junior Member |
|
|
On Mon, 15 Aug 2005 12:40:15 -0400, Nick Allen wrote:
> I am having the same problem with Cut, Copy, and Paste actions that I am
> trying to contribute to the context menu. When I add the same actions
> to the toolbar or a menu, the cut, copy, paste images appear as normal.
The problems seem to only appear with actions which are not
always enabled. For instance, my cut and copy actions are only enabled
when a copy-able/cut-able element is selected.
I would like the behavior of the provided Delete action. If the
action is not enabled, the action appears shaded in the context menu, but
still visible.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04037 seconds