javaintellij-ideacompiler-errorssdkide

Intellij does not show any errors in the syntax/does not give any suggestions


There's a couple of similar threads, but none seems to contain the answer to my issue.

My IDE does not show any error, does not give any suggestions, does not import anything. Example:

public static String createInversion(ArrayList<String> splitName) {
        splitName.removeIf(n -> List.of("Lord", "Lady").contains(n));
        ArrayList<String> reverted = List.newArrayList(splitName.stream()
        .collect(Collector.toCollection(LinkedList::new))
        .descendingIterator());
        return String.format("%s, %s", splitName.get(1), splitName.get(0));
        gyugyuihu
                dsfsdf
                rewfewr
    }

You can clearly see that the last three lines are random chains of letters without any context. My IDE does not highlight them, does not report any problems. I don't even know if I should use Collector or Collectors class, because I am given zero suggestions, it's like writing in a Word Document.

I am only given errors the moment I try to compile, but also just in the terminal. The code remains untouched by Intellij.

I do not have the Power Safe Mode on, SDK is set correctly, language level in Modules is set correctly, Settings -> Build, Execution, Deployment -> Java Compiler -> Target Bytecode Version is set correctly, the main folder is marked as the Source Root.

I am out of ideas. Please help.

EDIT: Adding a screenshot of my setup. enter image description here


Solution

  • Have you tried to invalidate the caches? That usually clears up issues like this. It's easy to do too: From the main menu, select File | Invalidate Caches / Restart.