IntelliJ unable to show sources if they are not java

Answered

Hi,

I use Apache Flink and the library `samza-kafka_2.11`. This lib is available in the maven central repo with its sources.

But the problem is, that most of the classes are in `scala`, so they have a `.scala` suffix. Some of them are in `java`.

When I now navigate to a class in IntelliJ, which is in `scala`, than it tries to decompile that class. Is there a way, that just the source-file is opened, regardless of the suffix (`scala`, `kt`, `java`)?

thanks in advance

Guenther

0
5 comments

How the sources in the library are organized? I see no sources available for the library at e.g. http://mvnrepository.com/artifact/org.apache.samza/samza-kafka_2.11/0.12.0

>When I now navigate to a class in IntelliJ, which is in `scala`, than it tries to decompile that class. Is there a way, that just the source-file is opened, regardless of the suffix (`scala`, `kt`, `java`)?

IDE will open source if it is configured for the library(in Edit Library dialog). Do you have them configured there?

0
Avatar
Permanently deleted user

The source-file is configured.

0
Avatar
Permanently deleted user

When I navigate into the library and open a scala class (I know that this is scala, because I looked into the sources-jar-file), it must be decompiled.

 

But when I open a java class (of the same lib), the source is displayed.

 

0

Can you navigate to class via Navigate | Class action? Please try 2017.3 EAP Seems to work fine for me there:

File an issue at https://youtrack.jetbrains.com/issues/SCL with sample project if problem remains. Thanks.

0
Avatar
Permanently deleted user

Ok, the problem is, that the plugin must be activated to see the source-file.

After enabling the scala-plugin.

 

thx

0

Please sign in to leave a comment.