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
6671028c
Commit
6671028c
authored
8 years ago
by
Vincent Aravantinos
Browse files
Options
Downloads
Patches
Plain Diff
triggers markers refresh directly in the service after opening status
comments refs 2553
parent
bb3fcfea
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/internal/ConstraintVerificationUIService.java
+27
-20
27 additions, 20 deletions
...g/kernel/ui/internal/ConstraintVerificationUIService.java
with
27 additions
and
20 deletions
org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/ConstraintVerificationUIService.java
+
27
−
20
View file @
6671028c
...
...
@@ -36,7 +36,7 @@ import org.fortiss.tooling.kernel.utils.LoggingUtils;
* @author aravantinos
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash:
220B5753C9EEEF2B9E972690D285AFA9
* @ConQAT.Rating YELLOW Hash:
3F14A57863E8C0447B2BE1CFD412BBDD
*/
public
final
class
ConstraintVerificationUIService
extends
EObjectAwareServiceBase
<
IConstraintVerifierUI
<
IConstraint
>>
implements
...
...
@@ -64,6 +64,7 @@ public final class ConstraintVerificationUIService extends
public
void
openStatus
(
IConstraintVerificationStatus
status
)
{
IConstraintVerifierUI
<
IConstraint
>
verifier
=
getFirstVerifier
(
status
.
getConstraint
());
verifier
.
openStatus
(
status
);
ConstraintsUtils
.
triggerMarkersRefresh
(
status
.
getConstraint
());
}
/** {@inheritDoc} */
...
...
@@ -130,27 +131,14 @@ public final class ConstraintVerificationUIService extends
/**
* @param constraint
* @param notification
* If <code>constraint</code> is outdated because its verification status has
* just been changed, we do not want to change the status to outdated...
*/
private
boolean
skipConstraintSelfNotification
(
IConstraint
constraint
,
Notification
notification
)
{
String
n
=
ConstraintsPackage
.
eINSTANCE
.
getIConstraint_VerificationStatus
().
getName
();
if
(
notification
.
getNotifier
()
!=
null
&&
notification
.
getNotifier
().
equals
(
constraint
))
{
if
(
notification
.
getFeature
()
instanceof
EReference
)
{
return
(
n
.
equals
(((
ENamedElement
)
notification
.
getFeature
()).
getName
()));
}
}
return
false
;
}
/**
* @param constraint
* @return <code>true</code> if <code>constraint</code> is outdated and has been handled as
* such.
* Checks if <code>notification</code> denotes a change entailing that
* <code>constraint</code> is outdated. If so updates the status to outdated or
* triggers an automatic check if the constraint is {@link IAutoCheck}.
* @return <code>true</code> iff <code>notification</code> indeed entailed that
* <code>constraint</code> is outdated.
*/
private
boolean
constraintOutdated
(
IConstraint
constraint
,
Notification
notification
)
{
if
(
skip
ConstraintSelf
Notification
(
constraint
,
notification
))
{
if
(
skip
StatusChange
Notification
(
constraint
,
notification
))
{
return
false
;
}
if
(!
IConstraintVerificationService
.
INSTANCE
.
isUpToDate
(
constraint
))
{
...
...
@@ -166,11 +154,30 @@ public final class ConstraintVerificationUIService extends
}
else
if
(!(
constraint
.
getVerificationStatus
()
instanceof
OutdatedVerificationStatus
))
{
ConstraintsUtils
.
createOutdatedVerificationStatus
(
constraint
);
}
// Update GUI markers
ConstraintsUtils
.
triggerMarkersRefresh
(
constraint
);
return
true
;
}
return
false
;
}
/**
* @param constraint
* @param notification
* @return true iff <code>notification</code> denotes a change of the
* <code>constraint</code>'s status.
*/
private
boolean
skipStatusChangeNotification
(
IConstraint
constraint
,
Notification
notification
)
{
String
n
=
ConstraintsPackage
.
eINSTANCE
.
getIConstraint_VerificationStatus
().
getName
();
if
(
notification
.
getNotifier
()
!=
null
&&
notification
.
getNotifier
().
equals
(
constraint
))
{
if
(
notification
.
getFeature
()
instanceof
EReference
)
{
return
(
n
.
equals
(((
ENamedElement
)
notification
.
getFeature
()).
getName
()));
}
}
return
false
;
}
/**
* @param notification
* @param constrained
...
...
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