Skip to content

Package: AutocompleteViewModelService

AutocompleteViewModelService

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2015 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: * Johannes Faltermeier - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.spi.swt.control.text.autocomplete.viewservice;
15:
16: import java.util.List;
17:
18: import org.eclipse.emf.ecore.EAttribute;
19: import org.eclipse.emf.ecore.EObject;
20: import org.eclipse.emf.ecp.view.spi.context.ViewModelService;
21:
22: /**
23: * A {@link ViewModelService} which returns a list of proposals for a setting of an {@link EObject} and an
24: * {@link EAttribute}.
25: *
26: * @author jfaltermeier
27: *
28: */
29: public interface AutocompleteViewModelService extends ViewModelService {
30:
31:         /**
32:          * Returns a list of possible values for the given setting. This method is not expected to return <code>null</code>
33:          * values.
34:          *
35:          * @param object the {@link EObject}
36:          * @param attribute the {@link EAttribute}
37:          * @return a list of proposals for the setting
38:          */
39:         List<String> getProposals(EObject object, EAttribute attribute);
40:
41: }