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 55748 - Customizing logical view
Summary: Customizing logical view
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Freeform (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-02 07:17 UTC by Petr Pisl
Modified: 2007-03-05 12:39 UTC (History)
0 users

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 Petr Pisl 2005-03-02 07:17:54 UTC
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.
Comment 1 Jesse Glick 2005-03-09 23:50:11 UTC
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.
Comment 2 _ hair 2005-03-10 09:54:14 UTC
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?
Comment 3 _ hair 2005-03-10 11:02:34 UTC
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...
Comment 4 _ hair 2005-03-14 13:14:47 UTC
reopening to gain focus...
attempt to get answer to questions in previous comment...
Comment 5 Jesse Glick 2005-03-14 16:33:26 UTC
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>
Comment 6 _ hair 2005-03-15 06:22:05 UTC
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...