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

如何在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 宇视监控服务器无法登录
  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥50 power BI 从Mysql服务器导入数据,但连接进去后显示表无数据
  • ¥15 (关键词-阻抗匹配,HFSS,RFID标签天线)