-
Notifications
You must be signed in to change notification settings - Fork 133
IEP-1272 Improve UX in Build Settings Tab #1003
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
WalkthroughThe recent updates to Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration 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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/CMakeBuildTab2.java (9 hunks)
Additional comments not posted (7)
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/CMakeBuildTab2.java (7)
13-13: New Import Added: java.nio.file.PathThe addition of the
java.nio.file.Pathimport suggests that file path operations have been introduced in this class, likely to handle file paths more robustly, especially with the new features related to handling build and clean commands.
48-53: Introduction of Constants for CMake Arguments and MessagesThe addition of constants
LOCAL_CMAKE_ARGUMENTS,DEFAULT_CMAKE_MSG,DEFAULT_BUILD_MSG, andDEFAULT_CLEAN_MSGis a good practice for maintainability and readability. Using constants helps avoid magic strings throughout the code and makes future changes easier and less error-prone.
113-113: Set Default Messages for Text FieldsSetting default messages for
cmakeArgsText,buildCommandText, andcleanCommandTextenhances user experience by providing hints about what values are expected. This is a positive change that aligns with the PR's objective to improve user experience in the Build Settings tab.Also applies to: 121-121, 129-129
Line range hint
170-224: Handling of CMake Arguments with Absolute Project PathThe method
getCmakeArgumentsWithAbsProjectPathis used here to ensure that the CMake arguments are correctly formatted with absolute paths when necessary. This is crucial for ensuring that the build configuration is portable and not dependent on implicit path relations, which can vary between different environments and setups.
Line range hint
204-228: Robust Handling of Configuration Attributes in performApplyThe updates in the
performApplymethod to handle attributes related to CMake arguments, build commands, and clean commands more dynamically are commendable. These changes make the configuration more adaptable and maintainable. However, ensure that the conditions and logic here cover all edge cases, particularly with empty strings and null values.
260-260: Save and Restore Properties EnhancementsThe modifications in
savePropertiesandrestorePropertiesto includeLOCAL_CMAKE_ARGUMENTSenhance the persistence of user settings across sessions. This is a critical improvement for user experience, ensuring that users' configurations are reliably maintained.Also applies to: 286-286
355-374: Method to Process Absolute Project Paths in CMake ArgumentsThe implementation of
getCmakeArgumentsWithAbsProjectPathis a key part of handling the relative custom build folder paths. This method ensures that paths are handled correctly, which is crucial for the build process to function correctly in different environments. However, the method could be refined to handle potential edge cases and improve clarity.- String[] cmakeArgsArr = cmakeArgsText.getText().trim().replaceAll(" +", " ").split(" "); + String[] cmakeArgsArr = cmakeArgumets.split("\\s+"); // Simplify splitting logic - if (cmakeArgsArr[i].equals("-B") && i + 1 < cmakeArgsArr.length) + if ("-B".equals(cmakeArgsArr[i]) && i + 1 < cmakeArgsArr.length) // Use constant-time string comparisonEnsure that the method handles cases where the build folder might not follow immediately after
-Bdue to spaces or other command line arguments.
kolipakakondal
left a comment
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
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/CMakeBuildTab2.java
Show resolved
Hide resolved
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/CMakeBuildTab2.java
Show resolved
Hide resolved
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/CMakeBuildTab2.java (9 hunks)
Additional comments not posted (7)
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/CMakeBuildTab2.java (7)
48-53: LGTM! Constants improve readability and maintainability.The added constants help avoid hard-coded strings and improve code readability.
113-113: LGTM! Default messages provide context to the user.Setting default messages for the text fields helps users understand what values are expected.
Also applies to: 121-121, 129-129
170-171: LGTM! Ensures preference for local CMake arguments.The change aligns with the new functionality by preferring local CMake arguments over global ones.
Line range hint
204-224:
LGTM! Correctly sets CMake arguments with absolute paths.The change ensures that the CMake arguments are correctly set with absolute project paths when a project is available.
Also applies to: 228-228
260-260: LGTM! Saves local CMake arguments.The change aligns with the new functionality by saving local CMake arguments.
286-286: LGTM! Restores local CMake arguments.The change aligns with the new functionality by restoring local CMake arguments.
355-376: Fix the typo in the method name.The method name
getCmakeArgumentsWithAbsProjectPathcontains a typo. It should begetCmakeArgumentsWithAbsProjectPath.- private String getCmakeArgumentsWithAbsProjectPath(IProject project, String cmakeArgumets) + private String getCmakeArgumentsWithAbsProjectPath(IProject project, String cmakeArguments)Likely invalid or redundant comment.
|
@sigmaaa hi ! Tested under: Steps to reproduce: |
Hi @AndriiFilippov |
|
@sigmaaa LGTM |
Description
Fixes # (IEP-1272)
Type of change
Please delete options that are not relevant.
How has this been tested?
Test Configuration:
Dependent components impacted by this PR:
Checklist
Summary by CodeRabbit
New Features
Improvements