Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » labelling shape
labelling shape [message #194373] Tue, 24 June 2008 21: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 12: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: Fri Apr 19 18:55:56 GMT 2024

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

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

Back to the top