DrewShirts
DrewShirts

Reputation: 157

How to manage IntelliJ IDEA contexts

Using IntelliJ IDEA 2016.2.4, I can save, load, and clear contexts from the Tools menu:

Tools > Tasks & Contexts > Save Context

Tools > Tasks & Contexts > Load Context

Tools > Tasks & Contexts > Clear Context

When the list of contexts come up, I don't have any control on how to delete the context from the list. The Clear Context option, only removes all the files loaded from that context from the view in the IDE. It doesn't remove that context from the list of contexts.

How do I remove contexts from the list of contexts?

Upvotes: 4

Views: 2103

Answers (2)

Tim Richardson
Tim Richardson

Reputation: 7221

For bulk deletion of Intellij contexts

I have intellij installed as a snap in linux. Contexts are stored in a zip file. The location is for example

/home/tim/.config/JetBrains/IntelliJIdea2021.3/tasks/

the relevant zip is named like so

myproject.contexts.zip

Exit intellij.

In the archive, delete unwanted contexts, each of which is a file in the archive. For example, you may expand the archive, delete the contexts you don't want and re-zip it. Or perhaps you can edit them in-place.

Restart intellij. They are gone.

Upvotes: 1

Ashutosh Jindal
Ashutosh Jindal

Reputation: 18869

This was tested on:

IntelliJ IDEA 2016.2.4
Build #IU-162.2032.8, built on September 9, 2016
JRE: 1.8.0_112-release-b343 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

When you do Tools > Tasks & Contexts > Load Context, then for each context you can press the Right Arrow key to get the Load or Remove options. Choosing the latter removes the Context :

enter image description here

Upvotes: 5

Related Questions