Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve IntelliJ layout #1155

Open
hohwille opened this issue Mar 20, 2025 · 2 comments · Fixed by devonfw/ide-settings#76
Open

Improve IntelliJ layout #1155

hohwille opened this issue Mar 20, 2025 · 2 comments · Fixed by devonfw/ide-settings#76
Labels
enhancement New feature or request
Milestone

Comments

@hohwille
Copy link
Member

hohwille commented Mar 20, 2025

As a IDEasy user, I want to use IntelliJ properly and fast so that I can work efficiently.

Actual situation

  • IDEasy opens the workspace as toplevel folder in the Project view of IntelliJ
  • IDEasy generates an idea.properties file in the workspace that relocated the configuration locations of IntelliJ so they are inside a .intellij subfolder of the workspace
  • As a result every workspace has its own .intellij subfolder which in my case is 6.60 GB (7,092,398,951 bytes) and for having 6 workspaces I have this 6 times
  • Even worse that .intellij folder is indexed by Intellij that by default indexes everything under the root folder that is opened in IntelliJ. As a result indexing writes an updated index inside .intellij so IntelliJ again notices that files have changed that need to be reindexed and also in the search I can find all the internal intellij files storing what I searched and did run giving me confusing results.

Suggested solution

We should redirect idea.log.path, and idea.system.path to be outside of the workspace.
So in other words .intellij/system folder should be in $IDE_HOME rather than in $IDE_HOME/workspaces/$WORKSPACE.

We cannot move idea.config.path or the idea.properties outside of the workspace since our automatic IDE configuration is merging configurations into the workspace. Therefore we did put .intellij into the workspace, so that we can reuse our existing mechanism (this is also how it worked for eclipse from the start that has this concept of workspaces and uses a .metadata folder for everything just like we do with .intellij folder but for Eclipse this is the default behaviour not tweaked by IDEasy).
Currently it is not possible to configure something outside of the workspace with our auto configuration (workspace configurator aka merger).

All this comes from here:
https://github.com/devonfw/ide-settings/blob/9551c1a222b64e958cdf1e8b01a952fa537241a6/intellij/workspace/update/idea.properties#L1-L4

Migration

Since projects have already started with IDEasy such change would not reach them but only new projects starting from scratch.
Therefore, we should consider writing a migration that checks the idea.properties file in the settings and migrates them automatically.
Alternatively we could manually approach the IDEasy projects and suggest them to update their settings accordingly.

Workaround

If you are reading this and struggling with the indexing, you can do the following quickfix:
Right-click .intellij folder in Project view of IntelliJ and select Mark Directory as > Excluded.

@hohwille
Copy link
Member Author

Fixed in settings via PR devonfw/ide-settings#76
We still need to discuss if we want to create a migration for this story.

@hohwille hohwille reopened this Mar 20, 2025
@hohwille hohwille added this to the settings milestone Mar 20, 2025
@hohwille
Copy link
Member Author

We still need to discuss if we want to create a migration for this story.

IMHO this should rather be a feature of of ide upgrade-settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant