Skip to content

Package: DiagnosticFilter

DiagnosticFilter

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2017 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Mat Hansen - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.common.spi.validation.filter;
15:
16: import org.eclipse.emf.common.util.Diagnostic;
17: import org.eclipse.emf.ecore.EObject;
18:
19: /**
20: * Interface that allows filtering of {@link Diagnostic}s.
21: * See ValidationService#registerValidationFilter(ValidationFilter).
22: *
23: * @author Mat Hansen <mhansen@eclipsesource.com>
24: */
25: public interface DiagnosticFilter extends ValidationFilter {
26:
27:         /**
28:          * Return true if the given {@link Diagnostic} should be ignored.
29:          * Ignored {@link Diagnostic}s will not appear in the output of ValidationService#validate(EObject).
30:          *
31:          * @param eObject the {@link EObject} that has been validated
32:          * @param diagnostic the {@link Diagnostic} as a result of the validation of the given {@link EObject}
33:          * @return true if the given {@link Diagnostic} should not be included in the output
34:          * of ValidationService#validate(EObject)
35:          */
36:         boolean ignoreDiagnostic(EObject eObject, Diagnostic diagnostic);
37:
38: }