Skip to content

Package: ModelQuickFixRegistry

ModelQuickFixRegistry

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2014 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: * Alexandra Buzila - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.quickfix;
15:
16: import java.util.List;
17:
18: import org.eclipse.emf.common.util.Diagnostic;
19:
20: /**
21: * Registry for model quick fixes.
22: *
23: * @author Alexandra Buzila
24: *
25: */
26: public interface ModelQuickFixRegistry {
27:
28:         /**
29:          * Register a {@link ModelQuickFix} implementation.
30:          *
31:          * @param modelQuickFix - the implementation to register
32:          */
33:         void registerModelQuickFix(ModelQuickFix modelQuickFix);
34:
35:         /**
36:          * @param diagnostic - the diagnostic
37:          * @return a list of {@link ModelQuickFix} objects, applicable for the given diagnostic. The list is
38:          * ordered by the priority of the quick fixes, in descending order.
39:          */
40:         List<ModelQuickFix> getApplicableModelQuickFixes(Diagnostic diagnostic);
41:
42:         /** @return all the quick fixes contained in the registry. */
43:         List<ModelQuickFix> getAllModelQuickFixes();
44:
45: }