This is a migrated thread and some comments may be shown as answers.

Smart semicolon often lags behind

3 Answers 58 Views
Code Generation
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andrei
Top achievements
Rank 1
Andrei asked on 27 May 2012, 11:45 AM
I type quite fast and every so often I run into a situation when semicolon is not put at the end of the line as it's supposed to be. For instance, I type:

myObject.DoSomething(param1, param2|)

| indicates where the cursor is. So if I hit ; fast right after I've finished typing param2 the cursor remains within the parens. Then I hit backspace and type ; again. However, it's not moved to the end of the statement either. Then I remove it once again and wait for half a second or so and type ; again. This time it's successfully moved to the end of the statement.

I understand that it requres the code analysis to kick in and report the 'missing semicolon' error, however, I find it rather annoying and counter productive. I guess you have prioritized various code analysis tasks so that those that require instant feedback are done first. But apparently something yet is to be done with the smart semicolon. Maybe add a separate single statement parsing pass for it and maybe even do it inside IDE without sending a request to the analysis service..

3 Answers, 1 is accepted

Sort by
0
Andrei
Top achievements
Rank 1
answered on 30 May 2012, 02:52 PM
I also noticed sometimes even if it manages to put semicolon to the end of the line it moves the cursor back like:

DoSomething(param|)

becomes:

DoSomething(par|am);

For some strange reason it's moved the cursor 3 or 4 symbols back.
0
Ivan
Telerik team
answered on 31 May 2012, 12:10 PM
Hello,

Thank you for your feedback. Both of the behaviors you experience are known issues.
The first one, as you have noticed is because sometimes the analysis does not complete fast enough. Since performance is very important for us, we are going to do our best to fix this issue as soon as possible.
The second issue is caused because of the formatting feature of the typing assistance. When you hit semicolon we format the current line. We move the semicolon to the place where it should be, however after the format - this position is no longer the correct one.
A temporary workaround could be to disable the automatic format after semicolon hit.
I am sorry for the caused inconvenience.
Thank you for your feedback!

Kind regards,
Ivan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Andrei
Top achievements
Rank 1
answered on 31 May 2012, 01:38 PM
Hi Ivan,

thanks for your response! Hope you will be able to resolve these problems soon.
Tags
Code Generation
Asked by
Andrei
Top achievements
Rank 1
Answers by
Andrei
Top achievements
Rank 1
Ivan
Telerik team
Share this question
or