Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.edit.codeassist.base
Class ISeriesEditorBaseCompletionProposal

java.lang.Object
  extended by com.ibm.etools.iseries.edit.codeassist.base.ISeriesEditorBaseCompletionProposal
Direct Known Subclasses:
ISeriesEditorCompletionProposal

public class ISeriesEditorBaseCompletionProposal
extends Object

The standard LPEX implementation of the ICompletionProposal interface.


Field Summary
protected  String fAdditionalProposalInfo
           
protected  IContextInformation fContextInformation
           
protected  int fCursorPosition
           
protected  String fDisplayString
           
protected  Image fImage
           
protected  int fReplacementLength
           
protected  int fReplacementOffset
           
protected  String fReplacementString
           
 
Constructor Summary
ISeriesEditorBaseCompletionProposal(String replacementString, int replacementOffset, int replacementLength, int cursorPosition)
          Create a new completion proposal based on the information provided.
ISeriesEditorBaseCompletionProposal(String replacementString, int replacementOffset, int replacementLength, int cursorPosition, Image image, String displayString, IContextInformation contextInformation, String additionalProposalInfo)
          Create a new completion proposal.
 
Method Summary
 void apply(IDocument document)
          Deprecated. Use apply(LpexTextViewer).
 void apply(LpexTextViewer viewer)
          In LPEX, we apply against the LpexTextViewer directly, not its document.
 String getAdditionalProposalInfo()
           
 IContextInformation getContextInformation()
           
 String getDisplayString()
           
 Image getImage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fDisplayString

protected String fDisplayString

fReplacementString

protected String fReplacementString

fReplacementOffset

protected int fReplacementOffset

fReplacementLength

protected int fReplacementLength

fCursorPosition

protected int fCursorPosition

fImage

protected Image fImage

fContextInformation

protected IContextInformation fContextInformation

fAdditionalProposalInfo

protected String fAdditionalProposalInfo
Constructor Detail

ISeriesEditorBaseCompletionProposal

public ISeriesEditorBaseCompletionProposal(String replacementString,
                                           int replacementOffset,
                                           int replacementLength,
                                           int cursorPosition)
Create a new completion proposal based on the information provided. The replacement string is considered being the display string too. All remaining fields are set to null.

Parameters:
replacementString - the actual string to be inserted into the document
replacementOffset - the offset of the text to be replaced relative to the current cursor position (i.e., 0 or < 0)
replacementLength - the length of the text to be replaced
cursorPosition - N/U (in Eclipse: the position of the cursor following the insert, relative to replacementOffset)

ISeriesEditorBaseCompletionProposal

public ISeriesEditorBaseCompletionProposal(String replacementString,
                                           int replacementOffset,
                                           int replacementLength,
                                           int cursorPosition,
                                           Image image,
                                           String displayString,
                                           IContextInformation contextInformation,
                                           String additionalProposalInfo)
Create a new completion proposal. All fields are initialized based on the provided information.

Parameters:
replacementString - the actual string to be inserted into the document
replacementOffset - the offset of the text to be replaced relative to the current cursor position (i.e., 0 or < 0)
replacementLength - the length of the text to be replaced
cursorPosition - N/U (in Eclipse: the position of the cursor following the insert, relative to replacementOffset)
image - the image to display for this proposal
displayString - the string to be displayed for the proposal
contentInformation - the context information associated with this proposal
additionalProposalInfo - the additional information associated with this proposal
Method Detail

apply

public void apply(IDocument document)
Deprecated. Use apply(LpexTextViewer).

This method is not used in LPEX.

See Also:
apply(LpexTextViewer)

apply

public void apply(LpexTextViewer viewer)
In LPEX, we apply against the LpexTextViewer directly, not its document. The proposal is applied at an offset defined as relative to the current cursor position (which is located somewhere inside the final word that we want upon completion); the offset, therefore, is 0 or the negative number of positions prior to the cursor.


getContextInformation

public IContextInformation getContextInformation()

getImage

public Image getImage()

getDisplayString

public String getDisplayString()

getAdditionalProposalInfo

public String getAdditionalProposalInfo()

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.