Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Create a new EditPart with ToolEntry is forbidden?(create a new EditPart by clicking on an other works only one time)
icon9.gif  Create a new EditPart with ToolEntry is forbidden? [message #554054] Thu, 19 August 2010 22:03 Go to next message
Andreas is currently offline AndreasFriend
Messages: 9
Registered: February 2010
Location: Germany/Berlin
Junior Member
Hi,

We have a GEF/GMF based editor (ext. DiagramDocumentEditor). To add EditParts to our diagram we use tools (ext. ToolEntry). We had a tool, that create a new EditPart by clicking on an other and links the new one to it.
Our problem is that we can do this only one time. After that a forbidden sign is showing and we had to move the mouse cursor to get back in the insert mode.
On the screenshot your can see this behavior.

http://img441.imageshack.us/img441/1407/screenjb.png

What can we do to repair this. Tools? EditPolicy?


Thank You!
icon5.gif  Re: Create a new EditPart with ToolEntry is forbidden? [message #556442 is a reply to message #554054] Wed, 01 September 2010 11:14 Go to previous message
Andreas is currently offline AndreasFriend
Messages: 9
Registered: February 2010
Location: Germany/Berlin
Junior Member
I found out why the forbidden sign is showing. The forbidden sign is showing always if EditPolicy.getCommand(request) is returning null.
I debug and found the following application flow:

[we are in insert mode]

- LayoutEditPolicy.getCommand(CreateChildRequest) 
	return CompoundCommand

- LayoutEditPolicy.showTargetFeedback()

[Mouse clicked, new node is creating, forbidden sign is showing]

- LayoutEditPolicy.eraseTargetFeedback()

- LayoutEditPolicy.getCommand(ConnectionStartRequest)
	return null

- LayoutEditPolicy.getCommand(ConnectionEndRequest)
	return null

[we had to move the mouse, we are back in the insert mode]

- LayoutEditPolicy.showTargetFeedback()

- LayoutEditPolicy.getCommand(CreateChildRequest) 
	return CompoundCommand


How can we get back in the insert mode and create new CreateChildRequests? Rolling Eyes
Previous Topic:Create view for semantic element
Next Topic:[Announce] Modeling Classes - Sep. 20 - Nov. 5
Goto Forum:
  


Current Time: Thu Sep 19 08:38:54 GMT 2024

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

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

Back to the top