views:

51

answers:

1

I wrote custom java proposals contributor. It works fine when using "Java Proposals" advanced configuration of content-assist in Eclipse.

However, when I select "Java Proposals (Task-Focused)" and uncheck "Java Proposals", my proposals no longer show up.

Any idea why? Do I need to provide some extra information in my ICompletionProposal implementations?

A: 

The answer is simple in this case.

I used org.eclipse.jdt.ui.javaAllProposalCategory categoryID for my javaCompletionProposalComputer, but this is "Java Proposals" category.

When I created used own category ID, my proposals computer is now showing up in eclipse content-assist configuration, and proposals work as expected.

Full extension declaration now looks like this:

<extension
      id="properties.javaProposals"
      name="Property Names Proposals"
      point="org.eclipse.jdt.ui.javaCompletionProposalComputer">
   <javaCompletionProposalComputer
         activate="false"
         categoryId="properties.javaProposals"
         class="properties.PropertyProposalComputer">
      <partition
            type="__java_string">
      </partition>
   </javaCompletionProposalComputer>
</extension>

Important part is categoryId="properties.javaProposals"

Peter Štibraný