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

Rename refactoring fails for record fields #2077

Closed
lwrage opened this issue Nov 22, 2019 · 1 comment · Fixed by #2079
Closed

Rename refactoring fails for record fields #2077

lwrage opened this issue Nov 22, 2019 · 1 comment · Fixed by #2079
Assignees
Milestone

Comments

@lwrage
Copy link
Contributor

@lwrage lwrage commented Nov 22, 2019

Summary

When renaming a record filed only the name in the declaration is updated.

Expected and Current Behavior

All use sites are reported as problematic: "Refactoring introduces a name conflict." There is no real conflict.

Steps to Reproduce

  1. Create a record property type and an AADL model that uses sets a field.
  2. Position the cursor on the field name and invoke renaming (Alt+Shilt+R)
  3. A dialog pops up with the invalid error messages.

Environment

  • OSATE Version: 2.6.0
  • Operating System: all
@lwrage

This comment has been minimized.

Copy link
Contributor Author

@lwrage lwrage commented Nov 23, 2019

PropertiesScopeProvider contains this code:

def scope_BasicPropertyAssociation_property(Element context, EReference reference) {
	var parent = switch context {
		BasicPropertyAssociation case context.property.propertyType === null:
			context.owner
		default:
			context
	}
...

Removing case context.property.propertyType === null seems to fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.