Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » GEFActionConstants.GROUP_PRINT gives a blank menu item
GEFActionConstants.GROUP_PRINT gives a blank menu item [message #147580] Thu, 12 August 2004 14:55 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
> >
Previous Topic:Regarding Dragging and GrabHandle
Next Topic:Help Wanted bugzillas?
Goto Forum:
  


Current Time: Mon Jan 20 04:57:16 GMT 2025

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

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

Back to the top