com.ibm.systemz.common.editor.extensionpoints.contentassist
Class SimpleCompletionProposal

java.lang.Object
  extended by com.ibm.systemz.common.editor.extensionpoints.contentassist.SimpleCompletionProposal
All Implemented Interfaces:
org.eclipse.jface.text.contentassist.ICompletionProposal

public class SimpleCompletionProposal
extends java.lang.Object
implements org.eclipse.jface.text.contentassist.ICompletionProposal

A simple replacement proposal that works in both LPEX and newer editors. Because LPEX does not support the apply() method, this method cannot be over-ridden.


Constructor Summary
SimpleCompletionProposal(java.lang.String displayString, java.lang.String replacementString, org.eclipse.swt.graphics.Image image, org.eclipse.jface.text.contentassist.IContextInformation contextInformation, java.lang.String additionalProposalInfo, int replacementOffset, ECompletionProposalType type)
          Creates a new completion proposal.
 
Method Summary
 void apply(org.eclipse.jface.text.IDocument arg0)
          Deprecated. 
 java.lang.String getAdditionalProposalInfo()
           
 org.eclipse.jface.text.contentassist.IContextInformation getContextInformation()
           
 java.lang.String getDisplayString()
           
 org.eclipse.swt.graphics.Image getImage()
           
 int getReplacementOffset()
           
 java.lang.String getReplacementString()
           
 org.eclipse.swt.graphics.Point getSelection(org.eclipse.jface.text.IDocument arg0)
          Deprecated. 
 ECompletionProposalType getType()
          The built-in type of the proposal.
 void setContextInformation(org.eclipse.jface.text.contentassist.IContextInformation information)
          For recommendations on creating IContextInformation objects, see the ICompletionProposalComputer.computeContextInformation() method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCompletionProposal

public SimpleCompletionProposal(java.lang.String displayString,
                                java.lang.String replacementString,
                                org.eclipse.swt.graphics.Image image,
                                org.eclipse.jface.text.contentassist.IContextInformation contextInformation,
                                java.lang.String additionalProposalInfo,
                                int replacementOffset,
                                ECompletionProposalType type)
Creates a new completion proposal. For recommendations on creating IContextInformation objects, see the ICompletionProposalComputer.computeContextInformation() method.

Parameters:
displayString - the string to be displayed for the proposal
replacementString - the actual string to be inserted into the document
image - the image to display for this proposal
contextInformation - the context information associated with this proposal
additionalProposalInfo - the additional information associated with this proposal
replacementOffset - the offset of the text to be replaced
type - the base type of the proposal, may be null
Method Detail

apply

@Deprecated
public final void apply(org.eclipse.jface.text.IDocument arg0)
Deprecated. 

Because LPEX does not support the apply() method, this method cannot be over-ridden.

Specified by:
apply in interface org.eclipse.jface.text.contentassist.ICompletionProposal

getAdditionalProposalInfo

public java.lang.String getAdditionalProposalInfo()
Specified by:
getAdditionalProposalInfo in interface org.eclipse.jface.text.contentassist.ICompletionProposal

setContextInformation

public void setContextInformation(org.eclipse.jface.text.contentassist.IContextInformation information)
For recommendations on creating IContextInformation objects, see the ICompletionProposalComputer.computeContextInformation() method.

Parameters:
information - the context information associated with this proposal

getContextInformation

public org.eclipse.jface.text.contentassist.IContextInformation getContextInformation()
Specified by:
getContextInformation in interface org.eclipse.jface.text.contentassist.ICompletionProposal

getDisplayString

public java.lang.String getDisplayString()
Specified by:
getDisplayString in interface org.eclipse.jface.text.contentassist.ICompletionProposal

getImage

public org.eclipse.swt.graphics.Image getImage()
Specified by:
getImage in interface org.eclipse.jface.text.contentassist.ICompletionProposal

getSelection

@Deprecated
public org.eclipse.swt.graphics.Point getSelection(org.eclipse.jface.text.IDocument arg0)
Deprecated. 

Specified by:
getSelection in interface org.eclipse.jface.text.contentassist.ICompletionProposal

getReplacementOffset

public int getReplacementOffset()

getReplacementString

public java.lang.String getReplacementString()

getType

public ECompletionProposalType getType()
The built-in type of the proposal. May be null.

Returns:
the proposal type