You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "terax6669 (via GitHub)" <gi...@apache.org> on 2023/11/17 18:07:38 UTC

[I] [PHP] Refactor->rename isn't detecting the property usage properly. [netbeans]

terax6669 opened a new issue, #6719:
URL: https://github.com/apache/netbeans/issues/6719

   ### Apache NetBeans version
   
   Apache NetBeans 20 release candidate
   
   ### What happened
   
   When refactoring a class property a lot of incorrect usages are picked up.
   
   ![image](https://github.com/apache/netbeans/assets/19204073/b5274911-c448-47b7-815b-27cfc65f5100)
   
   It looks for any untyped occurrence of `->propertyName`. Maybe it made sense before typing and namespaces existed in PHP but now it's just a problem, especially if you're renaming something generic like `value`. I think that searching for untyped potential matches needs to be optional. Either unchecked by default or entirely disabled in preferences.
   
   Searching in vendor packages also doesn't make sense in my opinion.
   
   ### How to reproduce
   
   Open a class file and try to rename a property by Refactor > Rename (`Ctrl+R`).
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 11
   
   ### JDK
   
   21.0.1
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   At first I was very confused and thought that it's simply broken. Upon further investigation I discovered what was really going on. I find this kind of behavior unintended, that's why I filed it as a bug, feel free to change it to feature if you think otherwise.
   
   Since this window has a lot of empty space I propose to add a checkbox for it.
   ![image](https://github.com/apache/netbeans/assets/19204073/f578197d-b3c4-4997-97c2-f7a63424dbfc)
   
   Also the preview only appears after opening a file dropdown and selecting a specific occurrence. Can we please make it so that the file preview loads when you select a file (and jumps to first occurrence)? The message is confusing and made me think that the previews are broken, took me a while to figure out you had to go deeper.
   ![image](https://github.com/apache/netbeans/assets/19204073/4c3dc817-f635-429a-a246-8f4478080158)
   
   ### Are you willing to submit a pull request?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] [PHP] Refactor->rename isn't detecting the property usage properly. [netbeans]

Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on issue #6719:
URL: https://github.com/apache/netbeans/issues/6719#issuecomment-1943103253

   Could you also write an example code to reproduce it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists