EditDomains and EAnnotation.getDetails() returns java.lang.ArrayStoreException? [message #626756] |
Wed, 02 July 2008 17:50 |
Anders W. Tell 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
|
|
|
Powered by
FUDForum. Page generated in 0.04419 seconds