Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » labelling shape
labelling shape [message #194373] Tue, 24 June 2008 17:51 Go to next message
Eclipse UserFriend
Originally posted by: jk6803.yahoo.com

Hi
Does anyone know to t set the labe inside of shape just like GMF runtime
which provides small box right after creating shapes.

- thanks
Re: labelling shape [message #194932 is a reply to message #194373] Mon, 30 June 2008 08:29 Go to previous message
Eclipse UserFriend
Originally posted by: lunaris.bluemoon.gmail.com

Hi YJ,

Are you referring to a Direct Edit Request?

If so then you can do it as follows (taken from the GMF Tutorial I believe):

Display.getCurrent().asyncExec(
new Runnable() {
public void run() {
/*
* Set the selection to the edit part you
* wish to direct edit somehow - here we
* use a IDiagramGraphicalViewer.
*/
getDiagramGraphicalViewer().setSelection(
new StructuredSelection(targetEditPart));

Request directEditRequest =
new Request(RequestConstants.REQ_DIRECT_EDIT);

targetEditPart.performRequest(directEditRequest);
}
}
);

Hope this answers your question, regards
Will
Previous Topic:How can I resize the compartment if the component present inside it?
Next Topic:Element in compartment
Goto Forum:
  


Current Time: Sun Jul 06 08:11:02 EDT 2025

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

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

Back to the top