labelling shape [message #194373] |
Tue, 24 June 2008 21:51 |
Eclipse User |
|
|
|
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 12:29 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02506 seconds