Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moose-Easy isn't compatible with the latest VerveineJ #8

Open
fuhrmanator opened this issue Dec 26, 2020 · 0 comments
Open

Moose-Easy isn't compatible with the latest VerveineJ #8

fuhrmanator opened this issue Dec 26, 2020 · 0 comments

Comments

@fuhrmanator
Copy link
Collaborator

After generating an MSE file with FamixMaker, the "generated" code to load the model is like this:

"Load the moose Model with some error checking"
| mseFileRef mseStream mooseModel |
mseFileRef := 'tmp/HFDP.mse' asFileReference. "Generated by FamixMaker"
mseStream := mseFileRef readStream.
mseStream
	ifNotNil: [ 
		mooseModel := MooseModel importFromMSEStream: mseStream. 
		mooseModel rootFolder:
      'tmp/MooseEasyRepos/bethrobson__Head-First-Design-Patterns'.
		mooseModel install. "So it appears in the Panel"
		mseStream close. ]
	ifNil: [ self error: 
    'Could not load MSE file into Moose: ' , mseFileRef asString ].

However, with the latest VerveineJ (using FamixNG) when trying to load the MSE file, there are errors such as:
Element 'Famix-Java-Entities.IndexedFileAnchor' not found.

This also happens when using the Moose Panel "Import model from MSE file" function image.

Anyway, the solution (thanks @badetitou) is to change MooseModel to FamixJavaModel when loading the MSE file in the script above:

"Load the moose Model with some error checking"
| mseFileRef mseStream mooseModel |
mseFileRef := 'tmp/HFDP.mse' asFileReference. "Generated by FamixMaker"
mseStream := mseFileRef readStream.
mseStream
	ifNotNil: [ 
		mooseModel := FamixJavaModel importFromMSEStream: mseStream. 
		mooseModel rootFolder:
      'tmp/MooseEasyRepos/bethrobson__Head-First-Design-Patterns'.
		mooseModel install. "So it appears in the Panel"
		mseStream close. ]
	ifNil: [ self error: 
    'Could not load MSE file into Moose: ' , mseFileRef asString ].

Since "compatibility" Famix was VerveineJ 1.x.x, then I think Moose-Easy needs to synchronize better with it, as in #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant