This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 99494

Summary: Import/export of code templates
Product: editor Reporter: hbjastad <hbjastad>
Component: -- Other --Assignee: Milutin Kristofic <mkristofic>
Status: RESOLVED WORKSFORME    
Severity: blocker CC: markiewb
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description hbjastad 2007-03-30 08:20:00 UTC
When a team of developers are required to use the same code templates, we need a
simple way to make this happen. In Eclipse, we have created a set of code
templates, which can be exported, saved in Subversion and imported by all
developers. I can't find a simple way to do this in NetBeans.
Comment 1 Vitezslav Stejskal 2007-03-30 11:33:02 UTC
Would be nice. In fact there is a workaround for this, the codetemplates are
stored in an xml file in your userdir - eg.
<userdir>/config/Editors/text/x-java/abbreviations.xml. You can copy this file
over to your mates' userdir and they should see the same codetemplates in their
IDEs.
Comment 2 virtualdarkness 2008-08-19 11:45:44 UTC
Updated according to: http://blogs.sun.com/netbeansphp/entry/netbeans_ide_6_5_beta#comment-1219097273000

I agree with this enhancement request as stated in my comment:
----------
"Also another feature that would be very useful it is imho to add import/export features to the code templates and the
import feature should let the user to merge the imported templates with its own. I think that now you can already do it
editing by hand the config files but a GUI would stimulate users to join their forces and sharing and improving they
code templates for a specific language / framework (this last feature + the "new [user defined] language" feature)."
----------

I guess that the templates could be exported in xml format.

Having the possibility to automatically merge them will also make it more easy to share with other developers using svn
or, for example, posting them as an attachment to the forum of a language/framework community..
Comment 3 markiewb 2012-09-22 23:51:10 UTC
Exporting and importing of code templates is supported by the options dialogs. See the import/export buttons in the bottom of the dialog. 

At least >=NB7.2. So closing this issue.