gsohler / openscad

OpenSCAD - The Programmers Solid 3D CAD Modeller
https://www.openscad.org
Other
14 stars 6 forks source link

Allow editor to get current python state #4

Closed Matthieu-LAURENT39 closed 11 months ago

Matthieu-LAURENT39 commented 11 months ago

The text editor currently has no way of knowing if python is currently active (i.e. python is enabled and the current file is a python file). If the editor had that knowledge, it would allow to add much better editing features.

Having a python_enabled public attribute on the ScintillaEditor class could do the trick, however i'm not too sure how python mode is actually toggled (it seems like it's computed from the file name every time?), so i can't really add it myself

Matthieu-LAURENT39 commented 11 months ago

I implemented this by allowing ScintillaEditor to access MainWindows's python_active attribute, however i didn't get time to test it, and compilation is taking too long. I'll test it tomorrow and submit a PR.

gsohler commented 11 months ago

remarkably compilation is only fast 1st time and slow later. to get make the boost, do make clean make

Matthieu-LAURENT39 commented 11 months ago

It's the other way around for me, it's really slow the first time, then fast since it only recompiles the changed files

Matthieu-LAURENT39 commented 11 months ago

This is implemented and works, i'll make a PR

Matthieu-LAURENT39 commented 11 months ago

resolved in #6