Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Which role to use to install my EditPolicy in according to REQ_CREATE?
Which role to use to install my EditPolicy in according to REQ_CREATE? [message #220361] Mon, 31 July 2006 02:33 Go to next message
Eclipse UserFriend
Originally posted by: dzhpingbo.sohu.com

I want to install my EditPolicy while REQ_CREATE is invoked ,in my
NodeEditPart, which Role should I use to install my EditPoliy?

I found this in Gef help, but the CONTAINER_ROLE does not work, because my
NodeEditPart does not have container, and I don't want to use LAYOUT_ROLE...

Tools Requests Edit Policies and Roles Actions
CreationTool
REQ_CREATE
Create


CONTAINER_ROLE
LAYOUT_ROLE
TREE_CONTAINER_ROLE
ContainerEditPolicy
LayoutEditPolicy
Re: Which role to use to install my EditPolicy in according to REQ_CREATE? [message #220457 is a reply to message #220361] Mon, 31 July 2006 17:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

Role names are just keys for the policies which are stored in a map. They
have no significance other than to provide a way to replace editpolicies.
You can use any string you prefer as the role. All requests are sent to all
editpolicies so long as they return true for understandsRequest().

Having said that, I'm not sure what you mean by my "NodeEditPart does not
have a container." The ContainerEditPolicy should be going on the editpart
that is the container. It is that container's responsibility to allow
creation of children nodes inside it. Your diagram, by default, is a
container, and so is any editpart that can have other editparts in it.

"dzh" <dzhpingbo@sohu.com> wrote in message
news:eajq5o$t9h$1@utils.eclipse.org...
>I want to install my EditPolicy while REQ_CREATE is invoked ,in my
>NodeEditPart, which Role should I use to install my EditPoliy?
>
> I found this in Gef help, but the CONTAINER_ROLE does not work, because
> my NodeEditPart does not have container, and I don't want to use
> LAYOUT_ROLE...
>
> Tools Requests Edit Policies and Roles Actions
> CreationTool
> REQ_CREATE
> Create
>
>
> CONTAINER_ROLE
> LAYOUT_ROLE
> TREE_CONTAINER_ROLE
> ContainerEditPolicy
> LayoutEditPolicy
>
>
Re: Which role to use to install my EditPolicy in according to REQ_CREATE? [message #220910 is a reply to message #220457] Tue, 08 August 2006 01:10 Go to previous message
Eclipse UserFriend
Originally posted by: dzhpingbo.sohu.com

Thank you:)
"Pratik Shah" <none@unknown.com> д
Previous Topic:Article proposals & call for help
Next Topic:DND between 2 GEF viewers
Goto Forum:
  


Current Time: Fri Apr 26 03:55:43 GMT 2024

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

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

Back to the top