Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are IntelliJ scratch files located?

In IntelliJ IDEA 14, we can create scratch files from Tools > New Scratch File...

Are they stored in some temporary files? If the answer is yes, where are they?

Attempts:

1) I pressed right click > Copy Reference and I pasted it:

1d0b26a2/scratch.2:1

2) I opened .idea\workspace.xml and I have the following part for scratch files:

  <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> 

For a normal file the entry path starts with file:// instead of scratchpad://.

like image 280
ROMANIA_engineer Avatar asked Dec 09 '14 15:12

ROMANIA_engineer


People also ask

Where are all the files stored in scratch?

The scratch files are saved along with all preferences in a path specific to each version of your editor. In case of MacOS it's ~/Library/Preferences/PhpStorm2018. 2 . This means that when you update your IDE, it starts using the new path and it doesn't see your old scratches anymore.

How do I view a scratch file?

You can select Scratch files to view from your local computer and from Google Drive directly. Supports SB, SB2, SB3 file formats. An SB2/3 file is a program created with Scratch, an application development platform created at the MIT.


1 Answers

Starting with 14.1, Scratch Files are stored under .IntellijIdea14/config/scratches.

They are displayed either in Scratches and Consoles or on the Scratches tab (depends on the version you are using).

Current UI:

Scratches and Consoles

Earlier UI:

Scratches tab

IntelliJ IDEA Help - Scratch files

like image 87
ᄂ ᄀ Avatar answered Sep 19 '22 16:09

ᄂ ᄀ