Skip to content
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

Binding expression edition support (no resolution / string only) #279

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

treilhes
Copy link

@treilhes treilhes commented Jul 19, 2020

This pull request allow edition of binding expression for string values only.

imageimage

If the field containing the binding expression is shown in the hierarchy view. It won't be resolved and can't be edited
The warning is kept to inform the user about the presence of a binding expression
image

If the field containing the binding expression is shown in the scene view. It won't be resolved and can't be edited
imageimage

If the field containing the binding expression is shown in the previex view. It won't be resolved and can't be edited
image

#89 seems partialy solved, at least for string fields
#97 binding expression in fields other than string still generate an exception and prevent moving components

Please, feel free to comment or require modifications on this pull request

@treilhes
Copy link
Author

Hello, I wonder if someone can take some time to give it a look

@johanvos johanvos self-requested a review December 1, 2020 11:52
@abhinayagarwal
Copy link
Collaborator

Hi @treilhes,

Thank you for the exemplary work in the PR. I am trying to understand the target of the PR. Will binding expression resolution be added as a part of this PR?

@treilhes
Copy link
Author

treilhes commented Dec 1, 2020

It will add binding expression support only for String typed fields. The pull request allows SceneBuilder to show binding expression in the editor (aka ${something}) without trying to resolve it and generate an exception

Copy link
Collaborator

@abhinayagarwal abhinayagarwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I have left an initial list of review comments. Please update the license header on every file. I will do more extensive review soon.

@@ -70,6 +70,7 @@ label.qualifier.vertical = (垂直)
# -----------------------------------------------------------------------------
log.info.explore.jar = JAR {0}の探索を開始
log.warning.inline.edit.internationalized.strings = 国際化された文字列をインライン編集できません
log.warning.inline.edit.bindingexpression.strings = Can''t inline edit binding expression strings
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Can''t/Can't

@@ -72,6 +72,7 @@ log.info.explore.end = End exploring {0}
log.info.explore.folder = Start exploring FOLDER {0}
log.info.explore.jar = Start exploring JAR {0}
log.warning.inline.edit.internationalized.strings = Can''t inline edit internationalized strings
log.warning.inline.edit.bindingexpression.strings = Can''t inline edit binding expression strings
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Can''t/Can't

@@ -121,6 +138,8 @@ public Object getValue() {
String val = textNode.getText();
if (i18nMode) {
val = new PrefixedValue(PrefixedValue.Type.RESOURCE_KEY, val).toString();
} else if (exprMode) {
val = new PrefixedValue(PrefixedValue.Type.BINDING_EXPRESSION, val).toString();
Copy link
Collaborator

@abhinayagarwal abhinayagarwal Dec 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to use 'spaces' instead of 'tabs'. There are multiple other places where tabs have been introduced.

@abhinayagarwal abhinayagarwal force-pushed the master branch 2 times, most recently from 7c0a0f0 to fd0a426 Compare March 30, 2021 03:22
@abhinayagarwal abhinayagarwal added the enhancement New feature or request label Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA signed enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants