dongtong848825 2014-04-19 06:28
浏览 65
已采纳

如何在netbeans中重构

I'm new to PHP development and Netbeans use, but I'm struggling to find a way of writing my code more smoothly. Some time ago I've watched some episodes from Uncle's Bob Clean Code video series. He was using IntelliJIDEA and I was thinking that some of the features he was using were available only to that IDE. Yesterday I was watching a Tuts+ video tutorial, and the author was using some Netbeans IDE features which I'll also like to use.

The features I'm talking about are:

  1. refactoring, by renaming a variable name. I know that I can use rightClick-> Refactor-> Rename, but the author did it without using this approach.
  2. Create Method if the method was just declared in test file and not defined in the source file. In the video, a contextual menu appears under the method, exactly as in VS or Eclipse. Do I need to use a plugin? Is there a key combination which will allow me to see that contextual menu under my function names?

enter image description here

Don't get me wrong. I did my homework by searching online, but I didn't find the solutions for the problems from above. For example "Create Method" approach appears as a request/bug in Netbeans forums, but the developer from the video was using it.

PS:
I found the answer for my first problem. He was using Ctrl+R 2 shortcut. I assume that for the second problem, there has to be a shortcut key combination too, but I can't fins it. More exactly, I don't know what to look for in the Options->Keymap

  • 写回答

3条回答 默认 最新

  • dqpc1845 2014-04-19 20:32
    关注

    The 2nd comes if you press Alt+Enter on the line where the method is being called. Or you can click on the bulb icon on the left.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog