Borrar filtros
Borrar filtros

automated variable highlighting/ code highlighting doesn't work anymore

6 visualizaciones (últimos 30 días)
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 comentarios
Marten Amschler
Marten Amschler el 19 de Jun. de 2021
thanks for the quick answer. The main file has ~25.000 lines of code and ~1MB size.
Marten Amschler
Marten Amschler el 19 de Jun. de 2021
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

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 19 de Jun. de 2021
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.

Más respuestas (0)

Categorías

Más información sobre Workspace Variables and MAT-Files en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by