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

Methods of MD2GeneratorUtil should not be static #6

Open
sacnl opened this issue Jun 6, 2013 · 1 comment
Open

Methods of MD2GeneratorUtil should not be static #6

sacnl opened this issue Jun 6, 2013 · 1 comment

Comments

@sacnl
Copy link
Contributor

sacnl commented Jun 6, 2013

The state of the qualified name provider etc. should be reset on each new generation. Thus, its methods would best not be static.
Otherwise, state (wrt names) from the previous generation might leak into the next generation.

Example: first version of an app contains a button named "reset" and an action named reset. Then, the generated Android code contains errors, because the class .actions.Reset.javacontains a class Reset1 (related to a different bug: line 160 of AndroidGenerator.xtend should use getName as well).
Renaming the button to, e.g., "resetBtn" does not help directly, presumably because the old name mapping is still in the cache. Restarting the MD2-Eclipse instance and regenerating again resolves the error.

@sacnl
Copy link
Contributor Author

sacnl commented Jun 6, 2013

The bug with regard to inconsistent naming mentioned above has been resolved.
The static naming behavior can still be observed - renaming an object is only reflected after a restart of the Eclipse instance running MD2.

janernsting pushed a commit that referenced this issue Dec 1, 2015
riegerchris pushed a commit that referenced this issue Oct 11, 2017
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

1 participant