简体   繁体   English

Eclipse将新打开的编辑器选项卡放在当前活动的编辑器选项卡旁边?

[英]Eclipse place the new opened editor tab next to the currently active one?

Is it possible to make Eclipse place the new opened editor tab next to the currently active one? 是否可以让Eclipse将新打开的编辑器选项卡放在当前活动的编辑器选项卡旁边?

Until the tab row is full, eclipse places the new tab on the first free position, which is acceptable. 在选项卡行填满之前,eclipse会将新选项卡放在第一个可用位置上,这是可以接受的。 When the row gets full, eclipse chooses to hide the LRU tab, which is acceptable, too. 当行满时,eclipse选择隐藏LRU选项卡,这也是可以接受的。 But it places the new tab on the position freed this way, which is from the user's POV a completely random position. 但是它将新选项卡放置在以这种方式释放的位置上,该位置是来自用户POV的完全随机位置。 Extremely strange, IMHO. 非常奇怪,恕我直言。

An example, just in case my English is worse than I though: 一个例子,以防万一我的英语比我差:

Initial position , assuming b is LRU and D is active, opening G: 假设b为LRU且D有效,则初始位置打开G:
abc D ef

Current behavior : 当前行为
a G c D ef

Wanted behavior : 想要的行为
ac DG ef

I disliked the tab placement before, but I really dislike the way it works in Eclipse Juno. 我以前不喜欢选项卡的放置,但是我真的不喜欢它在Eclipse Juno中的工作方式。 The Eclipse team claims that they have never gotten above 20% of their users liking a tab placement method. Eclipse团队声称,他们喜欢使用制表符放置方法的用户从未超过20%。

Anyway, the good news is that customizing tab placement may get easier in the future, and if you dislike the current style you can go back to the old style relatively easily. 无论如何,好消息是自定义标签的位置将来可能会变得更容易,如果您不喜欢当前样式,则可以相对轻松地返回到旧样式。


Comparison of tab placement styles 标签放置样式的比较

MRU style (older) : The n most recently used tabs are always displayed. MRU样式(较旧) :总是显示n个最近使用的标签。

Array style (newer) : New tabs always go at the end of an infinite array of tabs. 数组样式(较新) :新选项卡始终位于无限选项卡数组的末尾。 Then the visible set of tabs is scrolled until the selected tab is visible. 然后,滚动可见的选项卡集,直到所选的选项卡可见。

Suppose the window is sized very small, so that only 3 tabs are visible at once. 假设窗口的大小很小,因此一次只能看到3个标签。 Here's how the two styles will place things, given that we've already opened tabs "A" and "B" and are about to open tab "C". 假设我们已经打开选项卡“ A”和“ B”并且即将打开选项卡“ C”,则这两种样式将如何放置这些内容。 I'll capitalize the tab being added for visibility: 我将大写添加的标签以提高知名度:

Tab    |         Old                    New
opened | Visible  |  Hidden  |  Visible  |  Hidden
----------------------------------------------------
C      | abC      |          | abC       | 
----------------------------------------------------
D      | Dbc      | a        | bcD       | a
----------------------------------------------------
E      | dEc      | ab       | cdE       | ab
----------------------------------------------------
A      | deA      | bc       | Abc       | de
----------------------------------------------------
F      | Fea      | bcd      | deF       | abc
----------------------------------------------------
D      | fDa      | bce      | Def       | abc

Selecting a tab placement style 选择标签页放置样式

As described in other StackOverflow questions Eclipse tabs repositionning and Retain previous open file tab under visible tabs , it's possible to choose between the two styles by installing the Eclipse E4 CSS editor plugin and then in Preferences > General > Appearance changing 如其他StackOverflow问题中所述, Eclipse标签重新定位在可见标签下保留先前打开的文件标签,可以通过安装Eclipse E4 CSS编辑器插件,然后在“偏好设置”>“常规”>“外观更改”中在两种样式之间进行选择。

.MPartStack {
    font-size: 12;
    swt-simple: false;
    swt-mru-visible: false;
}

to

.MPartStack {
    font-size: 12;
    swt-simple: false;
    swt-mru-visible: true;
}

Have you read the following? 您读过以下内容吗? https://bugs.eclipse.org/bugs/show_bug.cgi?id=68684 https://bugs.eclipse.org/bugs/show_bug.cgi?id=68684

Because i remember reading about this issue. 因为我记得读过这个问题。

There is no direct way achieve it. 没有直接的方法可以实现它。 [As per my knowledge.] [据我所知。]

As mikezx6r said in his comment: You will require to build an eclipse plugin or you can an eclipse view that works as per your need. 正如mikezx6r在他的评论中所说:您将需要构建一个eclipse plugin或者您可以根据需要运行一个eclipse view For your information: In the Eclipse Platform a view is typically used to navigate a hierarchy of information, open an editor, or display properties for the active editor 供您参考: 在Eclipse Platform中,视图通常用于导航信息层次结构,打开编辑器或显示活动编辑器的属性。

To know how to create an eclipse view here is a tutorial kinda stuff for you. 要了解如何在这里创建eclipse view 本教程将为您提供一些帮助。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何正确地在Eclipse编辑器中获取当前打开的类? - How to get currently opened class in eclipse editor correctly? 如何在Eclipse的选项卡列表中更改当前活动选项卡的背景? - How to change a background of currently active tab in tab list in Eclipse? Eclipse:使用相同编辑器选项卡通过多次搜索打开的文件 - Eclipse: Files opened by multiple searches using same editor tab Eclipse Editor分离并放置在控制台,问题和其他选项卡旁边 - Eclipse Editor Detach and place next to console, problems, and other tabs 在Eclipse中打开新编辑器时如何收到通知? - How do I get notified whenever a new editor is opened in Eclipse? 创建用于创建当前在编辑器上打开的源代码的快照的插件-Eclipse CDT - Create plug-in that creates a snapshot of the source code currently opened on editor - Eclipse CDT 如何使eclipse自定义视图从编辑器中当前活动的文件中获取数据? - How do I make eclipse custom view take data from the file currently active in the editor? Eclipse:如何在新的编辑器选项卡中打开搜索到的文件? - Eclipse: how to open a search-found file in a new editor tab? Eclipse 4.2(Juno)-将选项卡从一个编辑器区域拖到另一个区域? - Eclipse 4.2 (Juno) - Drag tab from one editor region to another? Eclipse插件-通知何时在Eclipse中打开编辑器 - Eclipse Plugin - Notification of when an editor is opened in Eclipse
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM