Architecture viewpoint definitions that refer to Class Diagram does not work in 2021-09 [message #1847099] |
Thu, 14 October 2021 14:57 |
|
I have a plugin with an architecture definition with a viewpoint definition which refer to standard UML Class Diagram as the representation Kind:
<viewpoints xmi:type="architecture:ArchitectureViewpoint"... >
<representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_zzf4gHDtEeWh-MssWmCB_A"/>
</viewpoints>
This has worked fine in Papyrus up to 2021-03 (5.1). But in the latest release 2021-09 (5.2) it does not work anymore.
When trying to create a new model based on the architecture with the class diagram as default, the Create New Model wizard get stuck. with the following exception thrown:
!ENTRY org.eclipse.ui 4 0 2021-10-14 16:34:33.338
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
at org.eclipse.papyrus.infra.gmfdiag.common.helper.GMFDiagramViewTypeHelper.doGetPrototypeFor(GMFDiagramViewTypeHelper.java:74)
at org.eclipse.papyrus.infra.gmfdiag.common.helper.GMFDiagramViewTypeHelper.doGetPrototypeFor(GMFDiagramViewTypeHelper.java:1)
at org.eclipse.papyrus.infra.viewpoints.policy.AbstractViewTypeHelper.getPrototypeFor(AbstractViewTypeHelper.java:77)
at org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype.get(ViewPrototype.java:128)
at org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard.initDiagrams(CreateModelWizard.java:789)
at org.eclipse.papyrus.uml.diagram.wizards.wizards.InitModelWizard.initDiagrams(InitModelWizard.java:200)
at org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard.initDiagramModel(CreateModelWizard.java:729)
at org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard.createAndOpenPapyrusModel(CreateModelWizard.java:331)
at org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard.performFinish(CreateModelWizard.java:285)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:832)
When I create a new model without any default diagram and then try to bring up the Add Diagram context menu, the following exception is thrown:
!ENTRY org.eclipse.ui 4 0 2021-10-14 16:31:08.821
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
at org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker.matchesProfiles(PolicyChecker.java:481)
at org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker.getPrototypesFor(PolicyChecker.java:361)
at org.eclipse.papyrus.infra.gmfdiag.common.handler.DynamicDiagramsMenuContribution.getContributionItems(DynamicDiagramsMenuContribution.java:64)
at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:83)
at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:57)
at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:146)
at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:729)
at org.eclipse.jface.action.MenuManager.update(MenuManager.java:806)
at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:470)
at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:495)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:259)
Trying to open an existing class diagram in a model with the architecture applied created in an older version of Papyrus brings up a "Enable viewpoint for diagram(s)/table(s) popup dialog which cannot be closed by the OK button.
Trying to debug the problem indicates that the REPRESENTATION_KIND__LANGUAGE feature id is never added to the eflag member of the PapyrusDiagramImpl class instance.
Is this a known regresion and are there any other recommended way to (re)use a standard UML diagram in a new architecture viewpoint definition that will work with the latest Papyrus version as well as in previous versions?
/Thomas
Thomas Wiman
MetaModelAgent Product Manager
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03360 seconds