Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » File Menu > Print, Zoom, etc
File Menu > Print, Zoom, etc [message #182304] Thu, 10 April 2008 15:54 Go to next message
Eclipse UserFriend
Originally posted by: diegobc.gmail.com

Hi everyone,

I've been trying to put the right-click on the diagram (view, zoom, file
> print) at the menu bar.

Print is disabled, and I couldn't get it to work registering the
ActionFactory.PRINT handle using my XXXEditor#init(...). It is working
using the popup diagram menu.

If anyone could help me out, that will be great.

Thanks!
Re: File Menu > Print, Zoom, etc [message #182530 is a reply to message #182304] Fri, 11 April 2008 13:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fbanica.soluta.net

Hello,

to enable printing I think you should change the .genmodel file:

Gen Editor Generator ***
Gen Plugin XXX Plugin
...
- Printing Enabled (set to true)
...

See also the attachment. Hope this does it.




Floppy


"Diego Guimar
Re: File Menu > Print, Zoom, etc [message #187326 is a reply to message #182530] Thu, 15 May 2008 08:43 Go to previous message
Ugo Sangiorgi is currently offline Ugo SangiorgiFriend
Messages: 44
Registered: July 2009
Member
Actually to get the Zoom in/Zoom out hooked on your Menu, just put those
on your XXXDiagramEditor

public void fireZoomIn(){
IAction a = getActionRegistry().getAction(GEFActionConstants.ZOOM_IN);
a.run();
}

public void fireZoomOut(){
IAction a = getActionRegistry().getAction(GEFActionConstants.ZOOM_OUT);
a.run();
}

Then you may just call them from inside an action you create and do this
inside the run method:
....
XXXDiagramEditor editor = (XXXDiagramEditor)
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().getActiveEditor();

editor.fireZoomIn();
....

or editor.fireZoomOut

Ugo

Florin Banica wrote:
> Hello,
>
> to enable printing I think you should change the .genmodel file:
>
> Gen Editor Generator ***
> Gen Plugin XXX Plugin
> ...
> - Printing Enabled (set to true)
> ...
>
> See also the attachment. Hope this does it.
>
>
>
>
> Floppy
>
>
> "Diego Guimarães" <diegobc@gmail.com> wrote in message
> news:ftld7o$hij$1@build.eclipse.org...
>> Hi everyone,
>>
>> I've been trying to put the right-click on the diagram (view, zoom, file
>>> print) at the menu bar.
>> Print is disabled, and I couldn't get it to work registering the
>> ActionFactory.PRINT handle using my XXXEditor#init(...). It is working
>> using the popup diagram menu.
>>
>> If anyone could help me out, that will be great.
>>
>> Thanks!
>
>
Previous Topic:about file .gmfmap
Next Topic:Howto Revert Mistakes
Goto Forum:
  


Current Time: Tue Apr 23 07:06:08 GMT 2024

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

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

Back to the top