Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » EditDomains and EAnnotation.getDetails() returns java.lang.ArrayStoreException?
EditDomains and EAnnotation.getDetails() returns java.lang.ArrayStoreException? [message #626756] Wed, 02 July 2008 17:50
Anders W. Tell is currently offline Anders W. TellFriend
Messages: 69
Registered: July 2009
Member
Hi,

Im trying to add annotation details to a UML2Model using commands and
editdomains. However I get the following exception.


> java.lang.ArrayStoreException
> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.jav a:191)
> at org.eclipse.emf.common.util.BasicEList.addAllUnique(BasicELi st.java:803)
> at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddAl lUnique(NotifyingListImpl.java:506)
> at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllU nique(NotifyingListImpl.java:446)
> at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllU nique(NotifyingListImpl.java:406)
> at org.eclipse.emf.common.util.BasicEList.addAll(BasicEList.jav a:716)
> at org.eclipse.emf.common.util.BasicEMap.addAll(BasicEMap.java: 1644)
> at org.eclipse.emf.edit.command.AddCommand.doExecute(AddCommand .java:403)
> at org.eclipse.emf.edit.command.AbstractOverrideableCommand.exe cute(AbstractOverrideableCommand.java:131)
> at org.eclipse.emf.common.command.CompoundCommand.execute(Compo undCommand.java:267)
> at org.eclipse.emf.common.command.BasicCommandStack.execute(Bas icCommandStack.java:84)



Ive been trying different kinds of Map.Entry but they all return the
same error. Below is a code snippet.

final String locationKey = "location"; //FIXME
Map.Entry<String, String> entry= new Map.Entry<String, String>(){
String fKey = locationKey;
String fValue;

/**
* @return the key
*/
public String getKey() {
return fKey;
}

/**
* @return the value
*/
public String getValue() {
return fValue;
}
/**
* @param theArg0
* @return
*/
public String setValue(String theValue) {
fValue = theValue;
return fValue;
}
};
entry.setValue(ref.getLocation().toString());

AddCommand addCmd = new AddCommand(fEditor.getEditingDomain(),
found, EcorePackage.eINSTANCE.getEAnnotation_Details(), entry);
cmd.append(addCmd);


any hints?
thanks
/anders
Previous Topic:UML2 examples
Next Topic:Should ValueSpecification be really a TypedElement?
Goto Forum:
  


Current Time: Thu Apr 02 23:33:31 GMT 2020

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

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

Back to the top