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.
I am not able to create popup menu in contrib/favourites module for any folder that is not part of any project. This is caused by NewFile returning null as getPopupPresenter(). I'm going to put there hotfix, but still this should be fixed soon.
projects/projectui/src/org/netbeans/modules/project/ui/actions/NewFile.java,v <-- NewFile.java new revision: 1.8
Hele Petr, Hacks.hackFolderActions should not exist. We should not be touching the FolderNode context menu. Wherever in Projects and Files tabs we are displaying folder nodes, we can add whatever actions we want using filter nodes. Then this kind of issue would not appear. On the other hand, o.o.a.NewTemplateAction *should* be deleted from FolderNode's context menu and replaced by o.o.a.NewAction, with two NewType's: one to make a new subfolder, one to make a new empty file with explicit extension. Then we can hide NewAction from the Projects & Files tabs when we add our special action, but anyone using a plain folder view (like Favorites) will have this action still. Agreed?
First paragraph ok, I am not sure about the second one. It is true that it would simplify our life in all files tab and favourites tab, but I am concerned about its possible (negative) effect on platform - people would not find the templates stuff. That would be imho bad. Would not it be simpler to hide all "project only" templates from default NewFromTemplate? Another solution to this would be to make the standard NewFromTemplate "callback action": Each view could register its own callback in getActionMap() and that callback could do anything.
Not really concerned about that. Templates are not really appropriate for the platform anyway, just there historically since that was where we put the impl. Just having new file/folder would be fine for platform usage. Anyway we want to kill the old template wizard sooner or later since the UI is no longer appropriate to anything.
Implemented in the NewFile action in projects. Feel free to move it into projects if you like it.