Bookmarks storage IDEA 2020.x

已回答

Hello.

Any idea where the bookmarks are kept for the 2020 IDEA version?

Looked in ./idea/workspace.xml and no mention there of BookmarkManager. In fact, I've ran a search on all workspace.xml from my computer and nowhere the bookmark component is to be found.

 

Thank you.

1

Hello,

Bookmarks are currently stored in <idea_config>/workspace/<workspace_id>.xml files in the following format:

<component name="BookmarkManager">
<bookmark url="file://$PROJECT_DIR$/src/New.java" description="bookmark1" line="4" />

...
</component>

<idea_config> is the IDE's configuration directory. Starting from 2020.1, default paths to this folder are as follows:

  • %APPDATA%\JetBrains\<product><version> on Windows, e.g. C:\Users\JohnS\AppData\Roaming\JetBrains\IntelliJIdea2020.2
  • ~/Library/Application Support/JetBrains/<product><version> on macOS
  • ~/.config/JetBrains/<product><version> on Linux
1
Avatar
Permanently deleted user

Thank you. Found them in the folders specified by you.

Although is a separate topic, any idea why from time to time <workspace_id>.xml is regenerated for the same project? I have about 20 generated <workspace_id>.xml and now makes sense the resets in bookmarks over the time

The bookmarks resetted about 2-3 times from the 2020 update losing all bookmarks in the process.

 

0

<workspace_id> is essentially your project's id. It is generated upon project creation and stored in the workspace.xml file of the project's .idea folder in the following format:

<component name="ProjectId" id="1boOMXvQZQvg3Cnecr2d5JN3h4F" />

.idea/workspace.xml is not stored in VCS, so if you delete your project and then clone it once again, .idea/workspace.xml will be recreated from scratch, project id will be generated anew, and a new <workspace_id>.xml file will appear in the <idea_config> directory.

1
Avatar
Permanently deleted user

Thank you. Sorry for the late reply. Solved the problem and gained a plus of understanding about IntelliJ file and folder structe. Thanks again.

1

Anybody got an update for IntelliJ IDEA 2023? They moved again. 

1

Margaret Leber 

In the recent versions, the only thing that's slightly changed is XML structure. Location and file naming logic are the same. 

See example below for version 2023.2.3 (Windows 10).

1

Is there option to store bookmars in .idea folder under project dir?

0

Ivan Smth 
Bookmarks storage has been moved to the IDE configuration directory/workspace/<project_workspace_id>.xml files.
Right now there is no possibility to move them to the project ( .idea ) directory. There is an open feature request on our issue tracker for sharing bookmarks between team members: https://youtrack.jetbrains.com/issue/IJPL-62086. However, it is not implemented yet.

0

请先登录再写评论。