Apache NetBeans Wiki Index

Note: These pages are being reviewed.

How can I define the available File types when the user right-clicks the project folder and chooses "New"?

Example: `

import org.netbeans.spi.project.ProjectServiceProvider;
import org.netbeans.spi.project.ui.PrivilegedTemplates;

@ProjectServiceProvider(projectType = "org-netbeans-modules-cnd-makeproject", service = PrivilegedTemplates.class)
public class NescPrivilegedTemplates implements PrivilegedTemplates {

    private static final String[] PRIVILEGED_NAMES = new String[]{

    public String[] getPrivilegedTemplates() {
        return PRIVILEGED_NAMES;


` Taken from Geertjan @ dev@platform.netbeans.org

Further examples:

Apache Migration Information

The content in this page was kindly donated by Oracle Corp. to the Apache Software Foundation.

This page was exported from http://wiki.netbeans.org/DevFaqAddFileTemplateToNewFileContentMenu , that was last modified by NetBeans user Markiewb on 2013-08-10T16:08:13Z.

NOTE: This document was automatically converted to the AsciiDoc format on 2018-02-07, and needs to be reviewed.