简体   繁体   English

Eclipse键盘快捷键,用于将参数传递给方法

[英]Eclipse keyboard shortcut for passing a parameter to a method

Today I was watching a video and I saw the tutor doing a correction in his code in Eclipse without touching the mouse. 今天我正在观看视频,我看到导师在Eclipse中的代码中进行了修正而没有碰到鼠标。 Below is the code. 下面是代码。

    System.out.println(Character.toUpperCase(ch)'c');

He changed the code to : 他将代码更改为:

   System.out.println(Character.toUpperCase('c'));

I have always wanted to do this because it is a pain to do it using backspaces and retype the ')' at the end. 我一直想这样做,因为使用退格键并在最后重新键入')'是很痛苦的。 Does anyone know how to do it. 有谁知道怎么做。 Thanks 谢谢

Ctrl + . Ctrl + on the editor will take you to the first problem (error / warning). 在编辑器上将带您到第一个问题(错误/警告)。 In your case, it will highlight ch , next you press delete twice to delete ch and ) . 在您的情况下,它将突出显示ch ,然后按两次删除以删除ch Then you press Ctrl + Shift + P to position at the right place for inserting bracket and then press ) . 然后按Ctrl + Shift + P键定位在右边的位置以插入括号,然后按 All these will get to what you want without using mouse. 所有这些都可以在不使用鼠标的情况下达到您的要求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM