Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Mutiples Deletes Issue
Mutiples Deletes Issue [message #200564] Tue, 05 August 2008 15:52 Go to next message
Eclipse UserFriend
Originally posted by: awm_abu.yahoo.com

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

"
Re: Mutiples Deletes Issue [message #200571 is a reply to message #200564] Tue, 05 August 2008 15:53 Go to previous message
Eclipse UserFriend
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
or runs.

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 ???

thanks,

Alan.








Hi, Alan,

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.

Cheers,

Christian


Alan wrote:
> 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
> way
> 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 ?
>
> thanks,
> Alan.
>
> "Christian W. Damus" <cdamus@zeligsoft.com> wrote in message
> news:g7211d$cce$1@build.eclipse.org...
>> 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.
>>
>> HTH,
>>
>> Christian
>>
>>
>> Alan wrote:
>>> Hi,
>>>
>>> Ya tried that one too as that thought did occur to me but still no go.
>>> The transactions have no parents.
>>>
>>> Any other ideas ?
>>>
>>> thanks,
>>> Alan.
>>>
>> -----8<-----
>
>



"Alan" <awm_abu@yahoo.com> wrote in message
news:g79sup$jb3$1@build.eclipse.org...
> 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
>
> "
>
>
>
>
>
>
>
Previous Topic:visual element
Next Topic:Modify diagram save as SVG
Goto Forum:
  


Current Time: Mon May 25 06:17:15 GMT 2020

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

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

Back to the top