Closed alirana01 closed 1 week ago
The pull request introduces several changes to enhance the Espressif IDF SDK configuration UI. A new command is added to the plugin.xml
to facilitate access to the MenuConfig editor. Additionally, two public static strings are introduced in the Messages
class to handle errors related to the absence of the SDK configuration file. A new class, OpenSdkConfigEditor
, is created to manage the opening of the SDK configuration file within the IDE, improving user interaction and error handling.
File Path | Change Summary |
---|---|
bundles/com.espressif.idf.sdk.config.ui/plugin.xml |
Added a new command for Menu Config with an associated icon and handler. |
bundles/com.espressif.idf.sdk.config.ui/src/com/espressif/idf/sdk/config/ui/Messages.java |
Introduced two public static strings for error messages related to missing SDK configuration files. |
bundles/com.espressif.idf.sdk.config.ui/src/com/espressif/idf/sdk/config/ui/OpenSdkConfigEditor.java |
Created a new class to handle opening the SDK configuration file and checking its existence. |
bundles/com.espressif.idf.sdk.config.ui/src/com/espressif/idf/sdk/config/ui/messages.properties |
Added entries for error messages regarding missing SDK configuration files. |
plugin.xml
file that also involve adding a new command, indicating a direct connection in terms of menu contributions and functionality enhancements within the SDK configuration UI.In the code where rabbits play,
New commands hop in today!
Menu Config, a joyful sight,
Errors handled, all feels right.
With each change, the UI gleams,
Hopping high on coding dreams! 🐇✨
bundles/com.espressif.idf.sdk.config.ui/src/com/espressif/idf/sdk/config/ui/messages.properties (2)
`19-19`: **LGTM!** The new property `SDKConfigFileNotFound_ErrorMessage` provides a clear and concise error message when the `sdkconfig` file is missing in the project. The property name follows the naming convention of the file, and the syntax is correct. --- `20-20`: **LGTM!** The new property `SDKConfigurationFileNotFound_Title` provides a short and descriptive title for the error message when the `sdkconfig` file is missing. The property name follows the naming convention of the file, and the syntax is correct.bundles/com.espressif.idf.sdk.config.ui/src/com/espressif/idf/sdk/config/ui/Messages.java (1)
`30-31`: **LGTM!** The addition of the new string declarations `SDKConfigFileNotFound_ErrorMessage` and `SDKConfigurationFileNotFound_Title` in the `Messages` class is a good enhancement. It aligns with the PR objective of adding a new menu configuration option and improves user experience by providing specific error messages when the SDK configuration file is not found.bundles/com.espressif.idf.sdk.config.ui/src/com/espressif/idf/sdk/config/ui/OpenSdkConfigEditor.java (3)
`16-63`: **LGTM!** The `OpenSdkConfigEditor` class is well-structured and follows the necessary steps to open the `sdkconfig` file in the editor. The class extends `AbstractHandler` and overrides the `execute` method to handle the execution event. It also includes a private `getCurrentProject` method to retrieve the current project containing the `sdkconfig` file. --- `21-45`: **LGTM!** The `execute` method is well-implemented and handles the necessary steps to open the `sdkconfig` file in the editor. It retrieves the active workbench page and the current project, checks for the existence of the `sdkconfig` file, and takes appropriate actions based on the file's presence. The error handling for `CoreException` is properly implemented, throwing an `ExecutionException` with a descriptive message. --- `47-62`: **LGTM!** The `getCurrentProject` method is well-implemented and correctly retrieves the current project containing the `sdkconfig` file. It iterates through all open projects in the workspace, checks if each project is open and contains the `sdkconfig` file, and returns the first project that meets the criteria. Returning `null` when no project is found is a valid approach, as the calling method (`execute`) handles the case when the current project is `null`.bundles/com.espressif.idf.sdk.config.ui/plugin.xml (2)
`42-47`: **LGTM!** The new command is correctly defined within the menu contribution. The command ID, icon, label, and style are all appropriately set. --- `57-61`: **Looks good!** The command is correctly defined with a matching ID, appropriate default handler, and a suitable name.
Description
Added menuconfig option in ESP-IDF menu list for projects
Fixes # (IEP-1252)
Type of change
Please delete options that are not relevant.
How has this been tested?
Create project and write click to see the Menu Config option in the ESP-IDF context menu and try to launch SDKConfig Editor using that
Test Configuration:
Checklist
Summary by CodeRabbit
New Features
Bug Fixes