CDT Plug-in Developer Guide > Reference > Extension Points Reference

Completion Proposal Filter


CDT 3.1

When the user requests code completion for an identifier prefix then proposals are gathered from a variety of sources. It is quite common that several proposals for the same completion are gathered. After gathering it is therefore necessary to filter proposals and present them in an optimal ordering to the user. The notion of what is "optimal" may vary from one application to another. This extension point allows the contribution of completion filters which best suit the needs of the user in any given situation. The decision about which filter will actually be used remains with the user who can select his preference from a list of all contributed filters (menu Window - Preferences - C/C++ - Editor - Content Assist).

Configuration Markup:

<!ELEMENT extension (ProposalFilter)>

<!ATTLIST extension




<!ELEMENT ProposalFilter EMPTY>

<!ATTLIST ProposalFilter




See the default implementation in org.eclipse.cdt.internal.ui.text.contentassist.DefaultProposalFilter as an example.

API Information:
ProposalFilters must implement interface org.eclipse.cdt.ui.text.contentassist.IProposalFilter.

Supplied Implementation:
The default implementation in org.eclipse.cdt.internal.ui.text.contentassist.DefaultProposalFilter is the default filtering method which is used as long as the user preference is not changed.

Copyright (c) 2006 Norbert Ploett and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors: Norbert Ploett (Siemens) - Initial Contribution