Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Outline view and EMF+GEF+MultiPageEditor
Outline view and EMF+GEF+MultiPageEditor [message #247978] Tue, 31 March 2009 09:00 Go to next message
Eclipse UserFriend
Originally posted by: j4r0d.hotmail.com

Hello,

I've been searching this newsgroup for any related topics and I have found
some interesting stuff.
However I still do have a problem... here it is:

I have generated my model using EMF, and I have customized 4 pages for my
multipage editor.
I have implemented some delegating command stack mechanism in order to get
one stack per page.
The first page is a GEF overview of a specific subpart of my model. I wish
to use the outline view in order to show a tree representation of this
subpart.
The other pages show other subparts of my model.
The content of the outline is always the same for every pages (subpart tree
representation).
This outline provides a popup menu so the user can modify this specific part
of the model using commands, which in the end, must be sent to the stack of
the visual page.

In a very first time, I thought I could simply implement a TreeEditPart for
the outline, this would be fairly easy but it also means duplicate what EMF
already does!
Then after looking at this newsgroup I thought I could simply use a
TreeViewer combined with EMF adapters (as generated). Then I should wrap
every GEF command into EMF command... this way every command could be
executed on top of the visual page (in an EMF stack).

Problem is, first I am not truely confident about any of these solutions
(should I do it another way? how?) and last but not least, my delegating
command stack is based on the current page... since the outline is not
within a page, it could send commands in a wrong stack... How could I handle
this?

If you have any examples, better implementations, please let me know.

Thanks.


J.
Re: Outline view and EMF+GEF+MultiPageEditor [message #247988 is a reply to message #247978] Tue, 31 March 2009 13:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Jarod,

It sounds tricky indeed. EMF generally will determine the editing
domain from the objects themselves using
AdapterFactoryEditingDomain.getEditingDomainFor, and the commands will
be executed on that stack. I'm not sure I understand how multiple
stacks can work. Are the pages not showing different aspects of one
common underlying model? If there's only one common underlying model,
it seems to me there needs to be only one stack...


Jarod Mills wrote:
> Hello,
>
> I've been searching this newsgroup for any related topics and I have found
> some interesting stuff.
> However I still do have a problem... here it is:
>
> I have generated my model using EMF, and I have customized 4 pages for my
> multipage editor.
> I have implemented some delegating command stack mechanism in order to get
> one stack per page.
> The first page is a GEF overview of a specific subpart of my model. I wish
> to use the outline view in order to show a tree representation of this
> subpart.
> The other pages show other subparts of my model.
> The content of the outline is always the same for every pages (subpart tree
> representation).
> This outline provides a popup menu so the user can modify this specific part
> of the model using commands, which in the end, must be sent to the stack of
> the visual page.
>
> In a very first time, I thought I could simply implement a TreeEditPart for
> the outline, this would be fairly easy but it also means duplicate what EMF
> already does!
> Then after looking at this newsgroup I thought I could simply use a
> TreeViewer combined with EMF adapters (as generated). Then I should wrap
> every GEF command into EMF command... this way every command could be
> executed on top of the visual page (in an EMF stack).
>
> Problem is, first I am not truely confident about any of these solutions
> (should I do it another way? how?) and last but not least, my delegating
> command stack is based on the current page... since the outline is not
> within a page, it could send commands in a wrong stack... How could I handle
> this?
>
> If you have any examples, better implementations, please let me know.
>
> Thanks.
>
>
> J.
>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Outline view and EMF+GEF+MultiPageEditor [message #247992 is a reply to message #247988] Tue, 31 March 2009 16:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: j4r0d.hotmail.com

Thanks for your reply Ed,

I have created my editingDomain using my own command stack implementation
which simply delegates to another true command stack depending on the active
page.

Why do I need several command stacks? Here is a part of my model:
My model handles a set of figures. Each figure as a style property. The
style property is simply a string which is used to reference a style
definition (which has a name property, plus any style related stuffs). A
tree of style definitions exists at my model's root node.

model
/ \
fig.A StyleDefA
/ \ \
fig.B fig.C ...


In the end you can get a multi page editor with 2 pages, one for the visual
part, the other one representing a style tree.
Of course, I could have done all this using one command stack, which,
considering my outline problem would be an easy solution... but from the
user point of view, if you create one style, then you create really much
figures and oops... your style name was misstyped you entered "foo" rather
than "bar", crtl+z will simply help you... restarting from scratch :-(
Besides, even if the 2 pages are related to one model, those pages are just
a representation of 2 different subparts of this model. Here again, from the
user point of view, does it make sense to press ctrl+z and having nothing to
change on screen, just because you are not looking at the appropriate page?

That's why I decided to introduce different contexts depending on what is
being edited. I think this way undoing is much more user-friendly.
This example is even more true if you consider 4 pages (same concept) and a
really big model.

Regarding the outline problem, does the eclipse API provide any way of
knowing which view is the active one? If so I could still enhance my
delegating command stack to send outline commands onto the visual page
stack.

J.


"Ed Merks" <Ed.Merks@gmail.com> wrote
> Jarod,
>
> It sounds tricky indeed. EMF generally will determine the editing domain
> from the objects themselves using
> AdapterFactoryEditingDomain.getEditingDomainFor, and the commands will be
> executed on that stack. I'm not sure I understand how multiple stacks
> can work. Are the pages not showing different aspects of one common
> underlying model? If there's only one common underlying model, it seems
> to me there needs to be only one stack...
>
>
> Jarod Mills wrote:
>> Hello,
>>
>> I've been searching this newsgroup for any related topics and I have
>> found some interesting stuff.
>> However I still do have a problem... here it is:
>>
>> I have generated my model using EMF, and I have customized 4 pages for my
>> multipage editor.
>> I have implemented some delegating command stack mechanism in order to
>> get one stack per page.
>> The first page is a GEF overview of a specific subpart of my model. I
>> wish to use the outline view in order to show a tree representation of
>> this subpart.
>> The other pages show other subparts of my model.
>> The content of the outline is always the same for every pages (subpart
>> tree representation).
>> This outline provides a popup menu so the user can modify this specific
>> part of the model using commands, which in the end, must be sent to the
>> stack of the visual page.
>>
>> In a very first time, I thought I could simply implement a TreeEditPart
>> for the outline, this would be fairly easy but it also means duplicate
>> what EMF already does!
>> Then after looking at this newsgroup I thought I could simply use a
>> TreeViewer combined with EMF adapters (as generated). Then I should wrap
>> every GEF command into EMF command... this way every command could be
>> executed on top of the visual page (in an EMF stack).
>>
>> Problem is, first I am not truely confident about any of these solutions
>> (should I do it another way? how?) and last but not least, my delegating
>> command stack is based on the current page... since the outline is not
>> within a page, it could send commands in a wrong stack... How could I
>> handle this?
>>
>> If you have any examples, better implementations, please let me know.
>>
>> Thanks.
>>
>>
>> J.
>>
>>
>>
Re: Outline view and EMF+GEF+MultiPageEditor [message #247997 is a reply to message #247992] Tue, 31 March 2009 16:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050306060700040006060207
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Jarod,

A generated EMF editor has an IPartListener that listens for when the
ContentOutline is activated so likely you'll want to have a look at that.


Jarod Mills wrote:
> Thanks for your reply Ed,
>
> I have created my editingDomain using my own command stack implementation
> which simply delegates to another true command stack depending on the active
> page.
>
> Why do I need several command stacks? Here is a part of my model:
> My model handles a set of figures. Each figure as a style property. The
> style property is simply a string which is used to reference a style
> definition (which has a name property, plus any style related stuffs). A
> tree of style definitions exists at my model's root node.
>
> model
> / \
> fig.A StyleDefA
> / \ \
> fig.B fig.C ...
>
>
> In the end you can get a multi page editor with 2 pages, one for the visual
> part, the other one representing a style tree.
> Of course, I could have done all this using one command stack, which,
> considering my outline problem would be an easy solution... but from the
> user point of view, if you create one style, then you create really much
> figures and oops... your style name was misstyped you entered "foo" rather
> than "bar", crtl+z will simply help you... restarting from scratch :-(
> Besides, even if the 2 pages are related to one model, those pages are just
> a representation of 2 different subparts of this model. Here again, from the
> user point of view, does it make sense to press ctrl+z and having nothing to
> change on screen, just because you are not looking at the appropriate page?
>
> That's why I decided to introduce different contexts depending on what is
> being edited. I think this way undoing is much more user-friendly.
> This example is even more true if you consider 4 pages (same concept) and a
> really big model.
>
> Regarding the outline problem, does the eclipse API provide any way of
> knowing which view is the active one? If so I could still enhance my
> delegating command stack to send outline commands onto the visual page
> stack.
>
> J.
>
>
> "Ed Merks" <Ed.Merks@gmail.com> wrote
>
>> Jarod,
>>
>> It sounds tricky indeed. EMF generally will determine the editing domain
>> from the objects themselves using
>> AdapterFactoryEditingDomain.getEditingDomainFor, and the commands will be
>> executed on that stack. I'm not sure I understand how multiple stacks
>> can work. Are the pages not showing different aspects of one common
>> underlying model? If there's only one common underlying model, it seems
>> to me there needs to be only one stack...
>>
>>
>> Jarod Mills wrote:
>>
>>> Hello,
>>>
>>> I've been searching this newsgroup for any related topics and I have
>>> found some interesting stuff.
>>> However I still do have a problem... here it is:
>>>
>>> I have generated my model using EMF, and I have customized 4 pages for my
>>> multipage editor.
>>> I have implemented some delegating command stack mechanism in order to
>>> get one stack per page.
>>> The first page is a GEF overview of a specific subpart of my model. I
>>> wish to use the outline view in order to show a tree representation of
>>> this subpart.
>>> The other pages show other subparts of my model.
>>> The content of the outline is always the same for every pages (subpart
>>> tree representation).
>>> This outline provides a popup menu so the user can modify this specific
>>> part of the model using commands, which in the end, must be sent to the
>>> stack of the visual page.
>>>
>>> In a very first time, I thought I could simply implement a TreeEditPart
>>> for the outline, this would be fairly easy but it also means duplicate
>>> what EMF already does!
>>> Then after looking at this newsgroup I thought I could simply use a
>>> TreeViewer combined with EMF adapters (as generated). Then I should wrap
>>> every GEF command into EMF command... this way every command could be
>>> executed on top of the visual page (in an EMF stack).
>>>
>>> Problem is, first I am not truely confident about any of these solutions
>>> (should I do it another way? how?) and last but not least, my delegating
>>> command stack is based on the current page... since the outline is not
>>> within a page, it could send commands in a wrong stack... How could I
>>> handle this?
>>>
>>> If you have any examples, better implementations, please let me know.
>>>
>>> Thanks.
>>>
>>>
>>> J.
>>>
>>>
>>>
>>>
>
>
>

--------------050306060700040006060207
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Jarod,<br>
<br>
A generated EMF editor has an IPartListener that listens for when the
ContentOutline is activated so likely you'll want to have a look at
that.<br>
<br>
<br>
Jarod Mills wrote:
<blockquote cite="mid:gqtg2q$4lc$1@build.eclipse.org" type="cite">
<pre wrap="">Thanks for your reply Ed,

I have created my editingDomain using my own command stack implementation
which simply delegates to another true command stack depending on the active
page.

Why do I need several command stacks? Here is a part of my model:
My model handles a set of figures. Each figure as a style property. The
style property is simply a string which is used to reference a style
definition (which has a name property, plus any style related stuffs). A
tree of style definitions exists at my model's root node.

model
/ \
fig.A StyleDefA
/ \ \
fig.B fig.C ...


In the end you can get a multi page editor with 2 pages, one for the visual
part, the other one representing a style tree.
Of course, I could have done all this using one command stack, which,
considering my outline problem would be an easy solution... but from the
user point of view, if you create one style, then you create really much
figures and oops... your style name was misstyped you entered "foo" rather
than "bar", crtl+z will simply help you... restarting from scratch :-(
Besides, even if the 2 pages are related to one model, those pages are just
a representation of 2 different subparts of this model. Here again, from the
user point of view, does it make sense to press ctrl+z and having nothing to
change on screen, just because you are not looking at the appropriate page?

That's why I decided to introduce different contexts depending on what is
being edited. I think this way undoing is much more user-friendly.
This example is even more true if you consider 4 pages (same concept) and a
really big model.

Regarding the outline problem, does the eclipse API provide any way of
knowing which view is the active one? If so I could still enhance my
delegating command stack to send outline commands onto the visual page
stack.

J.


"Ed Merks" <a class="moz-txt-link-rfc2396E" href="mailto:Ed.Merks@gmail.com">&lt;Ed.Merks@gmail.com&gt;</a> wrote
</pre>
<blockquote type="cite">
<pre wrap="">Jarod,

It sounds tricky indeed. EMF generally will determine the editing domain
from the objects themselves using
AdapterFactoryEditingDomain.getEditingDomainFor, and the commands will be
executed on that stack. I'm not sure I understand how multiple stacks
can work. Are the pages not showing different aspects of one common
underlying model? If there's only one common underlying model, it seems
to me there needs to be only one stack...


Jarod Mills wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hello,

I've been searching this newsgroup for any related topics and I have
found some interesting stuff.
However I still do have a problem... here it is:

I have generated my model using EMF, and I have customized 4 pages for my
multipage editor.
I have implemented some delegating command stack mechanism in order to
get one stack per page.
The first page is a GEF overview of a specific subpart of my model. I
wish to use the outline view in order to show a tree representation of
this subpart.
The other pages show other subparts of my model.
The content of the outline is always the same for every pages (subpart
tree representation).
This outline provides a popup menu so the user can modify this specific
part of the model using commands, which in the end, must be sent to the
stack of the visual page.

In a very first time, I thought I could simply implement a TreeEditPart
for the outline, this would be fairly easy but it also means duplicate
what EMF already does!
Then after looking at this newsgroup I thought I could simply use a
TreeViewer combined with EMF adapters (as generated). Then I should wrap
every GEF command into EMF command... this way every command could be
executed on top of the visual page (in an EMF stack).

Problem is, first I am not truely confident about any of these solutions
(should I do it another way? how?) and last but not least, my delegating
command stack is based on the current page... since the outline is not
within a page, it could send commands in a wrong stack... How could I
handle this?

If you have any examples, better implementations, please let me know.

Thanks.


J.



</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->

</pre>
</blockquote>
</body>
</html>

--------------050306060700040006060207--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Outline view and EMF+GEF+MultiPageEditor [message #503201 is a reply to message #247997] Fri, 11 December 2009 11:13 Go to previous message
Deepak Singla is currently offline Deepak SinglaFriend
Messages: 27
Registered: December 2009
Junior Member
Hi All,

I am new to GEF.

I want to use gef 3.2.2 shape example in side multipage Editor (one page shape and other page xml).

Please help me and give me the steps to do it.

thanks in advance
Previous Topic:Feedback layer zoom
Next Topic:Problem with running RCP with GEF editor
Goto Forum:
  


Current Time: Thu Mar 28 10:46:13 GMT 2024

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

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

Back to the top