| Collection doesn't update on delete [message #124074] |
Fri, 04 May 2007 06:35  |
Eclipse User |
|
|
|
Originally posted by: evaandoli.dodo.com.au
Hi,
I add and remove attributes from a displayed collection node.
The add updates ok, but when I do the delete its gets removed underneath
but not on the diagram.
If I close the diagram and reopen the attribute has gone.
I guess I need to trigger an event, but just seems odd that the add works
and the delete doesn't
Code for add and remove below:-
aValueHolder.getRuleValues().removeAll(deleteList);
I have also done a for loop and rused the single object remove but no joy.
aValueHolder.getRuleValues().add(newRuleValue); << this works ok.
Any clues ?
The ecore setup for the attribute is attched if that helps.
|
|
|
| Re: Collection doesn't update on delete [message #124244 is a reply to message #124074] |
Fri, 04 May 2007 23:00   |
Eclipse User |
|
|
|
Originally posted by: evaandoli.dodo.com.au
A few more bits that I tried and didn't work:-
For delete I tried signally what I thought would be the right event:-
aValueHolder.getRuleValues().removeAll(deleteList);
aValueHolder.eNotify(new ENotificationImpl(aValueHolder,
Notification.REMOVE_MANY,VisualratingPackage.RULE_VALUE_HOLD ER__RULE_VALUES,
new ArrayList<RuleValue>(), aValueHolder.getRuleValues()));
Similar with the add:-
aHolder.getRuleValues().add(variable);
aHolder.getRuleValues();
aHolder.eNotify(new ENotificationImpl(aHolder, Notification.ADD,
VisualratingPackage.RULE_VALUE_HOLDER__RULE_VALUES, new
ArrayList<RuleValue>(), aHolder.getRuleValues()));
I would like the whole collection to fresh as on the getter I sort the
collection.
Any help would get great.
"Stu" <evaandoli@dodo.com.au> wrote in message
news:f1f29v$o9o$1@build.eclipse.org...
> Hi,
>
> I add and remove attributes from a displayed collection node.
>
> The add updates ok, but when I do the delete its gets removed underneath
> but not on the diagram.
>
> If I close the diagram and reopen the attribute has gone.
>
> I guess I need to trigger an event, but just seems odd that the add works
> and the delete doesn't
>
> Code for add and remove below:-
>
> aValueHolder.getRuleValues().removeAll(deleteList);
>
> I have also done a for loop and rused the single object remove but no joy.
>
> aValueHolder.getRuleValues().add(newRuleValue); << this works ok.
>
>
>
> Any clues ?
>
>
>
> The ecore setup for the attribute is attched if that helps.
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.27590 seconds