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,

You were right. I had my own implementation. I switched to
ProcessableCompletionProposalComputer and let the SessionProcessors do the
work. These are now called.

Would be nice to see this API grow, it is really straight forward and easy
to use :-)

Best regards

-----Ursprüngliche Nachricht-----
Von: recommenders-dev-bounces@xxxxxxxxxxx
[mailto:recommenders-dev-bounces@xxxxxxxxxxx] Im Auftrag von Marcel Bruch
Gesendet: Montag, 7. Januar 2013 16:43
An: Recommenders developer discussions
Betreff: Re: [recommenders-dev] SessionProcessor Extension is not called

How does TypesCompletionProposalComputer look like? I guess it's your own
implentation, right?

Please define a proposal computer that uses the
RecommendersAllCompletionProposalProcessor class and check that this
computer gets called. AFAIK, this class reads the extension point and calls
your processors.




-- 
Codetrails.com – The knowledge transfer company




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

> 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.recom
menders.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.recom
menders.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.recom
menders.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.co
mpletionevents.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.co
mpletion.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.recom
menders.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
>  
> _______________________________________________
> recommenders-dev mailing list
> recommenders-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/recommenders-dev

_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/recommenders-dev



Back to the top