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

IBeX v1: TGG: referenced metamodel project names must start with a capital letter #434

Open
maxkratz opened this issue Jan 16, 2025 · 0 comments
Labels

Comments

@maxkratz
Copy link
Member

Similar to the findings in this issue (eMoflon/emoflon-ibex-hipe#3), I found myself with a non-compilable code snippet for HiPE when I created a new TGG project with eMoflon::IBeX-TGG (v1).
In particular, the (generated) class HiPERegistrationHelper.java contained some code snippets that probably should be replaced with actual names, e.g., of packages:

[...]
import <<SRC_Package>>.impl.<<SRC_Package>>PackageImpl;
import <<TRG_Package>>.impl.<<TRG_Package>>PackageImpl;
[...]
                // Load and register source and target metamodels
		EPackage <<src_project>>Pack = null;
		EPackage <<trg_project>>Pack = null;
		EPackage tggtestprojectcPack = null;
		
		if(executable instanceof FWD_OPT) {
			Resource res = executable.getResourceHandler().loadResource("platform:/resource/<<TRG_Project>>/model/<<TRG_Project>>.ecore");
			<<trg_project>>Pack = (EPackage) res.getContents().get(0);
			rs.getResources().remove(res);
			
			res = executable.getResourceHandler().loadResource("platform:/resource/Tggtestprojectc/model/Tggtestprojectc.ecore");
			tggtestprojectcPack = (EPackage) res.getContents().get(0);
			rs.getResources().remove(res);
		}
[...]

I found out that this problem vanishes if both, the source metamodel and the target metamodel, respectively their project names, start with a capital letter.
Hence, I opened this issue for future reference.

@maxkratz maxkratz added the bug label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant