-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open code in external editor #1647
base: master
Are you sure you want to change the base?
Open code in external editor #1647
Conversation
samamou
commented
Dec 27, 2024
•
edited
Loading
edited
- Reuse previous editor instance instead of launching a new one each time and ending up with 30 sublime / vscode files open for each edit :')
- before creating a new file, check if it exists?
QFileSystemWatcher to monitor if a temp file changes externally + syncs updates back into the score editor? @jcelerier |
yep ! but keep in mind this issue: https://stackoverflow.com/questions/18300376/qt-qfilesystemwatcher-signal-filechanged-gets-emited-only-once/18304496 so a bit of intelligence is needed - I think the best way is the answer that proposes watching the parent folder for newly created file, and check if it matches. Also I think this behaviour should be encapsulated in a entirely separate utility class as there is this requirement in multiple other places in ossia :) |
oki another crash on thread 20 here score-crash.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, I have small nitpicks but the code looks very clean, !
I spoke to Lou and Zach briefly about scripting in other software to discuss the behavior they expect Feedback:
Possible quick implementation: It also got me thinking, is it possible to have this open up and direct the log/output here / to another terminal instead of the QTextEditor + give feedback onCompile()/onRun() such as adding a comment block SUCCESSFULLY COMPILED
@jcelerier can you please tell me which is high/ low effort? |
Amazing thanks for this analysis ! |
sounds like what we discussed earlier, this is also what i'd expect as behaviour
yep, that sounds doable (in a further PR!). Should be done here: https://github.com/jcelerier/QCodeEditor ; I also like the "red" error state that you propose, imho this one should be generalised as there are definitely non-code-editor things which can be in erroneous states like this! For the immediate needs though, I think a bespoke-like thing with the line being underlined is the best bet. (again, in a further PR, this is another feature on top of this one.)
yeah, this one's more of a challenge and to be thought of as part of a more general "debug overlays" feature, e.g. to see for instance not only code but also inputs & outputs signals, textures, etc. |