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
d6783018
Commit
d6783018
authored
Sep 13, 2017
by
Johannes Eder
Browse files
gui of reworked synthesis view base
parent
6f25618e
Changes
1
Hide whitespace changes
Inline
Side-by-side
org.fortiss.af3.exploration.ui/trunk/src/org/fortiss/af3/exploration/ui/perspective/generic/SynthesisViewBase2.java
View file @
d6783018
...
...
@@ -20,7 +20,11 @@ package org.fortiss.af3.exploration.ui.perspective.generic;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
org.conqat.ide.commons.ui.selection.SelectionUtils
;
import
org.eclipse.jface.viewers.ArrayContentProvider
;
import
org.eclipse.jface.viewers.CheckboxTreeViewer
;
import
org.eclipse.jface.viewers.ISelectionChangedListener
;
import
org.eclipse.jface.viewers.SelectionChangedEvent
;
import
org.eclipse.swt.SWT
;
import
org.eclipse.swt.events.KeyEvent
;
import
org.eclipse.swt.events.KeyListener
;
...
...
@@ -161,8 +165,38 @@ public abstract class SynthesisViewBase2 extends DSEPerspectiveViewBase {
synthesisComposite
.
explorationTimeoutText
.
addVerifyListener
(
new
TimeoutVerifyListener
());
synthesisComposite
.
validityTimeoutText
.
addVerifyListener
(
new
TimeoutVerifyListener
());
synthesisComposite
.
explorationTimeoutText
.
addKeyListener
(
new
TimeoutKeyListener
());
synthesisComposite
.
constraintSetsTable
.
addSelectionChangedListener
(
new
ConstraintObjectiveRuleSetListener
(
synthesisComposite
.
constraintsTree
));
synthesisComposite
.
objectiveSetsTable
.
addSelectionChangedListener
(
new
ConstraintObjectiveRuleSetListener
(
synthesisComposite
.
objectivesTree
));
}
/**
* Listener for updating the constraints objectives in the lower part due to {@link RuleSet}
* selection in the upper part.
*/
private
class
ConstraintObjectiveRuleSetListener
implements
ISelectionChangedListener
{
/** The {@link CheckboxTreeViewer} to be updated. */
private
CheckboxTreeViewer
checkboxTableViewer
;
/** Constructor. */
public
ConstraintObjectiveRuleSetListener
(
CheckboxTreeViewer
checkboxTableViewer
)
{
this
.
checkboxTableViewer
=
checkboxTableViewer
;
}
/** {@inheritDoc} */
@Override
public
void
selectionChanged
(
SelectionChangedEvent
event
)
{
RuleSet
explorationSpecificationSubSet
=
SelectionUtils
.
checkAndPickFirst
(
event
.
getSelection
(),
RuleSet
.
class
);
checkboxTableViewer
.
setCheckedElements
(
explorationSpecificationSubSet
.
getExplorationTargets
().
toArray
());
}
}
/** Listener verifying the text in the timeout text field. */
...
...
Write
Preview
Supports
Markdown
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