29
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2005, 2006 IBM Corporation and others.
|
|
3 * All rights reserved. This program and the accompanying materials
|
|
4 * are made available under the terms of the Eclipse Public License v1.0
|
|
5 * which accompanies this distribution, and is available at
|
|
6 * http://www.eclipse.org/legal/epl-v10.html
|
|
7 *
|
|
8 * Contributors:
|
|
9 * IBM Corporation - initial API and implementation
|
|
10 * Port to the D programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 module dwtx.jface.fieldassist.IContentProposalProvider;
|
|
14
|
|
15 import dwtx.jface.fieldassist.IContentProposal;
|
|
16
|
|
17 import dwt.dwthelper.utils;
|
|
18
|
|
19 /**
|
|
20 * IContentProposalProvider provides an array of IContentProposals that are
|
|
21 * appropriate for a textual dialog field, given the field's current content and
|
|
22 * the current cursor position.
|
|
23 *
|
|
24 * @since 3.2
|
|
25 */
|
|
26 public interface IContentProposalProvider {
|
|
27
|
|
28 /**
|
|
29 * Return an array of Objects representing the valid content proposals for a
|
|
30 * field.
|
|
31 *
|
|
32 * @param contents
|
|
33 * the current contents of the text field
|
|
34 * @param position
|
|
35 * the current position of the cursor in the contents
|
|
36 *
|
|
37 * @return the array of {@link IContentProposal} that represent valid
|
|
38 * proposals for the field.
|
|
39 */
|
|
40 IContentProposal[] getProposals(String contents, int position);
|
|
41 }
|