Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » TextDirectEditManager giving old value
TextDirectEditManager giving old value [message #885688] Wed, 13 June 2012 12:42
Sarath Rachakonda is currently offline Sarath RachakondaFriend
Messages: 16
Registered: May 2012
Junior Member
Hi,

Iam trying to edit the NameEditPart programmatically as below:

XXXXEditPart XXXXEP1 = (XXXXEditPart) createShapeUsingTool(XXXXElementTypes.XXXX_2001,
new Point(100, 100));
View model = (View)XXXXEP1.getModel();

IGraphicalEditPart nameCompartment = XXXXEP1.getChildBySemanticHint(XXXXVisualIDRegistry
.getType(XXXXNameEditPart.VISUAL_ID));

final ITextAwareEditPart nameEditPart = (ITextAwareEditPart)nameCompartment;
final TextDirectEditManager textDirectEditManager = new TextDirectEditManager(nameEditPart,
TextDirectEditManager.getTextCellEditorClass(nameEditPart),
XXXXEditPartFactory.getTextCellEditorLocator(nameEditPart));

textDirectEditManager.show();
textDirectEditManager.setEditText("XXXX");

Problem is when i try to get the modified value from model it is showing old value.

((IXXXX)model.getElement()).getName()

Above invocation is giving old value.Did i missed anything.


Thanks,
Sarath
Previous Topic:programmatically created connections do not show
Next Topic:Question compartments
Goto Forum:
  


Current Time: Mon Dec 22 02:54:15 GMT 2014

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

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