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
c389c2e8
Commit
c389c2e8
authored
8 years ago
by
Vincent Aravantinos
Browse files
Options
Downloads
Patches
Plain Diff
adapts UI utils
refs 2726
parent
55bc0937
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/ConstraintsUIUtils.java
+8
-11
8 additions, 11 deletions
...rg/fortiss/tooling/kernel/ui/util/ConstraintsUIUtils.java
with
8 additions
and
11 deletions
org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/ConstraintsUIUtils.java
+
8
−
11
View file @
c389c2e8
...
...
@@ -35,7 +35,6 @@ import org.eclipse.swt.widgets.Shell;
import
org.fortiss.tooling.kernel.extension.IConstraint
;
import
org.fortiss.tooling.kernel.extension.data.IConstraintViolation
;
import
org.fortiss.tooling.kernel.extension.data.IConstraintViolation.ESeverity
;
import
org.fortiss.tooling.kernel.model.constraints.ConstrainedWithChecksum
;
import
org.fortiss.tooling.kernel.model.constraints.ConstraintInstance
;
import
org.fortiss.tooling.kernel.model.constraints.ErrorConstraintInstanceStatus
;
import
org.fortiss.tooling.kernel.model.constraints.FailedConstraintInstanceStatus
;
...
...
@@ -53,7 +52,7 @@ import org.fortiss.tooling.kernel.utils.EcoreUtils;
* @author aravantinos
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash:
DFE7BB929A7FFD5E807F6C4B873BE83E
* @ConQAT.Rating YELLOW Hash:
B0B5292B6B483943B7569735FD98865D
*/
public
class
ConstraintsUIUtils
{
...
...
@@ -171,9 +170,7 @@ public class ConstraintsUIUtils {
// We first collect separately the constrained objects because - unfortunately for some
// unknown reason - the following notification seems to trigger a change of the list of
// constrained objects.
for
(
ConstrainedWithChecksum
cwc
:
ci
.
getConstrainedsWithChecksum
())
{
constraineds
.
add
(
cwc
.
getConstrained
());
}
constraineds
.
addAll
(
ci
.
getConstraineds
());
constraineds
.
stream
().
forEach
(
constrained
->
{
if
(
constrained
!=
null
)
{
EcoreUtils
.
postRefreshNotification
(
constrained
);
...
...
@@ -188,9 +185,9 @@ public class ConstraintsUIUtils {
public
static
void
triggerMarkersRefresh
(
List
<
ConstraintInstance
>
cis
)
{
Set
<
IConstrained
>
constraineds
=
new
HashSet
<
IConstrained
>();
for
(
ConstraintInstance
ci
:
cis
)
{
for
(
Constrained
WithChecksum
cwc
:
ci
.
getConstraineds
WithChecksum
())
{
if
(
c
wc
.
getConstrained
()
!=
null
)
{
constraineds
.
add
(
c
wc
.
getConstrained
()
);
for
(
I
Constrained
cstrd
:
ci
.
getConstraineds
())
{
if
(
c
strd
!=
null
)
{
constraineds
.
add
(
c
strd
);
}
}
}
...
...
@@ -215,7 +212,7 @@ public class ConstraintsUIUtils {
*/
public
static
String
getText
(
ConstraintInstance
c
)
{
if
(
c
==
null
)
{
return
"
NOT APPLICABLE
"
;
return
""
;
}
String
mainMsg
=
"ERROR"
;
IConstraintInstanceStatus
status
=
IConstraintUIService
.
getInstance
().
getStatus
(
c
);
...
...
@@ -255,11 +252,11 @@ public class ConstraintsUIUtils {
public
static
Color
getColor
(
ConstraintInstance
c
)
{
Display
display
=
Display
.
getCurrent
();
if
(
c
==
null
)
{
return
display
.
getSystemColor
(
SWT
.
COLOR_WIDGET_BACKGROUND
)
;
return
null
;
}
IConstraintInstanceStatus
status
=
IConstraintUIService
.
getInstance
().
getStatus
(
c
);
if
(
status
==
null
)
{
return
display
.
getSystemColor
(
SWT
.
COLOR_WIDGET_BACKGROUND
)
;
return
null
;
}
else
if
(
status
instanceof
FailedConstraintInstanceStatus
||
status
instanceof
ErrorConstraintInstanceStatus
)
{
return
display
.
getSystemColor
(
SWT
.
COLOR_RED
);
...
...
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