[IDEA 201.x] Remove macro registration hack #499
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In old versions of IntelliJ platform it was only possible to register
macros of custom names. The only way to provide custom macro was to
override one of the existing macros. We've been overriding
FileRelativePath
macro.Unfortunately, since version 201.x of IntelliJ platform the hack does
not work, because the data structure to keep the macros has been
changed from a HashMap to a List. This means, the entries are not
overriden, but appended to the end of the list. MacroManager looks up
only for the first ocurrence of the name, so the one in the end of the
list will never be found if the name is not unique. The change was
done in this commit JetBrains/intellij-community@6183806
Luckily, the hack is not needed since
JetBrains/intellij-community@fdf6dbc.
This means, we can use any custom name for the macro