How to Export / Import Netbeans Templates

I am running Netbeans 7.0.1 under OS X and have created several templates using Tools> Templates. All my templates are created in a new folder in the Templates folder list.

Now I would like to export the templates and share them with other members of my team.

How do I export them and then allow my import partners to install Netbean in their installation?

Note. I found the templates in the ~ / .netbeans directory, but was hoping the IDE would simplify the import / export, so people would not need to copy folders on the file system.

+6
source share
3 answers

I just tested my WinXP with Netbeans 7.0.1 and 7.1, so I'm not 100% sure that it will work on OS X.

Open Netbeans 7.0.1 and go to Tools -> Options , and in the new windows, go to the bottom corner of Export . In this window, expand Editor by clicking + .

In the tree that opens, you need to activate the check box in front of Code Templates , fill in the target file and where you are ready to import Templatesfile.

Your team members can import them by clicking Import in Tools -> Options .

Hope this helps you and your members.

enter image description here

+7
source

Templates are saved in you ~/.netbeans/version/config/Templates/Properties . You can import your template using:

 Tools --> Templates --> Choose a directory then click "Add" button. 

If you need more information, perhaps this tattoo can help you.

Or in

 Tools -->Options --> Editor pane --> Code templates pane 

Select your language, then in the lower left corner you will find the Export and Import buttons.

+2
source

You had a similar problem while trying to save my settings with respect to โ€œCode Templatesโ€ in my automatic backup. After I tried the Tools >> Options >> Editor pane >> Code Templates pane + Export trick suggested here, I found out by checking the exported archive file that the name of the xml-parameters file that I had to look for was org-netbeans-modules-editor-settings-CustomCodeTemplates.xml , as stored in AppData\Roaming\NetBeans\8.0\config\Editors\text\x-java\CodeTemplates (Windows), so I can use this path right now in the backup without save the file.

0
source

Source: https://habr.com/ru/post/906621/


All Articles