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

📄 movestaticmethod.java

📁 emacs的一个非常有用的插件,叫xrefactory,可以实现source insight里的那种函数跳转.和cscope(跳回来不方便)配合使用,非常的不错.
💻 JAVA
字号:
package com.xrefactory.refactorings;/*  1.)   Put  cursor   inside  TARGET   class  and   invoke   'Xref  ->  Refactor'. Select 'Set Target  for Next Moving Refactoring' from the  proposed menu.  2.)  Move  cursor onto  the definition of  the method to  move (onto  'method' name), invoke 'Xref ->  Refactor' once more time and select  'Move Static Method'.*/class Target {    static int i=0;    // move method here:    }class Source {    static int j=1;    // cursor has to be on 'method' name.    public static void method() {        System.out.println("i, j == " + Target.i + ", " + j);    }}class MoveStaticMethod {    public static void main(String[] args) {        Source.method();    }}/*  (multiple) F5 will bring you back to Index*/

⌨️ 快捷键说明

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