GEFActionConstants.GROUP_PRINT gives a blank menu item [message #147580] |
Thu, 12 August 2004 14:55 |
Eclipse User |
|
|
|
Originally posted by: none.bphnx.com
I just wanted to see if this is a bug or maybe I am doing something wrong.
In my editor class I add the PrintAction to the ActionRegistry like this:
addEditorAction(new PrintAction((IWorkbenchPart)this));
Then in my buildContextMenu() method of ContextMenuProviderImpl, I do this
IAction action;
action = m_actionRegistry.getAction(ActionFactory.PRINT.getId());
if (action != null)
manager.appendToGroup(GEFActionConstants.GROUP_PRINT, action);
But when I right click in the editor, I get a blank menu item. However, if
I click on the blank menu item, the printing does work.
Is this a bug, or I am missing something? I searched bugzilla, but did not
find anything on this.
many thanks,
B
|
|
|
Re: GEFActionConstants.GROUP_PRINT gives a blank menu item [message #147588 is a reply to message #147580] |
Thu, 12 August 2004 15:08 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
The action is not labeled under the assumption that it is being hooked into
the Global print action which is already labeled. Open a bugzilla. As a
workaround, call action.setText("Print...");
"bandrews" <none@bphnx.com> wrote in message
news:cfg0d0$rt9$1@eclipse.org...
> I just wanted to see if this is a bug or maybe I am doing something wrong.
> In my editor class I add the PrintAction to the ActionRegistry like this:
> addEditorAction(new PrintAction((IWorkbenchPart)this));
>
> Then in my buildContextMenu() method of ContextMenuProviderImpl, I do this
> IAction action;
> action = m_actionRegistry.getAction(ActionFactory.PRINT.getId());
> if (action != null)
> manager.appendToGroup(GEFActionConstants.GROUP_PRINT, action);
>
> But when I right click in the editor, I get a blank menu item. However, if
> I click on the blank menu item, the printing does work.
>
> Is this a bug, or I am missing something? I searched bugzilla, but did not
> find anything on this.
>
> many thanks,
>
> B
>
|
|
|
Re: GEFActionConstants.GROUP_PRINT gives a blank menu item [message #147604 is a reply to message #147588] |
Thu, 12 August 2004 15:18 |
Eclipse User |
|
|
|
Originally posted by: none.bphnx.com
action.setText("Print...");
Yes, that makes sense. I will open a bug now. Thanks!
B
Randy Hudson wrote:
> The action is not labeled under the assumption that it is being hooked into
> the Global print action which is already labeled. Open a bugzilla. As a
> workaround, call action.setText("Print...");
> "bandrews" <none@bphnx.com> wrote in message
> news:cfg0d0$rt9$1@eclipse.org...
> > I just wanted to see if this is a bug or maybe I am doing something wrong.
> > In my editor class I add the PrintAction to the ActionRegistry like this:
> > addEditorAction(new PrintAction((IWorkbenchPart)this));
> >
> > Then in my buildContextMenu() method of ContextMenuProviderImpl, I do this
> > IAction action;
> > action = m_actionRegistry.getAction(ActionFactory.PRINT.getId());
> > if (action != null)
> > manager.appendToGroup(GEFActionConstants.GROUP_PRINT, action);
> >
> > But when I right click in the editor, I get a blank menu item. However, if
> > I click on the blank menu item, the printing does work.
> >
> > Is this a bug, or I am missing something? I searched bugzilla, but did not
> > find anything on this.
> >
> > many thanks,
> >
> > B
> >
|
|
|
Powered by
FUDForum. Page generated in 0.03429 seconds