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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
af3
kernel
Commits
ea08c647
Commit
ea08c647
authored
May 11, 2016
by
Vincent Aravantinos
Browse files
Options
Downloads
Patches
Plain Diff
embeds verification in a command
refs 2553
parent
c3c3de8a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConstraintVerificationService.java
+15
-6
15 additions, 6 deletions
...ooling/kernel/internal/ConstraintVerificationService.java
with
15 additions
and
6 deletions
org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConstraintVerificationService.java
+
15
−
6
View file @
ea08c647
...
...
@@ -21,12 +21,14 @@ import org.eclipse.emf.ecore.resource.ResourceSet;
import
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
;
import
org.fortiss.tooling.kernel.ToolingKernelActivator
;
import
org.fortiss.tooling.kernel.extension.IConstraintVerifier
;
import
org.fortiss.tooling.kernel.extension.data.ITopLevelElement
;
import
org.fortiss.tooling.kernel.model.constraints.ConstrainedWithChecksum
;
import
org.fortiss.tooling.kernel.model.constraints.ConstraintsFactory
;
import
org.fortiss.tooling.kernel.model.constraints.IConstrained
;
import
org.fortiss.tooling.kernel.model.constraints.IConstraint
;
import
org.fortiss.tooling.kernel.model.constraints.IConstraintVerificationStatus
;
import
org.fortiss.tooling.kernel.service.IConstraintVerificationService
;
import
org.fortiss.tooling.kernel.service.IPersistencyService
;
import
org.fortiss.tooling.kernel.service.base.EObjectAwareServiceBase
;
import
org.fortiss.tooling.kernel.utils.EcoreUtils
;
import
org.fortiss.tooling.kernel.utils.LoggingUtils
;
...
...
@@ -37,7 +39,7 @@ import org.fortiss.tooling.kernel.utils.LoggingUtils;
* @author aravantinos
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash:
3B08090E073A0A96815E002991A128A7
* @ConQAT.Rating YELLOW Hash:
101AAAD68A0AC283E6B4772998186B71
*/
public
final
class
ConstraintVerificationService
extends
EObjectAwareServiceBase
<
IConstraintVerifier
<
IConstraint
>>
implements
...
...
@@ -48,12 +50,19 @@ public final class ConstraintVerificationService extends
public
void
verify
(
IConstraint
constraint
)
{
IConstraintVerifier
<
IConstraint
>
verifier
=
getFirstVerifier
(
constraint
);
if
(
verifier
!=
null
)
{
ITopLevelElement
modelContext
=
IPersistencyService
.
INSTANCE
.
getTopLevelElementFor
(
constraint
);
modelContext
.
runAsCommand
(
new
Runnable
()
{
@Override
public
void
run
()
{
verifier
.
verify
(
constraint
);
// Updating checksums must be done *after* verification because the verification
can
//
have side effects.
// Updating checksums must be done *after* verification because the verification
// can
have side effects.
updateChecksums
(
constraint
);
constraint
.
getVerificationStatus
().
setConstraint
(
constraint
);
}
});
}
}
/** {@inheritDoc} */
...
...
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
sign in
to comment