Skip to content
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

New feature - run configurations #51

Merged
merged 28 commits into from
Nov 15, 2022
Merged

Conversation

sillydan1
Copy link
Collaborator

@sillydan1 sillydan1 commented Nov 5, 2022

This PR adds a new feature: Run configurations. Very much inspired by the jetbrains IDEs' feature of the same name. You can now run any program from inside the IDE.

It would be much appreciated if I could get some help with the UI/UX design specifically the run configurations-editor is not very pretty and could use some love

Screen.Recording.2022-11-05.at.18.44.59.mov

Features

  • Add run configurations: run any kind of program from inside H-UPPAAL

Fixes / Minor improvements

  • Cleanup in classes that affect the run configurations feature
  • Buttons now have a subtle hover-effect, enhancing the user experience a bit
  • Updated gson to version 2.10 (notably, records can now be serialized/deserialized!)
  • add version information into the statusbar

Missing Tasks

  • Clicking "stop" whilst a run configuration is running should SIGTERM it, right now it just adds another thread
  • Bump version number
  • Run configurations should be able to provide additional environment variables to the command
  • Test on MacOS
  • Test on GNU/Linux
  • Test on Windows

For the moment run configurations will be stored in preferences. I personally think they should be saved in the project files instead. However, to keep the scope reasonable I have omitted this from this PR.

The output of a command will currently be put in the "Warnings" tab. This is not ideal, however I am also working on a complete rewrite of the CodeAnalysis/Logging system (I will make sure to keep it backwards compatible to ensure that the uppaal integration still works) so unless it's a really big issue (or easy to fix) I have also considered that "out-of-scope" for this PR.

Asger Gitz-Johansen and others added 21 commits October 31, 2022 16:16
We need a seperate message tray for these commands
cleanup: use var in HUPPAALController class
The CodeAnalysis class and log-tabs could really use a green thumb soon.
It's still super ugly, but at least it's usable now
also moved the background-spinner into the middle of the statusbar
also remove the version label in the runconfig editor
@sillydan1 sillydan1 requested a review from Nielswps November 10, 2022 17:27
@sillydan1 sillydan1 changed the title Draft: Feature: Run Configurations Feature: Run Configurations Nov 10, 2022
@sillydan1 sillydan1 changed the title Feature: Run Configurations New feature - run configurations Nov 10, 2022
@sillydan1 sillydan1 requested review from yrke and ulriknyman and removed request for yrke November 12, 2022 14:12
Copy link
Contributor

@Nielswps Nielswps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the intended use case for this feature?
I personally would just use a terminal to run executables and wonder if this is outside the scope of the application. It is probably just because I do not have a lot of experience using the system, but an example of a use case would be nice

@sillydan1
Copy link
Collaborator Author

sillydan1 commented Nov 13, 2022

What is the intended use case for this feature?
I personally would just use a terminal to run executables and wonder if this is outside the scope of the application. It is probably just because I do not have a lot of experience using the system, but an example of a use case would be nice

The specific use-case would be that at our company we use a custom model compiler, debugger and a bunch of other utility tools (upload-scripts, unit-test runners etc.). Not all of these are implemented in java, so a direct java interface would be impractical (I would also argue that would be out of scope for the editor)

Model-designers are not necessarily developers themselves and they don't necessarily know how to use a terminal (especially on windows, this can be a problem) so this feature provides a generic way to integrate our tools, and makes it much easier to iterate on a model and get feedback from our tools.

In combination with the logging system refactor tools can provide clickable links to exactly where an error has occurred - providing a seamless developer experience.

From the perspective of running a model-checker on your models, I would argue that it is more seamless to simply push a button in the editor and click on the problem, than to tab out, write the command, and interpret the standard-output manually to find the culprit component/syntax error/whatever went wrong.

For this feature to be truly complete, run-configurations would have to be saved per-project and should be "shareable" (through git) rather than saved in the global preferences. However, I dont have much insight in the model-representation part of the codebase (right now, I'm slowly learning the architecture) so I haven't implemented that yet.

I can arrange a meeting about a use-case demonstration, if you'd like?

Copy link
Contributor

@Nielswps Nielswps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍 Thanks for clarifying the use case, I think it makes a lot of sense

@sillydan1 sillydan1 merged commit baf345a into master Nov 15, 2022
@sillydan1 sillydan1 deleted the feat/external-tool-preferences branch November 15, 2022 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants