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

Attempt to fix autocomplete for strings that start with "$" #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mcred
Copy link

@mcred mcred commented Nov 1, 2020

Please review as I was not able to successfully build due to issue unrelated to this code

When typing out variables in the IDE that start with $, for example $clog, autocomplete will correctly suggest possibilities, but when replacing the variable it will not properly identify the start as $ and will replace the text creating a double first character: $$clog.

I was not able to get the IDE to build from the current code. IntelliJ was not happy with it and gave lots of errors when trying to build. A pom.xml or other build manifest would be helpful for this.

I did do some testing to compare Character.isLetterOrDigit to text.charAt(start) == '$' in the console:

String text = "$clog";
System.out.println(Character.isLetterOrDigit(text.charAt(0)));
System.out.println(text.charAt(0) == '$');
Defined field String text = "$clog"

System.out.println(Character.isLetterOrDigit(text.charAt(0)))
false

System.out.println(text.charAt(0) == '$')
true

Considering that there was already an exception for text that starts with _, I hope that an additional check for $ will fix this issue. If it will not, please reject this PR. I may have misunderstood why the additional check for _ is required.

Signed-off-by: Derek Smart <derek@grindaga.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant