Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » problems view in gef
problems view in gef [message #723122] Wed, 07 September 2011 17:29 Go to next message
karthick9686@gmail.com Missing name
Messages: 41
Registered: July 2011
Member
I want to display any problems in the model in the problem view. Also when the user clicks on the problem view, it should select the particular EditPart (whose model caused the problem ) example => there should be no nodes in gef editor without any outgoing connnection then if u have an node which does not have any outgoing connections and u perform save action . the editor should display that there is no outgoing connection from the node and when clicked on the error in problems view then it should select the particular EditPart (whose model caused the problem )
Re: problems view in gef [message #723733 is a reply to message #723122] Fri, 09 September 2011 09:47 Go to previous messageGo to next message
Nagesh Y J is currently offline Nagesh Y J
Messages: 11
Registered: July 2009
Junior Member
You can get editpart for a model from your editor,
Map modelAndEditPartsMap = myEditor.getViewer().getEditPartRegistry();
(EditPart) modelAndEditPartsMap.get(model);

You can select this particular editpart by, myEditor.getViewer().appendSelection(editpart); or myEditor.getViewer().select(editpart);

Even if you want you can reveal it.
myEditor.getViewer().reveal(editpart);

Regards,
Nagesh Y.J.



Regards,
Nagesh Y.J.
Re: problems view in gef [message #723880 is a reply to message #723733] Fri, 09 September 2011 18:49 Go to previous message
karthick9686@gmail.com Missing name
Messages: 41
Registered: July 2011
Member
i am able to display the errors in the problems view . but my problem now is when i click the particular error i have to get the model for that particular error . i think i must implement the igotomarker interface. if u have the coding could you please post it . i am writing all my code in the save method of the editor .

your coding can be used only after i get the particular model that caused the errors and passing model as argument to

modelAndEditPartsMap.get(model);

thanks

[Updated on: Fri, 09 September 2011 18:55]

Report message to a moderator

Previous Topic:Layered Pane problem
Next Topic:adding layers to scalablerooteditpart
Goto Forum:
  


Current Time: Mon Sep 22 18:21:17 GMT 2014

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

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