PhpStorm - 打印出 class 文件中的方法和变量

PhpStorm - print out methods and variables in class files

我有大约 10 个 类 都在单独的文件中。我已经很久没有看过它们了。是否有一个 PhpStorm 函数可以让我列出各个文件中列出的方法和属性?

编辑:解决方案是突出显示您感兴趣的所有 类,然后使用图表工具。请参阅下面我的回答。

您可以使用 PHPStorm 的结构视图:

Use the Structure pop-up window or the Structure tool window to quickly jump to the desired member of a file in the editor. The Structure views provide quick navigation for all supported file types.

You can also use the Structure tool window (Alt+7). This view is flexibly configurable and useful for many tasks, apart from navigation. However, the File Structure pop-up window is the easiest way for quick navigation.

来源https://www.jetbrains.com/phpstorm/help/navigating-with-structure-views.html

您可以为此使用 PHPDoc。生成评论文档的 API 文档,您有一个非常有用的离线参考并且喜欢您的代码。

否则,您可以通过属性快捷方式启动或专注于 PHPStorm 工具的结构视图。

终于找到了我要找的东西。

在项目视图中突出显示您感兴趣的所有 类。右键单击 Diagrams->Show Diagrams(或 Ctrl+Alt+Shift+U)。

在屏幕上排列图表。

Select 浅色背景(Ctrl 反引号)select 5:外观(不是主题)。

右键单击图表并进行打印预览。 Select 全尺寸图。单击“确定”并进行页面调整。我在 11 x 17 sheet 上打印了我的 8 类,我在 "help-my-bad-memory-heaven" 中。正是我要找的。

希望有用。