Name displayed of a source content root

Answered

Hello,

I'm new to Jetbrains IDE and i'd like to try for a big java project. 

It's a project whose structure I can no longer change for various reasons and I have scattered sources. So I added source content roots to my module for each source. (hundreds of them). Everything works perfectly.

The problem is the display of names in Intellij :



 

It displays the name of the last folder in the tree. The problem is that at least half of them have the same name.

The entire source path is displayed in gray alongside, but that's not enough for a good use.

Is it possible to customize? Or at least display the full path name (not in gray alongside). I haven't found a way to do this.

thanks a lot!

0
7 comments

Did I understand correctly, that you have a few modules in your project? 

If yes, right-click the content root folder in the project view and click “Open module settings”. Then give your module a unique name. Example:

https://youtu.be/scshHzSxBqY

Otherwise, please share some example of project of the same structure as your working project.

0

No sorry I only have one is named “intellij”

I added content root to it at the right of my screen. Maybe there is another way to add scattered sources ?

0

Sadly, IDEA UI does not cover all possible variants. But we can use a workaround provided by OS.

  1. run command `subst z: c:\dev\my_path_to_project"
  2. Open the IDEA project from z: drive
  3. Add the command 1 to startup 

    Therefore, the path will be shortened so you will see a meaningful name. Alternatively, you can use a symlink.
0

Hello,

Answering way too late sorry.

Your both solution worked well. The issue is I can't anymore use git with a symlink for example.. Git is fully lost because of paths.. :(

0

I created a ticket IJPL-172143

FYI: I tried working with symlinks under GIT by creating an alternate project folders in my local macine.  I opened these symlinks folder in my IDE instead of the original folders, and it helped.

0

Just to be sure we understand us well, I don't have many modules, but many source content root under one module : 

What's in green, is a symlink redirecting to the source package to have the label I want on the Project pannel on the left, but then the path with the symlink make impossble to use git

0

Please sign in to leave a comment.