在IntelliJ IDEA 14中,我们可以从工具>新的临时文件... 创建临时文件。
它们存储在一些临时文件中吗?如果答案是肯定的,他们在哪里?
尝试:
1)我按右键单击>复制引用,然后将其粘贴:
2)我打开了 .idea \ workspace.xml ,下面是暂存文件的一部分:
<file leaf-file-name="scratch.2" pinned="false" current-in-tab="true">
<entry file="scratchpad://1d0b26a2/scratch.2">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="636">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
</file>
对于普通文件,输入路径以
file://
而不是scratchpad://
开头。 最佳答案
从14.1开始,暂存文件存储在.IntellijIdea14/config/scratches
下。
它们显示在 Scratches和控制台或 Scratches 选项卡中(取决于您使用的版本)。
当前用户界面:
先前的用户界面:
IntelliJ IDEA Help - Scratch files