This is an Eclipse Code Recommender Snipmatch Snippet repository for Maveryx Test Automation Framework by Maveryx S.r.l.
This repository can be used to provide pre-defined code snippets for writing Maveryx test classes in the Eclipse IDE.
Eclipse Code Recommenders comes pre-installed in every Eclipse release since the Mars release in 2015.
Open the Preferences -> Code Recommenders -> Snipmatch preference page and click the New button:
Select Git-Based Snippet Repository from the list of Snippet Repository Types and click the Next > button:
Fill in the configuration form exactly as shown below and click the Finish button:
This repository is now set up correctly, click the OK button:
Please take a moment to read these general instructions on how to use Eclipse Snipmatch if you are not familiar with it.
Press Ctrl + Alt + Space
in a Java editor in Eclipse to open the Snipmatch search box view. Search for a Maveryx snippet by name or keyword. Or view all Maveryx snippets by searching for the maveryx
tag by typing tag:maveryx
in the search box.
Please raise an issue in the repository issues list to suggest a new snippet idea.
Or, even better, fork this repository, commit a new snippet definition then send a pull request!
Please note that Snipmatch repositories have a specific branch structure that must be adhered to in order to work properly in Eclipse.
The process is that you create and test a snippet locally, then upload it to a configured Snipmatch repository.
Select the Window -> Show View -> Other... menu option then select the Code Recommenders -> Snippets View. NB: Do not select the identically-named General -> Snippets view by mistake:
In the Snippets View, select the "Maveryx Snippets repository" repo (as configured in the Installation section above):
Right click on the "Maveryx Snippets repository" folder and select the Add Snippet to... context menu entry:
The Snipmatch Snippet Editor is now displayed. Fill in the meta data similar to the example in the screenshot below. Don't forget the maveryx
tag. For more information on how to use this editor, see the Eclipse.org Snipmatch Editor documentation:
Click on the Raw Source tab at the bottom of the Snippet Editor. This is where you add the actual code for the snippet. If you adding Java code, you can also select existing code from a Java Editor, right-click and select the Create Snippet... option. Take a look at the Raw Source documentation for more information and links to the JFace template language used by Snipmatch:
Hit Ctrl+S in the Snippet Editor to save the newly-defined snippet. It is now available to try out in your Eclipse editor.
When you are happy that the snippet is working as you desire, if you have write permission to the configured Maveryx Snippets repository, you can upload it directly from the Snippets View. Locate the newly - created snippet in the Snippets View, right-click and select Share Snippet(s)... (NB: you can multi-select more than one snippet to upload in one commit):
Fill in the commit details on the Commit Changes window then click the Commit button:
You will then be prompted with the url of the repository (should be filled in for you), enter your username and password credentials for the git repository and click the OK button:
If the commit was successful, you will see this final message:
The contents of this repository are provided under the MIT license. See LICENSE for more details.