开发者

My proposals are hidden when using Java Proposals (Task-Focused)

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

However, whe开发者_如何学JAVAn 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?


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"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜