Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Node with OPEN_ROLE EditPolicy nearly "unclickable"
Node with OPEN_ROLE EditPolicy nearly "unclickable" [message #643442] Mon, 06 December 2010 21:17 Go to next message
Kai Maschke is currently offline Kai Maschke
Messages: 16
Registered: October 2010
Junior Member
Hi,

on some nodes I installed EditPolicyRoles with OPEN_ROLE.
It opens a swing component.
My problem is, that I have to click very very often until the command is fired. Almost every time I am double-clicking on it, the editor wants to edit the label, which is inside the node.
Can I prevent the editor of doing so?
The labels in the nodes are already read-only.

Another problem is that I'd like to have the nodes, which are inside a compartment, in "List Layout". But if I activate the "List Layout" for the parent comparment, the OPEN_ROLE event is never fired!

My nodes and compartments are very simple.

Any solutions?
Re: Node with OPEN_ROLE EditPolicy nearly "unclickable" [message #643467 is a reply to message #643442] Mon, 06 December 2010 23:49 Go to previous message
Michael Golubev is currently offline Michael Golubev
Messages: 373
Registered: July 2009
Senior Member
Hello,

In the TopGraphicalEditPart#performEditRequest there is following code:

editPart = (EditPart) getEditingDomain().runExclusive(
  new RunnableWithResult.Impl() {
     public void run() {
        setResult(getPrimaryChildEditPart());
     }
});
if (editPart != null){
  editPart.performRequest(request);
}


so in order to disable in-place editor, you may either return null from the generated getPrimaryChildEditPart() method or override the whole performEditRequest() method.

Quote:
if I activate the "List Layout" for the parent compartment, the OPEN_ROLE event is never fired


Weird, in the UML2Tools we have a top-level packages that contain inner deep packages in a list layout, but OPEN_ROLE EP works for both of them. May be the fixing of the first part will reveal something new?

Regards,
Michael







Previous Topic:Can't refer to elements defined in more than one Ecore file in GMF Audit Rule
Next Topic:How to refresh the content of an external label
Goto Forum:
  


Current Time: Sat Oct 25 07:11:39 GMT 2014

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

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