Login | Register
My pages Projects Community openCollabNet

Discussions > users > showing/creating multiple editors at the same time

gef
Discussion topic

Hide all messages in topic

All messages in topic

Re: [gef-users] showing/creating multiple editors at the same time

Reply

Author axhixh
Full name Ashish Shrestha
Date 2008-04-10 06:32:13 PDT
Message As a first step, I have run the google-singleton-detector
(http://code.google.c​om/p/google-singleto​n-detector/) on version 0.12.3.

This represents "everything that needs to be fixed". I have attached the
result.

Since I don't use everything from GEF, I will most probably "fix" the
limited classes I use. I don't use persistence, undo and annotation
provided by GEF (Result of starting to use GEF since version 0.6) and
hence can afford to "break" them. Might look into doing a proper fix later.

Thank you,
Ashish

Bob Tarling wrote:
> I agree with everything you say here.
>
> Globals is a major anti-pattern that should be removed entirely or
> broken up in a more modular way.
>
> Unfortunately GEF was developed at the same time as
> http://argouml.tigris.org with support of that application as its
> primary purpose. ArgoUML requires to display only one graph at aa time
> at the moment.
>
> Since I took overas project lead I've done my best to support the
> needs of all projects.
>
> I'll have to put a small demo app together to take a look at this and
> see what can be resolved.
>
> In the meantime maybe you'd be able to do a workaround.
>
> Would it be possible to wrap the Actions/Cmds in an Action of your own
> and the first thing that Action does is correct the curEditor before
> then calling the wrapped Action?
>
> Bob.
>
>
>
> On 10/04/2008, *Ashish Shrestha* <ashish dot shrestha at wysdm dot com
> <mailto:ashish.sh​restha at wysdm dot com>​> wrote:
>
> Hi!
>
> I am using the gef library to edit some graphs. Currently, I can
> edit only one graph at a time because the class Globals is
> effectively singleton and stores 'current editor' which is
> accessed by all the actions.
>
> Is there a way to make multiple editors visible at the same time?
> Both the editor has their own graph and data model.
>
> I think the use of Globals.curEditor() should be
> removed/minimised. Shouldn't the Cmds be moved to Actions and the
> ActionEvent pass the editor as the source?
>
> Ashish
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: users-unsubscribe@ge​f.tigris.org
> <mailto:users-uns​ubscribe at gef dot tigris.​org>
> For additional commands, e-mail: users-help at gef dot tigris dot org
> <mailto:users-hel​p@gef.tigris.org>​
>
>
Attachments

Re: [gef-users] showing/creating multiple editors at the same time

Reply

Author bobtarling
Full name Bob Tarling
Date 2008-04-10 05:18:25 PDT
Message I agree with everything you say here.

Globals is a major anti-pattern that should be removed entirely or broken
up in a more modular way.

Unfortunately GEF was developed at the same time as
http://argouml.tigris.org with support of that application as its primary
purpose. ArgoUML requires to display only one graph at aa time at the
moment.

Since I took overas project lead I've done my best to support the needs of
all projects.

I'll have to put a small demo app together to take a look at this and see
what can be resolved.

In the meantime maybe you'd be able to do a workaround.

Would it be possible to wrap the Actions/Cmds in an Action of your own and
the first thing that Action does is correct the curEditor before then
calling the wrapped Action?

Bob.



On 10/04/2008, Ashish Shrestha <ashish.shrestha@​wysdm.com> wrote:
>
> Hi!
>
> I am using the gef library to edit some graphs. Currently, I can edit only
> one graph at a time because the class Globals is effectively singleton and
> stores 'current editor' which is accessed by all the actions.
>
> Is there a way to make multiple editors visible at the same time? Both the
> editor has their own graph and data model.
>
> I think the use of Globals.curEditor() should be removed/minimised.
> Shouldn't the Cmds be moved to Actions and the ActionEvent pass the editor
> as the source?
>
> Ashish
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: users-unsubscribe@ge​f.tigris.org
> For additional commands, e-mail: users-help at gef dot tigris dot org
>
>
Attachments

showing/creating multiple editors at the same time

Reply

Author axhixh
Full name Ashish Shrestha
Date 2008-04-10 04:48:55 PDT
Message Hi!

I am using the gef library to edit some graphs. Currently, I can edit
only one graph at a time because the class Globals is effectively
singleton and stores 'current editor' which is accessed by all the actions.

Is there a way to make multiple editors visible at the same time? Both
the editor has their own graph and data model.

I think the use of Globals.curEditor() should be removed/minimised.
Shouldn't the Cmds be moved to Actions and the ActionEvent pass the
editor as the source?

Ashish
Messages per page: