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
93c4f10e
Commit
93c4f10e
authored
7 years ago
by
Vincent Aravantinos
Browse files
Options
Downloads
Patches
Plain Diff
YELLOW
parent
3fdd665b
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
+10
-35
10 additions, 35 deletions
...rg/fortiss/tooling/kernel/ui/util/ConstraintsUIUtils.java
with
10 additions
and
35 deletions
org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/ConstraintsUIUtils.java
+
10
−
35
View file @
93c4f10e
...
...
@@ -54,9 +54,8 @@ import org.fortiss.tooling.kernel.utils.EcoreUtils;
* @author aravantinos
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash:
97453A8CA6928F43F260FB918B4C1AA4
* @ConQAT.Rating YELLOW Hash:
B7B5322692639BE0093B6969ADC18BC6
*/
// TODO (FH): remove @params or document
public
class
ConstraintsUIUtils
{
/** Gathers some statuses by verification status. */
...
...
@@ -83,10 +82,7 @@ public class ConstraintsUIUtils {
}
}
/**
* @param constrained
* @return {@link ClassifiedStatuses} corresponding to <code>constrained</code>.
*/
/** Returns {@link ClassifiedStatuses} corresponding to <code>constrained</code>. */
public
static
ClassifiedStatuses
getClassifiedStatuses
(
IConstrained
constrained
)
{
ClassifiedStatuses
res
=
new
ClassifiedStatuses
();
for
(
ConstraintInstance
constraint
:
constrained
.
getConstraintInstances
())
{
...
...
@@ -108,10 +104,7 @@ public class ConstraintsUIUtils {
return
res
;
}
/**
* @param c
* @return {@link ESeverity} corresponding to the status of the constraint <code>c</code>
*/
/** Returns {@link ESeverity} corresponding to the status of the constraint <code>c</code> */
public
static
ESeverity
getConstraintSeverity
(
ConstraintInstance
c
)
{
IConstraintInstanceStatus
status
=
IConstraintUIService
.
getInstance
().
getStatus
(
c
);
if
(
IConstraintUIService
.
getInstance
().
shallDisplayAsWarning
(
c
))
{
...
...
@@ -132,10 +125,7 @@ public class ConstraintsUIUtils {
}
}
/**
* @param c
* @return Severity corresponding to the status of the constraints of <code>c</code>.
*/
/** Returns severity corresponding to the status of the constraints of <code>c</code>. */
public
static
ESeverity
getSeverity
(
IConstrained
c
)
{
try
{
return
c
.
getConstraintInstances
().
stream
().
map
(
cstr
->
getConstraintSeverity
(
cstr
))
...
...
@@ -146,12 +136,8 @@ public class ConstraintsUIUtils {
}
/**
* @param sev
* @param modelElement
* @return the maximum severity between <code>sev</code> and the severity resulting of possibly
* unsatisfied constraints on <code>modelElement</code>.
*
* Note: if, later on, {@link IConstraintViolation}
* Returns the maximum severity between <code>sev</code> and the severity resulting of possibly
* unsatisfied constraints on <code>modelElement</code>.
*/
public
static
ESeverity
augmentSeverityWithConstraintSeverity
(
ESeverity
sev
,
EObject
modelElement
)
{
...
...
@@ -210,9 +196,7 @@ public class ConstraintsUIUtils {
}
}
/**
* @return Standard text describing the status of <code>c</code>.
*/
/** Returns a standard text describing the status of <code>c</code>. */
public
static
String
getText
(
ConstraintInstance
c
)
{
if
(
c
==
null
)
{
return
""
;
...
...
@@ -231,10 +215,7 @@ public class ConstraintsUIUtils {
return
mainMsg
;
}
/**
* @param c
* @return Standard "hint" indicating possible action on the status of <code>c</code>.
*/
/** Returns a standard "hint" indicating possible action on the status of <code>c</code>. */
public
static
String
getHint
(
ConstraintInstance
c
)
{
if
(
c
==
null
)
{
return
""
;
...
...
@@ -248,10 +229,7 @@ public class ConstraintsUIUtils {
return
""
;
}
/**
* @param c
* @return Standard colour corresponding to the status of <code>c</code>.
*/
/** Returns a standard color corresponding to the status of <code>c</code>. */
public
static
Color
getColor
(
ConstraintInstance
c
)
{
Display
display
=
Display
.
getCurrent
();
if
(
c
==
null
)
{
...
...
@@ -313,10 +291,7 @@ public class ConstraintsUIUtils {
}
}
/**
* @param constraint
* @return <code>true</code> if <code>constraint</code> is active.
*/
/** Returns <code>true</code> iff <code>constraint</code> is active. */
public
static
boolean
isConstraintActive
(
ConstraintInstance
constraint
)
{
return
IConstraintUIService
.
getInstance
().
getStatus
(
constraint
)
!=
null
;
}
...
...
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