Community
Participate
Working Groups
Recommenders and Mylyn content assist cannot be used at the same time. Recommenders 2.0 offers a simple mechanism to integrate "session processors" to its content assist engine. Mylyn integration could be implemented with that API. Because the completion API is not 100% stable, we'd like to create a new plugin at the Recommenders project that integrates Mylyn (latest after EclipseCon NA 2014, i.e. in April). Steffen, is there a public API that can be used to query the relevance of a proposal?
I am not familiar with the implementation, but it looks like Mylyn content assist for Java is implemented by FocusedJavaProposalProcessor and FocusedJavaAllProposalComputer in the org.eclipse.mylyn.java.ui plugin. Those classes don't appear to have any significant dependencies on Mylyn internals, but they are internal themselves and they do define some thresholds. Getting the relevance of a proposal seems to be a matter of getting its interest (for which there is API) and comparing it with the thresholds. Since the same thresholds are defined in FocusedCProposalProcessor, perhaps it would make sense to provide API to get the thresholds.
I just looked into FocusedJavaProposalProcessor briefly. Looks like everything is there to create the Mylyn integration. We only need ContextCore which seems to provide static access to all information we need (relevance and important thresholds). If that's all, this is a no-brainer. Andreas, can you add this to the schedule for in the beginning of February and before 2.1? >> relevant lines we'll need. AbstractJavaCompletionProposal proposal; IJavaElement javaElement = proposal.getJavaElement(); IInteractionElement interactionElement = ContextCore.getContextManager().getElement(javaElement.getHandleIdentifier()); float interest = interactionElement.getInterest().getValue(); if (interest > ContextCore.getCommonContextScaling().getInteresting()) { proposal.setRelevance(...); ...
(In reply to Marcel Bruch from comment #2) > If that's all, this is a no-brainer. > Andreas, can you add this to the schedule for in the beginning of February > and before 2.1? Sure. Will schedule this.
Were you able to make this work?
https://twitter.com/MarcelBruch/status/436912572642902016 We have to fiddle around with the scores a bit more.
Steffen, Sam the current prototype is available here [1]. Can you take a look and tell me whether this code does what you'd expect it to do - or whether I missed some fundamental feature? It's not a complete copy of FocusedJavaProposalProcessor. I didn't get the meaning of the "implicit interest" LoCs (see isImplicitlyInteresting()). Thus, I skipped that code for now. [1] https://git.eclipse.org/r/#/c/22378/ [2] https://git.eclipse.org/r/#/c/22378/2/plugins/org.eclipse.recommenders.mylyn.rcp/src/org/eclipse/recommenders/internal/mylyn/rcp/MylynSessionProcessor.java
It looks good to me, but I don't know what the implicit interest is either so it would be good to get feedback from Steffen. It looks like you don't need the dependency on org.eclipse.mylyn.java.ui. Also, I'm not sure if Recommenders supports languages other than Java but I think you could use a structure bridge to get the handle and remove the dependency on JDT so that this would work for more than just Java. Finally, I wonder why there is .rcp in the bundle name.
(In reply to Sam Davis from comment #7) > It looks like you don't > need the dependency on org.eclipse.mylyn.java.ui. I cleaned the dependencies section. It only requires org.eclipse.mylyn.context.core now. > Also, I'm not sure if > Recommenders supports languages other than Java but I think you could use a > structure bridge to get the handle and remove the dependency on JDT so that > this would work for more than just Java. We currently support Java only. Thus, I'd say we should think about this again at a later time. > Finally, I wonder why there is .rcp > in the bundle name. Because there is more than one "ui" ;) Thanks Sam.
Regarding Release: ------------------ Andreas, I added/updated the poms and create a new o.e.r.mylyn.rcp.feature for Tycho. Can you please review the change and add the feature to the head update site? After that, I'd like to ask mylyn users/devs to test it and provide improvement suggestions. Regarding roadmap: ------------------ I'd like to release the mylyn integration with 2.1 (Luna) as second feature to snipmatch. For that we'll need some feedback from mylyn users to be sure it works as intended. Steffen, can you imagine that we write two short blog posts, one published on the recommenders blog the other on the mylyn blog, to announce the availability of the integration and requests for comments? We'd provide a couple of screenshots and a short text you may adapt.
FWIW, once this is properly tested, the Java and RCP/RAP package maintainers should be notified so that they can include not only org.eclipse.recommenders.rcp.feature, but also org.eclipse.recommenders.mylyn.rcp.feature in their respective packages.
(In reply to Marcel Bruch from comment #9) > Andreas, > I added/updated the poms and create a new o.e.r.mylyn.rcp.feature for Tycho. > Can you please review the change and add the feature to the head update > site? After that, I'd like to ask mylyn users/devs to test it and provide > improvement suggestions. Done. Should be part of <http://download.eclipse.org/recommenders/updates/head/> in a few minutes.
(In reply to comment #9) > Steffen, > can you imagine that we write two short blog posts, one published on the > recommenders blog the other on the mylyn blog, to announce the availability of > the integration and requests for comments? We'd provide a couple of screenshots > and a short text you may adapt. That sounds great to me! We can include that in the Mylyn release blog post once the feature is available. This could either be for 3.11 (scheduled for mid March) or 3.12 which is part of Luna (sounds like that would make the most sense).
I'll publish a small blog post next tuesday morning announcing that an experimental Mylyn integration is ready for testing.
Steffen, which feature should the Code Recommenders Mylyn Integration depend on best? I currently use: <requires> <import feature="org.eclipse.mylyn.context_feature" version="3.8.0"/> <import feature="org.eclipse.recommenders.rcp.feature" version="2.0.0"/> </requires> But it looks like that this dependency only pulls in Mylyn context features that tracks Java types in its context but not visited methods. Is there a particular Java feature I should depend on?
org.eclipse.mylyn.java-feature sounds too easy...
org.eclipse.mylyn.java_feature sounds right since you depend on JDT anyways.
The first version of the blog post is available here [1]. The screenshots will be updated and annotated with some additional info over the weekend. Steffen, feel free to comment or edit the article until Sunday night - in particular the section about Mylyn. I'll finalize it on Monday morning. Andreas, I changed the dependency to <import feature="org.eclipse.mylyn.java_feature" version="3.8.0"/>. See https://git.eclipse.org/r/22942. [1] https://docs.google.com/a/codetrails.com/document/d/1bvQEo--ZSds2aryHkj250U_2fW0GPloyHuNpb99x-yk/edit#
I don't get any feedback nor error reports. We had ~30 downloads in the last 10 days. I'm closing this now.