Eclipse 包资源管理器:隐藏部分长包名?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13142960/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 19:17:46  来源:igfitidea点击:

Eclipse Package Explorer: Hide part of long package names?

eclipse

提问by Kenneth Brodersen

I've been searching for a "problem" that have annoyed me for a while (but without any luck).

我一直在寻找一个让我烦恼了一段时间的“问题”(但没有任何运气)。

I am developing an Android application with the rather long package name com.kennethbrodersen.simplecaster.

我正在开发一个包名相当长的 Android 应用程序com.kennethbrodersen.simplecaster

This project contains a number of subpackages. The problem is that all these packages are shown with the full package identifier in the package explorer. The result is that this view has to be very wide or that I have to scroll horizontally to actually view the interesting part of the name. The problem is very clearly visible on the screenshot below.

该项目包含许多子包。问题是所有这些包都在包浏览器中显示了完整的包标识符。结果是这个视图必须非常宽,或者我必须水平滚动才能实际查看名称的有趣部分。在下面的屏幕截图中可以非常清楚地看到这个问题。

Do any of you know of a way to "hide" parts of the identifier (in this case com.kennethbrodersen.simplecaster)?

你们中有人知道“隐藏”部分标识符的方法(在这种情况下com.kennethbrodersen.simplecaster)吗?

Eclipse Package Explorer

Eclipse 包资源管理器

回答by Bill the Lizard

You can configure package name abbreviations in Helios (3.6) or later. Go to Window > Preferences > Java > Appearanceto set up abbreviation rules.

您可以在 Helios (3.6) 或更高版本中配置包名称缩写。转到Window > Preferences > Java > Appearance来设置缩写规则。

For example, com.kennethbrodersen.simplepodcould be configured to be displayed as {KBsimple}with the rule com.kennethbrodersen.simplepod={KBsimple}.

例如,com.kennethbrodersen.simplepod可以配置为{KBsimple}与规则一样显示com.kennethbrodersen.simplepod={KBsimple}