2014-07-25 19 views
0

这两个quickfix功能非常简单,但在Intellj中找不到它们。IntelliJ自动创建不存在的新方法和自动类型转换?

例如:

class A { 

} 

A a = new A(); 
a.newMethod();//Eclipse can create "newMethod" function in Class A, if we put mouse at here. 

请问有什么快捷键?

+0

“auto type conversion”是什么意思?例如: – Seb

+0

:'A a = getInstance()'; 'getInstance()'返回Object。它应该是'A a =(A)getInstance();' –

+0

不完全确定你的意思,但alt + enter也允许你创建局部变量。 – Seb

回答

2

如果您有任何问题,请尝试将光标放在上面,然后首先点击'alt'+'enter'。这是标准的IDEA问题解决者。

+1

使用IntelliJ时,Alt + Enter是您最好的朋友。 :) – Seb