-
Notifications
You must be signed in to change notification settings - Fork 133
IEP-1109 Target provided based on target's id and not IDF target property #850
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 changes introduced in the codebase primarily focus on improving code readability and maintainability. A new constant Changes
Poem
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- bundles/com.espressif.idf.debug.gdbjtag.openocd/src/com/espressif/idf/debug/gdbjtag/openocd/ui/TabDebugger.java (3 hunks)
- bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/CMakeMainTab2.java (3 hunks)
Additional comments: 6
bundles/com.espressif.idf.debug.gdbjtag.openocd/src/com/espressif/idf/debug/gdbjtag/openocd/ui/TabDebugger.java (3)
103-103: The introduction of the constant
LAUNCH_TARGET_NAME_ATTRis a good practice as it improves code readability and maintainability. It also reduces the risk of typos and inconsistencies.278-280: The use of the constant
LAUNCH_TARGET_NAME_ATTRin the filter method is a good practice. It ensures that the attribute name is consistent throughout the code.553-555: The use of the constant
LAUNCH_TARGET_NAME_ATTRto retrieve the attribute value is a good practice. It ensures that the attribute name is consistent throughout the code.bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/CMakeMainTab2.java (3)
88-88: The new constant
LAUNCH_TARGET_NAME_ATTRis a good addition. It replaces the hardcoded attribute name, improving code readability and maintainability.746-749: The
getAttributemethod is now using the new constantLAUNCH_TARGET_NAME_ATTR. This is a good change as it makes the code more maintainable and less prone to errors.873-876: The
findFirstmethod now uses a filter based on the attribute value using the constantLAUNCH_TARGET_NAME_ATTR. This is a good change as it makes the code more readable and maintainable.
|
@sigmaaa hi ! Tested: LGTM 👍 |
|
|
||
| // ------------------------------------------------------------------------ | ||
|
|
||
| private static final String LAUNCH_TARGET_NAME_ATTR = "com.espressif.idf.launch.serial.core.idfTarget"; //$NON-NLS-1$ |
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.
had to write this attribute like this. Maybe we can use a single class in the core package to store all attributes there
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.
You can use IDFLaunchConstants.ATTR_IDF_TARGET
sigmaaa
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.
self reviewed
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
|
|
||
| // ------------------------------------------------------------------------ | ||
|
|
||
| private static final String LAUNCH_TARGET_NAME_ATTR = "com.espressif.idf.launch.serial.core.idfTarget"; //$NON-NLS-1$ |
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.
You can use IDFLaunchConstants.ATTR_IDF_TARGET
Description
To reproduce this issue: edit the launch target. For example for the esp32 target select the esp32s2 target and edit the esp32s2 target for esp32. After that edit the launch or debug configuration and change the target to esp32s2 or esp32 -> after finishing the dialog you will receive notification about incorrect target for jtag flashing
Fixes # (IEP-1109)
Type of change
Please delete options that are not relevant.
How has this been tested?
Test 1:
Test Configuration:
Dependent components impacted by this PR:
Checklist
Summary by CodeRabbit
runmethod to filter launch targets based on attribute value, enhancing the code's efficiency.