-
Notifications
You must be signed in to change notification settings - Fork 121
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
IEP-908: Adding the code to support the default workspace directory #736
Conversation
The issue with installer where it sometimes references to the idf toolchain directory for workspace should be resolved now the default workspace is now either in the user home directory or is pointed by the defaultWorkspace property in the esp_idf.json file
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.
Overriding the default IDEApplication class and only the required methods that still required some internal code to be rewritten. I could not found a workaround to set the workspace via configs. Other methods only allow setting the default workspace but that also doesnt work at times.
I have also refactored and isolated some code that could be reused in multiple classes
JSONParser parser = new JSONParser(); | ||
try | ||
{ | ||
JSONObject jsonObj = (JSONObject) parser.parse(new FileReader(idf_json_file)); |
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.
we need to close the FileReader with try-with-resources and provide an explicit character set to the FileReader constructor (e.g. StandardCharsets.UTF_8) to avoid dependency on OS code.
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.
@sigmaaa resolved in the latest commit
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.
Hi @alirana01, thanks for the PR, need to close FileReader, otherwise LGTM
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.
LGTM
Description
The issue with installer where it sometimes references to the idf toolchain directory for workspace should be resolved now the default workspace is now either in the user home directory or is pointed by the defaultWorkspace property in the esp_idf.json file
Fixes # (IEP-908)
Type of change
Please delete options that are not relevant.
How has this been tested?
Test 1:
Test 2:
Test3:
Also make sure to change the workspace to some other directory and try to relaunch the IDE the workspace selection dialog on second start should always point to the last used directory.
Test Configuration:
Checklist