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

introduces a new base class to make it easier to transition from the old system

refs 2334
parent cd7b492a
No related branches found
No related tags found
No related merge requests found
/*--------------------------------------------------------------------------+
$Id$
| |
| Copyright 2016 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
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.Constraint;
import org.fortiss.tooling.kernel.model.constraints.IConstraintVerificationStatus;
import org.fortiss.tooling.kernel.service.IConstraintVerificationService.IFix;
/**
* Base for {@link IConstraintVerifier}.
*
* @author aravantinos
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 2FA83556B62AFF67BF1D234A9E7A4467
*/
public abstract class ConstraintVerifierBase implements IConstraintVerifier {
/** {@inheritDoc} */
@Override
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