Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Code Recommenders » [snipmatch] branch format-5?
[snipmatch] branch format-5? [message #1438614] Mon, 06 October 2014 09:21 Go to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1234
Registered: October 2011
Senior Member
Can you confirm that the Version Mars-M2 (2.1.10.v20140926-1135) from snipmatch uses the branch "format-5" from the Git-Repo?

From what I have seen, there is no format difference between format-4 and format-5.

The snippet-repository-update-guide does not mention this new format yet.

Thanks in advance for your explanations.


Re: [snipmatch] branch format-5? [message #1438832 is a reply to message #1438614] Mon, 06 October 2014 15:04 Go to previous messageGo to next message
Johannes Dorn is currently offline Johannes DornFriend
Messages: 52
Registered: June 2013
Member
Hi Jeremie,

there is a new "format-5" branch first used in the Mars-M2 contribution. This new format adds dependencies to snippets.
This means, you can declare dependencies for snippets that have to be on the classpath, otherwise the snippet is not found.

We have not yet changed the snippets in our Git repo to include any dependency information. In that case, snippets are always found.
You can use the snippet editor in the Snippets view to add dependencies. These are then persisted in the snippets' JSON file.

Since this feature is still in development, we cannot yet guarantee that the format won't change again (though we won't create a new format branch before the release).

We will update the snippet-repo-update-guide once the format is fix.
Re: [snipmatch] branch format-5? [message #1439023 is a reply to message #1438832] Mon, 06 October 2014 20:01 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1234
Registered: October 2011
Senior Member
Ok, thank you a lot for the explanation.
I will give the feature a try and report if necessary (feedback or bug....).

Johannes Dorn wrote on Mon, 06 October 2014 17:04
Since this feature is still in development, we cannot yet guarantee that the format won't change again (though we won't create a new format branch before the release).

This is not a problem at all. A Mars milestone build is a preview release.

Can we use this thread as communication channel during the development process? If you change something I would appreciate to have the information (and to know what I need to change on the format-5 branch).

Thank you in advance.

I appreciate your support and the great work on Snipmatch.

.
Re: [snipmatch] branch format-5? [message #1439427 is a reply to message #1439023] Tue, 07 October 2014 06:37 Go to previous messageGo to next message
Marcel Bruch is currently offline Marcel BruchFriend
Messages: 281
Registered: July 2009
Senior Member

Johannes,
isn't the @before Junit 4 snippet using the new format already?
Re: [snipmatch] branch format-5? [message #1439547 is a reply to message #1439023] Tue, 07 October 2014 09:06 Go to previous messageGo to next message
Johannes Dorn is currently offline Johannes DornFriend
Messages: 52
Registered: June 2013
Member
Jeremie Bresson wrote on Mon, 06 October 2014 16:01

Can we use this thread as communication channel during the development process? If you change something I would appreciate to have the information (and to know what I need to change on the format-5 branch).

Absolutely.

Marcel Bruch wrote on Mon, 06 October 2014 16:01
isn't the @before Junit 4 snippet using the new format already?


You are correct. The "before" and "after" snippets already use the JUnit dependency.
Re: [snipmatch] branch format-5? [message #1441268 is a reply to message #1439547] Thu, 09 October 2014 13:34 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1234
Registered: October 2011
Senior Member
This is nice. I could add the scout dependencies in my snippets.
As far as I could test, this seems to work as expected.

What about the version indication in the metadata?
For the moment I have:
  "dependencies": [
    {
      "groupId": "org.eclipse.scout",
      "artifactId": "org.eclipse.scout.rt.client",
      "version": "0.0.0"
    }
  ]


Do you plan a fixed version indication or a version range?
Re: [snipmatch] branch format-5? [message #1441289 is a reply to message #1441268] Thu, 09 October 2014 14:14 Go to previous messageGo to next message
Johannes Dorn is currently offline Johannes DornFriend
Messages: 52
Registered: June 2013
Member
The next release will probably ignore version informations. The Editor always enters a 0.0.0 version.
Thus, the snippets will work if a matching plugin in any version is found.

We want to add version range support, but this will most likely not make it into the next release.
Re: [snipmatch] branch format-5? [message #1451131 is a reply to message #1441289] Thu, 23 October 2014 11:35 Go to previous messageGo to next message
Johannes Dorn is currently offline Johannes DornFriend
Messages: 52
Registered: June 2013
Member
Hi again Jeremy,

you may have noticed that we have put a silent update onto our stable update site. External circumstances required us to do so, before the documentation was ready. That will hopefully come next week.

Until then, i can now confirm that the format-5 is fix. The version is ignored for now, so simply use "0.0.0" if you manually edit the files. The new version contains a "Share snippet(s)" button in the Snippets view so you could update your snippets using the editor and upload the changes from within Eclipse.
Of course, manually editing the files and commiting the changes works as before.

Let me know if you have questions or experience any issues.
Re: [snipmatch] branch format-5? [message #1478284 is a reply to message #1451131] Tue, 18 November 2014 14:58 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1234
Registered: October 2011
Senior Member
Question:
With commit 29db16ab76dcf9bb9a5707513ad20b38e5045aa7 I have noticed that you have added this to a lot of snippets:
    {
      "groupId": "jre",
      "artifactId": "jre",
      "version": "0.0.0"
    }

The commit message tells "Add snippet dependencies for classpath awareness".

What does it mean? Does it stand for "Java" (with the possibility to add a constraint of the version in the future?)

You will not support snippets without any dependencies in the future?

----
Nice to see, that the UI in the preference page now allows the configuration of multiple repositories. I really like it!
I think I will remove all the snippets defined in the "Eclipse Code Recommenders Snippet Repository" from my fork. Otherwise those snippets are defined twice.

Now if someone wants to have the eclipse scout snippets he configures a second repo like this:

index.php/fa/19933/0/

index.php/fa/19934/0/

Thank you for having added this feature.
Previous Topic:How to change git url for "Share Snippets"
Next Topic:[snipmatch] dependency names
Goto Forum:
  


Current Time: Wed Apr 26 12:27:04 GMT 2017

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

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