Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Trying to resolve all cross-references of an EObject model from an .aadl file.(Resolve all cross-references of an EObject from a loaded .aadl file processed with Xtext.)
Trying to resolve all cross-references of an EObject model from an .aadl file. [message #1855767] Wed, 02 November 2022 11:27 Go to next message
Jose Alejandro Concepcion Alvarez is currently offline Jose Alejandro Concepcion AlvarezFriend
Messages: 11
Registered: June 2022
Junior Member
I am currently working on a standalone java plugin to get an .aadl file and convert it to an XMI model. I am using OSATE pluggings and libraries and want to reproduce this feature. The problem I am struggling with is with the intent to resolve all cross references. The plugging works fine with a simple addl model with no cross reference. When I call resolveAll() from the EObject instance nothing happens. And with this, the following instantiation and conversion fails. When I load the project in OSATE it resolves all cross references. Does anyone have any useful information to help me in the process. ?

I think one of the things may be the fact that when I open the project in OSATE it takes the whole folder with all the .addl files. And the program I am developing just takes the path of the .addl file and tries to get the conversion.
But if that would be the case , I dont have ideo how to address this problem.

These are the libraries I'm using:
index.php/fa/42657/0/

This is a important part of the process:
index.php/fa/42658/0/

Here is how i inject the model from the .addl file given by a global path to it.
After i call the EcoreUtil.resolveAll(rsrc); -> In order to resolve all the CROSS-References
One I instantiate the Resource element I get the EObject element that correspond to (AadlPackage).
There is a validateFunction from the "org.eclipse.xtext.validation.IResourceValidator", where i perform the validation process and collect the information about what is going wrong with the model.

This is the ouput that i got:
index.php/fa/42659/0/

This is the example .addl model loaded into OSATE:
index.php/fa/42660/0/

Re: Trying to resolve all cross-references of an EObject model from an .aadl file. [message #1855770 is a reply to message #1855767] Wed, 02 November 2022 12:10 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
I have no idea but the error message indicates you try to use osgi code in an non osgi environment
So you may need to write a switch there


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Trying to resolve all cross-references of an EObject model from an .aadl file. [message #1855771 is a reply to message #1855770] Wed, 02 November 2022 12:19 Go to previous messageGo to next message
Jose Alejandro Concepcion Alvarez is currently offline Jose Alejandro Concepcion AlvarezFriend
Messages: 11
Registered: June 2022
Junior Member
Sorry but I dont get your point ?
Re: Trying to resolve all cross-references of an EObject model from an .aadl file. [message #1855773 is a reply to message #1855771] Wed, 02 November 2022 14:17 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
Check the code of InstancePlugin.getPluginId
What does it do


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Previous Topic:grammar for ignore string
Next Topic:Load models of imported Ecore in Xtext Language Server
Goto Forum:
  


Current Time: Sat Nov 09 02:43:07 GMT 2024

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

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

Back to the top