简体   繁体   English

Intellij 快捷方式 - 如何在项目视图中打开当前类?

[英]Intellij shortcut - how to open at project view current class?

I just want to know if it is possible at Intellij open Project view for class which is currently opened.我只想知道是否可以在 Intellij 打开当前打开的类的Project view Using short cut.使用捷径。

Steps:脚步:

  • After using find class shortcut ( Ctrl + N ) => type String使用 find 类快捷方式 ( Ctrl + N ) => 键入String
  • Press String class from JDK.按 JDK 中的String类。 It has next looking:它有下一个看:

在此处输入图片说明

  • And now when press Alt + 1 => It will open Project view where it was active last time.现在,当按Alt + 1 => 它将打开上次处于活动状态的Project view
  • But I want to know how to open this view and cursor is exactly at this class location:但我想知道如何打开这个视图,光标正好在这个类位置:

在此处输入图片说明

I tried to find it at internet but without success.我试图在互联网上找到它,但没有成功。

Any suggestions?有什么建议?

You can click the settings icon in the project view and check Autoscroll from source .您可以单击项目视图中的设置图标并选中Autoscroll from source That way any class (or any file for that matter) you open will be automatically selected in the project view.这样,您打开的任何类(或与此相关的任何文件)都将在项目视图中自动选择。

在此处输入图片说明

or if you don't want this to happen always you can click this icon to naviage to the currently opened item in the project view:或者,如果您不希望始终发生这种情况,您可以单击此图标以导航到项目视图中当前打开的项目:

在此处输入图片说明

Unfortunately I don't see any command in keymap section to bind this action to a keyboard shortcut.不幸的是,我在键盘映射部分没有看到任何命令将此操作绑定到键盘快捷键。

Replying to an old thread, but may help someone in the future.回复一个旧线程,但将来可能会帮助某人。 I am using IntelliJ 2020.2 and now I can see a keymap for the 'Select Opened File' (earlier 'Scroll from Source') button mentioned by @Bohuslav Burghardt.我正在使用 IntelliJ 2020.2,现在我可以看到@Bohuslav Burghardt 提到的“选择打开的文件”(之前的“从源代码滚动”)按钮的键盘映射。 It's它是

Alt + F1 and then 1 (submenu item 1) Alt + F1 然后是 1(子菜单项 1)

在此处输入图片说明

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

相关问题 在Eclipse中,如何将“打开类型”快捷方式限制为仅显示当前项目中的源文件 - In Eclipse, how do I limit the Open Type shortcut to only show source files in my current project 如何使用键盘快捷键在Eclipse Project Explorer视图中查找当前文件? - How to locate current file in Eclipse Project Explorer view using keyboard shortcut? 如何有选择地在启动时打开最后一个intellij项目(或不打开)? - How to optionally open last intellij project (or not) on startup? IntelliJ 在具有内部类的类的项目视图中双击 - IntelliJ double click in Project view on class with internal classes 如何在IntelliJ中查看类包类型和参数? - How to view class package type and parameters in IntelliJ? 在intellij中打开所选的课程 - open selected class in intellij 如何通过open api检测IntelliJ的当前主题? - How to detect the current theme of the IntelliJ via open api? 在IntelliJ中,查看类/接口所有后代的快捷方式? - In IntelliJ, shortcut to see all decendants of a class/interface? IntelliJ:查看导入类(的例程)的用法的快捷方式 - IntelliJ: Shortcut for seeing usages of (the routines of) an imported class 如何在 IntelliJ IDEA 14 中为当前项目工作配置注释处理? - How to configure annotations processing in IntelliJ IDEA 14 for current project work?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM