|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICodeAssist
Common protocol for Java elements that support source code assist and code resolve.
Method Summary | |
---|---|
void |
codeComplete(int offset,
CompletionRequestor requestor)
Performs code completion at the given offset position in this compilation unit, reporting results to the given completion requestor. |
void |
codeComplete(int offset,
CompletionRequestor requestor,
WorkingCopyOwner owner)
Performs code completion at the given offset position in this compilation unit, reporting results to the given completion requestor. |
void |
codeComplete(int offset,
ICodeCompletionRequestor requestor)
Deprecated. Use codeComplete(int, ICompletionRequestor) instead. |
void |
codeComplete(int offset,
ICompletionRequestor requestor)
Deprecated. Use codeComplete(int, CompletionRequestor) instead. |
void |
codeComplete(int offset,
ICompletionRequestor requestor,
WorkingCopyOwner owner)
Deprecated. Use codeComplete(int, CompletionRequestor, WorkingCopyOwner) instead. |
IJavaElement[] |
codeSelect(int offset,
int length)
Returns the Java elements corresponding to the given selected text in this compilation unit. |
IJavaElement[] |
codeSelect(int offset,
int length,
WorkingCopyOwner owner)
Returns the Java elements corresponding to the given selected text in this compilation unit. |
Method Detail |
---|
void codeComplete(int offset, ICodeCompletionRequestor requestor) throws JavaModelException
codeComplete(int, ICompletionRequestor)
instead.
offset
is the 0-based index of the character, after which code assist is desired.
An offset
of -1 indicates to code assist at the beginning of this
compilation unit.
offset
- the given offset positionrequestor
- the given completion requestor
JavaModelException
- if code assist could not be performed. Reasons include:java.lang.IllegalArgumentException
- if requestor
is null
void codeComplete(int offset, ICompletionRequestor requestor) throws JavaModelException
codeComplete(int, CompletionRequestor)
instead.
offset
is the 0-based index of the character, after which code assist is desired.
An offset
of -1 indicates to code assist at the beginning of this
compilation unit.
offset
- the given offset positionrequestor
- the given completion requestor
JavaModelException
- if code assist could not be performed. Reasons include:java.lang.IllegalArgumentException
- if requestor
is null
void codeComplete(int offset, CompletionRequestor requestor) throws JavaModelException
offset
is the 0-based index of the character, after which code assist is desired.
An offset
of -1 indicates to code assist at the beginning of this
compilation unit.
offset
- the given offset positionrequestor
- the given completion requestor
JavaModelException
- if code assist could not be performed. Reasons include:java.lang.IllegalArgumentException
- if requestor
is null
void codeComplete(int offset, ICompletionRequestor requestor, WorkingCopyOwner owner) throws JavaModelException
codeComplete(int, CompletionRequestor, WorkingCopyOwner)
instead.
offset
is the 0-based index of the character, after which code assist is desired.
An offset
of -1 indicates to code assist at the beginning of this
compilation unit.
It considers types in the working copies with the given owner first. In other words,
the owner's working copies will take precedence over their original compilation units
in the workspace.
Note that if a working copy is empty, it will be as if the original compilation unit had been deleted.
offset
- the given offset positionrequestor
- the given completion requestorowner
- the owner of working copies that take precedence over their original compilation units
JavaModelException
- if code assist could not be performed. Reasons include:java.lang.IllegalArgumentException
- if requestor
is null
void codeComplete(int offset, CompletionRequestor requestor, WorkingCopyOwner owner) throws JavaModelException
offset
is the 0-based index of the character, after which code assist is desired.
An offset
of -1 indicates to code assist at the beginning of this
compilation unit.
It considers types in the working copies with the given owner first. In other words,
the owner's working copies will take precedence over their original compilation units
in the workspace.
Note that if a working copy is empty, it will be as if the original compilation unit had been deleted.
offset
- the given offset positionrequestor
- the given completion requestorowner
- the owner of working copies that take precedence over their original compilation units
JavaModelException
- if code assist could not be performed. Reasons include:java.lang.IllegalArgumentException
- if requestor
is null
IJavaElement[] codeSelect(int offset, int length) throws JavaModelException
offset
is the 0-based index of the first selected character.
The length
is the number of selected characters.
Note that if the length
is 0 and the offset
is inside an identifier
or the index just after an identifier then this identifier is considered as the selection.
offset
- the given offset positionlength
- the number of selected characters
JavaModelException
- if code resolve could not be performed. Reasons include:
IJavaElement[] codeSelect(int offset, int length, WorkingCopyOwner owner) throws JavaModelException
offset
is the 0-based index of the first selected character.
The length
is the number of selected characters.
It considers types in the working copies with the given owner first. In other words,
the owner's working copies will take precedence over their original compilation units
in the workspace.
Note that if the length
is 0 and the offset
is inside an identifier
or the index just after an identifier then this identifier is considered as the selection.
Note that if a working copy is empty, it will be as if the original compilation unit had been deleted.
offset
- the given offset positionlength
- the number of selected charactersowner
- the owner of working copies that take precedence over their original compilation units
JavaModelException
- if code resolve could not be performed. Reasons include:
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |