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 - Need API to block certain templates in New action
Summary: Need API to block certain templates in New action
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: API
Depends on:
Blocks: 170659
  Show dependency tree
 
Reported: 2009-08-19 18:02 UTC by _ tboudreau
Modified: 2010-07-02 19:20 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.