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

Some generated methods lack of proper @generated annotations #22

Open
abelgomez opened this issue Feb 25, 2020 · 0 comments
Open

Some generated methods lack of proper @generated annotations #22

abelgomez opened this issue Feb 25, 2020 · 0 comments

Comments

@abelgomez
Copy link
Collaborator

Some automatically generated methods lack of proper @generated annotations. Thus, in order to apply model changes existing java files must be deleted so that a full generation is done, and no in-place update is possible.

See an example of the issue in the template https://github.com/lip6/pnmlframework/blob/master/pnmlFw-Low_Level_API_Generation/templates-2.2.0/ToPNML/ToPNMLNIO.javajet which generates the toPNML(FileChannel fc) method in all domain classes.

For an example of generated code, see:

A properly generated toPNML(FileChannel fc) should look like:

	/**
	 * Return the string containing the pnml output
	 * @generated
	 */
	@Override
	public void toPNML(FileChannel fc) {
		//id 0
		//idref 0
		//attributes 0
		//sons 1

		final int bufferSizeKB = 8;
		final int bufferSize = bufferSizeKB * 1024;
		...
		...

This is only a small example. Inspect generation templates for other cases. On a quick look, I see other methods such as toPNML (without args), fromPNML, idRefHang, validateOCL, etc.

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

No branches or pull requests

2 participants