Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Zooming in the MultiPageEditor
Zooming in the MultiPageEditor [message #71627] Thu, 20 March 2003 13:01 Go to next message
Eclipse UserFriend
Originally posted by: yuri.il.ibm.com

I try to implement zooming for my MultiPageEditor.

In the new Logic example ZoomIn.. and ZoomOutActions are registered in the
LogicEditor.configureGraphicalViewer() method.

The LogicActionBarContributor.buildActions() uses addRetargetAction()
method, undefined for MultiPageEditorActionBarContributor.

I tried to use regular addAction() method and got disabled Zoom buttons.

Thanks in advance,

Yuri
Re: Zooming in the MultiPageEditor [message #71686 is a reply to message #71627] Thu, 20 March 2003 15:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

This is a multi-part message in MIME format.

------=_NextPart_000_00A7_01C2EECC.E0F88E40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

When you switch from editor to editor, the zoom in action is "pulled" =
from the active Editor in =
ActionBarContributor.setActiveEditor(IEditorPart), because that retarget =
action is listed among the global action which get remapped. However, =
that is not the only time in which the zoom-in action can be re-target. =
You may also retarget it during a page change in your multipage editor =
by making the exact same call:

actionbars.setGlobalActionHandler(id, action);

So the "pull" happens when you switch editors, but you could "push" the =
page changes to the retarget actions.

"Yuri Levin" <yuri@il.ibm.com> wrote in message =
news:b5ce31$e4e$1@rogue.oti.com...
> I try to implement zooming for my MultiPageEditor.
>=20
> In the new Logic example ZoomIn.. and ZoomOutActions are registered in =
the
> LogicEditor.configureGraphicalViewer() method.
>=20
> The LogicActionBarContributor.buildActions() uses addRetargetAction()
> method, undefined for MultiPageEditorActionBarContributor.
>=20
> I tried to use regular addAction() method and got disabled Zoom =
buttons.
>=20
> Thanks in advance,
>=20
> Yuri
>=20
>=20
>=20

------=_NextPart_000_00A7_01C2EECC.E0F88E40
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>When you switch from editor to editor, =
the zoom in=20
action is "pulled" from the active Editor in=20
ActionBarContributor.setActiveEditor(IEditorPart), because that retarget =
action=20
is listed among the&nbsp;global action which get remapped.&nbsp; =
However, that=20
is not the only time in which the zoom-in action can be re-target.&nbsp; =
You may=20
also retarget it during a page change in your multipage editor by making =
the=20
exact same call:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>actionbars.setGlobalActionHandler(id,=20
action);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So the "pull" happens when you switch =
editors, but=20
you could "push" the page changes to the retarget actions.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Yuri Levin" &lt;</FONT><A=20
href=3D"mailto:yuri@il.ibm.com"><FONT face=3DArial=20
size=3D2>yuri@il.ibm.com</FONT></A><FONT face=3DArial size=3D2>&gt; =
wrote in message=20
</FONT><A href=3D"news:b5ce31$e4e$1@rogue.oti.com"><FONT face=3DArial=20
size=3D2>news:b5ce31$e4e$1@rogue.oti.com</FONT></A><FONT face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>&gt; I try to =
implement zooming=20
for my MultiPageEditor.<BR>&gt; <BR>&gt; In the new Logic example =
ZoomIn.. and=20
ZoomOutActions are registered in the<BR>&gt;=20
LogicEditor.configureGraphicalViewer() method.<BR>&gt; <BR>&gt; The=20
LogicActionBarContributor.buildActions() uses =
addRetargetAction()<BR>&gt;=20
method, undefined for MultiPageEditorActionBarContributor.<BR>&gt; =
<BR>&gt; I=20
tried to use regular addAction() method and got disabled Zoom =
buttons.<BR>&gt;=20
<BR>&gt; Thanks in advance,<BR>&gt; <BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Yuri<BR>&gt; <BR>&gt; =
<BR>&gt;=20
</FONT></BODY></HTML>

------=_NextPart_000_00A7_01C2EECC.E0F88E40--
Re: Zooming in the MultiPageEditor [message #71762 is a reply to message #71686] Thu, 20 March 2003 16:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: yuri.il.ibm.com

This is a multi-part message in MIME format.

------=_NextPart_000_000E_01C2EF10.33827CA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Randy,
Thanks for your instant answer.
It looks like the problem with disabled ZoomIn/OutRetargetAction =
originates in fact that when MultiPageEditorActionBarContributor starts =
to play, the getGraphicalViewer() returns null, or in other words, =
configureGraphicalViewer() (with Zoom actons registration) was not =
called yet. The menu View item with Zooms does not appear also, but =
ZoomComboContributionItem is enabled and works. May be I could use and =
register in plugin.xml ActionBarContributor instead of =
MultiPageEditorActionBarContributor?
Thanks,
Yuri

------=_NextPart_000_000E_01C2EF10.33827CA0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Randy,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for your instant =
answer.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>It looks like the problem with disabled =

ZoomIn/OutRetargetAction originates in fact that when=20
MultiPageEditorActionBarContributor starts to play, the =
getGraphicalViewer()=20
returns null, or in other words, <FONT =
size=3D2>configureGraphicalViewer() (with=20
Zoom actons registration) was not called yet. The menu View item with =
Zooms does=20
not appear also, but <FONT size=3D2>ZoomComboContributionItem is enabled =
and=20
works. May be I could use and register in plugin.xml =
ActionBarContributor=20
instead of =
MultiPageEditorActionBarContributor?</FONT></FONT></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
Yuri</FONT></DIV></BODY></HTML>

------=_NextPart_000_000E_01C2EF10.33827CA0--
Re: Zooming in the MultiPageEditor [message #71799 is a reply to message #71762] Thu, 20 March 2003 17:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

This is a multi-part message in MIME format.

------=_NextPart_000_001A_01C2EEDB.5357B2A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Which getGraphicalViewer()?
"Yuri Levin" <yuri@il.ibm.com> wrote in message =
news:b5cqt3$pkr$1@rogue.oti.com...
Randy,
Thanks for your instant answer.
It looks like the problem with disabled ZoomIn/OutRetargetAction =
originates in fact that when MultiPageEditorActionBarContributor starts =
to play, the getGraphicalViewer() returns null, or in other words, =
configureGraphicalViewer() (with Zoom actons registration) was not =
called yet. The menu View item with Zooms does not appear also, but =
ZoomComboContributionItem is enabled and works. May be I could use and =
register in plugin.xml ActionBarContributor instead of =
MultiPageEditorActionBarContributor?
Thanks,
Yuri

------=_NextPart_000_001A_01C2EEDB.5357B2A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Which =
getGraphicalViewer()?</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Yuri Levin" &lt;<A =
href=3D"mailto:yuri@il.ibm.com">yuri@il.ibm.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:b5cqt3$pkr$1@rogue.oti.com">news:b5cqt3$pkr$1@rogue.oti.com<=
/A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Randy,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for your instant =
answer.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>It looks like the problem with =
disabled=20
ZoomIn/OutRetargetAction originates in fact that when=20
MultiPageEditorActionBarContributor starts to play, the =
getGraphicalViewer()=20
returns null, or in other words, <FONT =
size=3D2>configureGraphicalViewer() (with=20
Zoom actons registration) was not called yet. The menu View item with =
Zooms=20
does not appear also, but <FONT size=3D2>ZoomComboContributionItem is =
enabled=20
and works. May be I could use and register in plugin.xml =
ActionBarContributor=20
instead of =
MultiPageEditorActionBarContributor?</FONT></FONT></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =

Yuri</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_001A_01C2EEDB.5357B2A0--
Re: Zooming in the MultiPageEditor [message #71817 is a reply to message #71799] Thu, 20 March 2003 17:44 Go to previous messageGo to next message
Yoav Rubin is currently offline Yoav RubinFriend
Messages: 93
Registered: July 2009
Member
GraphicalEditor.getGraphicalViewer()

Randy Hudson wrote:

> This is a multi-part message in MIME format.

> ------=_NextPart_000_001A_01C2EEDB.5357B2A0
> Content-Type: text/plain;
> charset=\"iso-8859-1\"
> Content-Transfer-Encoding: quoted-printable

> Which getGraphicalViewer()?
> \"Yuri Levin\" <yuri@il.ibm.com> wrote in message =
> news:b5cqt3$pkr$1@rogue.oti.com...
> Randy,
> Thanks for your instant answer.
> It looks like the problem with disabled ZoomIn/OutRetargetAction =
> originates in fact that when MultiPageEditorActionBarContributor starts =
> to play, the getGraphicalViewer() returns null, or in other words, =
> configureGraphicalViewer() (with Zoom actons registration) was not =
> called yet. The menu View item with Zooms does not appear also, but =
> ZoomComboContributionItem is enabled and works. May be I could use and =
> register in plugin.xml ActionBarContributor instead of =
> MultiPageEditorActionBarContributor?
> Thanks,
> Yuri

> ------=_NextPart_000_001A_01C2EEDB.5357B2A0
> Content-Type: text/html;
> charset=\"iso-8859-1\"
> Content-Transfer-Encoding: quoted-printable

> <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
> <HTML><HEAD>
> <META http-equiv=3DContent-Type content=3D\"text/html; =
> charset=3Diso-8859-1\">
> <META content=3D\"MSHTML 6.00.2600.0\" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=3D#ffffff>
> <DIV><FONT face=3DArial size=3D2>Which =
> getGraphicalViewer()?</FONT></DIV>
> <BLOCKQUOTE dir=3Dltr=20
> style=3D\"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
> BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px\">
> <DIV>\"Yuri Levin\" <<A =
> href=3D\"mailto:yuri@il.ibm.com\">yuri@il.ibm.com</A>>=20
> wrote in message <A=20
> =
> href=3D\"news:b5cqt3$pkr$1@rogue.oti.com\">news:b5cqt3$pkr$1@rogue.oti.com<=
> /A>...</DIV>
> <DIV><FONT face=3DArial size=3D2>Randy,</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>Thanks for your instant =
> answer.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>It looks like the problem with =
> disabled=20
> ZoomIn/OutRetargetAction originates in fact that when=20
> MultiPageEditorActionBarContributor starts to play, the =
> getGraphicalViewer()=20
> returns null, or in other words, <FONT =
> size=3D2>configureGraphicalViewer() (with=20
> Zoom actons registration) was not called yet. The menu View item with =
> Zooms=20
> does not appear also, but <FONT size=3D2>ZoomComboContributionItem is =
> enabled=20
> and works. May be I could use and register in plugin.xml =
> ActionBarContributor=20
> instead of =
> MultiPageEditorActionBarContributor?</FONT></FONT></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2>    =
> Thanks,</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>        =

> Yuri</FONT></DIV></BLOCKQUOTE></BODY></HTML>

> ------=_NextPart_000_001A_01C2EEDB.5357B2A0--
Re: Zooming in the MultiPageEditor [message #212979 is a reply to message #71799] Fri, 31 March 2006 18:23 Go to previous message
Eclipse UserFriend
Originally posted by: hplaas.gmx.de

Hi.
I have a similar problem. I´ve a Multipageedior with a graphical Editor nested in each page. When the editor starts, the ZoomCombobox is disabled.
A doubleclick on a special figure creates, using direct_open, a new Page with the same type of editor. Now the ZoomCombobox is enabled and it works fine in any page.
I´ve tried nearly everything.....but any way I tried to set the Zoomaction enabled didn´t work.

is it possible, that there is a bug in the Multipageeditorpart?

thanks,
Heiko
Previous Topic:Menu entries allways diabled in Editor within MultipageEditor
Next Topic:Labels in Palette appears to be cut in RTL mode
Goto Forum:
  


Current Time: Sat Apr 20 00:46:55 GMT 2024

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

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

Back to the top