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

New Java metamodel #276

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open

Conversation

tschilpp
Copy link

@tschilpp tschilpp commented Sep 1, 2023

Updated the Java metamodel used in the case studies from the old Java 6 version to the new Java 15 declared in JaMoPP.

tschilpp added 16 commits June 12, 2023 15:37
JavaClasspath.registerZIP(URI)
- Removed references to JavaClasspath.Initializer as it does not exist
anymore
- Replaced JavaClasspath.getClassifier(String) with
JavaClasspath.getConcreteClassifier(String)
  - Moved the call-part of the JavaCompilationUnitInsertedInPackage
reaction into the JavaCompilationUnitInsertedAsRoot reaction
- JavaContainerAndClassifierUtil
  - Simplified methods removeJavaClassifierFromPackage()and
findClassifier()
- Replaced calls to Package.compilationUnits with
Package.classifiers.map[it.containingCompilationUnit]
- JaMoPPTest
  - Corrected the means of adding a CompilationUnit to a Package
  - Renamed reactions to comply with naming conventions
    - "PackageCreated" -> "JavaPackageCreated"
    - "InterfaceCreated" -> "JavaInterfaceCreated"
    - "ClassCreated" -> "JavaClassCreated"
-JaMoPPTest.java
  - testAddInterfaceMethod()
    - Added an empty statement to the interface method to avoid
NullPointerExceptions
  - Added a check to initializeClassMethod() to avoid the statement of
the method being null
include a statement

=> PCM-Java tests now do show the same results as before the MM change
  - Fixed a bug in reaction JavaCompilationUnitInsertedAsRoot
=> UML-Java tests now show even better results than before the MM change
- Updated JaMoPP repository reference in parent pom

=> UML-Java tests now show even better results than before the MM change
@tschilpp tschilpp requested a review from a team as a code owner September 1, 2023 15:53
@TomWerm
Copy link
Member

TomWerm commented Sep 2, 2023

Thank you very much for your contribution 👍

@tschilpp tschilpp requested a review from TomWerm September 3, 2023 17:35
@TomWerm
Copy link
Member

TomWerm commented Sep 4, 2023

The old jamopp metamodel is still used in the commonalities projects. @tschilpp do you plan to migrate them also?

@tschilpp
Copy link
Author

tschilpp commented Sep 5, 2023

The old jamopp metamodel is still used in the commonalities projects. @tschilpp do you plan to migrate them also?

Until now, I wasn't even aware that the old MM was used elsewhere. At the beginning of my practical course, I was told to migrate the transformation (UML <-> Java and PCM <-> Java) to the new MM and make sure that the tests show the same results as before the migration. So in short the answer is probably not.

@TomWerm
Copy link
Member

TomWerm commented Sep 6, 2023

That's absolutely fine, I just wanted to make sure no work is done twice. I will adapt this PR to pass the CI (if that is ok for you @tschilpp ?) and open an issue for the migration of the commonalities projects.

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

Successfully merging this pull request may close these issues.

3 participants