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

Inner classes are missing #94

Open
supersache opened this issue May 17, 2023 · 2 comments
Open

Inner classes are missing #94

supersache opened this issue May 17, 2023 · 2 comments

Comments

@supersache
Copy link

It is a bit of a mystery that noone has brought this up before... Regardless of which decompiler you chose, inner classes are always missing in the decompiled eclipse view. So are references to those, e.g. class attributes whose type is an inner class of another type.

@jpstotz
Copy link
Collaborator

jpstotz commented May 17, 2023

Most decompiler require direct access to the class files, so ECD has to extract the necessary classes. Inner classes are stored in separate class file(s) and if they are missing this may indicate that they had not been extracted and are thus not decompiled.

If you have an example JAR file that contains a class where you miss the inner classes please check if e.g. standalone jd-gui shows the inner class. If it shows the inner class it would be nice of you if you could provide that Jar to me so I could check it in detail what is going wrong.

@JanecekPetr
Copy link

I stumbled on ths issue because I am indeed seeing similar things. However, there are at least two different issues at hand, so let's make it more specific.

  1. I have a jar (which I cannot distribute, but will try with a different one and report back) on which I call the "Export Source" action. Doesn't matter whether it's on the whole jar or a single package. This generates a zip file containing all decompiled .java sources ... but without the inner classes. If I specifically call "Export sources" on a single inner class, it works. If I select multiple class files, the inner classes are not included.

  2. By default inner class files are not visible in the Project Explorer. This ties into point 1, actually point 1 makes this problem seem much worse than it is. It looks like the decompiler does not see the inner class files at all because they're not in the Package explorer and they're not exported when decompiling the whole jar. However, this can be configured.
    In other words, the inner class files are hidden by default, but can be displayed at will, and decompiled one by one.

obrazek

What I want, obviously, is to fix the first issue. If that works as expected, the second issue would never even seem like an issue. Extra points for decompiling the inner classes automatically when only the outer class is selected for the extraction.

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

No branches or pull requests

3 participants