# Completion Proposal Computer

###### Identifier:

org.eclipse.cdt.ui.completionProposalComputer

###### Since:

4.0

###### Description:

This extension point allows to contribute completion proposal computers to participate in the content assist process of the C/C++ editor.

###### Configuration Markup:

<!ELEMENT extension (completionProposalComputer | proposalCategory)>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #REQUIRED

name CDATA #IMPLIED>

- point - The fully qualified identifier of the target extension point
- id - The identifier of the extension instance, unique within the declaring plug-in (the plug-in's identifier will be prepended to form a platform-wide unique id)
- name - The optional name of the extension instance

<!ELEMENT completionProposalComputer (partition)*>

<!ATTLIST completionProposalComputer

class CDATA #REQUIRED

activate (true | false) "false"

categoryId IDREF "org.eclipse.cdt.ui.defaultProposalCategory">

A proposal computer contribution. If no partition types are specified, the computer is added to all partition types.

- class - The name of the class that implements the contributed computer. The class must be public and implement `org.eclipse.cdt.ui.text.contentassist.ICompletionProposalComputer` and must have a public 0-argument constructor.
- activate - If the attribute is set to "true" it will force this plug-in to be loaded on content assist invocation.
- categoryId - The id of a `proposalCategory`

<!ELEMENT partition EMPTY>

<!ATTLIST partition

type (__dftl_partition_content_type|__c_multiline_comment|__c_singleline_comment|__c_string|__c_character|__c_preprocessor|__c_multiline_doc_comment|__c_singleline_doc_comment) >

- type - A C/C++ partition type for which the specified computer can provide completion proposals. See `IDocument.DEFAULT_CONTENT_TYPE` and `ICPartitions` for valid values.

<!ELEMENT proposalCategory EMPTY>

<!ATTLIST proposalCategory

icon CDATA #IMPLIED>

A proposal category contribution defines categories of proposals used to group them in the UI.

- icon - The optional icon of the category, which can be displayed in the user preferences.

###### Examples:

The following is an example of a completion proposal computer contribution:

     <extension point="org.eclipse.cdt.ui.completionProposalComputer"
       id="textual_proposals"
       name="Text Proposals">
       <proposalCategory icon="icons/wordcompletions.png"/>
     </extension>
     <extension point="org.eclipse.cdt.ui.completionProposalComputer"
       id="WordCompletionProposalComputer"
       name="Word Completion Proposal Computer">
       <completionProposalComputer
          class="org.eclipse.cdt.internal.ui.text.contentassist.HippieProposalComputer"
          categoryId="org.eclipse.ui.texteditor.textual_proposals">
          <partition type="__c_multiline_comment"/>
       </completionProposalComputer>
     </extension>

###### API Information:

The contributed class must extend `org.eclipse.cdt.ui.text.contentassist.ICompletionProposalComputer`

###### Supplied Implementation:

see `org.eclipse.cdt.internal.ui.text.contentassist.HippieProposalComputer` for an example.

Copyright (c) 2006, 2007 IBM Corporation and others.
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-2.0/ t; t;SPDX-License-Identifier: EPL-2.0