Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » two model in gef
two model in gef [message #243014] Mon, 19 May 2008 09:22 Go to next message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

i am using the GEF tree in the outline view to represent the contents(Edit parts) on the editor.

for this i am using two models.
one is passed to the graphical editor and the second to the tree.

when i pass the same model to both, it works fine,
but when i pass two models the tree is not updated.

what can be the possible reason for this, am i missing something?..,
Re: two model in gef [message #243025 is a reply to message #243014] Tue, 20 May 2008 11:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

well i am now able to update my tree also, but i have used a crude way to do it

1. i made the root object static which was used in setContent() method of my tree

2. than i used that object to add child in my model.

well i didnt found any bug in the code yet but i am not sure that it will work fine.

if any one still know the correct way than please correct me..,
Re: two model in gef [message #243071 is a reply to message #243025] Thu, 22 May 2008 05:38 Go to previous message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

well i have again changed my approach and did this in a much better way than the previous one,

1. i made a setModel() method in the factory class
2. then i passed the treemodel to that method,
3. then i made another setModel() in my editor base edit part on top of which i will create other edit part
4. then i called the second setModel() while creating the edit part in the factory and furhter passed the tree model to that edit part
5. then i passed the treemodel to the edit policy and to the command
6. now i am able to access my treeModel from the createCommand class and so i can update the tree in much better way,

but still i feel this is not the exact way and there are chances that i may encounter some bug,

so if any one have any better idea then please do tell me
thanks..,
Previous Topic:Change Absolute Positions (Can't be so difficult???)
Next Topic:Placing a property figure on the original figure.
Goto Forum:
  


Current Time: Sat Dec 21 17:08:49 GMT 2024

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

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

Back to the top