Skip to content
Snippets Groups Projects
Commit 65938837 authored by Vincent Aravantinos's avatar Vincent Aravantinos
Browse files

provides more defaults in the base class

refs 2553
parent dbc6d21d
No related branches found
No related tags found
No related merge requests found
......@@ -20,8 +20,9 @@ package org.fortiss.tooling.kernel.extension.base;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.tooling.kernel.extension.IConstraintVerifier;
import org.fortiss.tooling.kernel.model.constraints.IConstraint;
import org.fortiss.tooling.kernel.model.constraints.Constraint;
import org.fortiss.tooling.kernel.model.constraints.IConstraintVerificationStatus;
import org.fortiss.tooling.kernel.service.IConstraintVerificationService.IFix;
......@@ -31,14 +32,27 @@ import org.fortiss.tooling.kernel.service.IConstraintVerificationService.IFix;
* @author aravantinos
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 499E3262CA408F075CCF06E9B3172291
* @ConQAT.Rating YELLOW Hash: 2FA83556B62AFF67BF1D234A9E7A4467
*/
public abstract class ConstraintVerifierBase<T extends IConstraint> implements
IConstraintVerifier<T> {
public abstract class ConstraintVerifierBase implements IConstraintVerifier {
/** {@inheritDoc} */
@Override
public List<IFix> fixes(T constraint, IConstraintVerificationStatus status) {
public void removeConstraintIrrelevantContent(EObject obj) {
// By default, we do nothing. Should be adapted in general but makes the first developments
// of a verifier easier.
}
/** {@inheritDoc} */
@Override
public void cancel(Constraint constraint) {
// By default, we do nothing. Not all constraints are so heavy that they deserve to have a
// cancellation procedure.
}
/** {@inheritDoc} */
@Override
public List<IFix> fixes(Constraint constraint, IConstraintVerificationStatus status) {
// No fix by default
return new ArrayList<IFix>();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment