-
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-1346 Make it possible to copy values from fields with dynamic variables #1068
Conversation
WalkthroughThe Changes
Suggested reviewers
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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: 1
🧹 Outside diff range and nitpick comments (3)
bundles/com.espressif.idf.swt.custom/src/com/espressif/idf/swt/custom/TextWithButton.java (3)
62-62
: Improve the clarity of the inline commentThe current comment at line 62 can be rephrased for better readability and understanding.
Apply this diff to enhance the comment:
- // text is not editable means that the button isn't pressed now and we have to show dynamic variables + // If the text is not editable, display the dynamic variables
69-75
: Ensure consistent exception handlingWhile the
try
block correctly attempts string substitution, consider handling the exception more gracefully or providing user feedback in case of failure.Optionally, you could inform the user if the substitution fails:
try { text.setText(VariablesPlugin.getDefault().getStringVariableManager() .performStringSubstitution((textWithDynamicVariables), false)); + } + catch (CoreException e1) + { + Logger.log(e1); + MessageDialog.openError(parent.getShell(), "Error", "Failed to resolve dynamic variables."); } - catch (CoreException e1) - { - Logger.log(e1); - }This provides a better user experience by notifying them of the issue.
107-112
: Clarify the method comment in 'getText()'The comment above the
getText()
method states "Always return text with dynamic variables," but the method returnstextWithDynamicVariables
only when the text is not editable.Consider updating the comment for accuracy:
- /* - * Always return text with dynamic variables. - */ + /** + * Returns the original text with dynamic variables when not resolved. + * If dynamic variables are resolved (text is not editable), returns the resolved text. + */
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- bundles/com.espressif.idf.swt.custom/src/com/espressif/idf/swt/custom/TextWithButton.java (3 hunks)
🧰 Additional context used
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
@AndriiFilippov Please take a look. |
@sigmaaa hi! Tested: Add a variable from the list and try displaying it with 'eye'—nothing happens. |
Hi @AndriiFilippov, I don't have a fix for it right now. Since this issue is not caused by this pr, let's handle it in the separate issue |
@sigmaaa hi ! Tested: LGTM 👍 |
Description
Previously, when we clicked a button in a text box to show a dynamic variable, we had to hold it down. Users can now click on it once and the dynamic variables will be resolved, but the text will not be editable.
Fixes # (IEP-1346)
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