Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » ComponentEditPolicy and deletion
ComponentEditPolicy and deletion [message #167907] Sat, 12 February 2005 01:28 Go to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

ComponentEditPolicy returns commands for Request REQ_ORPHAN and
REQ_DELETE, but returns false for understandsRequests for both of those
requests. Is that correct behavior??


CL
Re: ComponentEditPolicy and deletion [message #168017 is a reply to message #167907] Mon, 14 February 2005 00:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

understandRequest is used to filter the selection during certain
actions/operations. Currently neither of those opereations performs this
type of filtering.

"CL [dnoyeb] Gilbert" <Lamont_Gilbert@rigidsoftware.com> escreveu na
mensagem news:cujm4n$e70$1@www.eclipse.org...
> ComponentEditPolicy returns commands for Request REQ_ORPHAN and
> REQ_DELETE, but returns false for understandsRequests for both of those
> requests. Is that correct behavior??
>
>
> CL
Re: ComponentEditPolicy and deletion [message #168203 is a reply to message #168017] Mon, 14 February 2005 16:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

I was attempting to make one of my edit parts not deleteable by
returning false for understandsRequest(REQ_DELETE), but I found out its
never called and instead I must override and make sure no command is
returned. Or something like that. Somewhat strange to have both
returning null as an indication that an edit part does not support a
command AND returning false to understandsRequests, isint it? Seems
like the same info returned in two seperate places, and they do not
always agree.

CL


Randy Hudson wrote:
> understandRequest is used to filter the selection during certain
> actions/operations. Currently neither of those opereations performs this
> type of filtering.
>
> "CL [dnoyeb] Gilbert" <Lamont_Gilbert@rigidsoftware.com> escreveu na
> mensagem news:cujm4n$e70$1@www.eclipse.org...
>
>>ComponentEditPolicy returns commands for Request REQ_ORPHAN and
>>REQ_DELETE, but returns false for understandsRequests for both of those
>>requests. Is that correct behavior??
>>
>>
>>CL
>
>
>
Re: ComponentEditPolicy and deletion [message #168218 is a reply to message #168203] Mon, 14 February 2005 16:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

"CL [dnoyeb] Gilbert" <Lamont_Gilbert@rigidsoftware.com> escreveu na
mensagem news:cuqkik$tkm$1@www.eclipse.org...
>I was attempting to make one of my edit parts not deleteable by returning
>false for understandsRequest(REQ_DELETE), but I found out its never called
>and instead I must override and make sure no command is returned. Or
>something like that. Somewhat strange to have both returning null as an
>indication that an edit part does not support a command AND returning false
>to understandsRequests, isint it? Seems

understandRequest is never called, therefore you don't need to return false,
and you just need to handle Delete in one place.

> like the same info returned in two seperate places, and they do not always
> agree.
>
> CL
>
>
> Randy Hudson wrote:
>> understandRequest is used to filter the selection during certain
>> actions/operations. Currently neither of those opereations performs this
>> type of filtering.
>>
>> "CL [dnoyeb] Gilbert" <Lamont_Gilbert@rigidsoftware.com> escreveu na
>> mensagem news:cujm4n$e70$1@www.eclipse.org...
>>
>>>ComponentEditPolicy returns commands for Request REQ_ORPHAN and
>>>REQ_DELETE, but returns false for understandsRequests for both of those
>>>requests. Is that correct behavior??
>>>
>>>
>>>CL
>>
>>
Re: ComponentEditPolicy and deletion [message #168250 is a reply to message #168218] Mon, 14 February 2005 20:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

Randy Hudson wrote:
> "CL [dnoyeb] Gilbert" <Lamont_Gilbert@rigidsoftware.com> escreveu na
> mensagem news:cuqkik$tkm$1@www.eclipse.org...
>
>>I was attempting to make one of my edit parts not deleteable by returning
>>false for understandsRequest(REQ_DELETE), but I found out its never called
>>and instead I must override and make sure no command is returned. Or
>>something like that. Somewhat strange to have both returning null as an
>>indication that an edit part does not support a command AND returning false
>>to understandsRequests, isint it? Seems
>
>
> understandRequest is never called, therefore you don't need to return false,
> and you just need to handle Delete in one place.
>

are you saying this method is not used. Or are you saying for the
delete command/action it is not used?



>
>>like the same info returned in two seperate places, and they do not always
>>agree.
>>
>>CL
>>
>>
>>Randy Hudson wrote:
>>
>>>understandRequest is used to filter the selection during certain
>>>actions/operations. Currently neither of those opereations performs this
>>>type of filtering.
>>>
>>>"CL [dnoyeb] Gilbert" <Lamont_Gilbert@rigidsoftware.com> escreveu na
>>>mensagem news:cujm4n$e70$1@www.eclipse.org...
>>>
>>>
>>>>ComponentEditPolicy returns commands for Request REQ_ORPHAN and
>>>>REQ_DELETE, but returns false for understandsRequests for both of those
>>>>requests. Is that correct behavior??
>>>>
>>>>
>>>>CL
>>>
>>>
>
Re: ComponentEditPolicy and deletion [message #168274 is a reply to message #168250] Mon, 14 February 2005 21:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Delete does not use it.
Re: ComponentEditPolicy and deletion [message #168289 is a reply to message #168274] Mon, 14 February 2005 22:11 Go to previous message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

Randy Hudson wrote:
> Delete does not use it.
>
>

OK. I have everything working. It was just an architectural question.
It seemed an architectural inconsistency with the way some
commands/request work and others work differently. I try to understand
the proper way to do my own commands and stick to the GEF architecture
as close as possible since it always seems to pay off when new features
are introduced.

Mainly I have a lot of my own actions/commands/requests and some of them
I have called 'understands' and some of them I do not. I'm kinda stuck
in the middle not knowing if I should always use this technique or not
for my own edit parts and policies!?


Thanks,


CL
Previous Topic:Creating EditParts and Figures outside the SWT Thread
Next Topic:In place editing
Goto Forum:
  


Current Time: Fri Apr 26 04:43:53 GMT 2024

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

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

Back to the top