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

GroovyCompletionProposalComputer is unable to return any proposals due to incorrect completion expression #302

Closed
tappio opened this issue Jun 5, 2017 · 3 comments
Assignees

Comments

@tappio
Copy link

tappio commented Jun 5, 2017

GroovyCompletionProposalComputer is unable to return any proposals due to incorrect completion expression returned by ExpressionFinder.

Let's consider the following code snippet:

void testMethod() {
   def testVariable = "";
   testV // cursor is placed at the end of this line
}

If user tries to complete this code (cursor is placed after "testV") everything works as expected without any issues. In this particular case ExpressionFinder will return "testV" completion expression and GroovyCompletionProposalComputer will be able to handle this case.

Now let's change testVariable's value a little bit and add two slashes (might be any string which contains two slashes):

void testMethod() {
   def testVariable = "//";
   testV // cursor is placed at the end of this line
}

In this case, if user tries to complete this code (cursor is placed after "testV") no completion will be returned by the GroovyCompletionProposalComputer. This happens because ExpressionFinder can't handle this particular case and returns something like "//\n\ttestV" instead of "testV" which in turn leads to empty completion for a user.

@eric-milles
Copy link
Member

Exception encountered is: org.codehaus.groovy.eclipse.core.util.TokenStreamException: Could not close quoted string. I'll see if I can figure out why this is happening.

@eric-milles
Copy link
Member

eric-milles commented Jun 6, 2017 via email

@tappio
Copy link
Author

tappio commented Jun 6, 2017

@eric-milles, unable to reproduce on the latest snapshot. Thank you!

@tappio tappio closed this as completed Jun 6, 2017
@eric-milles eric-milles self-assigned this Jun 6, 2017
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

No branches or pull requests

2 participants