Android Studio IDE中允许您使用方法()的任何技巧;当//method()在comment中时,[CTRL]B在代码中的位置?
作为主题。我要重复这一点,因为“作为主题”少于30个字符: 有人知道droid Studio IDE中的诀窍吗?Android Studio IDE中允许您使用方法()的任何技巧;当//method()在comment中时,[CTRL]B在代码中的位置?,android,android-studio,ide,Android,Android Studio,Ide,作为主题。我要重复这一点,因为“作为主题”少于30个字符: 有人知道droid Studio IDE中的诀窍吗?enter code heredroid Studio IDE可以让您转到一个方法();当//method()在comment中时,[CTRL]B在代码中的位置 // List of Methods: // method1() this makes that // medhod2() that makes this private void method1(){ //sth }
enter code here
droid Studio IDE可以让您转到一个方法();当//method()在comment中时,[CTRL]B在代码中的位置
// List of Methods:
// method1() this makes that
// medhod2() that makes this
private void method1(){
//sth
}
// I click on method1() in the List/Comment
// then by ([CTRL]B|Command-B) jump to the code...
据我所知,没有直接的方法可以转到注释中命名的方法。但是,您可以使用宏执行某些操作。可能有更好的方法可以做到这一点,但我所做的是记录一个宏,在将光标定位到我要转到的方法上后,该宏执行以下操作:
config\options\macros.xml
中。我建议您录制自己的宏,以便按照您想要的方式工作。您还需要进行测试,以查看发生故障时(例如,当该方法不存在时)会发生什么情况
<application>
<component name="ActionMacroManager">
<macro name="goto_method_in_comment">
<action id="CommentByLineComment" />
<action id="EditorUp" />
<action id="GotoDeclaration" />
<action id="JumpToLastChange" />
<action id="$Undo" />
<action id="Back" />
</macro>
</component>
</application>
据我所知,没有直接的方法可以转到注释中命名的方法。但是,您可以使用宏执行某些操作。可能有更好的方法可以做到这一点,但我所做的是记录一个宏,在将光标定位到我要转到的方法上后,该宏执行以下操作:
config\options\macros.xml
中。我建议您录制自己的宏,以便按照您想要的方式工作。您还需要进行测试,以查看发生故障时(例如,当该方法不存在时)会发生什么情况
<application>
<component name="ActionMacroManager">
<macro name="goto_method_in_comment">
<action id="CommentByLineComment" />
<action id="EditorUp" />
<action id="GotoDeclaration" />
<action id="JumpToLastChange" />
<action id="$Undo" />
<action id="Back" />
</macro>
</component>
</application>
然而,还有另一种解决方案Alt+F7,即使在注释中使用,也能为您提供所有细节 然而,还有另一种解决方案Alt+F7,即使在评论中使用,也能为您提供所有细节 想知道你在找什么,请在发帖前用谷歌搜索一下你的问题。这是一个常见的问题。如果你想寻找答案,请在发帖前用谷歌搜索一下你的问题。这是一个常见的问题。