Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text.contentassist
Interface ICompletionProposalExtension

All Known Implementing Classes:
TemplateProposal

public interface ICompletionProposalExtension

Extends ICompletionProposal with the following functions:

  • handling of trigger characters other than ENTER
  • completion proposal validation for a given offset
  • context information can be freely positioned

Since:
2.0

Method Summary
 void apply ( IDocument document, char trigger, int offset)
          Applies the proposed completion to the given document.
 int getContextInformationPosition ()
          Returns the position to which the computed context information refers to or -1 if no context information can be provided by this completion proposal.
 char[] getTriggerCharacters ()
          Returns the characters which trigger the application of this completion proposal.
 boolean isValidFor ( IDocument document, int offset)
          Returns whether this completion proposal is valid for the given position in the given document.
 

Method Detail

apply

void apply(
IDocument document,
           char trigger,
           int offset)
Applies the proposed completion to the given document. The insertion has been triggered by entering the given character at the given offset. This method assumes that isValidFor(IDocument, int) returns true if called for offset.

Parameters:
document - the document into which to insert the proposed completion
trigger - the trigger to apply the completion
offset - the offset at which the trigger has been activated

isValidFor

boolean isValidFor(
IDocument document,
                   int offset)
Returns whether this completion proposal is valid for the given position in the given document.

Parameters:
document - the document for which the proposal is tested
offset - the offset for which the proposal is tested
Returns:
true iff valid

getTriggerCharacters

char[] getTriggerCharacters()
Returns the characters which trigger the application of this completion proposal.

Returns:
the completion characters for this completion proposal or null if no completion other than the new line character is possible

getContextInformationPosition

int getContextInformationPosition()
Returns the position to which the computed context information refers to or -1 if no context information can be provided by this completion proposal.

Returns:
the position to which the context information refers to or -1 for no information

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire