-
Notifications
You must be signed in to change notification settings - Fork 221
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
base: master
Are you sure you want to change the base?
Binding expression edition support (no resolution / string only) #279
Conversation
Hello, I wonder if someone can take some time to give it a look |
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? |
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 |
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.
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 |
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.
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 |
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.
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(); |
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.
Make sure to use 'spaces' instead of 'tabs'. There are multiple other places where tabs have been introduced.
7c0a0f0
to
fd0a426
Compare
This pull request allow edition of binding expression for string values only.
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
If the field containing the binding expression is shown in the scene view. It won't be resolved and can't be edited
If the field containing the binding expression is shown in the previex view. It won't be resolved and can't be edited
#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