Skip to content

Comments

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

Open
treilhes wants to merge 2 commits intogluonhq:masterfrom
treilhes:feature/BindingExpressionSupport
Open

Binding expression edition support (no resolution / string only)#279
treilhes wants to merge 2 commits intogluonhq:masterfrom
treilhes:feature/BindingExpressionSupport

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.

# -----------------------------------------------------------------------------
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

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

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