Package org.eclipse.jface.text.link
Class ProposalPosition
- java.lang.Object
-
- org.eclipse.jface.text.Position
-
- org.eclipse.jface.text.link.LinkedPosition
-
- org.eclipse.jface.text.link.ProposalPosition
-
public class ProposalPosition extends LinkedPosition
LinkedPosition with added completion proposals.Clients may instantiate or extend this class.
- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description ProposalPosition(IDocument document, int offset, int length, int sequence, ICompletionProposal[] proposals)
Creates a new instance.ProposalPosition(IDocument document, int offset, int length, ICompletionProposal[] proposals)
Creates a new instance, with no sequence number.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
ICompletionProposal[]
getChoices()
Returns the proposals attached to this position.int
hashCode()
-
Methods inherited from class org.eclipse.jface.text.link.LinkedPosition
getContent, getDocument, getSequenceNumber, includes, includes, includes, includes, overlapsWith, setSequenceNumber
-
-
-
-
Constructor Detail
-
ProposalPosition
public ProposalPosition(IDocument document, int offset, int length, int sequence, ICompletionProposal[] proposals)
Creates a new instance.- Parameters:
document
- the documentoffset
- the offset of the positionlength
- the length of the positionsequence
- the iteration sequence rankproposals
- the proposals to be shown when entering this position
-
ProposalPosition
public ProposalPosition(IDocument document, int offset, int length, ICompletionProposal[] proposals)
Creates a new instance, with no sequence number.- Parameters:
document
- the documentoffset
- the offset of the positionlength
- the length of the positionproposals
- the proposals to be shown when entering this position
-
-
Method Detail
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classLinkedPosition
-
getChoices
public ICompletionProposal[] getChoices()
Returns the proposals attached to this position. The returned array is owned by thisProposalPosition
and may not be modified by clients.- Returns:
- an array of choices, including the initial one. Callers must not modify it.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classLinkedPosition
-
-