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

Generate Getters for Property Constants #2632

Closed
AaronGreenhouse opened this issue Apr 7, 2021 · 0 comments · Fixed by #2736
Closed

Generate Getters for Property Constants #2632

AaronGreenhouse opened this issue Apr 7, 2021 · 0 comments · Fixed by #2736

Comments

@AaronGreenhouse
Copy link
Contributor

AaronGreenhouse commented Apr 7, 2021

The property code generator should generate getter methods for property constants.

An example of the need for these is in Aadl2Validator, in the methods classifiersFoundInSupported* methods, where the value of the relevant property constant is retrieved and the values checked to make sure the references items exist.

I'm trying to get rid of the use of GetProperties methods, and right now there is no suitable replacement for the existing code, which all have a from like

		PropertyConstant matchesPropertyConstant = GetProperties.lookupPropertyConstant(connection,
				AadlProject.SUPPORTED_CLASSIFIER_COMPLEMENT_MATCHES);
		if (matchesPropertyConstant == null) {
			return false;
		}
		PropertyExpression constantValue = matchesPropertyConstant.getConstantValue();
		if (!(constantValue instanceof ListValue)) {
			return false;
		}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants