在Eclipse中禁用自动水平滚动? [英] Disable automatic horizontal scrolling in Eclipse?

查看:637
本文介绍了在Eclipse中禁用自动水平滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时,当我跳入源代码时,例如从搜索或查找某些东西的声明时,Eclipse文本编辑器会尝试通过水平滚动来显示附近的长行。即使我跳到的项目在显示内没有滚动,这种情况也会发生。我觉得这很烦人,所以:

Sometimes when I jump into source code, e.g. from search or when looking up the declaration of something, the Eclipse text editor tries to display nearby long lines by horizontal scrolling. This happens even if the item I jumped to is well within the display without scrolling. I find this rather annoying, so:

有没有办法禁用这个?我已经通过所有的编辑器设置搜索了。

Is there a way to disable this? I have searched in vain through all the editor settings.

具体来说,这是关于Eclipse CDT,但我认为JDT中的行为是一样的。

Specifically, this is about Eclipse CDT, but I suppose the behaviour is the same in JDT.

推荐答案

这似乎也在其他eclipse编辑器中发生(如 PDT for PHP

This seems to happen in other eclipse editors too (like PDT for PHP)

它可能与 ScrolledFormText ,但插件间谍告诉我们一个 WorkbenchWindow class,以及 AbstractDecoratedTextEditor ,这实质上是一个 org.eclipse.ui.texteditor.AbstractTextEditor

It could have been related with the ScrolledFormText, but the Plugin Spy tells us a WorkbenchWindow class is concerned, as well as an AbstractDecoratedTextEditor, that is in essence an org.eclipse.ui.texteditor.AbstractTextEditor.

源的 AbstractTextEditor 表示有:


  • a ScrollLinesAction 用于垂直滚动

  • a TextNavigationAction 用于设置光标并可能触发水平滚动

  • a ScrollLinesAction for vertical scrolling
  • a TextNavigationAction for settings the cursor and potentially triggering horizontal scrolling

我不知道如何改变这种行为,除了以某种方式贡献给主动编辑器标识符(例如,对于java, org.eclipse.jdt.ui.ClassFileEditor ),并修改 Action

I am not sure how to change that behavior, except by contributing somehow to the active editor identifier (for instance, for java, "org.eclipse.jdt.ui.ClassFileEditor"), and modifying that Action.

这篇关于在Eclipse中禁用自动水平滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆