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 170663 - Need API to disable folder creation (including via paste)
Summary: Need API to disable folder creation (including via paste)
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: API
Depends on: 170664
Blocks: 170659
  Show dependency tree
 
Reported: 2009-08-19 18:09 UTC by _ tboudreau
Modified: 2010-04-02 19:16 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:09:00 UTC
Classic (2.0) Java Card projects are only allowed to contain one Java package.  Issue 170659 requests an API to suppress new package and folder templates.

To fully support this option we also need an API to allow our code to veto creating a new folder under source folders if sources are present.

One notable caveat to this is that package rename refactoring will create intermediate folders and should still be allowed to.  Will request a separate API for 
detecting when running inside a refactoring.
Comment 1 Jaroslav Tulach 2010-04-02 18:34:27 UTC
Either the project's new file wizard can give project some control over the templates (btw. there are PreferredTemplates, so maybe just use them properly?), or Java Package template shall consult the project and allow its creation to be forbidden.

I don't plan to do anything about this in openide.filesystems nor openide.loaders as this is very IDE specific request.
Comment 2 Jesse Glick 2010-04-02 19:16:14 UTC
(In reply to comment #1)
> there are PreferredTemplates, so maybe just use them properly?

That would be the obvious solution.

Or just display a warning on the project node, and/or an error in the task list, and/or a build-time error if there is >1 package.