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 Marcel,

 

I should have posted the whole plugin.xml file because I have a category and a proposal computer which are working. Here is the whole file:

 

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

<?eclipse version="3.4"?>

<plugin>

   <!-- Categories -->

   <extension

         id="org.eclipse.recommenders.rcp.category.completion.types"

         name="Code Recommenders Types Proposals"

         point="org.eclipse.jdt.ui.javaCompletionProposalComputer">

      <proposalCategory

            icon="icons/icon2.gif">

      </proposalCategory>

   </extension>

   <!-- Proposal computer -->

   <extension

         id="org.eclipse.recommenders.rcp.completion.types"

         name="Code Recommenders Type Proposals"

         point="org.eclipse.jdt.ui.javaCompletionProposalComputer">

      <javaCompletionProposalComputer

            activate="true"

            categoryId="org.eclipse.recommenders.rcp.category.completion.types"

            class="org.eclipse.recommenders.injection.ExtensionFactory:org.eclipse.recommenders.internal.completion.rcp.types.TypesCompletionProposalComputer">

      </javaCompletionProposalComputer>

   </extension>

   <!-- Session processors-->

   <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.rcp.completion.types.processor"

            name="Types Proposal Completion Processor">

      </processor>

   </extension>  

</plugin>

 

I changed the id and name of the session processor which I posted in the initial mail, but the processor class is still not called while runtime.

 

Do you have further ideas?

 

Kevin

 

Von: recommenders-dev-bounces@xxxxxxxxxxx [mailto:recommenders-dev-bounces@xxxxxxxxxxx] Im Auftrag von Marcel Bruch
Gesendet: Montag, 7. Januar 2013 15:28
An: Recommenders developer discussions
Betreff: 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