Skip to content

Package: EStructuralFeatureSelectionValidator

EStructuralFeatureSelectionValidator

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2019 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: * Lucas Koehler - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.spi.editor.controls;
15:
16: import org.eclipse.emf.ecore.EStructuralFeature;
17:
18: /**
19: * Used to check whether a selected {@link EStructuralFeature} is a valid selection in a wizard.
20: * <p>
21: * Implemented by clients to specify the validation criteria.
22: *
23: * @author Lucas Koehler
24: * @since 1.20
25: *
26: */
27: @FunctionalInterface
28: public interface EStructuralFeatureSelectionValidator {
29:
30:         /**
31:          * Checks whether the given {@link EStructuralFeature} constitutes a valid selection.
32:          *
33:          * @param structuralFeature The selected {@link EStructuralFeature} to be validated
34:          * @return The error message, or <code>null</code> if the selection is valid
35:          */
36:         String isValid(EStructuralFeature structuralFeature);
37: }