Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [recommenders-dev] SessionProcessor Extension is not called

Hi Kevin,

you need to define a completion engine extension (+ Category) that actually calls these session processors. this is done as follows:


<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>

<!-- category definition -->
   <extension
         id="org.eclipse.recommenders.completion.rcp.category.completion.all"
         name="Code Recommenders Proposals (feedback)"
         point="org.eclipse.jdt.ui.javaCompletionProposalComputer">
      <proposalCategory
            icon="icons/view16/slice.gif">
      </proposalCategory>
   </extension>

<!-- proposal computer definition -->
   <extension
         id="org.eclipse.recommenders.completion.rcp.all.engine"
         name="Code Recommenders (all)"
         point="org.eclipse.jdt.ui.javaCompletionProposalComputer">
      <javaCompletionProposalComputer
            activate="true"
            categoryId="org.eclipse.recommenders.completion.rcp.category.completion.all"
            class="org.eclipse.recommenders.injection.ExtensionFactory:org.eclipse.recommenders.internal.completion.rcp.RecommendersAllCompletionProposalProcessor"   
            needsSortingAfterFiltering="true">
      </javaCompletionProposalComputer>
   </extension>

<!-- some example processor definitions -->
   <extension
         point="org.eclipse.recommenders.completion.rcp.sessionprocessors">
      <processor
         class="org.eclipse.recommenders.injection.ExtensionFactory:com.codetrails.completionevents.rcp.completion.CompletionModelSessionProcessor"
         icon="icons/view16/slice.gif"
         id="com.codetrails.completionevents.processor"
         name="Immediate Feedback"
         priority="1500">
      </processor>
   </extension>
   <extension
         point="org.eclipse.recommenders.completion.rcp.sessionprocessors">
      <processor
            class="org.eclipse.recommenders.injection.ExtensionFactory:com.codetrails.completion.tracking.CompletionTrackerSessionProcessor"
            icon="icons/view16/slice.gif"
            id="com.codetrails.completion.types.processor"
            name="Proposal Tracker">
      </processor>
   </extension>

</plugin>



See RecommendersAllCompletionProposalProcessor for the implementation that get's actually called.

Please note that this API is still very experimental. We aim to have this API ready for Kepler but it will probably change several time and without warning in the next months.

Best,
Marcel


-- 
Codetrails.com – The knowledge transfer company




On Jan 7, 2013, at 2:37 PM, "Kevin Munk" <kevin.munk@xxxxxxxxx> wrote:

Hi,
 
I use the extension point org.eclipse.recommenders.completion.rcp.sessionprocessors. But the processor that I assigned is not called at all. I ran out of ideas what could be wrong. Do you have any ideas?
 
 
The extension is in plugin.xml described as follows:
 
<plugin>
<extension point="org.eclipse.recommenders.completion.rcp.sessionprocessors">
      <processor        
            class="org.eclipse.recommenders.injection.ExtensionFactory:org.eclipse.recommenders.internal.completion.rcp.types.TypesSessionProcessor"
            icon="icons/icon2.gif"
            id="org.eclipse.recommenders.completion.rcp.types.processor"
            name="Types Completion Processor">
      </processor>
</extension>
</plugin>
 
There are no warnings or errors from eclipse in the plugin.xml.
The processor class TypesSessionProcessor extends org.eclipse.recommenders.completion.rcp.SessionProcessorand implements the necessary methods.
 
 
Thanks for your advice,
Kevin
_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/recommenders-dev


Back to the top