Rational Developer for Power Systems Software
V7.6

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

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

public class ISeriesEditorCompletionProposal
extends ISeriesEditorBaseCompletionProposal


Field Summary
protected  ISeriesEditorProposalMatch _match
           
protected  int _maxColumn
           
protected  int _minColumn
           
 
Fields inherited from class com.ibm.etools.iseries.edit.codeassist.base.ISeriesEditorBaseCompletionProposal
fAdditionalProposalInfo, fContextInformation, fCursorPosition, fDisplayString, fImage, fReplacementLength, fReplacementOffset, fReplacementString
 
Constructor Summary
ISeriesEditorCompletionProposal(String replacementString, int replacementOffset, int replacementLength, int cursorPosition, Image image, String displayString, IContextInformation contextInformation, String additionalProposalInfo, ISeriesEditorProposalMatch match)
           
 
Method Summary
 void apply(LpexTextViewer viewer)
          In LPEX, we apply against the LpexTextViewer directly, not its document.
protected  String blankString(int length)
           
protected  int deleteBlanksBefore(LpexView lpexView, int position, int element, int numBlanks)
           
protected  void doDelete(LpexView lpexView, int length)
           
protected  int getAdditionalColumnWidth(LpexView lpexView, int offset)
           
protected  String getHSpecIndent(String lineText)
           
protected  int getReplacementWidth(int offset)
           
protected  void insertLine(LpexView view)
           
protected  void insertText(LpexView lpexView, String replacementString)
           
protected  com.ibm.etools.iseries.edit.codeassist.base.ISeriesEditorCompletionProposal.LastSeparator positionOfLastSeparator(String lineText, int currentPosition)
           
protected  void resetColumnSensitivity(LpexView lpexView)
           
protected  void trimLeadingWhitespace(int amount)
           
protected  void trimTrailingWhitespace(int amount)
           
protected  void turnOffColumnSensitivity(LpexView lpexView)
           
 
Methods inherited from class com.ibm.etools.iseries.edit.codeassist.base.ISeriesEditorBaseCompletionProposal
getAdditionalProposalInfo, getContextInformation, getDisplayString, getImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_minColumn

protected int _minColumn

_maxColumn

protected int _maxColumn

_match

protected ISeriesEditorProposalMatch _match
Constructor Detail

ISeriesEditorCompletionProposal

public ISeriesEditorCompletionProposal(String replacementString,
                                       int replacementOffset,
                                       int replacementLength,
                                       int cursorPosition,
                                       Image image,
                                       String displayString,
                                       IContextInformation contextInformation,
                                       String additionalProposalInfo,
                                       ISeriesEditorProposalMatch match)
Method Detail

getReplacementWidth

protected int getReplacementWidth(int offset)

getAdditionalColumnWidth

protected int getAdditionalColumnWidth(LpexView lpexView,
                                       int offset)

trimLeadingWhitespace

protected void trimLeadingWhitespace(int amount)

trimTrailingWhitespace

protected void trimTrailingWhitespace(int amount)

turnOffColumnSensitivity

protected void turnOffColumnSensitivity(LpexView lpexView)

resetColumnSensitivity

protected void resetColumnSensitivity(LpexView lpexView)

apply

public void apply(LpexTextViewer viewer)
Description copied from class: ISeriesEditorBaseCompletionProposal
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.

Overrides:
apply in class ISeriesEditorBaseCompletionProposal

doDelete

protected void doDelete(LpexView lpexView,
                        int length)

deleteBlanksBefore

protected int deleteBlanksBefore(LpexView lpexView,
                                 int position,
                                 int element,
                                 int numBlanks)

blankString

protected String blankString(int length)

positionOfLastSeparator

protected com.ibm.etools.iseries.edit.codeassist.base.ISeriesEditorCompletionProposal.LastSeparator positionOfLastSeparator(String lineText,
                                                                                                                            int currentPosition)

insertText

protected void insertText(LpexView lpexView,
                          String replacementString)

insertLine

protected void insertLine(LpexView view)

getHSpecIndent

protected String getHSpecIndent(String lineText)

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.