Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Architecture viewpoint definitions that refer to Class Diagram does not work in 2021-09
Architecture viewpoint definitions that refer to Class Diagram does not work in 2021-09 [message #1847099] Thu, 14 October 2021 14:57 Go to next message
Thomas Wiman is currently offline Thomas WimanFriend
Messages: 83
Registered: June 2012
Location: Stockholm , Sweden
Member

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
Re: Architecture viewpoint definitions that refer to Class Diagram does not work in 2021-09 [message #1847179 is a reply to message #1847099] Mon, 18 October 2021 11:55 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Thomas,

Without having done any more analysis than yours, this does look like a regression. There was a considerable overhaul in the loading and processing of Architecture Models in the summer release to support a new extensions and inheritance capability for Architecture Contexts. At any rate, a null-pointer exception is always a bug by definition, so could you please raise a bugzilla if there is not already one covering this issue?

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Papyrus

Thanks,

Christian
Re: Architecture viewpoint definitions that refer to Class Diagram does not work in 2021-09 [message #1847196 is a reply to message #1847179] Tue, 19 October 2021 06:27 Go to previous messageGo to next message
Thomas Wiman is currently offline Thomas WimanFriend
Messages: 83
Registered: June 2012
Location: Stockholm , Sweden
Member

Hi Christian,

I have submitted a bug of this behavior: https://bugs.eclipse.org/bugs/show_bug.cgi?id=576715

Thanks,
Thomas


Thomas Wiman
MetaModelAgent Product Manager
Re: Architecture viewpoint definitions that refer to Class Diagram does not work in 2021-09 [message #1847259 is a reply to message #1847196] Thu, 21 October 2021 12:24 Go to previous messageGo to next message
Pauline Deville is currently offline Pauline DevilleFriend
Messages: 122
Registered: November 2016
Location: Paris Saclay, France
Senior Member
Hi Thomas,

Since 2021-09 release it is not possible to reference directly the uml architecture in your own architecture file, this is the expected behavior.

You have to migrate your architecture file, you should create new RepresentationKind which references the same creation class and the same implementationId. You can find in attachment an example of a architecture file referencing a uml diagram.

HTH,
Pauline
Re: Architecture viewpoint definitions that refer to Class Diagram does not work in 2021-09 [message #1847261 is a reply to message #1847259] Thu, 21 October 2021 12:44 Go to previous message
Thomas Wiman is currently offline Thomas WimanFriend
Messages: 83
Registered: June 2012
Location: Stockholm , Sweden
Member

Hi Pauline,

Thanks for the clarification. It was not the kind of change I expected within one and the same major release (v5.1 -> v5.2).

/Thomas


Thomas Wiman
MetaModelAgent Product Manager
Previous Topic:SysML 1.6 for eclipse 2021-09 is available
Next Topic: UCS4SysML?
Goto Forum:
  


Current Time: Thu Apr 25 19:46:11 GMT 2024

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

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

Back to the top