-
Notifications
You must be signed in to change notification settings - Fork 1
DevFaqAddFileTemplateToNewFileContentMenu
How can I define the available File types when the user right-clicks the project folder and chooses "New"?
See documentation of "Privileged and Recommended Templates" at http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectuiapi/org/netbeans/spi/project/ui/templates/support/package-summary.html
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[]{
"Templates/Nesc/EmptyTemplate.nc",
"Templates/Nesc/SimpleTemplate.nc",
};
@Override
public String[] getPrivilegedTemplates() {
return PRIVILEGED_NAMES;
}
}
` Taken from Geertjan @ [email protected]
Further examples:
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-01-26, and needs to be reviewed.
Apache NetBeans is an effort undergoing incubation at The Apache Software Foundation (ASF).
Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects.
While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
This wiki is an experiment pending Apache NetBeans Community approval.