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 using cnd to work on a project which has its own old makefile. A very nice (and unique, afaik) feature of cnd is that it doesn't require the project directory (the one containing the nbproject folder) to be a subdir of the legacy code directory. This is very convenient because it allows to preserve the existing structure on the versioning system, allowing programmers to adopt netbeans as a development tool unobtrusively, i.e. without imposing new project files to other developers working on the same project. Unfortunately, the "new file" dialog only allows to create new files under the project directory structure; furthermore, trying to use the absolute path results in the complete replication of the directory structure under the project dir, and the dialog rejects relative paths. So one has to manually create the new file from outside netbeans, then import it in the project via "Add existing item". Maybe an "Add existing directory" command, allowing the user to refer to the original sources location might be a solution (but I don't know how it fits in the overall project structure...)
I've just noticed that the wizards for creating new files do contain a "Location" combo box, allowing the user to create files in the external source folders. Unfortunately, the items in the combo box are not correctly initialized: for example, my "src" folder appears in the list only after using the "Add existing item..." entry in the explorer popup menu.
I agree. I think should be more simple way to add files to such projects. Therefore I upgrade bug to P2.
I've noticed that the "Location" combo box in the new file wizard doesn't appear for some of my projects. When I open these projects, the source folders also appear in the "Files" tab of the explorer. I don't know why this behaviour is different for different projects.
The Folder browse button in the wizard should allow browsing outside project root. The New File dialog is part of NB's project system so I will re-categorize to projects component.
The standard NF wizards intentionally restrict file creation to SourceGroup's claimed by the project's Sources impl. This will not be changed. Either the CND project needs to supply a more accurate SourceGroup list, or you need to provide alternate template wizards which ask for arbitrary file locations.
OK, I will take it back.
*** Issue 116890 has been marked as a duplicate of this issue. ***
I am desperately waiting for a solution to this problem, since one of the consequences of this will make NB6 cvs/svn features totally ignore the original (thus external) project directory, as only the NB-created folder is committable.
The workaround could be: suppose you have sources as ...Project/ src Then on last page of wizard (Project Name and Location) type: - <Project name> as "src" - <Project Location> as ...Project/ In this case under your "src" folder the new folder "nbproject" will be created, but that allows you to be your sources "inside" your project root
Fixed. Now makefile projects have two source roots: the folder where the main makefile from the imported project is (it's new) and the created project itself. When you create a new file from one of the folders in the project view, you will now get a choice of where to create the new file. One of the choices is in the source tree of the imported makefile project. I think this is what you ask for. The Files view will show both source roots. VC of the imported project can be managed from the Files view. The Project view may not correctly reflect the state of the VC system. I will consider this issue fixed. You should be able to control the source roots. The imported project may have a different root than the build directory and it may have more than one root. It should be customizable. I have filed an enhancement request for this: 117708
Verified in build 31102007