简体   繁体   English

IntelliJ 在具有内部类的类的项目视图中双击

[英]IntelliJ double click in Project view on class with internal classes

IntelliJ double click in Project view on class with internal classes opens the node in the Projects view or closes the node in the Project view if it was open. IntelliJ 在具有内部类的类的项目视图中双击打开项目视图中的节点或关闭项目视图中的节点(如果它已打开)。 I can't figure out to change the settings of IntelliJ so that if I double click on a class it opens the class in the editor.我不知道如何更改 IntelliJ 的设置,以便如果我双击一个类,它会在编辑器中打开该类。 It works fine for normal classes, but if the class has embedded internal classes defined, IntelliJ does not jump to the class, but opens the node in the Projects view.它适用于普通类,但如果该类定义了嵌入的内部类,IntelliJ 不会跳转到该类,而是在 Projects 视图中打开节点。

There must be a setting to override this?必须有一个设置来覆盖这个?

I suppose you should switch off Show Members option in your project menu我想您应该关闭项目菜单中的“显示成员”选项在此处输入图片说明

Using the "Open Files with Single Click" setting will, at least with Kotlin, open the selected file in the editor without expanding the node.使用“通过单击打开文件”设置,至少在 Kotlin 中,将在编辑器中打开选定的文件而不展开节点。 Not exactly the requested behavior, but may be a workaround for some.不完全是请求的行为,但可能是某些人的解决方法。

Not really sure on what you're asking here but hazarding a guess:不太确定你在这里问的是什么,但冒险猜测:

Showing internal classes in the Projects View you'd click the little cog on the bar at the top of the Projects View to open the drop down settings.在项目视图中显示内部类,您可以单击项目视图顶部栏上的小齿轮以打开下拉设置。
Then ensure "Show Members" is checked.然后确保选中“显示成员”。

OR或者

If you're asking how to to "Jump to Source", hit F4.如果您要问如何“跳转到源”,请按 F4。

Otherwise, hit "Ctrl + Alt + S" and hunt through IntelliJ's settings.否则,点击“Ctrl + Alt + S”并搜索 IntelliJ 的设置。

Dock Pinned should be enabled.应启用 Dock Pinned。 enter image description here在此处输入图片说明

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM