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

Fix highlighting for generics with dots in class name #133

merged 2 commits into from Mar 5, 2018


None yet
2 participants

sadikovi commented Mar 5, 2018


  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

This PR fixes issue when having code like Set<java.lang.String> var = ..., java.lang.String part was highlighted incorrectly.

Consider code below:

class A {
  Set<MapEntry<K, V>> var = null;
  Set<Map.Entry<K, V>> varA = null;
  Set<java.util.List<K>> varB = null;

Before the patch:


After the patch


Alternate Designs

None were considered. I just tried different combinations of patterns to see which one worked.


Fixes the issue, without breaking existing tests.

Possible Drawbacks

This does not fix code like following, parts java.util.Set and java.lang.String are highlighted incorrectly:

class A {
  java.util.Set<java.util.List<K>> varA = null;
  java.lang.String varB = null;

But I think this is outside of the scope of this PR.

Applicable Issues

Fixes #131


This comment has been minimized.


sadikovi commented Mar 5, 2018

@50Wliu Could you please review this PR? Thanks!
Let me know what you think about Possible Drawbacks section. Should we fix it here or create a separate issue? Thanks.


This comment has been minimized.


50Wliu commented Mar 5, 2018

Separate issue is fine.

@50Wliu 50Wliu merged commit 9c2c2ec into atom:master Mar 5, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@sadikovi sadikovi deleted the sadikovi:generics-with-dots branch Mar 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment