필터 지우기
필터 지우기

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일
thanks for the quick answer. The main file has ~25.000 lines of code and ~1MB size.
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