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
d55046b3
Commit
d55046b3
authored
8 years ago
by
Vincent Aravantinos
Browse files
Options
Downloads
Patches
Plain Diff
improves constraint verifier base in case no specific error messages have been defined
refs 2553
parent
c1d65364
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/extension/base/ConstraintVerifierUIBase.java
+9
-5
9 additions, 5 deletions
...ng/kernel/ui/extension/base/ConstraintVerifierUIBase.java
with
9 additions
and
5 deletions
org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/base/ConstraintVerifierUIBase.java
+
9
−
5
View file @
d55046b3
...
...
@@ -36,9 +36,11 @@ import org.fortiss.tooling.kernel.model.constraints.FailVerificationStatus;
import
org.fortiss.tooling.kernel.model.constraints.IConstraint
;
import
org.fortiss.tooling.kernel.model.constraints.IConstraintVerificationStatus
;
import
org.fortiss.tooling.kernel.model.constraints.OutdatedVerificationStatus
;
import
org.fortiss.tooling.kernel.model.constraints.SuccessVerificationStatus
;
import
org.fortiss.tooling.kernel.service.IConstraintVerificationService
;
import
org.fortiss.tooling.kernel.service.IConstraintVerificationService.IFix
;
import
org.fortiss.tooling.kernel.ui.extension.IConstraintVerifierUI
;
import
org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService
;
/**
* Base class for constraint verification GUI.
...
...
@@ -46,7 +48,7 @@ import org.fortiss.tooling.kernel.ui.extension.IConstraintVerifierUI;
* @author vincent
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash:
5C9927F236301634847D916815662784
* @ConQAT.Rating YELLOW Hash:
2CAFC35BCE6941999C382DCE461140F1
*/
public
class
ConstraintVerifierUIBase
<
T
extends
IConstraint
>
implements
IConstraintVerifierUI
<
T
>
{
...
...
@@ -83,7 +85,7 @@ public class ConstraintVerifierUIBase<T extends IConstraint> implements IConstra
/** {@inheritDoc} */
@Override
public
boolean
canOpen
(
IConstraintVerificationStatus
status
)
{
return
(
status
instanceof
Outdated
VerificationStatus
);
return
(
!(
status
instanceof
Success
VerificationStatus
)
)
;
}
/** Dialog presenting the error/failure and the possible fix(es). */
...
...
@@ -161,8 +163,10 @@ public class ConstraintVerifierUIBase<T extends IConstraint> implements IConstra
/** {@inheritDoc} */
@Override
public
String
getMessage
(
IConstraintVerificationStatus
status
)
{
// By default, no message. To be specialized by inheriting classes.
return
null
;
public
String
getMessage
(
IConstraintVerificationStatus
s
)
{
// Default message. Inheriting classes SHOULD specialize.
String
name
=
IModelElementHandlerService
.
INSTANCE
.
getName
(
s
.
getConstraint
());
String
pre
=
s
instanceof
FailVerificationStatus
?
"Error while checking"
:
"Unsatisfied"
;
return
pre
+
" constraint"
+
(
name
==
null
?
"."
:
": "
+
name
);
}
}
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