Hello,
 
When working with Topcased, I found the following issue:
 
When I create a new UML model, the content of the .uml/.umdi files is as
follows:
 
DefaultName.uml:
<?xml version="1.0" encoding="UTF-8"?>
<uml:Model ... xmi:id="_qb8akM37EdqwVrslYOdUDA">
    <packagedElement xmi:type="uml:Package"
xmi:id="_w8IxIM37EdqwVrslYOdUDA" name="DefaultName"/>
</uml:Model>
 
DefaultName.umldi:
<?xml version="1.0" encoding="UTF-8"?>
<diagrams:Diagrams ...>
  <model href="DefaultName.uml#_w8IxIM37EdqwVrslYOdUDA"/>
  <diagrams position="0,0" size="100,100" name="DefaultName"
viewport="0,0">
    <semanticModel xsi:type="di:EMFSemanticModelBridge"
presentation="org.topcased.modeler.uml.classdiagram">
      <element href="DefaultName.uml#_w8IxIM37EdqwVrslYOdUDA"/>
    </semanticModel>
  </diagrams>
</diagrams:Diagrams>
 
What is strange for me is that the "model" element in the diagram file
(DefaultName.umldi) references the "packageElement" element in the UML
file. I'd have expected that it would reference the root element "Model"
with the xmi:id "_qb8akM37EdqwVrslYOdUDA".
The problem here is, that when I delete the diagram and then the package
(without having defined other diagrams), I get the following error:
"An error occurred during the delete action. See error logs for more
details."
The log contains the following error:
!ENTRY org.topcased.modeler 4 0 2011-08-17 09:30:30.321
!MESSAGE Error
!STACK 0
java.lang.reflect.InvocationTargetException
 at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
 at
org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialo
g.java:507)
 at
org.topcased.modeler.internal.actions.DeleteAction.run(DeleteAction.java
:159)
 at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
 at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(Ac
tionContributionItem.java:584)
 at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContribut
ionItem.java:501)
 at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionCont
ributionItem.java:411)
 at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
 at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
 at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
 at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
 at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
 at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
 at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
332)
 at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:6
67)
 at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
 at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplicat
ion.java:123)
 at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.j
ava:196)
 at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplicat
ion(EclipseAppLauncher.java:110)
 at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Eclip
seAppLauncher.java:79)
 at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
344)
 at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
179)
 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:622)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Caused by: java.lang.NullPointerException
 at
org.topcased.modeler.internal.actions.DeleteAction.switchDiagram(DeleteA
ction.java:225)
 at
org.topcased.modeler.internal.actions.DeleteAction.run(DeleteAction.java
:201)
 at
org.topcased.modeler.internal.actions.DeleteAction$1.run(DeleteAction.ja
va:164)
 at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalCon
text.java:121)
Root exception:
java.lang.NullPointerException
 at
org.topcased.modeler.internal.actions.DeleteAction.switchDiagram(DeleteA
ction.java:225)
 at
org.topcased.modeler.internal.actions.DeleteAction.run(DeleteAction.java
:201)
 at
org.topcased.modeler.internal.actions.DeleteAction$1.run(DeleteAction.ja
va:164)
 at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalCon
text.java:121)
 
If I first create another package with a separate diagram and then I
delete the diagram and the package, it seems to work, but when I close
the editor, I get the following error message:
An error has occurred. See error log for more details. null argument:
!ENTRY org.eclipse.ui.workbench 4 2 2011-08-17 09:40:03.306
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.ui.workbench".
!STACK 0
org.eclipse.core.runtime.AssertionFailedException: null argument:
 at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
 at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
 at
org.eclipse.jface.viewers.StructuredViewer.assertElementsNotNull(Structu
redViewer.java:599)
 at
org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredView
er.java:1011)
 at
org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:
703)
 at
org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTree
Viewer.java:1336)
 at
org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:391)
 at
org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(Structure
dViewer.java:917)
 at
org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractT
reeViewer.java:605)
 at
org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTree
Viewer.java:2622)
 at
org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(Abstr
actTreeViewer.java:1908)
 at
org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.ja
va:721)
 at
org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTre
eViewer.java:1883)
 at
org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTre
eViewer.java:1840)
 at
org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredViewer.java:1
535)
 at
org.eclipse.jface.viewers.StructuredViewer.preservingSelection(Structure
dViewer.java:1443)
 at
org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java
:403)
 at
org.eclipse.jface.viewers.StructuredViewer.preservingSelection(Structure
dViewer.java:1404)
 at
org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java
:1533)
 at
org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:548)
 at
org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java
:1490)
 at
org.topcased.modeler.editor.outline.DiagramsOutlinePage.refreshOutline(D
iagramsOutlinePage.java:214)
 at
org.topcased.modeler.editor.Modeler.refreshOutline(Modeler.java:2079)
 at
org.topcased.modeler.editor.Modeler$1.partActivated(Modeler.java:259)
 at
org.eclipse.ui.internal.PartListenerList$1.run(PartListenerList.java:72)
 at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
 at org.eclipse.core.runtime.Platform.run(Platform.java:888)
 at
org.eclipse.ui.internal.PartListenerList.fireEvent(PartListenerList.java
:57)
 at
org.eclipse.ui.internal.PartListenerList.firePartActivated(PartListenerL
ist.java:70)
 at
org.eclipse.ui.internal.PartService.firePartActivated(PartService.java:1
87)
 at
org.eclipse.ui.internal.PartService.setActivePart(PartService.java:306)
 at
org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePartChanged(Work
benchPagePartList.java:57)
 at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:136)
 at
org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3
636)
 at
org.eclipse.ui.internal.WorkbenchPage.requestActivation(WorkbenchPage.ja
va:3159)
 at
org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:279)
 at
org.eclipse.ui.internal.EditorPane.requestActivation(EditorPane.java:98)
 at
org.eclipse.ui.internal.presentations.PresentablePart.setFocus(Presentab
lePart.java:192)
 at
org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$1.han
dleEvent(TabbedStackPresentation.java:94)
 at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(A
bstractTabFolder.java:269)
 at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(A
bstractTabFolder.java:274)
 at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder.handleMouse
Down(AbstractTabFolder.java:344)
 at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder$3.mouseDown
(AbstractTabFolder.java:78)
 at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:191
)
 at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
 at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
 at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
 at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
 at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
 at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
 at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
332)
 at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:6
67)
 at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
 at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplicat
ion.java:123)
 at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.j
ava:196)
 at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplicat
ion(EclipseAppLauncher.java:110)
 at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Eclip
seAppLauncher.java:79)
 at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
344)
 at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
179)
 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:622)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
 
The root cause is that the umldi file references the "packagedElement"
element and not the root "Model" element. So I would've expected the
following file content when creating a new UML model:
DefaultName.uml:
<?xml version="1.0" encoding="UTF-8"?>
<uml:Model ... xmi:id="_qb8akM37EdqwVrslYOdUDA">
    <packagedElement xmi:type="uml:Package"
xmi:id="_w8IxIM37EdqwVrslYOdUDA" name="DefaultName"/>
</uml:Model>
 
DefaultName.umldi:
<?xml version="1.0" encoding="UTF-8"?>
<diagrams:Diagrams ...>
  <model href="DefaultName.uml#_qb8akM37EdqwVrslYOdUDA"/>
  <diagrams position="0,0" size="100,100" name="DefaultName"
viewport="0,0">
    <semanticModel xsi:type="di:EMFSemanticModelBridge"
presentation="org.topcased.modeler.uml.classdiagram">
      <element href="DefaultName.uml#_qb8akM37EdqwVrslYOdUDA"/>
    </semanticModel>
  </diagrams>
</diagrams:Diagrams>
 
By the way: If I delete the diagram with having another diagram
available in the model, the umldi file is changed in exactly that way,
meaning it now references the "Model" element.
 
I even wonder, if the "packagedElement" element is really needed?
Shouldn't look an empty model like that:
 
DefaultName.uml:
<?xml version="1.0" encoding="UTF-8"?>
<uml:Model xmi:version="2.1"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1";
xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML";
xmi:id="_qb8akM37EdqwVrslYOdUDA">
</uml:Model>
 
I also saw that when I do a "control" on a subpart of the model, the
created file looks like I would have expected it: The umldi file
references the root element of the uml file.
 
 
Is this behaviour by intension or is this an error in Topcased? When it
is by intension, could you explain why?
 
 
Regards
 
Robert
 
 

This email (including any attachments) may contain confidential and/or
privileged information or information otherwise protected from disclosure.
If you are not the intended recipient, please notify the sender immediately,
do not copy this message or any attachments and do not use it for any
purpose or disclose its content to any person, but delete this message and
any attachments from your system.
Astrium disclaims any and all liability if this email transmission
was virus corrupted, altered or falsified.
----------------------------------------------------------------------------
Astrium GmbH
Vorsitzender des Aufsichtsrates: Thomas S. Müller -
Geschäftsführung: Evert Dudok (Vorsitzender), Josef Stukenborg,
Dr. Johannes von Thadden
Sitz der Gesellschaft: München -
Registergericht: Amtsgericht München, HRB Nr. 107647
----------------------------------------------------------------------------
Weitere Informationen über EADS Astrium unter www.astrium.eads.net
_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-users

Reply via email to