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.
In web freeform sometimes user have to define as web root the project folder. Then the logical view is very ugly, because the web root contains all project folders (pages, WEB-INF, build.xml, src ...) So it would be cool to have a option some how customize, which file should be displayed under a source folder. For example: <source-folder style="tree" excludes="src,test,build,nbprojects,build.xml, WEB-INF/classes" includes="index.jsp"> <label>web</label> <location>.</location> </source-folder> See the issue #52753.
Do not plan to permit any such exclusions. The logical view node represented by <source-folder style="tree"> is simply a clone of the folder node for this folder, including all operations permitted on folder nodes and their children generally. While it is not difficult to make a filter which excludes certain files and subdirectories, the semantics of file operations would be unpleasant. What if the user adds a subdir called "src2" but then renames it to "src" using in-place rename? Should it suddenly disappear? Or stay until the project is closed and reopened? Generally we do not display trees with exclusions anywhere in the IDE for this reason.
Did you read the issue #52753 ? There was no response or suggestion to the original problem... The problem is that my project folder is layed out: project - WEB-INF - META-INF - jsp - src - etc - log - build - test To I need to set my web folder to the project's root folder to get jsp editing features to work, but then my web folder under project view is simply a tree view of my whole project. Pretty nasty and I'm not in a position to change the project layout. Jesse, do you have any smart ideas to solve this?
One obvious fix was to set web folder to project's root but to specify the view locations to the jsp folder. <view> <items> <source-folder style="tree"> <label>/</label> <location>.</location> </source-folder> This was the first thing I tried but you can no longer open any of the jsps after this change...
reopening to gain focus... attempt to get answer to questions in previous comment...
Yes, I looked at issue #52753. I don't offer any suggestions other than restructuring your project, living with a more cluttered logical view, or using the trick hair already mentioned. Re. changing the view/items to display just the desired folders - should work, I guess (*), so if it doesn't please file a separate bug report with details to reproduce - in ant/freeform if the folders do not display at all (or the incorrect folder is displayed) acc. to your edits in project.xml; in web/code if the folders are displayed incl. the desired JSPs but opening the JSPs fails somehow. (*) I presume you meant to write something more like this: <view> <items> <source-folder style="tree"> <label>JSPs</label> <location>jsp</location> </source-folder> <source-folder style="packages"> <label>Servlets</label> <location>src</location> </source-folder> <!-- etc., as desired --> </items> </view>
Playing around alittle more I find a acceptable workaround. While I can't change my webfolder's view, I can add a view node pointing just to the jsp folder. For example, my project.xml now contains: <view> <items> <source-folder style="tree"> <label>Everything</label> <location>.</location> </source-folder> <source-folder style="tree"> <label>JavaServerPages</label> <location>jsp</location> </source-folder> <source-folder style="packages"> <label>Java sources</label> <location>src</location> </source-folder> So I have "Everything" which is the webfolder setup, "JavaServerPages" which is the custom added folder to only view jsps, and "Java Sources" for all my java classes. With this setup all jsps open successfully with completion popups...