⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addremoveparameter.java

📁 emacs的一个非常有用的插件,叫xrefactory,可以实现source insight里的那种函数跳转.和cscope(跳回来不方便)配合使用,非常的不错.
💻 JAVA
字号:
package com.xrefactory.refactorings;/*  Put cursor on  the METHOD NAME (not on the  parameter) and press F11  or  invoke  'Xref  ->  Refactor'.   Then  move  to  the  appropriate  refactoring in the proposed menu and press <return>.  If  a  profile  collision  is  detected,  use  'Xref  ->  Undo  Last  Refactoring' to undo wrong manipulation.*/class AddRemoveParameter {    int arg = 1;    // put cursor on 'printParameter' and add a new parameter    void printParameter(int j) {        System.out.println("j == " + j);    }    // works for constructors too, add new parameter to this constructor    AddRemoveParameter() {}    public static void main(String ss) {        AddRemoveParameter pp = new AddRemoveParameter();        pp.printParameter(1);        pp.printParameter("toto");    }    // you can add/remove parameter on virtuals,     // in preference do it for the whole hierarchy at once.    // in proposed resolution screen press <return> to continue    class Super {        void vmethod() {}    }    class Infer extends Super {        void vmethod() {}    }    // deleting first parameter here will report profile clash    void printParameter(int j, String x) {        System.out.println("x == " + x);    }    void printParameter(String x) {        System.out.println("x == " + x);    }    // inserting parameter 'int arg' will report symbol clash    void printArg() {        System.out.println("arg == " + arg);    }}/*  (multiple) F5 will bring you back to Index*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -