Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Collection doesn't update on delete
Collection doesn't update on delete [message #124074] Fri, 04 May 2007 06:35 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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.
>
>
>
>
>
Re: Collection doesn't update on delete [message #124347 is a reply to message #124074] Mon, 07 May 2007 05:36 Go to previous messageGo to next message
Eclipse UserFriend
Hello stu,

So, to clarify this situation first:
AFAIU you have a diagram Node containing arbitrary numer of SubNodes and
you are removing one of the SubNodes from the Node by running a custom code
dealing with domain model. As a result, diagram Node visualized on your diagram
will not be updated. Is it the case?

If yes then put a breakpoint into the generated NodeCanonicalEditPolicy.handleNotificationEvent()
and see what if the notification came to the edit part.

-----------------
Alex Shatalin
Re: Collection doesn't update on delete [message #124386 is a reply to message #124347] Mon, 07 May 2007 06:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

Sounds pretty mush right.
I have a Canvas level Node called ValueHolder
Inside it holds a collection of Values that are added by the other Nodes on
the view.
The add works fine, the delete doesn't.

I look in the CollectionsCanonicalEditPolicy and there is no
handleNotificationEvent()
(code is below).
package com.ibridge.visualratingmodel.diagram.edit.policies;
<..IMPORTS...>
/**
* @generated
*/
public class RuleValueHolderValuesCanonicalEditPolicy extends
CanonicalEditPolicy {

/**
* @generated
*/
protected List getSemanticChildrenList() {
List result = new LinkedList();
EObject modelObject = ((View) getHost().getModel()).getElement();
View viewObject = (View) getHost().getModel();
EObject nextValue;
int nodeVID;
for (Iterator values = ((RuleValueHolder) modelObject).getRuleValues()
.iterator(); values.hasNext();) {
nextValue = (EObject) values.next();
nodeVID = VisualRatingModelVisualIDRegistry.getNodeVisualID(
viewObject, nextValue);
if (RuleValueEditPart.VISUAL_ID == nodeVID) {
result.add(nextValue);
}
}
return result;
}

/**
* @generated
*/
protected boolean shouldDeleteView(View view) {
return view.isSetElement() && view.getElement() != null
&& view.getElement().eIsProxy();
}

/**
* @generated
*/
protected String getDefaultFactoryHint() {
return null;
}

}


"Alex Shatalin" <vano@borland.com> wrote in message
news:3c3172e61349f8c95eb320ff56fc@news.eclipse.org...
> Hello stu,
>
> So, to clarify this situation first: AFAIU you have a diagram Node
> containing arbitrary numer of SubNodes and you are removing one of the
> SubNodes from the Node by running a custom code dealing with domain model.
> As a result, diagram Node visualized on your diagram will not be updated.
> Is it the case?
>
> If yes then put a breakpoint into the generated
> NodeCanonicalEditPolicy.handleNotificationEvent() and see what if the
> notification came to the edit part.
>
> -----------------
> Alex Shatalin
>
>
Re: Collection doesn't update on delete [message #124398 is a reply to message #124386] Mon, 07 May 2007 06:39 Go to previous messageGo to next message
Eclipse UserFriend
Hello stu,

> I look in the CollectionsCanonicalEditPolicy and there is no
> handleNotificationEvent()

This method is inherited from one of the super-classes.

-----------------
Alex Shatalin
Re: Collection doesn't update on delete [message #124426 is a reply to message #124398] Mon, 07 May 2007 06:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

I am so sorry - my only excuse is its 9pm here and I've had a few beers :-)

Ok yes it goes into the method:

ShouldRefresh is set to true.

It then does this coide part on refresh:-
boolean defRefresh = _deferredRefresh;

_deferredRefresh = false;

refreshSemantic();

_deferredRefresh = defRefresh;



But the view stays the same.





"Alex Shatalin" <vano@borland.com> wrote in message
news:3c3172e6134aa8c95ebbeef38c96@news.eclipse.org...
> Hello stu,
>
>> I look in the CollectionsCanonicalEditPolicy and there is no
>> handleNotificationEvent()
>
> This method is inherited from one of the super-classes.
>
> -----------------
> Alex Shatalin
>
>
Re: Collection doesn't update on delete [message #124438 is a reply to message #124398] Mon, 07 May 2007 06:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

I just noticed an error in the log just before hand.

basically I have a confirmation dialog pop up to confirm the delete.

Just before it pops up this error appears - could this cause the issue later
on in the method:-

org.eclipse.core.commands.ExecutionException: While executing the operation,
an exception occurred
at
org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:517)
at
org.eclipse.gmf.runtime.emf.ui.properties.sections.UndoableM odelPropertySheetEntry.valueChanged(UndoableModelPropertyShe etEntry.java:244)
at
org.eclipse.gmf.runtime.emf.ui.properties.sections.UndoableM odelPropertySheetEntry.setValue(UndoableModelPropertySheetEn try.java:199)
at
org.eclipse.gmf.runtime.emf.ui.properties.sections.UndoableM odelPropertySheetEntry.applyEditorValue(UndoableModelPropert ySheetEntry.java:127)
at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:3 05)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:850)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:52)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:15 3)
at
org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(Ce llEditor.java:303)
at org.eclipse.jface.viewers.CellEditor.focusLost(CellEditor.ja va:683)
at
org.eclipse.jface.viewers.TextCellEditor$5.focusLost(TextCel lEditor.java:185)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:136)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:943)
at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java: 2167)
at org.eclipse.swt.widgets.Widget.wmKillFocus(Widget.java:1681)
at org.eclipse.swt.widgets.Control.WM_KILLFOCUS(Control.java:38 02)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3505 )
at org.eclipse.swt.widgets.Text.windowProc(Text.java:2007)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4172 )
at org.eclipse.swt.internal.win32.OS.BringWindowToTop(Native Method)
at org.eclipse.swt.widgets.Decorations.bringToTop(Decorations.j ava:227)
at org.eclipse.swt.widgets.Shell.open(Shell.java:1068)
at org.eclipse.jface.window.Window.open(Window.java:792)
at
org.eclipse.jface.dialogs.MessageDialog.openConfirm(MessageD ialog.java:301)
at
com.ibridge.visualratingmodel.customisation.VisualRatingCust omisation.cleanUpOrthandRuleValues(VisualRatingCustomisation .java:161)
at
com.ibridge.visualratingmodel.customisation.VisualRatingCust omisation.parseExpression(VisualRatingCustomisation.java:137 )
at
com.ibridge.visualratingmodel.impl.ElementExpressionRuleActi onImpl.parseExpression(ElementExpressionRuleActionImpl.java: 540)
at
com.ibridge.visualratingmodel.impl.ElementExpressionRuleActi onImpl.setExpression(ElementExpressionRuleActionImpl.java:24 6)
at
com.ibridge.visualratingmodel.impl.ElementExpressionRuleActi onImpl.eSet(ElementExpressionRuleActionImpl.java:419)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1061)
at org.eclipse.emf.edit.command.SetCommand.doExecute(SetCommand .java:700)
at
org.eclipse.emf.edit.command.AbstractOverrideableCommand.exe cute(AbstractOverrideableCommand.java:129)
at
org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFC ommandOperation.java:116)
at
org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:135)
at
org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:509)
at
org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.exe cute(WorkspaceCommandStackImpl.java:147)
at
org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.exe cute(WorkspaceCommandStackImpl.java:183)
at
org.eclipse.emf.edit.provider.ItemPropertyDescriptor.setProp ertyValue(ItemPropertyDescriptor.java:1400)
at
org.eclipse.emf.edit.ui.provider.PropertySource.setPropertyV alue(PropertySource.java:116)
at
org.eclipse.gmf.runtime.emf.ui.properties.commands.SetModelP ropertyValueCommand.doExecuteWithResult(SetModelPropertyValu eCommand.java:104)
at
org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doExecute(AbstractTransactionalCommand.ja va:246)
at
org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:135)
at
org.eclipse.emf.workspace.CompositeEMFOperation.doExecute(Co mpositeEMFOperation.java:212)
at
org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:135)
at
org.eclipse.core.commands.operations.TriggeredOperations.exe cute(TriggeredOperations.java:165)
at
org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:509)
at
org.eclipse.gmf.runtime.emf.ui.properties.sections.UndoableM odelPropertySheetEntry.valueChanged(UndoableModelPropertyShe etEntry.java:244)
at
org.eclipse.gmf.runtime.emf.ui.properties.sections.UndoableM odelPropertySheetEntry.setValue(UndoableModelPropertySheetEn try.java:199)
at
org.eclipse.gmf.runtime.emf.ui.properties.sections.UndoableM odelPropertySheetEntry.applyEditorValue(UndoableModelPropert ySheetEntry.java:127)
at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:3 05)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:850)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:52)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:15 3)
at
org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(Ce llEditor.java:303)
at
org.eclipse.jface.viewers.TextCellEditor.handleDefaultSelect ion(TextCellEditor.java:294)
at
org.eclipse.jface.viewers.TextCellEditor$1.widgetDefaultSele cted(TextCellEditor.java:147)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:112)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3490)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3104)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2264)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2228)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 03)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:457)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:452)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:101)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:146)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:354)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 476)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416)
at org.eclipse.equinox.launcher.Main.run(Main.java:1124)
at org.eclipse.equinox.launcher.Main.main(Main.java:1099)
Caused by: java.lang.IllegalStateException: Cannot open an operation while
one is already open
at
org.eclipse.core.commands.operations.DefaultOperationHistory .openOperation(DefaultOperationHistory.java:1307)
at
org.eclipse.core.commands.operations.TriggeredOperations.exe cute(TriggeredOperations.java:163)
at
org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:509)
"Alex Shatalin" <vano@borland.com> wrote in message
news:3c3172e6134aa8c95ebbeef38c96@news.eclipse.org...
> Hello stu,
>
>> I look in the CollectionsCanonicalEditPolicy and there is no
>> handleNotificationEvent()
>
> This method is inherited from one of the super-classes.
>
> -----------------
> Alex Shatalin
>
>
Re: Collection doesn't update on delete [message #124503 is a reply to message #124438] Mon, 07 May 2007 07:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

Ok I have got rid of this error but its the same without it any so I guess
there was no impact.

"Stu" <evaandoli@dodo.com.au> wrote in message
news:f1n0ph$a8m$1@build.eclipse.org...
>I just noticed an error in the log just before hand.
>
> basically I have a confirmation dialog pop up to confirm the delete.
>
> Just before it pops up this error appears - could this cause the issue
> later on in the method:-
>
> org.eclipse.core.commands.ExecutionException: While executing the
> operation, an exception occurred
> at
> org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:517)
> at
> org.eclipse.gmf.runtime.emf.ui.properties.sections.UndoableM odelPropertySheetEntry.valueChanged(UndoableModelPropertyShe etEntry.java:244)
> at
> org.eclipse.gmf.runtime.emf.ui.properties.sections.UndoableM odelPropertySheetEntry.setValue(UndoableModelPropertySheetEn try.java:199)
> at
> org.eclipse.gmf.runtime.emf.ui.properties.sections.UndoableM odelPropertySheetEntry.applyEditorValue(UndoableModelPropert ySheetEntry.java:127)
> at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:3 05)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:52)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:15 3)
> at
> org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(Ce llEditor.java:303)
> at org.eclipse.jface.viewers.CellEditor.focusLost(CellEditor.ja va:683)
> at
> org.eclipse.jface.viewers.TextCellEditor$5.focusLost(TextCel lEditor.java:185)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:136)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:943)
> at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java: 2167)
> at org.eclipse.swt.widgets.Widget.wmKillFocus(Widget.java:1681)
> at org.eclipse.swt.widgets.Control.WM_KILLFOCUS(Control.java:38 02)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3505 )
> at org.eclipse.swt.widgets.Text.windowProc(Text.java:2007)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4172 )
> at org.eclipse.swt.internal.win32.OS.BringWindowToTop(Native Method)
> at org.eclipse.swt.widgets.Decorations.bringToTop(Decorations.j ava:227)
> at org.eclipse.swt.widgets.Shell.open(Shell.java:1068)
> at org.eclipse.jface.window.Window.open(Window.java:792)
> at
> org.eclipse.jface.dialogs.MessageDialog.openConfirm(MessageD ialog.java:301)
> at
> com.ibridge.visualratingmodel.customisation.VisualRatingCust omisation.cleanUpOrthandRuleValues(VisualRatingCustomisation .java:161)
> at
> com.ibridge.visualratingmodel.customisation.VisualRatingCust omisation.parseExpression(VisualRatingCustomisation.java:137 )
> at
> com.ibridge.visualratingmodel.impl.ElementExpressionRuleActi onImpl.parseExpression(ElementExpressionRuleActionImpl.java: 540)
> at
> com.ibridge.visualratingmodel.impl.ElementExpressionRuleActi onImpl.setExpression(ElementExpressionRuleActionImpl.java:24 6)
> at
> com.ibridge.visualratingmodel.impl.ElementExpressionRuleActi onImpl.eSet(ElementExpressionRuleActionImpl.java:419)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1061)
> at org.eclipse.emf.edit.command.SetCommand.doExecute(SetCommand .java:700)
> at
> org.eclipse.emf.edit.command.AbstractOverrideableCommand.exe cute(AbstractOverrideableCommand.java:129)
> at
> org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFC ommandOperation.java:116)
> at
> org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:135)
> at
> org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:509)
> at
> org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.exe cute(WorkspaceCommandStackImpl.java:147)
> at
> org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.exe cute(WorkspaceCommandStackImpl.java:183)
> at
> org.eclipse.emf.edit.provider.ItemPropertyDescriptor.setProp ertyValue(ItemPropertyDescriptor.java:1400)
> at
> org.eclipse.emf.edit.ui.provider.PropertySource.setPropertyV alue(PropertySource.java:116)
> at
> org.eclipse.gmf.runtime.emf.ui.properties.commands.SetModelP ropertyValueCommand.doExecuteWithResult(SetModelPropertyValu eCommand.java:104)
> at
> org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doExecute(AbstractTransactionalCommand.ja va:246)
> at
> org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:135)
> at
> org.eclipse.emf.workspace.CompositeEMFOperation.doExecute(Co mpositeEMFOperation.java:212)
> at
> org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:135)
> at
> org.eclipse.core.commands.operations.TriggeredOperations.exe cute(TriggeredOperations.java:165)
> at
> org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:509)
> at
> org.eclipse.gmf.runtime.emf.ui.properties.sections.UndoableM odelPropertySheetEntry.valueChanged(UndoableModelPropertyShe etEntry.java:244)
> at
> org.eclipse.gmf.runtime.emf.ui.properties.sections.UndoableM odelPropertySheetEntry.setValue(UndoableModelPropertySheetEn try.java:199)
> at
> org.eclipse.gmf.runtime.emf.ui.properties.sections.UndoableM odelPropertySheetEntry.applyEditorValue(UndoableModelPropert ySheetEntry.java:127)
> at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:3 05)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:52)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:15 3)
> at
> org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(Ce llEditor.java:303)
> at
> org.eclipse.jface.viewers.TextCellEditor.handleDefaultSelect ion(TextCellEditor.java:294)
> at
> org.eclipse.jface.viewers.TextCellEditor$1.widgetDefaultSele cted(TextCellEditor.java:147)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:112)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3490)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3104)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2264)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2228)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 03)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:457)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:452)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:101)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:146)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:354)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:169)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 476)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1124)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1099)
> Caused by: java.lang.IllegalStateException: Cannot open an operation while
> one is already open
> at
> org.eclipse.core.commands.operations.DefaultOperationHistory .openOperation(DefaultOperationHistory.java:1307)
> at
> org.eclipse.core.commands.operations.TriggeredOperations.exe cute(TriggeredOperations.java:163)
> at
> org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:509)
> "Alex Shatalin" <vano@borland.com> wrote in message
> news:3c3172e6134aa8c95ebbeef38c96@news.eclipse.org...
>> Hello stu,
>>
>>> I look in the CollectionsCanonicalEditPolicy and there is no
>>> handleNotificationEvent()
>>
>> This method is inherited from one of the super-classes.
>>
>> -----------------
>> Alex Shatalin
>>
>>
>
>
Re: Collection doesn't update on delete [message #124510 is a reply to message #124438] Mon, 07 May 2007 07:45 Go to previous messageGo to next message
Eclipse UserFriend
Hello stu,

AFAIKSee this is something from the property view. Not sure if it can affect
notification came from removing elements but it's better to get rid of this
error first.

-----------------
Alex Shatalin
Re: Collection doesn't update on delete [message #124523 is a reply to message #124503] Mon, 07 May 2007 07:46 Go to previous messageGo to next message
Eclipse UserFriend
Hello stu,

So, can you debug handleHotification emthod a bit more to see why corresponding
element is still a child of diagram node?
BTW, which version of GMF do you use?

-----------------
Alex Shatalin
Re: Collection doesn't update on delete [message #124664 is a reply to message #124523] Mon, 07 May 2007 11:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

Version I am using are:-
org.eclipse.gmf (1.0.100.v20070221-150-7b-EHPY1PCG7WNo3caGFB) "Graphical
Modeling Framework"
org.eclipse.gmf.doc (1.1.0.v20070221-150-0---w3118131902911) "Graphical
Modeling Framework Documentation"
org.eclipse.gmf.examples.pde (1.1.0.v20070228-200-1--0r733F456D16663)
"Graphical Modeling Framework Examples"
org.eclipse.gmf.sdk (2.0.0.v20070228-200-7c77AiKiO-MQQBH2llVlD-MojHGC)
"Graphical Modeling Framework SDK"
org.eclipse.gmf.sdk.source (2.0.0.v20070228-2000) "Graphical Modeling
Framework SDK Developer Resources"
org.eclipse.gmf.source (1.0.100.v20070221-1500) "Graphical Modeling
Framework Runtime Developer Resources"

Full :
org.apache.batik (1.6.0.v20061222-1222-0842283444-3444) "Apache Batik"
org.eclipse.cvs (1.0.0) "Eclipse CVS Client"
org.eclipse.cvs.source (1.0.0) "Eclipse CVS Client"
org.eclipse.emf (2.3.0.v200702121527) "Eclipse Modeling Framework (EMF)"
org.eclipse.emf.codegen.jet.editor (0.8.0.v200703030036) "JET Editor"
org.eclipse.emf.codegen.jet.editor.doc (0.8.0.v200703030036) "Eclipse
Modeling Framework Technology JET Editor Documentation"
org.eclipse.emf.codegen.jet.editor.source (0.8.0.v200703030036) "Java
Emitter Templates (JET) Editor Developer Resources"
org.eclipse.emf.doc (2.3.0.v200702121527) "Eclipse Modeling Framework (EMF)
Programmers Guide"
org.eclipse.emf.ecore.sdo (2.3.0.v200702121527) "EMF Service Data Objects
(SDO)"
org.eclipse.emf.ecore.sdo.doc (2.3.0.v200702121527) "EMF Service Data
Objects (SDO) Programmers Guide"
org.eclipse.emf.ecore.sdo.source (2.3.0.v200702121527) "EMF Service Data
Objects (SDO) Source"
org.eclipse.emf.ocl (1.1.0.v200702141355) "Object Constraint Language (OCL)
2.0 Compatibility API"
org.eclipse.emf.ocl.doc (1.1.0.v200702141355) "Object Constraint Language
(OCL) 2.0 Compatibiltiy API Documentation"
org.eclipse.emf.ocl.source (1.1.0.v200702141355) "Object Constraint Language
(OCL) 2.0 Compatibility Source"
org.eclipse.emf.query (1.0.1.v200702141445) "Eclipse Modeling Framework
Technology Query Framework"
org.eclipse.emf.query.doc (1.0.1.v200702141445) "Eclipse Modeling Framework
Technology Query Documentation"
org.eclipse.emf.query.ocl (1.0.1.v200702141445) "Eclipse Modeling Framework
Technology Query OCL"
org.eclipse.emf.query.ocl.source (1.0.1.v200702141445) "Eclipse Modeling
Framework Technology (EMFT) Query OCL Source"
org.eclipse.emf.query.source (1.0.1.v200702141445) "Eclipse Modeling
Framework Technology (EMFT) Query Source"
org.eclipse.emf.source (2.3.0.v200702121527) "Eclipse Modeling Framework
(EMF) Source"
org.eclipse.emf.transaction (1.1.0.v200702141506) "Eclipse Modeling
Framework Technology Transaction Core"
org.eclipse.emf.transaction.doc (1.0.2.v200702141506) "Eclipse Modeling
Framework Technology Transactions Documentation"
org.eclipse.emf.transaction.source (1.1.0.v200702141506) "Eclipse Modeling
Framework Technology (EMFT) Transaction Source"
org.eclipse.emf.validation (1.1.0.v200702141455) "Eclipse Modeling Framework
Technology Model Validation Core"
org.eclipse.emf.validation.doc (1.0.1.v200702141455) "Eclipse Modeling
Framework Technology Validation Documentation"
org.eclipse.emf.validation.ocl (1.1.0.v200702141455) "Eclipse Modeling
Framework Technology Validation Support for OCL"
org.eclipse.emf.validation.ocl.source (1.1.0.v200702141455) "Eclipse
Modeling Framework Technology (EMFT) Validation OCL Source"
org.eclipse.emf.validation.source (1.1.0.v200702141455) "Eclipse Modeling
Framework Technology (EMFT) Validation Source"
org.eclipse.emf.workspace (1.1.0.v200702141506) "Eclipse Modeling Framework
Technology Workbench Core"
org.eclipse.emf.workspace.doc (1.0.1.v200702141506) "Eclipse Modeling
Framework Technology Workbench Integration Documentation"
org.eclipse.emf.workspace.source (1.1.0.v200702141506) "Eclipse Modeling
Framework Technology (EMFT) Workbench Integration Source"
org.eclipse.gef (3.3.0.v20070209) "Graphical Editing Framework"
org.eclipse.gef.examples (3.3.0.v20070209) "GEF Examples"
org.eclipse.gef.sdk (3.3.0.v20070209) "Graphical Editing Framework Developer
Resources"
org.eclipse.gef.source (3.3.0.v20070209) "Graphical Editing Framework
Developer Resources"
org.eclipse.gmf (1.0.100.v20070221-150-7b-EHPY1PCG7WNo3caGFB) "Graphical
Modeling Framework"
org.eclipse.gmf.doc (1.1.0.v20070221-150-0---w3118131902911) "Graphical
Modeling Framework Documentation"
org.eclipse.gmf.examples.pde (1.1.0.v20070228-200-1--0r733F456D16663)
"Graphical Modeling Framework Examples"
org.eclipse.gmf.sdk (2.0.0.v20070228-200-7c77AiKiO-MQQBH2llVlD-MojHGC)
"Graphical Modeling Framework SDK"
org.eclipse.gmf.sdk.source (2.0.0.v20070228-2000) "Graphical Modeling
Framework SDK Developer Resources"
org.eclipse.gmf.source (1.0.100.v20070221-1500) "Graphical Modeling
Framework Runtime Developer Resources"
org.eclipse.jdt (3.3.0.v20070205-180-GKeyrSg2mvoVKQM) "Eclipse Java
Development Tools"
org.eclipse.jdt.source (3.3.0.v20070205-180-GKeyrSg2mvoVKQM) "Eclipse Java
Development Tools SDK"
org.eclipse.jet (0.7.100.v200702151055) "Eclipse Modeling Framework
Technologies - JET"
org.eclipse.jet.doc (0.7.100.v200702151055) "Eclipse Modeling Framework
Technologies - JET Documentation"
org.eclipse.jet.examples (0.7.100.v200702151055) "Eclipse Modeling Framework
Technologies - JET Examples"
org.eclipse.jet.source (0.7.100.v200702151055) "Eclipse Modeling Framework
Technologies - JET SDK"
org.eclipse.ocl (1.1.0.v200702141355) "Object Constraint Language (OCL) 2.0
Parser/Interpreter"
org.eclipse.ocl.doc (1.1.0.v200702141355) "Object Constraint Language (OCL)
2.0 Documentation"
org.eclipse.ocl.source (1.1.0.v200702141355) "Object Constraint Language
(OCL) 2.0 Source"
org.eclipse.ocl.uml (1.1.0.v200702141355) "OCL 2.0 Binding for UML"
org.eclipse.ocl.uml.source (1.1.0.v200702141355) "OCL 2.0 Binding for UML
Source"
org.eclipse.pde (3.3.0.v20061114-080-87cMNDNcOD-KLPM) "Eclipse Plug-in
Development Environment"
org.eclipse.pde.source (3.3.0.v20061114-080-87cMNDNcOD-KLPM) "Eclipse
Plug-in Development Environment Developer Resources"
org.eclipse.platform (3.3.0.v2007020-bEGPYS2NGG1Febs) "Eclipse Platform"
org.eclipse.platform.source (3.3.0.v2007020-bEGPYS2NGG1Febs) "Eclipse
Platform Plug-in Developer Resources"
org.eclipse.rcp (3.3.0.v20070116-FIEHGCmfQISbVPp) "Eclipse RCP"
org.eclipse.rcp.source (3.3.0.v20070116-FIEHGCmfQISbVPp) "Eclipse RCP
Plug-in Developer Resources"
org.eclipse.sdk (3.3.0.v2007012-zKKRulofJkbGUfF) "Eclipse Project SDK"
org.eclipse.uml2 (2.1.0.v200702222305) "UML2"
org.eclipse.uml2.diagram (1.0.0.v200702231841) "UML2 Diagramming Plug-in"
org.eclipse.uml2.diagram.source (1.0.0.v200702231841) "UML2 Diagramming
Source"
org.eclipse.uml2.doc (2.1.0.v200702222305) "UML2 Documentation"
org.eclipse.uml2.examples (2.1.0.v200702222305) "UML2 Examples"
org.eclipse.uml2.examples.source (2.1.0.v200702222305) "UML2 Examples
Source"
org.eclipse.uml2.source (2.1.0.v200702222305) "UML2 Source"
org.eclipse.uml2tools (1.0.0.v200702231841) "UML2 Tools Plug-in"
org.eclipse.uml2tools.doc (1.0.0.v200702231841) "UML2 Tools Documentation
Plug-in"
org.eclipse.xsd (2.3.0.v200702121527) "XML Schema Infoset Model (XSD)"
org.eclipse.xsd.doc (2.3.0.v200702121527) "XML Schema Infoset Model (XSD)
Programmers Guide"
org.eclipse.xsd.source (2.3.0.v200702121527) "XML Schema Infoset Model (XSD)
Source"
"Alex Shatalin" <vano@borland.com> wrote in message
news:3c3172e6134b98c95ec534923f89@news.eclipse.org...
> Hello stu,
>
> So, can you debug handleHotification emthod a bit more to see why
> corresponding element is still a child of diagram node?
> BTW, which version of GMF do you use?
>
> -----------------
> Alex Shatalin
>
>
Re: Collection doesn't update on delete [message #125287 is a reply to message #124523] Thu, 10 May 2007 07:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

Does this give any clues.
protected void refreshSemantic() {
List createdViews = refreshSemanticChildren();
makeViewsImmutable(createdViews);
}

The top line of the method ( List createdViews = refreshSemanticChildren();)
return null.
Is this right in the case I am talking about ?

I'm guessing the issue seems to be that my item is orphand. Its seems to be
null in the collection.
Does that sound right ?

Anyway any help would be good,

Stu




"Alex Shatalin" <vano@borland.com> wrote in message
news:3c3172e6134b98c95ec534923f89@news.eclipse.org...
> Hello stu,
>
> So, can you debug handleHotification emthod a bit more to see why
> corresponding element is still a child of diagram node?
> BTW, which version of GMF do you use?
>
> -----------------
> Alex Shatalin
>
>
Re: Collection doesn't update on delete [message #125298 is a reply to message #124523] Thu, 10 May 2007 07:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

Does this give any clues.
protected void refreshSemantic() {
List createdViews = refreshSemanticChildren();
makeViewsImmutable(createdViews);
}

The top line of the method ( List createdViews = refreshSemanticChildren();)
return null.
Is this right in the case I am talking about ?

I'm guessing the issue seems to be that my item is orphand. Its seems to be
null in the collection.
Does that sound right ?

Anyway any help would be good,

Stu




"Alex Shatalin" <vano@borland.com> wrote in message
news:3c3172e6134b98c95ec534923f89@news.eclipse.org...
> Hello stu,
>
> So, can you debug handleHotification emthod a bit more to see why
> corresponding element is still a child of diagram node?
> BTW, which version of GMF do you use?
>
> -----------------
> Alex Shatalin
>
>
Re: Collection doesn't update on delete [message #125321 is a reply to message #125298] Thu, 10 May 2007 07:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

Ok one more bit of info.

When it picks up the item as an orphan (which im guess is right).

The following two things return false.
In protected final boolean deleteViews( Iterator views ) {

" shouldDeleteView(view) " returns false as the view is not
view.getElement().eIsProxy();

So the element is not an eIsProxy() what does that mean ?

I read the doc just did really get it:-
/**

* <!-- begin-user-doc -->

* Indicates whether this object is a proxy.

* <p>

* A proxy is an object that is defined in a <code>Resource</code> that has
not been loaded.

* An object may be a proxy either because proxy resolution was disabled

* when the object was accessed (see {@link
#eGet(EStructuralFeature,boolean)})

* or because proxy {@link org.eclipse.emf.ecore.util.EcoreUtil#resolve
resolution} failed.

* </p>

* @return <code>true</code> if this object is a proxy or <code>false</code>,
otherwise.

* @see Resource#unload

* @see org.eclipse.emf.ecore.util.EcoreUtil#resolve(EObject,
org.eclipse.emf.ecore.resource.ResourceSet)

* @ignore

* <!-- end-user-doc -->

* @model

* @generated

*/

"Stu" <evaandoli@dodo.com.au> wrote in message
news:f1uu49$fd2$2@build.eclipse.org...
> Does this give any clues.
> protected void refreshSemantic() {
> List createdViews = refreshSemanticChildren();
> makeViewsImmutable(createdViews);
> }
>
> The top line of the method ( List createdViews =
> refreshSemanticChildren();)
> return null.
> Is this right in the case I am talking about ?
>
> I'm guessing the issue seems to be that my item is orphand. Its seems to
> be
> null in the collection.
> Does that sound right ?
>
> Anyway any help would be good,
>
> Stu
>
>
>
>
> "Alex Shatalin" <vano@borland.com> wrote in message
> news:3c3172e6134b98c95ec534923f89@news.eclipse.org...
>> Hello stu,
>>
>> So, can you debug handleHotification emthod a bit more to see why
>> corresponding element is still a child of diagram node?
>> BTW, which version of GMF do you use?
>>
>> -----------------
>> Alex Shatalin
>>
>>
>
>
>
Re: Collection doesn't update on delete [message #125387 is a reply to message #125321] Thu, 10 May 2007 08:03 Go to previous messageGo to next message
Eclipse UserFriend
Hello stu,

Aha! This is an old problem and it is already fixed in GMF 2.0 (AFAIU from
the uge trace you post you are working with GMF 1.0.1).

-----------------
Alex Shatalin
Re: Collection doesn't update on delete [message #125422 is a reply to message #125387] Thu, 10 May 2007 08:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

really!
I download all the latest stuff from GMF M5 is that not version 2?


"Alex Shatalin" <vano@borland.com> wrote in message
news:3c3172e6136e28c961232e4013fa@news.eclipse.org...
> Hello stu,
>
> Aha! This is an old problem and it is already fixed in GMF 2.0 (AFAIU from
> the uge trace you post you are working with GMF 1.0.1).
>
> -----------------
> Alex Shatalin
>
>
Re: Collection doesn't update on delete [message #125446 is a reply to message #125422] Thu, 10 May 2007 08:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

These are the build zips I used:-
eclipse-SDK-3.3M5eh-win32.zip
emf-sdo-xsd-SDK-2.3.0M5.zip
emft-jet-SDK-0.8.0M5.zip
emft-jeteditor-SDK-I200703030036.zip
emft-query-SDK-1.1M5.zip
emft-teneo-SDK-I200703081604.zip
emft-transaction-SDK-1.1M5.zip
emft-validation-SDK-1.1M5.zip
GEF-ALL-3.3M5.zip
GEF-Automated-Tests-3.3M4.zip
GMF-sdk-2.0M5uh.zip
mdt-ocl-SDK-1.1M5.zip
mdt-uml2tools-SDK-1.0.0M5.zip
uml2-SDK-2.1M5.zip
xsd-SDK-2.3.0M5.zip

Have i made a mistake ?

"Stu" <evaandoli@dodo.com.au> wrote in message
news:f1v2lf$q24$1@build.eclipse.org...
> really!
> I download all the latest stuff from GMF M5 is that not version 2?
>
>
> "Alex Shatalin" <vano@borland.com> wrote in message
> news:3c3172e6136e28c961232e4013fa@news.eclipse.org...
>> Hello stu,
>>
>> Aha! This is an old problem and it is already fixed in GMF 2.0 (AFAIU
>> from the uge trace you post you are working with GMF 1.0.1).
>>
>> -----------------
>> Alex Shatalin
>>
>>
>
>
Re: Collection doesn't update on delete [message #125520 is a reply to message #125446] Thu, 10 May 2007 09:02 Go to previous messageGo to next message
Eclipse UserFriend
Hello stu,

> GMF-sdk-2.0M5uh.zip
Well, this problem was fixed in GMF M6: http://wiki.eclipse.org/index.php/GMF_New_and_Noteworthy#Gen erating_proper_.3F.3F.3FCanonicalEditPolicy.shouldDeleteView .28.29

;-)

-----------------
Alex Shatalin
Re: Collection doesn't update on delete [message #125532 is a reply to message #125520] Thu, 10 May 2007 09:03 Go to previous message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

Thanks for your time on this.
Download has begun :-)

"Alex Shatalin" <vano@borland.com> wrote in message
news:3c3172e6136f88c9612b4c8a884d@news.eclipse.org...
> Hello stu,
>
>> GMF-sdk-2.0M5uh.zip
> Well, this problem was fixed in GMF M6:
> http://wiki.eclipse.org/index.php/GMF_New_and_Noteworthy#Gen erating_proper_.3F.3F.3FCanonicalEditPolicy.shouldDeleteView .28.29
> ;-)
>
> -----------------
> Alex Shatalin
>
>
Previous Topic:Re: OCL function
Next Topic:Accessing ecore elements
Goto Forum:
  


Current Time: Mon Nov 10 13:24:40 EST 2025

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

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

Back to the top