osx - IntelliJ on Mac Can't detect syntax errors for JAVA -


i started using intellij on mac. problem met syntax error on java file can't detected , highlighted in pc.

the problem errors not detected instead of errors not being highlighted, because have checked highlighting setting.

any configuration can play let syntax error can detected?

i.e.,

test = "test"; there no class declaration.

i'm going guess java classes have icon when open them:

enter image description here

what means java class file isn't in recognized source root. doesn't know source file, won't treat one.

right-click on folder, , select "mark directory as" -> "sources root".

enter image description here

after that, drag , drop java class folder. then, you'll see appear this:

enter image description here

then intellij report of errors.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -