Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-dev] Disabling a IJavaCompletionProposalComputer as default

Hi Roland,
Thanks for the tips, by the way this to work i need to have category like below right

  <extension
        id="javaChainProposalCategory"
        name="%ChainProposalCategory"
        point="org.eclipse.jdt.ui.javaCompletionProposalComputer">
        <proposalCategory icon="icons/full/eview16/package.png"/>
  </extension>
  <extension
        point="org.eclipse.jdt.ui.javaCompletionProposalComputer"
        id="org.eclipse.jdt.ui.javaCompletionProposalComputer.chain">
     <javaCompletionProposalComputer
           activate="true"
           categoryId="org.eclipse.jdt.ui.javaChainProposalCategory"
           class="org.eclipse.jdt.internal.ui.text.java.ChainCompletionProposalComputer"
           needsSortingAfterFiltering="false"
           requiresUIThread="false">
     </javaCompletionProposalComputer>
  </extension>
And should i add the category id in PreferenceConstants.CODEASSIST_EXCLUDED_CATEGORIES  ?

Br,
Gayan.


On Tue, Apr 7, 2020 at 4:37 PM Roland Grunberg <rgrunber@xxxxxxxxxx> wrote:
On Tue, Apr 7, 2020 at 3:40 AM Gayan Perera <gayanper@xxxxxxxxx> wrote:
>
> Hi all,
>
> Any updates on this? I see that some proposal computers such as chain completions are by default not included. How to achieve this?

Hey Gayan,

I think the properties you care about are
PreferenceConstants.CODEASSIST_EXCLUDED_CATEGORIES and
PreferenceConstants.CODEASSIST_CATEGORY_ORDER .

Their values are set in PreferenceConstants.initializeDefaultValues(..) .

When a completion proposal computer's ID is present in
CODEASSIST_EXCLUDED_CATEGORIES, it disables proposals
from being computed on the first completion invocation. When the
ID is present in CODEASSIST_CATEGORY_ORDER with a
'cyclestate' greater than 65535, then it will also be disabled from
appearing in its own "group" on subsequent invocations of content
assist (eg. hitting ctrl+space multiple times).

The above still won't work if a user has overridden the default
settings and a new completion proposal is being introduced so
we addressed this in http://eclip.se/550226 with the ability to
disable these newly introduced completions as well.

Hope this helps.

Roland Grunberg

_______________________________________________
jdt-dev mailing list
jdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jdt-dev

Back to the top