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
Answertopia.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 ICompletionProposalExtension2

All Known Implementing Classes:
TemplateProposal

public interface ICompletionProposalExtension2

Extends ICompletionProposal with the following functions:

  • handling of trigger characters with modifiers
  • visual indication for selection of a proposal

Since:
2.1

Method Summary
 void apply ( ITextViewer viewer, char trigger, int stateMask, int offset)
          Applies the proposed completion to the given document.
 void selected ( ITextViewer viewer, boolean smartToggle)
          Called when the proposal is selected.
 void unselected ( ITextViewer viewer)
          Called when the proposal is unselected.
 boolean validate ( IDocument document, int offset, DocumentEvent event)
          Requests the proposal to be validated with respect to the document event.
 

Method Detail

apply

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

Parameters:
viewer - the text viewer into which to insert the proposed completion
trigger - the trigger to apply the completion
stateMask - the state mask of the modifiers
offset - the offset at which the trigger has been activated

selected

void selected(
ITextViewer viewer,
              boolean smartToggle)
Called when the proposal is selected.

Parameters:
viewer - the text viewer.
smartToggle - the smart toggle key was pressed

unselected

void unselected(
ITextViewer viewer)
Called when the proposal is unselected.

Parameters:
viewer - the text viewer.

validate

boolean validate(
IDocument document,
                 int offset,
                 
DocumentEvent event)
Requests the proposal to be validated with respect to the document event. If the proposal cannot be validated, the methods returns false. If the document event was null, only the caret offset was changed, but not the document. This method replaces ICompletionProposalExtension.isValidFor(IDocument, int)

Parameters:
document - the document
offset - the caret offset
event - the document event, may be null
Returns:
boolean

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