question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Project tree shows confusing directory structure

See original GitHub issue

IntelliJ shows a confusing picture of the directory structure in the project tree pane.

  • Example 1 The following directory tree

    src
    ├── main
    │   ├── resources
    │   └── scala
    └── test
        └── scala
    

    is shown like this:

    one "scala" folder under "src/main", one under "src"

    I.e. the test directory is omitted, and it is not obvious where the lower scala folder belongs to. I would expect the project tree to match the actual directory structure.

  • Example 2 The following directory tree

    src
    ├── main
    │   └── scala
    └── test
        └── scala
    

    is shown like this:

    two "scala" folders under "src"

    I.e. the main and test directories are omitted. It is not obvious where the two “floating” scala folders belong to. I would expect the project tree to match the actual directory strucuture.

  • Version information IntelliJ:

    IntelliJ IDEA 2018.2.5 (Community Edition)
    Build #IC-182.4892.20, built on October 16, 2018
    
    JRE: 1.8.0_152-release-1248-b6-amd64
    JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
    

    Bazel plugin:

    2018.10.08.0.2
    

A full reproduction of this issue is available here: https://github.com/aherrmann/reproduce-intellij-project-view-issue

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
gseitzcommented, Nov 13, 2018

I don’t think it’s a bug in IntelliJ. The issue is that the root folder is added as a Source Folder in Intellij. This means IntelliJ interprets every sub-folder as a java-like “package”. Removing the root folder from the module setup manually yields the expected results: image

Notice that this also changed the icons for the folder src and main, as they are now regarded as normal directories rather than java-like packages.

0reactions
aherrmanncommented, Nov 15, 2018

Sounds great, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Intellij IDEA Project view doesn't show structure as it did before.
File -> Project Structure -> Click on modules (notice empty list) -> Click on '+' -> Click on ... I have a mixed...
Read more >
Structures of Directory in Operating System - GeeksforGeeks
A tree structure is the most common directory structure. The tree has a root directory, and every file in the system has a...
Read more >
Project and folder structure display - Wrike Help Center
I'm really having trouble telling where I am at times. What task belongs to what project, what project belongs to what client, and...
Read more >
File Not Found - The Verge
Modern college students aren't organizing their files into folders and directories, forcing some professors to rethink the way they teach ...
Read more >
Project panel does not show folder structure - Studio
Hi all, My project panel doesn't show the directory structure. It just shows Dependencies. Can someone can guide me how to show the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found