I am using Panel as a Figure in GEF eclipse. Now on double click I want to add a Label as other normal example shows .
How to achieve that.
I am using Panel as a Figure in GEF eclipse. Now on double click
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
On the
EditPartthat manages the figure you should install aDIRECT_EDIT_ROLEpolicy (implemented byDirectEditPolicyclass). This will cause yourEditPartto be called when double clicks occur on the figure. The framework will call methodperformRequestwith aRequestConstants.REQ_OPENorRequestConstants.REQ_DIRECT_EDITrequest. Upon receiving the request you can add whatever you want to the figure and refresh visuals.If you want to edit text inside a
Label, you can see how I implemented this here.Good luck.