Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF 2.2 - IllegalArgumentException: can't find ID print
GMF 2.2 - IllegalArgumentException: can't find ID print [message #232085] Wed, 03 June 2009 08:03 Go to next message
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
When I enable printing in .gmfgen, the following lines are generated in
XxxDiagramActionBarContributor.init:

public void init(IActionBars bars, IWorkbenchPage page) {
super.init(bars, page);
// print preview
IMenuManager fileMenu = bars.getMenuManager().findMenuUsingPath(
IWorkbenchActionConstants.M_FILE);
assert fileMenu != null;
IAction printPreviewAction = new RenderedPrintPreviewAction(
new EnhancedPrintActionHelper());
fileMenu.insertBefore("print", printPreviewAction); //$NON-NLS-1$
[...]

There does not seem to be a menu-item "print", so the last line results in
an
java.lang.IllegalArgumentException: can't find ID print

Can anyone reproduce this with GMF 2.2?

Is it a known bug, or if not, which Component do I have to choose when I
file a bugzilla?
Re: GMF 2.2 - IllegalArgumentException: can't find ID print [message #232193 is a reply to message #232085] Wed, 03 June 2009 12:16 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Peter,

I cannot reptoduce this problem with current state of GMF 2.2:

fileMenu.insertBefore("print", printPreviewAction); //$NON-NLS-1$

was executed without any exceptions.

-----------------
Alex Shatalin
Re: GMF 2.2 - IllegalArgumentException: can't find ID print [message #232211 is a reply to message #232193] Wed, 03 June 2009 12:49 Go to previous messageGo to next message
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
Thanks Alex.

Do you have a print and a printPreview menu-item then?
I'm using Eclipse Galileo RC2 with GMF 2.2.0 RC2 (Build 200905272029).

Regards, Peter


Alex Shatalin schrieb:
> Hello Peter,
>
> I cannot reptoduce this problem with current state of GMF 2.2:
>
> fileMenu.insertBefore("print", printPreviewAction); //$NON-NLS-1$
> was executed without any exceptions.
>
> -----------------
> Alex Shatalin
>
>
Re: GMF 2.2 - IllegalArgumentException: can't find ID print [message #232228 is a reply to message #232211] Wed, 03 June 2009 13:04 Go to previous messageGo to next message
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
Ah, I guess it's because I'm using RCP with required plug-ins only.

Could you try this please?
Thanks!


Peter Lang schrieb:
> Thanks Alex.
>
> Do you have a print and a printPreview menu-item then?
> I'm using Eclipse Galileo RC2 with GMF 2.2.0 RC2 (Build 200905272029).
>
> Regards, Peter
>
>
> Alex Shatalin schrieb:
>> Hello Peter,
>>
>> I cannot reptoduce this problem with current state of GMF 2.2:
>>
>> fileMenu.insertBefore("print", printPreviewAction); //$NON-NLS-1$
>> was executed without any exceptions.
>>
>> -----------------
>> Alex Shatalin
>>
>>
Re: GMF 2.2 - IllegalArgumentException: can't find ID print [message #232244 is a reply to message #232228] Wed, 03 June 2009 14:23 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Peter,

> Ah, I guess it's because I'm using RCP with required plug-ins only.
Yes, this can be a reason. I do not have RCP platform set up on my computer,
but I think some plugins are missing in your configuration - it looks natural
to have File/Print action available if you are going to use GMF-generated
printing functionality...

BTW, do you have org.eclipse.gmf.runtime.diagram.ui.providers plugin in RCP
plugins set?

-----------------
Alex Shatalin
Re: GMF 2.2 - IllegalArgumentException: can't find ID print [message #232355 is a reply to message #232244] Thu, 04 June 2009 11:57 Go to previous messageGo to next message
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
Yes, plugin
org.eclipse.gmf.runtime.diagram.ui.providers
is under Require-Bundle in my MANIFEST.MF

Even if choose "all workspace and enabled target plug-ins" in my Run
Configuration, the "print"-item is not there.

I'm quite new to eclipse, any hints on how to proceed?
Re: GMF 2.2 - IllegalArgumentException: can't find ID print [message #232445 is a reply to message #232355] Thu, 04 June 2009 15:59 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Peter,

> I'm quite new to eclipse, any hints on how to proceed?
Strange - in this case you should have exactly the same configuration as
I have here and I cannot reproduce this problem...
M.b. you have some problems with the installation of eclipse? Can you see
"print" action enabled in File menu then generated diagram editor is open?
-----------------
Alex Shatalin
Re: GMF 2.2 - IllegalArgumentException: can't find ID print [message #232453 is a reply to message #232445] Thu, 04 June 2009 16:14 Go to previous messageGo to next message
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
Hi Alex,

I did not encounter any other problems with my eclipse installation, its
Galileo Modeling RC2.

In non-RCP it works fine, the "Print..." item is shown. As I said, the
problem is with RCP application, where the "Print..." item seems to be
missing for some reason.

Regards, Peter


> Strange - in this case you should have exactly the same configuration as
> I have here and I cannot reproduce this problem...
> M.b. you have some problems with the installation of eclipse? Can you see
> "print" action enabled in File menu then generated diagram editor is open?
Re: GMF 2.2 - IllegalArgumentException: can't find ID print [message #232706 is a reply to message #232453] Fri, 05 June 2009 13:06 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Peter,

Ok. To correct this problem open generated DiagramEditorActionBarAdvisor
and modify fillMenuBar(IMenuManager menu) method:

in first block (File menu creation) add following code:

menuX.add(getAction(ActionFactory.SAVE_ALL.getId()));
/*++ added*/
menuX.add(new Separator());
menuX.add(getAction(ActionFactory.PRINT.getId()));
/*-- added*/
menuX.add(new Separator());

Can you pleaase file a bugzilla request for me describing this problem -
I'll correct it in next bugfix release.

-----------------
Alex Shatalin
Re: GMF 2.2 - IllegalArgumentException: can't find ID print [message #232917 is a reply to message #232706] Mon, 08 June 2009 11:42 Go to previous messageGo to next message
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
Thanks Alex, suggested workaround does the trick.

Filed as
https://bugs.eclipse.org/279445

Hope I got it right, not that experienced in bugzilla-Component-guessing ;)
Re: GMF 2.2 - IllegalArgumentException: can't find ID print [message #713334 is a reply to message #232917] Mon, 08 August 2011 11:09 Go to previous message
vinny503 Missing name is currently offline vinny503 Missing nameFriend
Messages: 156
Registered: August 2011
Senior Member
Hi

When I try to open GMF Editor from menu for the 1st time, I see this error
"llegalArgumentException: can't find ID print"
When I open it for 2nd time, I could open.

Can you please tell why I am not able to open it for 1st time.

Thanks,
Vinay
Previous Topic:PNML & EzPetri
Next Topic:diagram cannot be created inside a project.
Goto Forum:
  


Current Time: Fri Dec 19 03:19:24 GMT 2014

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

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