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 170662

Summary: Need API to block certain templates in New action
Product: projects Reporter: _ tboudreau <tboudreau>
Component: Generic InfrastructureAssignee: Jesse Glick <jglick>
Status: RESOLVED WONTFIX    
Severity: blocker CC: ankinelaturu
Priority: P1 Keywords: API
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 170659    

Description _ tboudreau 2009-08-19 18:02:33 UTC
Java Card Classic projects are only allowed to have a single Java package.

Need an SPI to suppress visibility of the Java Package and Folder templates which can be placed in a Project's lookup, similar to PreferredTemplates, e.g.

public interface getSuppressedTemplates {
    /**Array of paths to templates in the system filesystem**/
    public String[] getSuppressedTemplates();
}

and changes in NewAction to eliminate these templates from those visible in both the New popup menu on packages/folders, and also the New File wizard.

Suppression of templates should be specific to the source directories of the project - i.e. the user should be able to create a new folder in the project root 
- just not in any source directory of the project.
Comment 1 _ tboudreau 2009-08-19 18:04:36 UTC
See http://wiki.netbeans.org/JavaCardTODOs for details
Comment 2 Antonin Nebuzelsky 2010-03-29 14:11:07 UTC
Change of default owner.
Comment 3 Jesse Glick 2010-07-02 19:20:45 UTC
There are many other ways in which an unsuspecting user might wind up with >1 package containing Java classes. Better to just display an error during the build if this happens, explaining how to correct the problem.