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

[READY] Feature/create ahk run configs #15

Merged
merged 9 commits into from
Jun 7, 2020
Merged

[READY] Feature/create ahk run configs #15

merged 9 commits into from
Jun 7, 2020

Conversation

takanuva15
Copy link
Collaborator

Hi mtrnord, this PR fixes the run config functionality so that we can run AHK scripts via a run config. Basically you just create a new AutoHotkey SDK and then set that for the project, and then any scripts that are run will use that SDK.

I have also updated the plugin's compatible build range in the build script to include everything from 2019.3 to 2020.1.

(Assuming everything looks good, I would like to update the release version to 0.2.0 and push that to JetBrains with this new stuff.)

@MTRNord MTRNord self-requested a review May 26, 2020 05:19
@MTRNord MTRNord added the enhancement New feature or request label May 26, 2020
…ipt execution. Did some refactoring to make the command line code easier to understand.
Copy link
Contributor

@MTRNord MTRNord left a comment

Choose a reason for hiding this comment

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

Is it possible to auto-detect the script path using the open file? I saw other languages do it but I am not sure how.

@MTRNord
Copy link
Contributor

MTRNord commented May 29, 2020

grafik

I think this is introduced by your PR (I will double-check it). But it seems like the project doesn't have a file tree anymore if I use the open function in the welcome menu (not the import). Instead, it opened a temp file

Copy link
Contributor

@MTRNord MTRNord left a comment

Choose a reason for hiding this comment

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

Is it also possible to instead of opening the warning to set the sdk open a dialog to set it? (Not sure if possible but would be nice if it is. Kind of thinking out loud).

@takanuva15
Copy link
Collaborator Author

Is it also possible to instead of opening the warning to set the sdk open a dialog to set it? (Not sure if possible but would be nice if it is. Kind of thinking out loud).

I will look into this. There needs to be some kind of error alert shown to the user (otherwise the user has no idea why the Sdk dialog opened); using a message dialog is the easiest way to show it.

Eventually this error code will be deleted in a future release once an Sdk selector is added inside the run config itself (like what the Python plugin has).

@takanuva15
Copy link
Collaborator Author

takanuva15 commented May 31, 2020

Is it possible to auto-detect the script path using the open file? I saw other languages do it but I am not sure how.

I tried some various things to get the open script to appear by default in the "template configuration" when adding a new config via FileEditorManager.getInstance(project).getSelectedEditor().getFile().getPresentableUrl(), but it seems that the template editor is closely tied to the existing configurations, so setting a default script affects the script that shows for the already-saved configs.

If you can give me an example of another language that has this feature and the steps that the user needs to take to have the script show up by default, that would be helpful. (If you are talking about running a file by clicking the green arrow next to the line numbers within the editor, that requires a bunch of other configuration classes that would probably be out-of-scope for this PR)


I think this is introduced by your PR (I will double-check it). But it seems like the project doesn't have a file tree anymore if I use the open function in the welcome menu (not the import). Instead, it opened a temp file

I checked this against the master branch without my changes, and the same bug is happening. I also checked with a random python file, and the same issue is happening there too:
image
Thus I think this is an IntelliJ issue. In order to properly open a script, the user should click on the folder they want to open as a project, instead of the script file itself.


Is it also possible to instead of opening the warning to set the sdk open a dialog to set it? (Not sure if possible but would be nice if it is. Kind of thinking out loud).

I have fixed this in my latest commit. If you click "OK" on the warning that shows, it will open up the project settings where you can setup/select the SDK.

As a random note, I also added a small test case to verify how tests work. (Still a lot of documentation to read for that for larger tests)

@takanuva15 takanuva15 marked this pull request as ready for review May 31, 2020 09:44
@takanuva15 takanuva15 changed the title [WIP] Feature/create ahk run configs [READY] Feature/create ahk run configs May 31, 2020
… receiving popup will also open up project structure window. Also added simple junit test to verify testing is possible
Copy link
Contributor

@MTRNord MTRNord left a comment

Choose a reason for hiding this comment

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

LGTM

@MTRNord MTRNord merged commit 5456835 into Nordgedanken:master Jun 7, 2020
@takanuva15 takanuva15 deleted the feature/createAhkRunConfigs branch July 4, 2020 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants