Project: JDT
Bug 345213 [content assist][preferences] Add enablement to Java completion proposal category extension point
Reported: 2011-05-09 18:03:21 | Status: resolved fixed

We have a java completion proposal computer, but it should only be used for projects of a specific type. However, there is no way to eliminate our computer for projects that don't match this criteria. If there were an enablement (optional) element on the extension point, we'd be able to prevent this completion proposal category from showing up on project where it makes no sense. example: <extension point="org.eclipse.jdt.ui.javaCompletionProposalComputer" id="jaxbCompletionProposals" name="%jaxbCompletionProposals"> <proposalCategory icon="icons/full/etool16/jaxb_facet.gif"/> <enablement> <with variable="project"> <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jaxb" forcePluginActivation="true"/> </with> </enablement> </extension>

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SpecificContentAssistAction.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SpecificContentAssistExecutor.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/CompletionProposalCategory.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ContentAssistProcessor.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java