Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable for scala files #12

Open
bric3 opened this issue May 23, 2013 · 4 comments
Open

Disable for scala files #12

bric3 opened this issue May 23, 2013 · 4 comments

Comments

@bric3
Copy link
Owner

bric3 commented May 23, 2013

Originally reported by: Oleg Aleshko (Bitbucket: olegych, GitHub: olegych)


The plugin is quite useful for java but messes up resolving in scala files since it can't (yet?) decompile scala.


@bric3
Copy link
Owner Author

bric3 commented May 23, 2013

Original comment by Brice Dutheil (Bitbucket: bric3, GitHub: bric3):


Is that really an issue ?

If we could exclude those jars... But it's all .class files I'm not sure how to identify non-Java based bytecode. And clearly I don't know anything about Scala but what other people say about it.

So if you have any input or even a PR I'm interested, thx. Note however that if that's not JD-IntelliJ it'll be the IDEA decompiler that will be used anyway.

Aside of that it could be interesting to see how scala is compiled, like seeing the @ScalaSignature in the bytecode.

Also I don't think you can expect a scala decompiler in the very near future on our side. But who knows, if it happens that we'll work in Scala project.

Thx for the feedback, btw
Cheers.

@bric3
Copy link
Owner Author

bric3 commented May 23, 2013

Original comment by Oleg Aleshko (Bitbucket: olegych, GitHub: olegych):


Hi Brice
Almost all scala classes have scala.reflect.ScalaSignature or scala.reflect.ScalaLongSignature annotation (except closures i guess).
That's what scala plugin uses to decompile signatures.
See https://github.com/JetBrains/intellij-scala/blob/master/src/org/jetbrains/plugins/scala/decompiler/DecompilerUtil.scala#L109
Maybe you could disable decompiling for classes that have this annotation?

@bric3
Copy link
Owner Author

bric3 commented May 23, 2013

Original comment by Brice Dutheil (Bitbucket: bric3, GitHub: bric3):


Interesting.

Note that I'm not a huge fan of guessing the file type from the presence or not of this annotation ScalaSignature. There might be some other marker though. I know that bytecode allowed to put attributes (they then placed annotation data in these placeholders in Java 1.5), however I don't know if the Scala compiler use this placeholder as well to put reliable data that could identify the source / type of this bytecode.

It's not on my priority list though, plus the code is in Scala which makes it difficult to integrate I guess. Anyway if you want to play a bit with the code, and propose something I could integrate it later.

Cheers.

@bric3
Copy link
Owner Author

bric3 commented Jan 24, 2014

Original comment by Oleg Aleshko (Bitbucket: olegych, GitHub: olegych):


Looks like this was fixed in scala plugin, so jd doesn't crash anymore and works fine for java files.
Again, thanks for this plugin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant