Skip to main content
summaryrefslogtreecommitdiffstats
blob: 921f25c173565213fa3539cdc57e747abe9383a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package org.eclipse.jdt.core;

public interface ICodeAssist {
/**
 * Performs code completion at the given offset position in this compilation unit,
 * reporting results to the given completion requestor. The <code>offset</code>
 * is the 0-based index of the character, after which code assist is desired.
 * An <code>offset</code> of -1 indicates to code assist at the beginning of this
 * compilation unit.
 *
 * @exception JavaModelException if code assist could not be performed. Reasons include:<ul>
 *  <li>This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
 *	<li> The position specified is < -1 or is greater than this compilation unit's
 *		source length (INDEX_OUT_OF_BOUNDS)
 * </ul>
 *
 * @exception IllegalArgumentException if <code>requestor</code> is <code>null</code>
 */
 void codeComplete(int offset, ICodeCompletionRequestor requestor) throws JavaModelException;  
/**
 * Performs code selection on the given selected text in this compilation unit,
 * reporting results to the given selection requestor. The <code>offset</code>
 * is the 0-based index of the first selected character. The <code>length</code> 
 * is the number of selected characters.
 *
 * @exception JavaModelException if code resolve could not be performed. Reasons include:
 *  <li>This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
 *	<li> The range specified is not within this element's
 *		source range (INDEX_OUT_OF_BOUNDS)
 * </ul>
 *
 */
IJavaElement[] codeSelect(int offset, int length) throws JavaModelException;
}

Back to the top