Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[recommenders-dev] [soc-dev][gsoc] Weekly Status: Snippet Sharing Infrastructure

Hi,

my name is Olav Lenz and I participate in the Google Summer of Code 2014 at Code Recommenders [1].
This year is my second time, I already participated last year.

During the last weeks I get familiar with the code base and did contribute some bug fixes [2].
Since there isn't anything to show you at the moment, I would like to give a short introduction to the GSoC project [3] I will be working on.

Snippet Sharing Infrastructure

Snipmatch is a part of Eclipse Code Recommenders which allows developers to find helpful code snippets. Pressing Ctrl + Enter in Eclipse opens a search box and provides a list of snippets that match the query.

http://www.eclipse.org/recommenders/images/snipmatch-completion.png

The advantage of Snipmatch is that developers can quickly find the code snippet they are looking for in in a vast set of snippets. At the moment, all the snippets you can access using Snipmatch are Eclipse’s build-in templates. These templates are fetched from a Git repository to which the templates have been added by hand. Furthermore, it is possible for the user to contribute modified or added snippets using Egit, but the process of sharing is quite complex and requires knowledge of Snipmatch’s implementation details.

The current version of Snipmatch provides the basics of an sharing infrastructure but also has some restrictions which has to be improved.
The following issues are relevant for this project:
  • Snipmatch supports only one kind of source for the snippets (Git-based).
  • It is not possible to have multiple sources for snippets at the same time.
  • It is possible to change/add/remove code snippets but that isn’t very user-friendly.
The goal of this project is to improve Snipmatch to solve the problems described above to make Snipmatch more user friendly and to open it for a world of new snippets.

To reach the goal the following aspects are identified.

1. Support different kinds of sources for snippets
As already mentioned only one source type for snippets (Git-based) available at the moment. 

The first part of improving Snipmatch would be to extend the number of different sources. For this project these could be:


  • a git based source

  • a local, file-based source

  • a direct connection to the build-in templates of Eclipse


2. Support multiple sources at the same time
At the moment the backend of Snipmatch already supports more than one source at the same time, but the sources are hard coded and can’t be configured by the users. Therefore the preference page of Snipmatch should be improved to provide this functionality. An mock of the Snipmatch preference page could look like the following:

Snipmatch_Preference_Page.png



3. Configuration of snippet sources in the UI
The different kinds of sources all have some special kinds of configurations. For example a Git repository might need a username and password for the access. To make the configuration for the user comfortable the preference page of Snipmatch has to be improved to cover these new possibilities. A mock for the wizard which helps users to configure sources:

Wizard!.png Wizard_Git based.png

4. Sharing snippets
Since receiving snippets from different sources is only one part of “sharing snippets”, the sending part is important as well. An idea to implement this is to introduce a new view which takes care about all the sharing aspect. The view should display all snippets which are changed or added and the user can decide which snippets he wants to contribute to which plattform/source.

Snippet Sharing.png


Thats it for the moment. I hope to be able to show first results soon.
For the next week I planned to start with step 1: Having a look at different possible kinds of snippet sources and start the implemention.

Regards,

Olav

[1] http://www.eclipse.org/recommenders/
[2] https://git.eclipse.org/r/#/q/owner:%22Olav+Lenz%22+status:open,n,z
[3] https://docs.google.com/document/d/1IKXw25w_LsM6xi1Lun48g7Trm_tat6Tgt4HIcVfUT4M/edit#heading=h.f5cmiw24j8xe

Back to the top