A simple way to create static imports for constants in existing code?

前端 未结 9 850
心在旅途
心在旅途 2021-01-30 21:17

If I have a constant BAR in Foo, which I will use in a class C I\'ll have to write

Object o = Foo.BAR + \"...\";

which I can use Ctrl-Shift-M i

9条回答
  •  深忆病人
    2021-01-30 21:55

    Sounds like a nice idea, but after you have changed all the files, how much better will they be? Perhaps you should think about only changing the files which you are working on for other reasons already.

提交回复
热议问题