Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » EditDomain and mpre than 1 EditPartViewer
EditDomain and mpre than 1 EditPartViewer [message #243567] Thu, 12 June 2008 19:26
Andy Emmett is currently offline Andy EmmettFriend
Messages: 9
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0006_01C8CCCA.8B3D2740
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi All
I have a problem that I am trying to solve but thought I would also ask =
on the forum ....

I have a 'main' Editor with a GraphicalViewer (with a flyout pallete) =
containing some EditParts (contributed by multiple plugins/EMF models)
some EditParts have a context menu and associated actions, one of which =
is intended to 'drill-down' and launch another Editor/GraphicalViewer.

I wish to share/reuse the EditDomain for the second viewer but am not =
sure how to (correctly) get hold of it from the initial Editor.
Alternatively, (and probably the path I want to take) I would like to =
use the initial Editor and replace the 'current' viewer with a new one


The documentation says ....

"The collective state of a GEF "application", loosely defined by a =
CommandStack, one or more EditPartViewers, and the active Tool.=20
An EditDomain is usually tied with an Eclipse IEditorPart).=20
However, the distinction between EditorPart and EditDomain was made to =
allow for much flexible use of the Graphical Editing Framework"


What is the correct way to obtain a reference to the protected =
EditDomain so that the action can call the addViewer method ?
Is anyone able to provide an example of how to use more than 1 =
EditPartViewer with an EditDomain (DefaultEditDomain created in the =
constructor of the Editor) correctly ?

My current (not very elegant solution because the plugin containing the =
second viewer is not the plugin containing the 'main' Editor) thinking =
is to add a method to Editor to retrieve the EditDomain


Any help would be very much appreciated.

Regards and thanks in advance
Andy
------=_NextPart_000_0006_01C8CCCA.8B3D2740
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.5450.4" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi All</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I have a problem that I am trying to =
solve but=20
thought I&nbsp;would also ask on the forum ....</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have a 'main' Editor with a =
GraphicalViewer (with=20
a flyout pallete) containing some EditParts (contributed by multiple =
plugins/EMF=20
models)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>some EditParts have a context menu and =
associated=20
actions, one of which is intended to&nbsp;'drill-down' and launch =
another=20
Editor/GraphicalViewer.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I wish to share/reuse the EditDomain =
for the second=20
viewer but am not sure how to (correctly) get hold of it from the =
initial=20
Editor.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Alternatively, (and probably =
the&nbsp;path I want=20
to take)&nbsp;I&nbsp;would like&nbsp;to use the initial Editor and =
replace the=20
'current'&nbsp; viewer with a new one</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The documentation says =
.....</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"The collective state of a GEF =
"application",=20
loosely defined by a CommandStack, <STRONG><EM><U><FONT =
color=3D#ff0000>one or=20
more</FONT></U></EM></STRONG> EditPartViewers, and the active Tool.=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>An EditDomain is usually tied with an =
Eclipse=20
</FONT><A title=3D"class or interface in org.eclipse.ui"=20
href=3D" http://help.eclipse.org/help33/topic/org.eclipse.platform.do c.isv=
/reference/api/org/eclipse/ui/IEditorPart.html"><FONT=20
face=3DArial size=3D2>IEditorPart</FONT></A><FONT face=3DArial =
size=3D2>). </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>However, the distinction between =
EditorPart and=20
EditDomain was made to allow for much flexible use of the Graphical =
Editing=20
Framework"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>What is the correct way to obtain a =
reference to=20
the protected EditDomain so that the action can&nbsp;call the=20
<EM>addViewer</EM>&nbsp;method ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Is anyone able to provide an example of =
how to use=20
more than 1 EditPartViewer with an EditDomain (DefaultEditDomain created =
in the=20
constructor of the Editor) correctly ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>My current (not very&nbsp;elegant =
solution because=20
the plugin containing the second viewer is not the plugin containing the =
'main'=20
Editor) thinking is to add a method to Editor to retrieve the=20
EditDomain</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Any help would be very much=20
appreciated.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Regards and thanks in =
advance</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Andy</FONT></DIV></BODY></HTML>

------=_NextPart_000_0006_01C8CCCA.8B3D2740--
Previous Topic:GEF ann GMF
Next Topic:Graphical viewer query
Goto Forum:
  


Current Time: Fri Apr 26 09:22:17 GMT 2024

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

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

Back to the top