Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Extending EditDomain or EditPartViewer to Store Custom Information
Extending EditDomain or EditPartViewer to Store Custom Information [message #173701] Sat, 26 March 2005 08:28 Go to next message
Eclipse UserFriend
Originally posted by: rudolf.vaum.net

I am implementing some customizations to my gef editor. I was wondering what
is the most appropriate place to store some additional information (like
custom selection information) that would be specific for one editor
instance.
(this info would definitely be not model-specific, so I wouldn't want to
store in the model)

So far, I thought of extending either the EditDomain or the EditPartViewer
and put my variables in there.

Which one should I use? What is the best design choice for this?

Thanks
Rudi
Re: Extending EditDomain or EditPartViewer to Store Custom Information [message #173733 is a reply to message #173701] Sat, 26 March 2005 10:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rudolf.vaum.net

I have also discovered in the JavaDocs that the RootEditPart might also be a
candidate as it "allows the application's 'real' EditParts to be more
homogeneous", so it might seem logical to override it and add some
functionality/data there.

Also, are the properties that can be set in a GraphicalViewer via
"setProperty" meant to be used by client code?

Rudi


"Rudi Vaum" <rudolf@vaum.net> wrote in message
news:d23b9f$ti1$1@news.eclipse.org...
> I am implementing some customizations to my gef editor. I was wondering
what
> is the most appropriate place to store some additional information (like
> custom selection information) that would be specific for one editor
> instance.
> (this info would definitely be not model-specific, so I wouldn't want to
> store in the model)
>
> So far, I thought of extending either the EditDomain or the EditPartViewer
> and put my variables in there.
>
> Which one should I use? What is the best design choice for this?
>
> Thanks
> Rudi
>
>
>
Re: Extending EditDomain or EditPartViewer to Store Custom Information [message #173752 is a reply to message #173733] Sun, 27 March 2005 09:27 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
What kind of graphical information is this? If you have some graphical
information per model object, you might want to create a view model that
wraps your business model. The EDiagram example does this. If, however,
the graphical information is just a few settings that are applicable to all
editors, you can store that information in your plug-in's preference store.

Properties set on the GraphicalViewer are not persisted.

"Rudi Vaum" <rudolf@vaum.net> wrote in message
news:d23jh1$60o$1@news.eclipse.org...
> I have also discovered in the JavaDocs that the RootEditPart might also be
a
> candidate as it "allows the application's 'real' EditParts to be more
> homogeneous", so it might seem logical to override it and add some
> functionality/data there.
>
> Also, are the properties that can be set in a GraphicalViewer via
> "setProperty" meant to be used by client code?
>
> Rudi
>
>
> "Rudi Vaum" <rudolf@vaum.net> wrote in message
> news:d23b9f$ti1$1@news.eclipse.org...
> > I am implementing some customizations to my gef editor. I was wondering
> what
> > is the most appropriate place to store some additional information (like
> > custom selection information) that would be specific for one editor
> > instance.
> > (this info would definitely be not model-specific, so I wouldn't want to
> > store in the model)
> >
> > So far, I thought of extending either the EditDomain or the
EditPartViewer
> > and put my variables in there.
> >
> > Which one should I use? What is the best design choice for this?
> >
> > Thanks
> > Rudi
> >
> >
> >
>
>
Re: Extending EditDomain or EditPartViewer to Store Custom Information [message #173802 is a reply to message #173701] Mon, 28 March 2005 15:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Are you saving the info? you can use viewer properties. If the info needs
to be saved, but not in the model, the resource plug-in provide metadata
facilities. Basically, a ghost file with "terd" data in it that gets
deleted should the resource go away.

"Rudi Vaum" <rudolf@vaum.net> wrote in message
news:d23b9f$ti1$1@news.eclipse.org...
>I am implementing some customizations to my gef editor. I was wondering
>what
> is the most appropriate place to store some additional information (like
> custom selection information) that would be specific for one editor
> instance.
> (this info would definitely be not model-specific, so I wouldn't want to
> store in the model)
>
> So far, I thought of extending either the EditDomain or the EditPartViewer
> and put my variables in there.
>
> Which one should I use? What is the best design choice for this?
>
> Thanks
> Rudi
>
>
>
Re: Extending EditDomain or EditPartViewer to Store Custom Information [message #174109 is a reply to message #173802] Tue, 29 March 2005 07:22 Go to previous message
Eclipse UserFriend
Originally posted by: rudolf.vaum.net

I did use the viewer properties. I don't intend to save the info - it's just
a custom selection property - I only need it as long as an editor instance
is
open.

It's working quite nicely - thanks guys.
Rudi

"Randy Hudson" <none@us.ibm.com> wrote in message
news:d29clk$6rt$1@news.eclipse.org...
> Are you saving the info? you can use viewer properties. If the info
needs
> to be saved, but not in the model, the resource plug-in provide metadata
> facilities. Basically, a ghost file with "terd" data in it that gets
> deleted should the resource go away.
>
> "Rudi Vaum" <rudolf@vaum.net> wrote in message
> news:d23b9f$ti1$1@news.eclipse.org...
> >I am implementing some customizations to my gef editor. I was wondering
> >what
> > is the most appropriate place to store some additional information (like
> > custom selection information) that would be specific for one editor
> > instance.
> > (this info would definitely be not model-specific, so I wouldn't want to
> > store in the model)
> >
> > So far, I thought of extending either the EditDomain or the
EditPartViewer
> > and put my variables in there.
> >
> > Which one should I use? What is the best design choice for this?
> >
> > Thanks
> > Rudi
> >
> >
> >
>
>
Previous Topic:Launching an editor without a file - openEditor()
Next Topic:How can I disable auto-arrange functions of the "flow" example of GEF?
Goto Forum:
  


Current Time: Thu Apr 25 18:02:49 GMT 2024

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

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

Back to the top