Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
af3
kernel
Commits
d9860f12
Commit
d9860f12
authored
11 years ago
by
Cheng Zhang
Browse files
Options
Downloads
Patches
Plain Diff
refactor code
refs 1494
parent
504f5ce4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/DataBindingUtils.java
+6
-12
6 additions, 12 deletions
.../org/fortiss/tooling/kernel/ui/util/DataBindingUtils.java
with
6 additions
and
12 deletions
org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/DataBindingUtils.java
+
6
−
12
View file @
d9860f12
...
...
@@ -224,7 +224,7 @@ public final class DataBindingUtils {
*/
public
static
Binding
[]
performComboBinding
(
DataBindingContext
dbc
,
Control
control
,
IObservableValue
modelValue
,
IConverter
modelToSelectionConverter
,
IConverter
selectionToModelConverter
)
{
IConverter
selectionToModelConverter
,
IValidator
validator
)
{
Binding
[]
bindings
=
new
Binding
[
1
];
...
...
@@ -235,8 +235,8 @@ public final class DataBindingUtils {
// use POLICY_UPDATE to actually perform the update
UpdateValueStrategy
selectionToModelStrategy
=
new
UpdateValueStrategy
(
true
,
UpdateValueStrategy
.
POLICY_UPDATE
)
.
setConverter
(
selectionToModelConverter
);
new
UpdateValueStrategy
(
true
,
UpdateValueStrategy
.
POLICY_UPDATE
)
.
setConverter
(
selectionToModelConverter
)
.
setAfterGetValidator
(
validator
)
;
// add the "normal" binding to actually update the model
bindings
[
0
]
=
...
...
@@ -257,24 +257,18 @@ public final class DataBindingUtils {
*
* @param dbc
* the data binding context to be used
* @param editor
* the SWT control
* @param text
* the SWT control
* @param cellValue
* the model element value to be observed
* @param modalToCellConverter
* the converter from the element to the control's text
* @param cellToModelConverter
* the converter from the control's text to the element
* @param textValidator
* the validator for the control's text
* @return the array of constructed bindings
*/
public
static
Binding
[]
performCellTextBinding
(
DataBindingContext
dbc
,
Control
control
,
IObservableValue
cellValue
,
IConverter
modalToCellConverter
,
IConverter
cellToModelConverter
,
IValidator
textV
alidator
)
{
IConverter
cellToModelConverter
,
IValidator
v
alidator
)
{
Binding
[]
bindings
=
new
Binding
[
2
];
...
...
@@ -285,8 +279,8 @@ public final class DataBindingUtils {
// use POLICY_UPDATE to actually perform the update
UpdateValueStrategy
cellToModelStrategyWithUpdate
=
new
UpdateValueStrategy
(
true
,
UpdateValueStrategy
.
POLICY_UPDATE
)
.
setConverter
(
cellToModelConverter
);
new
UpdateValueStrategy
(
true
,
UpdateValueStrategy
.
POLICY_UPDATE
)
.
setConverter
(
cellToModelConverter
)
.
setAfterGetValidator
(
validator
)
;
// add the "normal" binding to actually update the model
bindings
[
0
]
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment