Maybe I found something.
Diagram diagram = ViewService.createDiagram(model, MethodContentEditPart.MODEL_ID, MethodContentDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
try {
for(Task task : model.getTasks())
{
Node node = ViewService.createNode(diagram, task, MethodContentElementTypes.Task_2003.getId(), MethodContentDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
...
It should create the node into my diagram, but nothing is happen.
So I tried to insert it on diagram using this:
diagram.insertChild(node);
But when I do it, it throws this exception
java.lang.IllegalArgumentException: The 'no null' constraint is violated
at org.eclipse.emf.common.util.AbstractEList.validate(AbstractEList.java:101)
at org.eclipse.emf.ecore.util.EcoreEList.validate(EcoreEList.java:69)
at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:424)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUnique(NotifyingListImpl.java:331)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:315)
at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:307)
at org.eclipse.gmf.runtime.notation.impl.ViewImpl.insertChild(ViewImpl.java:715)
at workspace.diagram.part.MethodContentDiagramEditorUtil$1.doExecuteWithResult(MethodContentDiagramEditorUtil.java:192)
any help?
[Updated on: Tue, 05 October 2010 19:08]
Report message to a moderator