|
Re: Invoking A Command [message #191079 is a reply to message #191065] |
Mon, 08 August 2005 19:27 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"Josh Reed" <jareed@iastate.edu> wrote in message
news:dd8927$ceg$1@news.eclipse.org...
> Hello,
>
> As per Randy's suggestion a few weeks back, I've been converting my direct
> model changes in my properties view to using GEF Commands. I've
You don't have to use requests and editpolicies in order to use commands.
For example, GEF's PropertySheetEntry implementation just calls directly to
the IPropertySource and makes changes.
> created a new request type, an edit policy to handle the requests, and
> commands to perform all the model changes. My only problem is how do I
> inject the Request such that the edit policies handle it. I found
> EditPart.performRequest(Request), but I'd much rather just install the
> edit policy I've written instead of implementing the request handling
> logic in the performRequest method of every edit part it affected. Is
> there a way to do this?
There is a bugzilla requesting that performRequest be forwarded to the
editpolicy interface. We have not made this change yet. You could use
getCommand instead perhaps.
>
> Thanks,
> Josh Reed
|
|
|
Re: Invoking A Command [message #191128 is a reply to message #191079] |
Mon, 08 August 2005 21:00 |
Josh Reed Messages: 38 Registered: July 2009 |
Member |
|
|
I think what I am looking for is CommandStack.execute(Command). This
should allow me to change the model in a GEF sort of way and gain the
benefits of undo/redo, etc.
Thanks,
Josh
Randy Hudson wrote:
> "Josh Reed" <jareed@iastate.edu> wrote in message
> news:dd8927$ceg$1@news.eclipse.org...
>
>>Hello,
>>
>>As per Randy's suggestion a few weeks back, I've been converting my direct
>>model changes in my properties view to using GEF Commands. I've
>
>
> You don't have to use requests and editpolicies in order to use commands.
> For example, GEF's PropertySheetEntry implementation just calls directly to
> the IPropertySource and makes changes.
>
>
>>created a new request type, an edit policy to handle the requests, and
>>commands to perform all the model changes. My only problem is how do I
>>inject the Request such that the edit policies handle it. I found
>>EditPart.performRequest(Request), but I'd much rather just install the
>>edit policy I've written instead of implementing the request handling
>>logic in the performRequest method of every edit part it affected. Is
>>there a way to do this?
>
>
> There is a bugzilla requesting that performRequest be forwarded to the
> editpolicy interface. We have not made this change yet. You could use
> getCommand instead perhaps.
>
>>Thanks,
>>Josh Reed
>
>
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02590 seconds