Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to refresh models in different editors?
How to refresh models in different editors? [message #147179] Wed, 11 August 2004 07:06 Go to next message
Eclipse UserFriend
Originally posted by: amy_fang.mailst.xjtu.edu.cn

Hello, everyone

I have created three editors, and they can show the same model with
different figures. Now I edit the model in a editor, and want to refresh
the model's properties in the other two editors. How can I implement this
function?

Thanks in advance.
Re: How to refresh models in different editors? [message #147189 is a reply to message #147179] Wed, 11 August 2004 07:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: word-up.gmx.de

The best solution for this is to use a notifier mechanism.

The model is the notifier and the editors, or better the editparts should
register for being notified if the model has changed. Then you can call
the refreshVisuals() or refreshChildren() method depending on what hast
changed.




Amy wrote:

> Hello, everyone

> I have created three editors, and they can show the same model with
> different figures. Now I edit the model in a editor, and want to refresh
> the model's properties in the other two editors. How can I implement this
> function?

> Thanks in advance.
Re: How to refresh models in different editors? [message #147260 is a reply to message #147179] Wed, 11 August 2004 15:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Are you sharing the model instances across editors?

"Amy" <amy_fang@mailst.xjtu.edu.cn> wrote in message
news:cfcgi5$l8g$1@eclipse.org...
> Hello, everyone
>
> I have created three editors, and they can show the same model with
> different figures. Now I edit the model in a editor, and want to refresh
> the model's properties in the other two editors. How can I implement this
> function?
>
> Thanks in advance.
>
Re: How to refresh models in different editors? [message #147382 is a reply to message #147260] Thu, 12 August 2004 01:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: amy_fang.mailst.xjtu.edu.cn

No. Maybe I can say that it is another problem to me. Can I use the same
model instance in different editor?

Randy Hudson wrote:

> Are you sharing the model instances across editors?

> "Amy" <amy_fang@mailst.xjtu.edu.cn> wrote in message
> news:cfcgi5$l8g$1@eclipse.org...
> > Hello, everyone
> >
> > I have created three editors, and they can show the same model with
> > different figures. Now I edit the model in a editor, and want to refresh
> > the model's properties in the other two editors. How can I implement this
> > function?
> >
> > Thanks in advance.
> >
Re: How to refresh models in different editors? [message #147442 is a reply to message #147189] Thu, 12 August 2004 02:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: amy_fang.mailst.xjtu.edu.cn

I think this solution may be feasible in a editor. But if there are
several editors, how can I add a listener to a model in a editor, but the
other editor can receive the notification if the model has changed?

Max wrote:

> The best solution for this is to use a notifier mechanism.

> The model is the notifier and the editors, or better the editparts should
> register for being notified if the model has changed. Then you can call
> the refreshVisuals() or refreshChildren() method depending on what hast
> changed.




> Amy wrote:

> > Hello, everyone

> > I have created three editors, and they can show the same model with
> > different figures. Now I edit the model in a editor, and want to refresh
> > the model's properties in the other two editors. How can I implement this
> > function?

> > Thanks in advance.
Re: How to refresh models in different editors? [message #147456 is a reply to message #147442] Thu, 12 August 2004 06:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: word-up.gmx.de

OK, if you use different models that doesn't work......but why do want to
refresh the other editors, because their model has not changed.

To answer your other question: It is definitely possible to share a model
instance across editors. Then works the notification pattern.

Amy wrote:

> I think this solution may be feasible in a editor. But if there are
> several editors, how can I add a listener to a model in a editor, but the
> other editor can receive the notification if the model has changed?

> Max wrote:

> > The best solution for this is to use a notifier mechanism.

> > The model is the notifier and the editors, or better the editparts should
> > register for being notified if the model has changed. Then you can call
> > the refreshVisuals() or refreshChildren() method depending on what hast
> > changed.




> > Amy wrote:

> > > Hello, everyone

> > > I have created three editors, and they can show the same model with
> > > different figures. Now I edit the model in a editor, and want to refresh
> > > the model's properties in the other two editors. How can I implement this
> > > function?

> > > Thanks in advance.
Re: How to refresh models in different editors? [message #147533 is a reply to message #147382] Thu, 12 August 2004 13:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Yes, this is what the JDT does with textual documents. All editors are
working on the same document simultaneously.

"Amy" <amy_fang@mailst.xjtu.edu.cn> wrote in message
news:cfege8$n68$1@eclipse.org...
> No. Maybe I can say that it is another problem to me. Can I use the same
> model instance in different editor?
>
> Randy Hudson wrote:
>
> > Are you sharing the model instances across editors?
>
> > "Amy" <amy_fang@mailst.xjtu.edu.cn> wrote in message
> > news:cfcgi5$l8g$1@eclipse.org...
> > > Hello, everyone
> > >
> > > I have created three editors, and they can show the same model with
> > > different figures. Now I edit the model in a editor, and want to
refresh
> > > the model's properties in the other two editors. How can I implement
this
> > > function?
> > >
> > > Thanks in advance.
> > >
>
>
Re: How to refresh models in different editors? [message #1471889 is a reply to message #147533] Thu, 13 November 2014 12:25 Go to previous message
Marco Descher is currently offline Marco DescherFriend
Messages: 198
Registered: October 2010
Location: Austria
Senior Member
Ed,

for the specific version here, the problem lies within differences of Juno and Luna.

For the class org.eclipse.e4.ui.model.application.ui.advanced.MPerspective for example, in Luna I have to add the plug-in org.eclipse.e4.ui.model.workbench while in Juno it was re-exported by org.eclipse.e4.ui.workbench. So this would be pretty easy to fix. Currently, however, we build the backend against the .target file, and limiting the Target definition made by oomph to the repositories mentioned in this .target file would allow for an easy introduction of oomph without forcing to change all the builds etc.

The definition of eclipse.target.platform = None does NOT work for me. I tried and I know how it is supposed to work. I also copied it from JDT.setup. It seems however, that the value change is simply not considered.

https://dl.dropboxusercontent.com/u/72943400/2014-11-13_1323.png

The result is: It ignores my own "None" Targlet and uses the Luna one.

Thank you Ed!!!

Previous Topic:draw power system with GEF
Next Topic:[Zest] drag and drop a node from a graph container to another
Goto Forum:
  


Current Time: Thu Dec 26 11:14:02 GMT 2024

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

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

Back to the top