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 256456 - [ConvertorProjects] go to file/type results columns
Summary: [ConvertorProjects] go to file/type results columns
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks: 253339
  Show dependency tree
 
Reported: 2015-11-09 10:06 UTC by IfElseTrue
Modified: 2016-03-15 07:42 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project with a submodule (4.10 MB, application/zip)
2015-11-11 10:14 UTC, IfElseTrue
Details

Note You need to log in before you can comment on or make changes to this bug.
Description IfElseTrue 2015-11-09 10:06:10 UTC
8.1 changed the way 'go to' file or type works. Prior to 8.1 release it showed filename (path) and project name, which was fine.

Now, instead of showing project name, it shows submodule's name and also jumps to an unrelated file in another opened project


Example:
1. Two projects opened (current and phpunit)
2. Press Ctrl+Alt+O
3. Type File.php
4. Instead of selecting an exact match in current project the list selects 'FileExists.php' entry in phpunit project (!)

Expected results select most relevant hit File.php in current project and fix column name to be current instead of submoule name where the File.php is located


Overall, current implementation is really, really bad, if you want to jump quickly to a file... I will probably switch to 8.0.2 back only because of this
Comment 1 Tomas Mysik 2015-11-09 12:35:59 UTC
Could you please attach a sample project? Thanks!
Comment 2 Tomas Zezula 2015-11-09 12:39:38 UTC
The GoToFile still shows the:

FileName (path) Project Name

The Project Name and (scope to search in is provided by PHP project).
Comment 3 IfElseTrue 2015-11-09 12:43:55 UTC
(In reply to Tomas Zezula from comment #2)
> The GoToFile still shows the:
> 
> FileName (path) Project Name
> 
> The Project Name and (scope to search in is provided by PHP project).

you have to add a submodule to your project and search a file contained in submodule

I guess, submodule returns it's own name as project name
Comment 4 Tomas Mysik 2015-11-09 13:24:25 UTC
(In reply to Tomas Mysik from comment #1)
> Could you please attach a sample project? Thanks!

Could you please do that? Just to be sure. I guess by "submodule" you mean a composer library, right? But still, please attach a sample project(s) and provide exact steps to reproduce.

@tzezula: It seems to me that project convertors has some impact on this scenario.

Simply reopen this issue, thanks.
Comment 5 IfElseTrue 2015-11-09 13:56:14 UTC
(In reply to Tomas Mysik from comment #4)
> (In reply to Tomas Mysik from comment #1)
> > Could you please attach a sample project? Thanks!
> 
> Could you please do that? Just to be sure. I guess by "submodule" you mean a
> composer library, right? But still, please attach a sample project(s) and
> provide exact steps to reproduce.
> 
> @tzezula: It seems to me that project convertors has some impact on this
> scenario.
> 
> Simply reopen this issue, thanks.

I mean true git submodule, sorry for not be clear. I'll try to make example project later on
Comment 6 Tomas Mysik 2015-11-09 14:07:23 UTC
I see now. Please, reopen this issue once you attach a sample project. Thanks.
Comment 7 IfElseTrue 2015-11-11 10:14:13 UTC
Created attachment 157268 [details]
sample project with a submodule
Comment 8 IfElseTrue 2015-11-11 10:20:00 UTC
I've uploaded sample project. Looks like it's a general problem with git submodules. You can also clone any git project and add another one as git submodule to reproduce the following bugs:

1. Find usages not working (grayed out context menu item or Alt+F7)
2. Upload (greyed out in context menu)
3. Open File dialog shows submodule name as project name. e.g. Search for 'Filter'

first two point are even more important of course
Comment 9 IfElseTrue 2015-11-23 15:46:31 UTC
one more use case, which worked prior to 8.1 release:

1. Have a project with a GIT submodule inside
2. GIT submodule has PHPUnit tests 
3. In project Settings define test folder from GIT submodule
4. 'Go to Test File' doesn't work, but 'Go to Tested File' works(Ctrl+Alt+T)


As mentioned above some fundamental change was made to handling of GIT submodules, so many IDE function not working anymore
Comment 10 Tomas Mysik 2015-11-24 08:30:37 UTC
My guess is that it is another problem of ConvertorProjects. You can easily verify it by these steps:

(1) in your project, rename all composer.json to e.g. composer2.json (do the same with package.json and bower.json files, if there are any in your project);
(2) restart your IDE.

Now, everything should work as before. If not, the problem will be somewhere else and we will investigate it soon.

Sorry for inconveniences.

Thanks.
Comment 11 IfElseTrue 2015-11-24 09:28:23 UTC
(In reply to Tomas Mysik from comment #10)
> My guess is that it is another problem of ConvertorProjects. You can easily
> verify it by these steps:
> 
> (1) in your project, rename all composer.json to e.g. composer2.json (do the
> same with package.json and bower.json files, if there are any in your
> project);
> (2) restart your IDE.
> 
> Now, everything should work as before. If not, the problem will be somewhere
> else and we will investigate it soon.
> 
> Sorry for inconveniences.
> 
> Thanks.

I don't use composer or bower or any other package managers. It's plain PHP project which has GIT submodules.
Comment 12 Tomas Mysik 2015-11-24 12:26:49 UTC
(In reply to IfElseTrue from comment #11)
> I don't use composer or bower or any other package managers. It's plain PHP
> project which has GIT submodules.

In the attachment you have provided, I can see 2 composer.json files [1].

It was just an idea for a possible workaround.

Thanks.
[1]
Codeception/composer.json
Codeception/libs/pcc/composer.json
Comment 13 IfElseTrue 2015-11-24 14:26:25 UTC
(In reply to Tomas Mysik from comment #12)
> (In reply to IfElseTrue from comment #11)
> > I don't use composer or bower or any other package managers. It's plain PHP
> > project which has GIT submodules.
> 
> In the attachment you have provided, I can see 2 composer.json files [1].
> 
> It was just an idea for a possible workaround.
> 
> Thanks.
> [1]
> Codeception/composer.json
> Codeception/libs/pcc/composer.json

Got it! I've removed all composer.json files and then all problems disappeared. So, just presence of those .json files is the problem, even though the project doesn't use composer manager itself

It would be great if it could be fixed somehow, cauze removing all composer.json files in each project is lot of work
Comment 14 Tomas Mysik 2015-11-24 15:09:48 UTC
(In reply to IfElseTrue from comment #13)
> Got it! I've removed all composer.json files and then all problems
> disappeared.

Thanks for verification.

> It would be great if it could be fixed somehow, cauze removing all
> composer.json files in each project is lot of work

On Linux in terminal you can simply run e.g. [1].

Thanks for reporting.
[1] find /path/to/project -name composer.json -exec rm '{}' \;
Comment 15 Tomas Mysik 2015-11-30 07:21:32 UTC
(In reply to IfElseTrue from comment #13)
> Got it! I've removed all composer.json files and then all problems
> disappeared.

One more possible workaround - disable Composer plugin in Tools > Plugins (if you don't use it, of course).

Thanks.
Comment 16 IfElseTrue 2015-11-30 10:38:25 UTC
(In reply to Tomas Mysik from comment #15)
> (In reply to IfElseTrue from comment #13)
> > Got it! I've removed all composer.json files and then all problems
> > disappeared.
> 
> One more possible workaround - disable Composer plugin in Tools > Plugins
> (if you don't use it, of course).
> 
> Thanks.

Great! This one is even better!
Comment 17 Tomas Zezula 2016-03-14 14:48:13 UTC
Fixed jet-main 752eba8d0793
Comment 18 Quality Engineering 2016-03-15 04:56:59 UTC
Integrated into 'main-silver', will be available in build *201603150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/752eba8d0793
User: Tomas Zezula <tzezula@netbeans.org>
Log: #256456:[ConvertorProjects] go to file/type results columns
Comment 19 Tomas Mysik 2016-03-15 07:42:41 UTC
(In reply to Tomas Zezula from comment #17)
> Fixed jet-main 752eba8d0793

Thanks a lot, Tome!