Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
af3
AF3
Commits
88282bd5
Commit
88282bd5
authored
Oct 26, 2017
by
Sudeep Kanav
Browse files
RED
refs 2248
parent
2775c3be
Changes
1
Show whitespace changes
Inline
Side-by-side
org.fortiss.af3.expression.ui/trunk/src/org/fortiss/af3/expression/ui/properties/EnumerationMemberPropertySection.java
View file @
88282bd5
...
...
@@ -26,6 +26,7 @@ import java.util.stream.Collectors;
import
org.apache.commons.lang.StringUtils
;
import
org.eclipse.core.databinding.observable.value.IObservableValue
;
import
org.eclipse.jface.databinding.swt.ISWTObservableValue
;
import
org.eclipse.jface.databinding.swt.SWTObservables
;
import
org.eclipse.swt.SWT
;
import
org.eclipse.swt.widgets.Button
;
...
...
@@ -44,7 +45,7 @@ import org.fortiss.tooling.kernel.ui.extension.base.PropertySectionBase;
* @author eder
* @author $Author$
* @version $Rev$
* @ConQAT.Rating
YELLOW
Hash:
F4E14E576A2B3A5DAE9057BBDB67680
C
* @ConQAT.Rating
RED
Hash:
BECACA0D25288CB31FD0F0579E0F2E4
C
*/
public
final
class
EnumerationMemberPropertySection
extends
PropertySectionBase
{
...
...
@@ -57,12 +58,13 @@ public final class EnumerationMemberPropertySection extends PropertySectionBase
/** Text section showing the traces */
private
Text
showTraces
;
// TODO (SK,4) Please rephrase
/** enumeration member implement the requirement correctly check button. */
private
Button
enumerationMemberImplReqButton
;
/** Label for the "enumeration member implement requirement" text. */
private
Label
enumerationMemberImplreqLabel
;
/**
f
or capturing the external relation specification */
/**
F
or capturing the external relation specification */
ExternalRelationSpecification
spec
;
/** {@inheritDoc} */
...
...
@@ -82,6 +84,7 @@ public final class EnumerationMemberPropertySection extends PropertySectionBase
@Override
protected
void
setSectionInput
(
Object
input
)
{
member
=
(
EnumerationMember
)
input
;
// TODO (SK,19) following expression should be refactored.
traces
=
pickInstanceOf
(
ExternalRelationSpecification
.
class
,
member
.
getSpecifications
())
.
stream
()
...
...
@@ -98,6 +101,8 @@ public final class EnumerationMemberPropertySection extends PropertySectionBase
if
(
pickInstanceOf
(
ExternalRelationSpecification
.
class
,
member
.
getSpecifications
()).
get
(
0
)
!=
null
)
{
// get(0) is to get the first instance of the externalRelationSpecification
// TODO (SK,20) pickInstanceOf(ExternalRelationSpecification.class,
// member.getSpecifications()) is used 3 times. Please make a local variable for it.
spec
=
pickInstanceOf
(
ExternalRelationSpecification
.
class
,
member
.
getSpecifications
()).
get
(
0
);
...
...
@@ -110,11 +115,12 @@ public final class EnumerationMemberPropertySection extends PropertySectionBase
public
void
refresh
()
{
super
.
refresh
();
if
(
spec
!=
null
)
{
IObservableValue
modelObservable
1
=
IObservableValue
modelObservable
=
observeValue
(
spec
,
EXTERNAL_RELATION_SPECIFICATION__REQUIREMENT_IMPLEMENTED_CORRECTLY
);
dbc
.
bindValue
(
SWTObservables
.
observeSelection
(
enumerationMemberImplReqButton
),
modelObservable1
,
null
,
null
);
ISWTObservableValue
swtObservable
=
SWTObservables
.
observeSelection
(
enumerationMemberImplReqButton
);
dbc
.
bindValue
(
swtObservable
,
modelObservable
,
null
,
null
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment