|Re: Mutiples Deletes Issue [message #200571 is a reply to message #200564]
||Tue, 05 August 2008 15:53
Originally posted by: awm_abu.yahoo.com|
Whoops, sorry bout that posted by mistake..
Anyway here's the issue
"I want to show the user a dialog which allows them to cancel a delete when
deleting objects from a GMF diagram.
I return a command from the EdtiAdviceHelper.getBeforeDestroyElementCommand
This command asks the user if they want to continue and then either cancels
My issue is when I try to delete multiple objects at once.
The getBeforeDestoryElementCommand is called for each element so I end up
with a dialog for each element that is going to be deleted.
What I am wondering is how can I group the elements to be deleted together
and show all in one dialog ?"
The back and forth between Christian and I is below.
So can anyone help ???
Yeah, I'm afraid you exhausted my store of ideas, such as it was.
My knee always jerks against such measures as looking back to a diagram
editor from a reusable component like edit-helper advice that really
shouldn't have knowledge of that context. It should be as usable in the
Project Explorer or any other view (e.g., EcoreTools inheritance
browser) as in the diagram editor.
Perhaps somebody else with more GMF experience than I can help you further.
> Hi Christian,
> I have had a look at the parameter map and the only thing in there is a
> key of "edit policy command" and a value of DestroyElementCommand.
> There does not seem to be any link back to anything I can use.
> It just seems to be two seperate DestroyElementRequests not linked in any
> Unless I am missing something of course.
> I was thinking of using the configureRequest method to add something to
> the paramter map
> but again how do I know how to link them ?
> Should I be coming at it in another way....like trying to figure out which
> nodes are selected in the diagram when the delete is invoked for example ?
> "Christian W. Damus" <email@example.com> wrote in message
>> Hi, Alan,
>> Is there some request object that is passed around through all of the
>> edit-helper processing? I seem to recall, for example, that the
>> DeleteDependentsRequest has a reference to the originating
>> DeleteElementRequest (or whatever it's called). I imagine that the
>> delete requests for the nested elements similarly track the original
>> request. Look in the request's parameters map to see what you can find.
>> Alan wrote:
>>> Ya tried that one too as that thought did occur to me but still no go.
>>> The transactions have no parents.
>>> Any other ideas ?
"Alan" <firstname.lastname@example.org> wrote in message
> Hello all,
> Christian Damus has tried to help me with this issue but unfortunately we
> have been unable to find a solution.
> Anyway here is the problem restated
Powered by FUDForum
. Page generated in 0.01442 seconds