Closed ammrat13 closed 1 year ago
Strangely, regenerating the model files from SysML_.genmodel
(not SysML.genmodel
) seems to resolve this particular issue, at the expense of creating many more. Specifically, many methods that are supposed to be of the form isX()
are actually isIsX()
.
Properly initializing the SysML setup is not simple. Luckily, the pilot implementation includes some utility classes to help with this. Unfortunately, it is probably not at all clear what and where these are!
To start with, I would suggest you look at org.omg.sysml.util.SysMLUtil
, which we use as the base class for pretty much all standalone utilities that use KerML and SysML resources. You can see how this is used with Xtext in the classes in org.omg.kerml.xtext.util
and org.omg.sysml.xtext.util
.
However, the easiest way to programmatically access the pilot implementation environment is to use the org.omg.sysml.interactive.SysMLInteractive
class that is the basis for implementing the Jupyter kernel for SysML. This has been discussed previously in the SysML v2 Google Group. If you would like to discuss this further, please post your issue there, and I can repost the example of how to use SysMLInteractive
.
PS: Don't use SysML_.genmodel
. This is just a work around for some problems with getting the Xtext work flows to run.
I am attempting to write a standalone "transpiler" for SysMLv2. The idea is to traverse the generated model to automatically generate some configuration files. I'm new to Xtext as a whole, so I haven't made much progress. Currently, I'm just trying to load a SysML file and dump the model.
My code is:
The printout is:
I don't know if this is an issue with SysML's code. I believe it is since the code for
OwningMembershipImpl.java
calls:while the callee assumes that the second parameter
settings
is notnull
. It is likely not a version issue since I'm using Eclipse 2022-09 with SysMLv2 Release 2023-02. Most likely though is that I'm not registering something that I'm supposed to. What might that be?