Eclipse中很少用到的键<不断更新>

本文介绍 Eclipse IDE 中 Java 编辑的一些实用技巧,包括代码格式化、字符串换行、类型指示器等功能,帮助开发者提高编码效率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Generalize Type

对对象的声明可用。

Use Supertype Where Possible

对类可用。

Correct Identation 选中代码然后对齐

Shift+Left/Right 左移或者右移

Use Supertype Where Possible 对类使用

Matching Bracket 找到匹配的括号

To find a matching bracket select an opening or closing bracket and pressCtrl+Shift+P or selectNavigate > Go To > Matching Bracket. You can alsodouble click before an opening or after a closing bracket - this selects the text between the two brackets.

Wrap stringsYou can have String literals wrapped when you edit them. For example, if you have code like this:
String message= "This is a very long message.";

position your caret after the word "very" and press Enter. The code will be automatically changed to:

String message= "This is a very" + 
           " long message.";

This behavior can be customized in the Opens the typing preference pageJava > Editor > Typing preference page.

Java type indicatorEnable the Java Type Indicator on theOpens the Label Decoration preference pageGeneral > Appearance > Label Decoration preference page to find out what the first type in a compilation unit or class file is. An adornment is shown for interfaces, annotations, and enums, while an ordinary class stays undecorated.

Picture of Java Type Indicator Label Decorator

Word wrap in Variables viewThe details area of the debugger's Variables and Expressions views supports word wrap, available from the view drop-down menu.

Word wrap action in Variables view drop-down menu

http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/tips/jdt_tips.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值