I’m trying to figure out how to create viewpoints for Capella using Capella Studio.
In my research, I started by studying the Capella Studio “Viewpoints development” manual, which describes the basic steps of creating a project and writing code in files contained in the model folder.
I did not invent my own code, but used existing basic examples (in particular basic price) to fill in the code in the files: price.spec.vptext, price.data.vptext, price.ui.vptext and price.diagram.vptext.
The first thing that confused me was the error warnings in the price.diagram.text file (see the picture below).
Using the “Generate Viewpoint” option, I got a set of files in the workspace for (if I understand correctly) the ability to launch Capella from debug mode.
Next, I configured the ability to run Capella in debug mode according to the manual Development Environment · eclipse-capella/capella Wiki · GitHub .
However, the first thing I saw were two windows with error warnings (see pictures below).
By clicking Continue, I got the Capella window running and was even able to activate my viewpoint in the Viewpoint manager. However, an attempt to create a PAB for tests led to the following output in the console in Capella Studio (it looks like the error warnings were not accidental XD).
!ENTRY org.eclipse.ui 4 0 2024-10-10 20:13:32.481
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException: Cannot invoke "org.eclipse.sirius.viewpoint.description.RepresentationDescription.getName()" because "description" is null
at org.polarsys.capella.core.sirius.ui.actions.NewRepresentationAction.<init>(NewRepresentationAction.java:59)
at org.polarsys.capella.core.explorer.activity.ui.hyperlinkadapter.AbstractCapellaNewDiagramHyperlinkAdapter.initNewRepresentationAction(AbstractCapellaNewDiagramHyperlinkAdapter.java:84)
at org.polarsys.capella.core.explorer.activity.ui.hyperlinkadapter.AbstractCapellaNewDiagramHyperlinkAdapter.createDiagram(AbstractCapellaNewDiagramHyperlinkAdapter.java:70)
at org.eclipse.amalgam.explorer.activity.ui.api.hyperlinkadapter.AbstractNewDiagramHyperlinkAdapter.linkPressed(AbstractNewDiagramHyperlinkAdapter.java:89)
at org.polarsys.capella.core.explorer.activity.ui.hyperlinkadapter.AbstractCapellaNewDiagramHyperlinkAdapter.linkActivated(AbstractCapellaNewDiagramHyperlinkAdapter.java:60)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:215)
at org.eclipse.ui.forms.widgets.ImageHyperlink.handleActivate(ImageHyperlink.java:212)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(AbstractHyperlink.java:309)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.lambda$3(AbstractHyperlink.java:117)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4209)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1043)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4026)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3626)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
at org.polarsys.capella.core.platform.sirius.ui.app.CapellaApplication.start(CapellaApplication.java:118)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:654)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1462)
at org.eclipse.equinox.launcher.Main.main(Main.java:1435)
As a result, I am at a dead end as to what I can do next. I will be happy to hear advice on what should be done to run at least basic viewpoints using Capella studio!
P.S. I am attaching the files of my project