|
Eclipse Platform Release 3.1 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.jface.contentassist.ContentAssistInvocationContext
Describes the context of an invocation of content assist. For a text editor, the context would typically include the document (or the viewer) and the selection range, while source code editors may provide specific context information such as an AST.
An invocation context may also compute additional context information on demand and cache it to
make it available to all ICompletionProposalComputers
contributing proposals to one content assist invocation.
Clients may subclass but must be careful to adhere to the described
equality contract.
XXX this API is provisional and may change anytime during the course of 3.2
| Constructor Summary | |
|---|---|
ContentAssistInvocationContext()
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Invocation contexts are equal if they describe the same context and are of the same type. |
int |
hashCode()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ContentAssistInvocationContext()
| Method Detail |
public boolean equals(Object obj)
null values and class equality. Subclasses
should extend this method by adding checks for their context relevant fields (but not
necessarily cached values).
Example:
class MyContext extends ContentAssistInvocationContext {
private final Object fState;
private Object fCachedInfo;
...
public boolean equals(Object obb) {
if (!super.equals(obj))
return false;
MyContext other= (MyContext) obj;
return fState.equals(other.fState);
}
}
Subclasses should also extend Object.hashCode().
obj -
public int hashCode()
|
Eclipse Platform Release 3.1 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.