Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Code Recommenders » Contribution
Contribution [message #671730] Wed, 18 May 2011 19:48 Go to next message
Paul-Emmanuel Faidherbe is currently offline Paul-Emmanuel FaidherbeFriend
Messages: 30
Registered: April 2011
Location: france
Member
Hi everyone,

I'm a french Eclipse user and developer. I'm working on several Eclipse plugins projects for my job and I'm maintaining a blog to spread knowledge about RCP platform and related tools : developpef.blogspot.com

I would like to get involved in some community project, especially Code Recommenders that I found really stuning.

Please let me know how can I get involved and for what.

Regards.
Re: Contribution [message #671826 is a reply to message #671730] Thu, 19 May 2011 06:08 Go to previous messageGo to next message
Marcel Bruch is currently offline Marcel BruchFriend
Messages: 49
Registered: July 2009
Member
Hi Paul-Emmanuel,

On 18.05.11 21:48, Paul-Emmanuel Faidherbe wrote:
> I would like to get involved in some community project, especially Code
> Recommenders that I found really stuning.

that sounds great!

> Please let me know how can I get involved and for what.

In fact there is a lot of work in many different areas. For some areas
it may take quite some time to familiarize yourself with code and
concepts but there are also some areas which could serve as a good entry
point to Code Recommenders.

Did you follow the "Fulltext Autocompletion proposal" thread in this
forum? There are quite some people (even from the JDT team) that would
like to see such a completion engine for Eclipse.

We created a simple completion engine that works on regular expressions
so far. But there are quite a lot of things we could/should implement.
For instance,

* ranking these proposal according to some notion of similarity,
* highlighting chars in the proposal that matched the regular expression,
* extending the concepts to support completion on arbitrary proposals

etc. Since this engine starts on the "green-field" this could be a good
way to start contributing since you have to deal mostly with extending
JDT but don't need to get into the details of Code Recommenders' core
from the beginning.

For sure there are many more ways to contribute like reporting errors,
improving user documentation in the Eclipse Wiki, writing cheat sheets
that show Code Recommenders in action etc. You may also keep your eyes
open for new ideas how Eclipse could be improved and discuss them here.
Many more things are possible.

Is there an Eclipse Indigo Democamp close to your home? You may consider
to present Code Recommenders there? ;)

Let us know what kind of work interests you.

Cheers,
Marcel
Re: Contribution [message #671867 is a reply to message #671826] Thu, 19 May 2011 08:31 Go to previous messageGo to next message
Paul-Emmanuel Faidherbe is currently offline Paul-Emmanuel FaidherbeFriend
Messages: 30
Registered: April 2011
Location: france
Member
Hello Marcel,

Thank you for your answer.

I took a look at Demo Camps planned for this year and saw there is one coming on june 22nd at Toulouse, right in my town! Smile Should consider taking a tour out there...

As you mentioned, starting reading and writing for Fulltext completion proposal may be a good entry point. I'm very curious about how to contribute to this first "sub-project".

After many researches, I could not find many documents on how to concretely get involved and start coding for a project. Maybe you could help me?
Re: Contribution [message #672051 is a reply to message #671867] Thu, 19 May 2011 17:53 Go to previous messageGo to next message
Marcel Bruch is currently offline Marcel BruchFriend
Messages: 289
Registered: July 2009
Senior Member

Hi Paul-Emmanuel,

> there is one coming on june 22nd at Toulouse, right in my town! Should consider taking a tour out there...

Definitely! If you like to present, I'll share my (5 introductory) demo camp slides. But even if not: Visiting demo camps is always worth doing Wink

> As you mentioned, starting reading and writing for Fulltext completion proposal may
> be a good entry point. I'm very curious about how to contribute to this first "sub-project".
> After many researches, I could not find many documents on how to concretely get involved
> and start coding for a project. Maybe you could help me?

You mean a general guide "How to Contribute"? Or a specific one for Code Recommenders?

I couldn't find any good (general) documentation on this too. Thus, I added a small wiki page on this here. Can you read it and provide me with some feedback whether this is what you were looking for - or what is missing?

In the case you are looking for a project specific guidance. So far we have:

http://wiki.eclipse.org/Recommenders/ContributorsWanted and http://wiki.eclipse.org/Recommenders/ContributorTopics

I'm currently rewriting the former to match the Code Recommenders specific parts. But in a nutshell it should roughly work like this:

# Check out our git repository.
# Create a feature branch.
# Make your changes
# Commit them locally.
# Create a patch, and finally
# Submit your patch to Bugzilla.

This is typically done quiet frequently with little patches (less than 200 lines) but takes longer if the patches get larger since patches containing more than 200 lines require an IP check from Eclipse IP team. If you want to learn more about this just check out http://www.eclipse.org/legal/EclipseLegalProcessPoster.pdf
Re: Contribution [message #672077 is a reply to message #672051] Thu, 19 May 2011 19:26 Go to previous messageGo to next message
Paul-Emmanuel Faidherbe is currently offline Paul-Emmanuel FaidherbeFriend
Messages: 30
Registered: April 2011
Location: france
Member
Hi,

As you mentioned it, Eclipse Legal Process Poster is the only "interesting" official document I found. By the way, your links look great and explain clearly what I was looking for as "first of all information". For the moment, I only have one question to add : is there another way (I mean other than this public forum) to contact project leader/responsible in order, for example, to get involved? The project's home page presents team but nothing like emails...

Your page on Contributor topics is a good simple way to understand where project needs help and to pick up the prefered one to get started.

So, when could I start?? Smile What has to be checked out as project source : the git repo or some other svn? Maybe it is what you are writing about... Please keep me aware, I'm now very excited to start helping you guys!

Cheers

[Edit]
I checked out source from git in order to have a first look at the existing code, and the first thing I stumbled upon is that you are using Tycho? So great! I had to make it work for some projects in my job so I study it but could not succeed in integrating it in our workflows because of 0.9 version's limitations. I wrote a serie of tutorial articles on my blog in order to spread knowledge Wink Hope this will help!

[Updated on: Thu, 19 May 2011 20:31]

Report message to a moderator

Re: Contribution [message #672094 is a reply to message #672077] Thu, 19 May 2011 20:54 Go to previous messageGo to next message
Marcel Bruch is currently offline Marcel BruchFriend
Messages: 49
Registered: July 2009
Member
On 19.05.11 21:26, Paul-Emmanuel Faidherbe wrote:

> your links look
> great and explain clearly what I was looking for as "first of all
> information".

Great. I proposed the page to Wayne. We'll move it's contents to
http://wiki.eclipse.org/How_to_contribute and refer to it from other
locations so that others may find it more easily. Thanks for pointing
this out.

> For the moment, I only have one question to add : is there
> another way (I mean other than this public forum) to contact project
> leader/responsible in order, for example, to get involved? The project's
> home page presents team but nothing like emails...

Agreed, the team page needs some love :) But in general I think that
public forums and (developer) mailing lists are well-suited channels to
get in contact with committers of an open-source project.


> So, when could I start?? :) What has to be checked out as project source
> : the git repo or some other svn? Maybe it is what you are writing
> about... Please keep me aware, I'm now very excited to start helping you
> guys!

Great! To get started you have to setup your local Eclipse once. This
may take a while since a lot dependencies are downloaded. But luckily
that happens just once :) Aside Eclipse you need GIT and Maven 3
installed on your local machine.


Please read

http://wiki.eclipse.org/Recommenders/Infrastructure#GIT_Repository

to see how to get access to the sources and then read


http://wiki.eclipse.org/Recommenders/Infrastructure#Compiling_Sources_in_Eclipse

to complete your Eclipse setup.


For the Subwords Completion Engine you just need to import two projects:

* org.eclipse.recommenders.rcp.codecompletion.subwords and
* org.eclipse.recommenders.tests.rcp.codecompletion.subwords

If everything is setup correctly (especially the target platform) you
are read to start contributing. Just start an Eclipse Runtime and
trigger method call code completion on any object like shown on the
screenshot here:


http://code-recommenders.blogspot.com/2011/05/subword-matching-completion-engine-for.html

If you see the regular expressions at work we should discuss the next
details :)

Best,
Marcel

P.S.: I silently assumed that you already have experience in building
and running plug-ins from within Eclipse. Let me know if I'm wrong.
Re: Contribution [message #672164 is a reply to message #672094] Fri, 20 May 2011 06:57 Go to previous messageGo to next message
Paul-Emmanuel Faidherbe is currently offline Paul-Emmanuel FaidherbeFriend
Messages: 30
Registered: April 2011
Location: france
Member
Thank you for all these details. I will start installing and running all of those as soon as I can and keep you in touch within a day.
Don't worry I already used the tools you mentioned, except Git, but this is the game, learn and work at the same time!
Re: Contribution [message #673175 is a reply to message #672164] Sun, 22 May 2011 17:37 Go to previous messageGo to next message
Paul-Emmanuel Faidherbe is currently offline Paul-Emmanuel FaidherbeFriend
Messages: 30
Registered: April 2011
Location: france
Member
Hello Marcel,

I am up and running! Smile I successfully configured my dev environment and tested subword completion. Seems already quiet interesting!
I am now waiting for some more information from you about what could I do.
One question by the way : do/will I have a commiter id for git? For the moment, I cloned from the anonymous URI but don't know if I could commit when required.

Regards
Re: Contribution [message #673195 is a reply to message #673175] Sun, 22 May 2011 19:29 Go to previous messageGo to next message
Marcel Bruch is currently offline Marcel BruchFriend
Messages: 49
Registered: July 2009
Member
Hi Paul-Emmanuel,

On 22.05.11 19:37, Paul-Emmanuel Faidherbe wrote:
> I am up and running! :) I successfully configured my dev environment and
> tested subword completion. Seems already quiet interesting!

Excellent!


> I am now waiting for some more information from you about what could
> I do.

There are 3 features I think would be great to be implemented next:

1. Support arbitrary proposals (not just method calls).
2. Implement a proposal ranking strategy that favors proposals that
share commons prefixes and subwords.
3. Highlight proposal characters that match the regex to indicate why a
proposal was selected.

I assembled a brief feature list for the subwords completion engine
here:
http://wiki.eclipse.org/Recommenders/ContributorTopics#Subwords_Completion_Engine

How do you feel starting with the first feature on the list?

> One question by the way : do/will I have a commiter id for git? For the
> moment, I cloned from the anonymous URI but don't know if I could commit
> when required.

No, not yet :) At Eclipse you start out with several contributions
(i.e., patches via Bugzilla) before becoming a committer. If you are
interested in more details this Wiki page may be a good reading:

http://wiki.eclipse.org/Development_Resources/HOWTO/Nominating_and_Electing_a_New_Committer


Do you want to take lead on feature one?

Best,
Marcel
Re: Contribution [message #673208 is a reply to message #673195] Sun, 22 May 2011 21:02 Go to previous messageGo to next message
Paul-Emmanuel Faidherbe is currently offline Paul-Emmanuel FaidherbeFriend
Messages: 30
Registered: April 2011
Location: france
Member
Hi.

Why not feature one. Could be interesting. But I think I need more details : completion should make proposals also for class names and static members for example?
I will start digging in the code as soon as I can.

I would really appreciate taking lead on this feature, even if I don't know if I am truly capable of... I'm still a newbie in Eclipse processes! So I try reading and learning about all of this, but when I will be ready to show you some snippets (no too soon of course!), I may still have some more questions on how to submit it to you and so on...

So I hope I wont take you too much time, and please forgive me by advance! Wink

Keep you in touch on what I am doing for the newt few days.

Thanks again.
Re: Contribution [message #673286 is a reply to message #673208] Mon, 23 May 2011 06:16 Go to previous messageGo to next message
Marcel Bruch is currently offline Marcel BruchFriend
Messages: 49
Registered: July 2009
Member
On 22.05.11 23:02, Paul-Emmanuel Faidherbe wrote:
> Why not feature one. Could be interesting.

Great. I'm looking forward to this!

> But I think I need more
> details : completion should make proposals also for class names and
> static members for example?

Exactly. There are two locations to look at:

(i) SubwordsCompletionRequestor.accept(CompletionProposal).
There I do a dispatch on the current completion kind and create the
JavaUI proposal. This needs to be extended to support other proposal kinds.

(ii)
SubwordsJavaMethodCompletionProposal.isPrefix(String, String).
This method had to be overridden to make completion work. The original
implementation made a "completion.startsWith(prefix)" check, which
simple does not work with subwords...

The worse thing of this extension is that I currently would end up in
copying the whole logic from
org.eclipse.jdt.ui.text.java.CompletionProposalCollector.createJavaCompletionProposal(CompletionProposal)
- which doesn't feel smart :) But I'm not sure whether we can do that
better from outside JDT.

> I will start digging in the code as soon as I can.
> I would really appreciate taking lead on this feature, even if I don't
> know if I am truly capable of...

No worries. This is part of getting involved into any project I guess.

Since this task yet requires JDT APIs only, you may consider to ask in
the JDT newsgroup for some suggestions how this could be solved (w/o
having to duplicate all the code from CompletionProposalCollector)?
I could imagine that Deepak or Ayushman may have some hints.

> I'm still a newbie in Eclipse
> processes! So I try reading and learning about all of this, but when I
> will be ready to show you some snippets (no too soon of course!), I may
> still have some more questions on how to submit it to you and so on...

Don't hesitate to ask...

> So I hope I wont take you too much time, and please forgive me by
> advance! ;)

.... and no worries :)

Marcel
Re: Contribution [message #674071 is a reply to message #673286] Wed, 25 May 2011 17:49 Go to previous messageGo to next message
Paul-Emmanuel Faidherbe is currently offline Paul-Emmanuel FaidherbeFriend
Messages: 30
Registered: April 2011
Location: france
Member
Hello,

I started implementing a solution for subwords completion proposals (without having to copy the whole logic of org.eclipse.jdt.ui.text.java.CompletionProposalCollector.createJavaCompletionProposal(CompletionProposal) as you mentioned it).

Here is what I did :

- In SubwordsCompletionRequestor I call org.eclipse.jdt.ui.text.java.CompletionProposalCollector.createJavaCompletionProposal(CompletionProposal proposal) in order to get back the proper proposal, letting jdt make its job.

- In SubwordsCompletionRequestor I call a newly created SubwordsCompletionProposalDecorator that is used to decorate jdt proposal with our new isPrefix() implementation.

- Decorator instanciates all "Subwords proposals" extending jdt proposals with their own properties.

- And of course I made the decorator managing all proposal kinds returned by jdt collector.

After some tests, I think it is quite what we were looking for. So far, how can I provide you my snippets (in order to get your review)?

Cheers
Re: Contribution [message #674140 is a reply to message #674071] Wed, 25 May 2011 22:54 Go to previous messageGo to next message
Marcel Bruch is currently offline Marcel BruchFriend
Messages: 289
Registered: July 2009
Senior Member

Hi Paul-Emmanuel,

this sounds great - but #isPrefix was originally a protected method I made public for testing. AFAIK this method is called from "this" only. Could you verify that completion also works when you trigger completion after typing, say, just one character and then continue typing and verify that the proposals are refined?
Re: Contribution [message #674410 is a reply to message #674140] Thu, 26 May 2011 20:24 Go to previous messageGo to next message
Paul-Emmanuel Faidherbe is currently offline Paul-Emmanuel FaidherbeFriend
Messages: 30
Registered: April 2011
Location: france
Member
Hi Marcel,

I did some more tests and I can confirm that completion is still refined when typing or using left/right arrow keys. Also, isPrefix() is still protected, as overriding jdt completion proposal types method (so far, RegexMatcherTest does not compile anymore, but I may fix it later).
I drew you a simple class diagram trying to explain my implementation choices.
I also join two screenshots of running completion.

Please keep me informed if I missed something.

Re: Contribution [message #674421 is a reply to message #674410] Thu, 26 May 2011 21:03 Go to previous messageGo to next message
Marcel Bruch is currently offline Marcel BruchFriend
Messages: 289
Registered: July 2009
Senior Member

Hey Paul-Emmanuel,

that sounds good. Could you create a new bug report and attach your changes as patch (e.g., by using git-format-patch)? Then we can download and test your patch.
I'm looking forward to it!

Thanks,
Marcel
Re: Contribution [message #674490 is a reply to message #674421] Fri, 27 May 2011 06:44 Go to previous message
Paul-Emmanuel Faidherbe is currently offline Paul-Emmanuel FaidherbeFriend
Messages: 30
Registered: April 2011
Location: france
Member
I created this report : https://bugs.eclipse.org/bugs/show_bug.cgi?id=347397
I will attach patches as soon as I come back home.
Previous Topic:(no subject)
Next Topic:getting exception on adding the Recommenders nature
Goto Forum:
  


Current Time: Sat Apr 20 00:52:58 GMT 2024

Powered by FUDForum. Page generated in 0.04215 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top