File Menu > Print, Zoom, etc [message #182304] |
Thu, 10 April 2008 15:54 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Ugo Sangiorgi 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!
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03191 seconds