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 252986 - Find usage does not find usage from JSF page
Summary: Find usage does not find usage from JSF page
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF Editor (show other bugs)
Version: 8.0
Hardware: PC Windows 8
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-14 15:19 UTC by muellermi
Modified: 2016-07-07 08:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (296.16 KB, text/plain)
2015-06-14 15:19 UTC, muellermi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description muellermi 2015-06-14 15:19:40 UTC
Product Version = NetBeans IDE Dev (Build 201506130001)
Operating System = Windows 8 version 6.2 running on amd64
Java; VM; Vendor = 1.8.0_45
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.45-b02

given a method
  public List<Review> getRecentReviews() {...}

which is used on a web page

                <ui:repeat value="#{reviewListController.recentReviews}" var="review">...

Now, invoking "find usages" on the getRecentReviews method would not find the invocation from the web page

And, btw. renaming the method would not rename the JSF tag anymore, which had been a great NB feature. Because there is this second problem, I increased priority to P2
Comment 1 muellermi 2015-06-14 15:19:48 UTC
Created attachment 154210 [details]
IDE log
Comment 2 Petr Hejl 2015-06-24 12:47:02 UTC
This works for me in both ant and maven projects in the latest dev build with GF as a server. Can you share a sample project for testing?
Comment 3 muellermi 2015-06-24 20:49:28 UTC
Reopened. I verified the problem and it seems only to occur under certain circumstances. It seems to work fine, if the variable is placed onto a client page, but fails if the variable is placed onto a template page.

I'm going to construct a demo next week(end).

Since the problem does not always occur, I decreased priority to 3.
Comment 4 muellermi 2015-06-30 20:55:03 UTC
I tried to create a sample project, but could not reproduce this bug.
Then, I checked my existing app, and verified that find usage did not find nothing. I moved the usage from a nested structure into a flat one. Then find usage worked perfectly. Next I moved the call back to the nested structure. Find usage still works.

This seems to be a bit mysterious. But I faced this problem a couple of time. Thus, I don't think we can close the bug. But it seems hard to reproduce as well hard to find. :(
Comment 5 muellermi 2015-07-04 21:46:55 UTC
It seems the problem occurs after a rename of a property.
Please refer to #202571
Comment 6 muellermi 2015-07-04 22:16:54 UTC
I got it reproducible:


Page:
        <ui:repeat value="#{controller.names}" var="name">
          <p>
            #{name}
          </p>
        </ui:repeat>

Java:

  public List<String> getNames(){
    return new ArrayList<>();
  }
  
Try Alt-F7 on getNames() finds the usage within the page.

Next, rename this method. Alt-F7 would not find the usage anymore nor would it be renamed if you rename the method again.

Then, after I changed and saved the page manually, Alt-F7 was ok again (till the next rename).
Comment 7 Martin Balin 2016-07-07 08:56:42 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss