Eclipse 支持虚拟空白吗?
不久我将加入一家严重依赖 Eclipse 进行 Java 开发的公司。对于我自己的开发,我专门使用了其他工具,因此我现在在开始合同之前熟悉了 Eclipse。
我已经习惯的功能之一是虚拟空白。这允许您单击给定文本区域中的任意位置并开始输入。如果光标之前不存在空格,它将自动填充。您可以使用文本编辑器 ConTEXT 或通过在 Visual Studio 的编辑器设置中打开来查看此行为的示例。
但我在 Eclipse 中找不到它的选项。我是否缺少某个选项,或者我必须搜索插件才能启用此功能?
Shortly I will be joining a company that relies heavily on Eclipse for Java development. For my own development I've used other tools exclusively so I am now getting acquainted with Eclipse before I begin my contract.
One of the features I've grown accustomed to is Virtual White space. This allows you to click anywhere in a given text area and begin typing. If no white space exists up until your cursor, it will automatically be filled in. You can see an example of this behavior with the text editor ConTEXT or by turning in on in the Editor settings of Visual Studio.
I can't find an option for it in Eclipse though. Is there an option I'm missing or will I have to search for a plug-in to enable this feature?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Eclipse 目前没有有提供此功能的插件。
据我从
TextEditor
类(几乎所有 Eclipse 编辑器的基础)来看,创建这样一个编辑器并不是一件容易的事。您可以轻松获取点击的
Point
- 通过addMouseListener(...)
- 但是如果编辑器的文档不是更改文档的单独的可撤消操作。这必须是一个额外的要求。Eclipse does not have a plug-in that provides this functionality right now.
As far as I can see from the
TextEditor
class (the basis for almost all Eclipse editors), it will not be an easy task to create such an editor.You can get the
Point
of the click easily - viaaddMouseListener(...)
- but there are no way to add spaces to the document of the editor without it being an separate undoable operation that changes the document. Which must be an additional requirement.