automated variable highlighting/ code highlighting doesn't work anymore

6 次查看(过去 30 天)
Dear community,
I am working on a huge prototype-project.I am creating a GUI using Guide (I know that this is not recommended). After some changes (added some buttons and filled their functions with life) i noticed that the Editor looks different...
After having a second look i noticed that no variables are highlighted anymore. Also the global variables are not turquise anymore. Also the backround is not yellow anymore, as it should be when you are seperation sections with "%%"
Here a screenshot of the previous and actual state:
usually this happens if there is a syntax error (e.g. if I am missing an "end" in a loop) or if I wrongly put a "return". But this time it might not be the case. The code and every function runs. No syntax error... I used the comparison function of matlab and checked every line I changed... but dind't find anything suspicious. Also the yellow "warnings" on the right side of the IDE don't help (also, there is no red "error").
Do you guys have any idea? Could I provide you any further information that would help?
greetings
Marten
  3 个评论
Marten Amschler
Marten Amschler 2021-6-19
Oh okay... because of your answer I tried the following:
I used an older version of the code (~23.000 lines). And just added a bunch of copy & paste lines to get over 25.000 lines... and all of the sudden the highlighting doesn't work anymore. Even after saving, restarting and reloading... so the size might be the problem... thank you!
I guess the prototype is too big now :D

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2021-6-19
I have a vague memory that the Code Analyzer (used to be called mlint https://www.mathworks.com/help/matlab/ref/mlint.html ) has a limit on the number of lines it analyzes automatically, and that was the same limit on what it could analyze for code folding.
Current non-interactive tool is checkcode()
and see also the code analyzer report (which creates interactive content iirc)
I do not know if there is a way of increasing the limit on the number of lines interactively analyzed; I would expect checkcode() to be able to handle larger files non-interactively.
Yes, that is a hint that you might not be getting errors and warnings that you should be getting when you are using more than 25K lines.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by