atom / language-java

Java package for Atom
Other
62 stars 59 forks source link

More robust enum field's pattern logic #212

Closed Vigilans closed 5 years ago

Vigilans commented 5 years ago

Description of the Change

The original logic uses three different patterns to match an enum constant field. This PR replaces them with a two-scope uniform pattern.

Alternate Designs

To solve #211, an alternative would be to add another to match (constructor + code overrides), but it introduces too much duplicate code, and it still cannot highlight correctly when '{' is placed at new line.

Benefits

Possible Drawbacks

Applicable Issues

Fix #211 Fix redhat-developer/vscode-java#974

Vigilans commented 5 years ago

New commit added to resolve the review conversations.