Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gef-dev] An in place editor (TextCellEditor) on an edit part

Hi,

Recently I ran into a problem and was hoping if any of you could help me out with it.

What I wish to achieve:
1) Dragging and dropping a tool(CombinedTemplateCreationEntry) from the palette instantiates the model class which leads to the normal GEF flow wherein an EditPart as well as a  Shape corresponding to the model is created.
Now for this particular EditPart I want an in place editor (something on the lines of TextCellEditor) so I have installed DirectEditPolicy and also created a sublcass of DirectEditManager which i initialize in the performRequest method of this EditPart.

So now whenever I click on the Label inside the Shape corresponding to this Edit Part I get a inplace editor. The show() method of the my subclssed DirectEditManager takes care of it.

Now what I also want to do is activate this editor for my edit part as soon as it is drag and dropped and not just on performRequest(). So the in place editor of this edit part is actiavted whenever the user drags and drops it and whenever the user clicks on the label in the shape (view) corresponding to this edit part. For all other scenarios the in place editor shouldn't be visible or active. While I have been able to take care of activating the editor whenever the label within it is clicked (making use of the performRequest() method of Edit Part) I have not been able to successfully do it as soon as it is dragged and dropped.

Can any of you help me with it.
Any and every help is highly appreciated. Thanks alot for your patience in reading a relatively long mail and am hopeful of a reply...

Thanks and Regards,
Siddharth

--
Thanks,
Siddharth

Back to the top