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

Renaming elements in text editor does not work #359

Closed
lwrage opened this issue Apr 24, 2014 · 9 comments · Fixed by #2085
Closed

Renaming elements in text editor does not work #359

lwrage opened this issue Apr 24, 2014 · 9 comments · Fixed by #2085

Comments

@lwrage
Copy link
Contributor

@lwrage lwrage commented Apr 24, 2014

The AADL text editor has an operation to rename identifiers (context menu 'Rename Element' or Alt-Shift-r). This renames the identifier where it is declared but leaves all other occurrences unchanged.
child of #1371
depends on #1466

@lwrage

This comment has been minimized.

Copy link
Contributor Author

@lwrage lwrage commented Jul 23, 2014

Works in part with the fix for #360. Need to add renaming of package/classifier at the end of the declaration.

@Korny666

This comment has been minimized.

Copy link

@Korny666 Korny666 commented Aug 3, 2015

bug2
Renaming is not working consistently.

@lwrage

This comment has been minimized.

Copy link
Contributor Author

@lwrage lwrage commented Sep 25, 2018

What to do about references to component implementations when the component type is renamed?

  • Investigate xtext handling of qualifies name segments.
  • Maybe handle when adding name at end of classifier.
@ghost ghost added in progress and removed next labels Sep 26, 2018
@lwrage

This comment has been minimized.

Copy link
Contributor Author

@lwrage lwrage commented Sep 26, 2018

Mark occurrences now marks type names in references to implementations. Rename refactoring is completely different. First need to create the linked editing regions for the editor, then adapt the actual renaming.

@lwrage

This comment has been minimized.

Copy link
Contributor Author

@lwrage lwrage commented Sep 26, 2018

And there are references from annexes and external languages into the core language. It is not clear how these need to be handled.

@lwrage lwrage removed this from the 2.3.6 milestone Sep 28, 2018
@lwrage

This comment has been minimized.

Copy link
Contributor Author

@lwrage lwrage commented Sep 28, 2018

Xtext 2.13 introduced improved support for semantic editing that may make it easier to implement component type renaming (see https://typefox.io/xtext-2-13-0-released-semantic-editing-made-easy). Postponing this issue until after we've updated to Photon with the newer Xtext.

@lwrage

This comment has been minimized.

Copy link
Contributor Author

@lwrage lwrage commented Nov 24, 2019

Look at IDependentElementsCalculator for renaming component implementations.

@lwrage

This comment has been minimized.

Copy link
Contributor Author

@lwrage lwrage commented Nov 29, 2019

There is a way to trigger subsequent renamings, see http://koehnlein.blogspot.com/2011/06/rename-refactoring-in-xtext-20.html

@lwrage

This comment has been minimized.

Copy link
Contributor Author

@lwrage lwrage commented Nov 29, 2019

It works with a dependent elements calculator. Declaration updates must also rename affected implementations, references are updated automatically.

@lwrage lwrage added this to the 2.6.1 milestone Nov 29, 2019
@lwrage lwrage added the core label Dec 9, 2019
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.