-
-
Notifications
You must be signed in to change notification settings - Fork 431
Enable opening the IDE from finder/explorer #835
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
Conversation
@msujew, I am happy to try it out. Can you please rebase? Currently, the app does not start. Thank you! See #836
|
7db4792
to
2ede39e
Compare
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.
On Windows, it does "Enable opening the IDE from finder/explorer" for me. However, it does not provide the full functionality that I, and I'm certain the users as well expect. So I don't think it can be considered as a fix for #370
- Close any Arduino IDE windows that are already open.
- Run the following command from PowerShell:
🙂 The IDE starts up with the "SketchA" sketch open.
& ".\Arduino IDE" "c:\Users\per\Documents\Arduino\SketchA\SketchA.ino"
- Run the following command from PowerShell:
🙁 The existing Arduino IDE window with the "SketchA" sketch open is switched to.
& ".\Arduino IDE" "c:\Users\per\Documents\Arduino\SketchB\SketchB.ino"
My expected result from step (3) is that a new IDE window will open with the "SketchB" sketch open.
This expectation is how Arduino IDE 1.x works.
On Linux, running the equivalent of step 2 doesn't open "SketchA". It just starts the IDE with the most recent sketch, the same as running ./arduino-ide
.
Arduino IDE 1.x works the same on Linux as on Windows, in that you can pass sketch paths as an argument and open as many sketches in IDE windows as you like this way.
2ede39e
to
38585e8
Compare
@per1234 @kittaakos Thanks for the comments. I pushed some changes already a few days ago that should've addressed them. |
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.
Thanks @msujew. Unfortunately, when using the build from 38585e8 (2.0.0-rc4-snapshot.7b5c9d7-snapshot-7b5c9d7), it is not working at all for me.
Set a known baseline state for the IDE
- Start the Arduino IDE directly.
- Select File > Open... from the Arduino IDE menus.
- Open
c:\Users\per\Documents\Arduino\SketchA\SketchA.ino
- Close all IDE windows other than the one that has "SketchA" open.
- Close the IDE window with "SketchA" open.
We now know that when the IDE is started without any file association, it should have "SketchA" open.
Test file association
- Run the following command from PowerShell:
🙁 The Arduino IDE starts with the "SketchA" sketch open rather than the expected "SketchB".
& ".\Arduino IDE" "c:\Users\per\Documents\Arduino\SketchB\SketchB.ino"
Notes
- I only tested using Windows 10
Hi @msujew. I have a question: is this intended to provide any support for Linux? The reason I ask is because the addressed issues are for Windows and macOS and you didn't mention anything about Linux (perhaps even implicitly excluding it from the scope via the labels and mention only of "finder/explorer"). Although I would eventually like to see feature parity with Arduino IDE 1.x achieved in this respect for Linux as well, there is no reason that must be within the scope of this PR. I mentioned my Linux results in my first review only because I had tried it out of curiosity. If this PR is intended to affect Linux, I'm happy to test on that OS as well. macOS is not so accessible to me so hopefully someone else can help with that. |
@per1234 Previously I used I also pushed some changes which made parsing the arguments a bit more lenient, I think it was too strict when going through the arguments, so it rejected some valid |
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.
I tried both of the previously failing test cases out using the latest build, on both Windows 10 and Ubuntu 20.04. Everything is working perfectly for me now.
Thanks @msujew!
@per1234 Great :) @fstasi @AlbyIanna @kittaakos someone up for a review of the Mac related changes? |
both @ubidefeo and I tested it on mac. Works as expected. Merging :) |
Hello! We are all developers, and I know how to report bug, so, here we go:
So, with comparison of 2. and 4., I guess there is something wrong during Could any of you have a chance to take a look at the problem? Thank you very much! |
Closes #72
Closes #370
Closes #293
I needed a workaround to make MacOS wait for the
open-file
event, which is accomplished using theopenFilePromise
. However, I can't test this on Mac currently, so please get back to me if does not work correctly on Mac :)