Skip to main content



      Home
Home » Eclipse Projects » GEF » EditPart doubt
EditPart doubt [message #239061] Thu, 11 October 2007 02:17 Go to next message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

hello everybody,

lately i have started working on gef and have learned about creating the starting editor for gef with a palette, i got some source code also like of the shape example,

but one thing i m really confused is that the objects we create like the rectangle or ellipse is how created?, i saw several methods of, setting size location etc, but i didnt find any class or method for editparts,

for connections also there was a list which keep track of the connections made, but i didnt found any such list for the objects, please can anyone just give me a simple explanation or anything similar about the edit part or about my doubt??..,

thanks.
Re: EditPart doubt [message #239066 is a reply to message #239061] Thu, 11 October 2007 03:09 Go to previous messageGo to next message
Eclipse UserFriend
You should have an EditPartFactory which creates the edit parts and the getSourceConnections & getTargetConnections in the edit parts should give the connections
Re: EditPart doubt [message #239071 is a reply to message #239066] Thu, 11 October 2007 03:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

thanks Prakash

but please can you show me some source code or some link where i can see and get an idea about how this edit part factory looks like??..,
Re: EditPart doubt [message #239076 is a reply to message #239071] Thu, 11 October 2007 03:26 Go to previous messageGo to next message
Eclipse UserFriend
The interface is org.eclipse.gef.EditPartFactory. Look for implementations of this in your project
Re: EditPart doubt [message #239081 is a reply to message #239076] Thu, 11 October 2007 03:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

thanks i found it but in another source code but not in the shapes example source code,

so is it possible to create editparts without using Editpartfactory or the Abstract edit part class??
Re: EditPart doubt [message #239086 is a reply to message #239081] Thu, 11 October 2007 03:48 Go to previous messageGo to next message
Eclipse UserFriend
Not sure of why you don't want to use the factory, but the answer is yes, you can create EditParts without using the EditPartFactory. You have to override the createChild method in your EditPart
Re: EditPart doubt [message #239091 is a reply to message #239086] Thu, 11 October 2007 04:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

i asked so because in the shape examples source code there was no edit part factory used neither any abstract graphical edit part, so i was confused how the edit part are actually generated, and thats why i asked you,

createChild method is of which class??..,
Re: EditPart doubt [message #239095 is a reply to message #239091] Thu, 11 October 2007 04:24 Go to previous messageGo to next message
Eclipse UserFriend
Shapes example does uses an EditPartFactory - ShapesEditPartFactory.
Re: EditPart doubt [message #239100 is a reply to message #239095] Thu, 11 October 2007 05:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

is that so?? i think then my source code is corrupt because i just have a palette factory but no editpart factory..,
Re: EditPart doubt [message #239105 is a reply to message #239100] Thu, 11 October 2007 06:21 Go to previous message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

jeez... you are correct the edit part factory is there, i re imported the code from the plugins and found that one whole package was missing in the previous one,

thanks for your help..,
Previous Topic:Action question
Next Topic:GraphicalViewer
Goto Forum:
  


Current Time: Wed May 07 17:13:22 EDT 2025

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

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

Back to the top