Now scilab backend start update keywords for highlighter in login function and with new login mechanism computation of first runned entry never ends. So this patch fix it by moving highlighting functionality to the scilab highlighter and adding expression queue in backend.
Details
- Reviewers
asemke filipesaraiva - Group Reviewers
Cantor - Commits
- R55:b3874e10ca2a: Fix first entry, highligthing and add queue in Scilab backend
- Start scilab session and try run something
- Check, that runned expression never ends
- Apply the patch
- Do 1)-2) and check, that now all fine.
Diff Detail
- Repository
- R55 Cantor
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
I cannot reproduce the problem with the first expression never ending. Which expression do you use?
Also here, the behavior and the implementation is inconsistent for different backends. For some backends like maxima we have a hard coded list of keywords, for others we fetch this list from the backend. In order to make the syntax highlighting and completion possible we need to always login for such backends in Worksheet::showCompletion() which breaks the whole idea of postponing the login. With your patch you won't have, if I see it correctly, any syntax highlighting and completion until the login is done. So, for saved scilab projects and for new projects where there user wants to write down some code first and evaluate later there will be no syntax highlighting and completion.
I'd rather also re-factor this part in Cantor. The syntax highlighting and completion should be implemented with the help of KSyntaxHighlighting as proposed in T5382. Once this is implemented we can remove a lot of code in Cantor and also really do the login if it's really required for evaluations.
I have recorded a video, because it's easy to show:
As you see, first entry don't wokr fine.
You haven't this behavior?
Also here, the behavior and the implementation is inconsistent for different backends. For some backends like maxima we have a hard coded list of keywords, for others we fetch this list from the backend. In order to make the syntax highlighting and completion possible we need to always login for such backends in Worksheet::showCompletion() which breaks the whole idea of postponing the login. With your patch you won't have, if I see it correctly, any syntax highlighting and completion until the login is done. So, for saved scilab projects and for new projects where there user wants to write down some code first and evaluate later there will be no syntax highlighting and completion.
I'd rather also re-factor this part in Cantor. The syntax highlighting and completion should be implemented with the help of KSyntaxHighlighting as proposed in T5382. Once this is implemented we can remove a lot of code in Cantor and also really do the login if it's really required for evaluations.
I agree, that the implementation of highlighting is inconsistent for different backends. And yes, the scilab highlighting don't work fully before login and it's problem. I have changed highlighting, because scilab backend parses keywords for highlighting in login function and it have given me the problem with first entry and I think, it's not place for the highlighting mechanism, so I have changed it. I'm not familiar with KSyntaxHighlighter, so I'm not sure if I can help with the T5382, but if we start refactoring, I can take on Octave backend and do everything in my power
@sirgienko thanks, it fix the current problem with Scilab backend (I could to reproduce it). I think while we don't implement T5382, we need to fix the problem with this backend.
Hi, @filipesaraiva, I completely forgot about this patch.
But, now, taking into account a more intimate knowledge of the Cantor code and some changes that have occurred since then, I think I need to change this code.
I think, I do it soon.
Haha, me too! :D
But, now, taking into account a more intimate knowledge of the Cantor code and some changes that have occurred since then, I think I need to change this code.
Ok, so I am going to change the review status to Request Changes in order to wait your updates.