Completion Proposal Computer

org.eclipse.cdt.ui.completionProposalComputer

4.0

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

<!ELEMENT extension (completionProposalComputer | proposalCategory)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #REQUIRED

name  CDATA #IMPLIED>


<!ELEMENT completionProposalComputer (partition)*>

<!ATTLIST completionProposalComputer

class      CDATA #REQUIRED

activate   (true | false) "false"

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

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



<!ELEMENT partition EMPTY>

<!ATTLIST partition

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


<!ELEMENT proposalCategory EMPTY>

<!ATTLIST proposalCategory

icon CDATA #IMPLIED>

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



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>

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

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