Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » problems with undo on setting default value for a paremeter
problems with undo on setting default value for a paremeter [message #533881] Mon, 17 May 2010 07:29 Go to previous message
Ioana is currently offline Ioana
Messages: 10
Registered: April 2010
Junior Member
Hi,

I have the following problem: I set the default value to a parameter using the set command:

SetCommand.create(editingDomain, parameter, UMLPackage.eINSTANCE.getParameter_Default(), defaultValue)


and it's working ok, but when I try to undo, I've seen that the unsetDefault (of ParameterOperations) is trying to do this:
parameter.eUnset(UMLPackage.Literals.PROPERTY__DEFAULT_VALUE);


though the PROPERTY__DEFAULT was not set -- I thought maybe I should set this feature also, but it does not work like this.
And my problem is that it searches for this feature - Property__Default for the parameter, and it does not exist, so the "undo" throws an nullpointerexception.
FYI:
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicUnset(BasicEObjectImpl.java:1208)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicUnset(BasicEObjectImpl.java:1197)
	at org.eclipse.uml2.uml.internal.impl.ParameterImpl.eUnset(ParameterImpl.java:1598)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eUnset(BasicEObjectImpl.java:1156)
	at org.eclipse.uml2.uml.internal.operations.ParameterOperations.unsetDefault(ParameterOperations.java:292)
	at org.eclipse.uml2.uml.internal.impl.ParameterImpl.unsetDefault(ParameterImpl.java:834)
	at org.eclipse.uml2.uml.internal.impl.ParameterImpl.eUnset(ParameterImpl.java:1583)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eUnset(BasicEObjectImpl.java:1156)

So is something that I might have missed on doing on setting the parameter default value?

Thanks,
Ioana
 
Read Message
Read Message
Read Message
Read Message
Previous Topic:problems with undo on setting default value for a paremeter
Next Topic:Newbie - Problem creating models
Goto Forum:
  


Current Time: Thu May 23 21:59:11 EDT 2013

Powered by FUDForum. Page generated in 0.04211 seconds