您可以在Eclipse中禁用自动水平滚动吗? [英] Can you disable automatic horizontal scrolling in Eclipse?

查看:109
本文介绍了您可以在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编辑器中(例如

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

它可能与 ScrolledFormText ,但是插件间谍告诉我们有关WorkbenchWindow类的问题,以及

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来源表示具有:

  • 用于垂直滚动的 ScrollLinesAction
  • 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天全站免登陆