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 254713 - Allow including folders inside "Ignored Folders" into the project.
Summary: Allow including folders inside "Ignored Folders" into the project.
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.0.2
Hardware: All All
: P4 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks: 244770
  Show dependency tree
 
Reported: 2015-08-25 13:09 UTC by budhajeewa
Modified: 2017-01-12 07:04 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 budhajeewa 2015-08-25 13:09:55 UTC
Imagine the project root "/". Inside "/", imagine an Ignored Folder "vendor". Within "vendor", there is a folder called "acme" (Among dozens of other folders.). The full path of acme is "/vendor/acme".

If the user wants to include "/vendor/acme" into the project, there is no way to do that. Because NB doesn't currently support including sub folders inside ignored folders.

I suggest adding an option to do just that, which is:

Add sub folders of ignored folders into the project.
Comment 1 Tomas Stupka 2015-08-27 16:46:38 UTC
sorry, i do not understand. what kind of ignore is this about? Ignored like in version control ignored, or sometinng else.

what is your project type?
Comment 2 budhajeewa 2015-08-28 01:01:23 UTC
@tstupka I am talking about the "Ignored Folders" in NetBeans. Not a VCS or something else. See https://blogs.oracle.com/netbeansphp/entry/ignored_folders_sure for more details.

Project type is irrelevant. This is a basic IDE feature.
Comment 3 Tomas Stupka 2015-08-28 08:43:29 UTC
> @tstupka I am talking about the "Ignored Folders" in NetBeans. Not a VCS or something else. See https://blogs.oracle.com/netbeansphp/entry/ignored_folders_sure for more details.
> Project type is irrelevant. This is a basic IDE feature.
php then, thanks
Comment 4 Tomas Mysik 2015-08-28 08:55:29 UTC
Definitely not a defect. IMHO a bit strange request, ignored folder is simply ignored. If anything underneath such folder should not be ignored then do not ignore any of its parent but rather all the folders around (/vendor/abc, /vendor/def etc. in your case).
Comment 5 budhajeewa 2015-08-28 13:12:11 UTC
(In reply to Tomas Mysik from comment #4)
> Definitely not a defect. IMHO a bit strange request, ignored folder is
> simply ignored. If anything underneath such folder should not be ignored
> then do not ignore any of its parent but rather all the folders around
> (/vendor/abc, /vendor/def etc. in your case).

"/vendor" folder is typically used to store 3rd party libraries which usually we do not want to be included in the NB project because it make the IDE scan files we actually do not need when we write our code. However, sometimes, we need to include one or two 3rd party libraries in the project because we might need to use it for auto-suggestions, for an example.

In such a case, what is easier?

1. Ignoring dozens of library folder inside "vendor" so that we can keep a couple.

2. Ignoring the "vendor" folder, and then instructing NB to track a couple of sub folders within that.
Comment 6 Tomas Mysik 2015-08-28 13:34:15 UTC
(In reply to budhajeewa from comment #5)
> "/vendor" folder is typically used to store 3rd party libraries which
> usually we do not want to be included in the NB project

So, why do you have them in your project? What is their purpose? If you are using Composer then its vendor directory should be scanned & indexed by NetBeans so editor features can work as expected, right?

> However,
> sometimes, we need to include one or two 3rd party libraries in the project
> because we might need to use it for auto-suggestions, for an example.

This is more common case IMO, see above.

> In such a case, what is easier?
> 
> 1. Ignoring dozens of library folder inside "vendor" so that we can keep a
> couple.
> 
> 2. Ignoring the "vendor" folder, and then instructing NB to track a couple
> of sub folders within that.

Adding another level of complexity to the existing code is too much to solve this "issue", sorry. Moreover, you can solve this situation very easily e.g. using symlinks ;)

Thanks.
Comment 7 budhajeewa 2015-08-28 13:43:11 UTC
(In reply to Tomas Mysik from comment #6)
> (In reply to budhajeewa from comment #5)
> > "/vendor" folder is typically used to store 3rd party libraries which
> > usually we do not want to be included in the NB project
> 
> So, why do you have them in your project? What is their purpose? If you are
> using Composer then its vendor directory should be scanned & indexed by
> NetBeans so editor features can work as expected, right?

Not all of the 3rd party libraries need to be included in the **NetBeans** project, although they are needed for the project to work.

Not all libraries need to show up in auto-suggestions. There are libraries that are set-up-and-forget. NetBeans scanning those are a waste of resources.

> > > However,
> > sometimes, we need to include one or two 3rd party libraries in the project
> > because we might need to use it for auto-suggestions, for an example.
> 
> This is more common case IMO, see above.

Replied above.

> > > In such a case, what is easier?
> > 
> > 1. Ignoring dozens of library folder inside "vendor" so that we can keep a
> > couple.
> > 
> > 2. Ignoring the "vendor" folder, and then instructing NB to track a couple
> > of sub folders within that.
> 
> Adding another level of complexity to the existing code is too much to solve
> this "issue", sorry. Moreover, you can solve this situation very easily e.g.
> using symlinks ;)
> 
> Thanks.

Symlinks are the workaround I am using currently. I have ignored "vendor" folder but created a "vendor-ref" folder, in which I create symlinks to the libraries that I need NB to scan. There are only 3 of them while there are nearly 60 in the original "vendor" folder. Scanning the rest might have been a waste of resource if I did not ignore the vendor folder.
Comment 8 Wirone 2017-01-12 07:04:08 UTC
It is strictly related to #244770

See my comment there to understand the problem:
https://netbeans.org/bugzilla/show_bug.cgi?id=244770#c6