[ANN] IdeaJad for IDEA 4.0 (1162.2)

Hi,

just to let everybody know - I uploaded a new version of the decompiler plugin IdeaJad to http://plugins.intellij.net/

This release just contains a minor fix for an exception that Chang Yu-ming kindly pointed out to me. Thanks again...

As always, please let me know, when you find that something isn't working as expected by sending me a mail (hs@tagtraum.com).

Cheers,

-hendrik

IdeaJad 1162.2
==============
- Fixed bug in decompiling class from context menu
- Changed behavior so that an attempt is made to display
classes that couldn't be properly decompiled

19 comments

Hello,

Fine plugin! :) Thanks!

I have some ideas:
- Will be nice to replace default *.class editor by Jad decompiled code. It is possible since editor API opened (as i remember since October 2003)
- Does you plan to valid decompilation Inners from jars?

Thanks!

0

Hey Alexey,

regarding your first suggestion - I wasn't aware of that. And it would be quite a change in behaviour as you wouldn't be able to see the 'normal' class editor anymore. Some folks really like to choose between the decompiled version and the class stub. This would have to be addressed somehow. But I will give it some more thought and give it a shot. High on my list of things to do is also having Idea reformat the decompiled source code, as the JAD formatting is sometimes a real mess...

I don't quite understand your second suggestion. Could you please explain?

Thanks,

-hendrik

0

Frankly I don't see any place in the API that lets me replace the a file extension to editor mapping. Does anybody know where to find that?

Thanks,

-hendrik

0

You may just add editor to *.class file type
Image editor plugin do something same. You can see sources. For simplicity,
just define FileEditorProvider and implement FileEditor.

0

Imagine that you have library in project as jar with classes:
MyClass.class
MyClass$1.class
MyClass$Child.class

Then for decompilation class MyClass.class you must have in temp directory also MyClass$1.class and MyClass$Child.class

0

The JBuilder JAD plugin I used a couple of years ago worked as a complete replacement and personally I much preferred this approach, especially since I did not even have to tell it where to put the decompiled classes - it just decompiled them to a temp directory or something and then displayed the contents just like the standard stub decompiler would do.

If there really are a lot of users that would like the choice between decompiled and class-view, would it be possible to make this an option in the options dialog? This way people who don't want to be prompted every time can simply change the option one time there and be done with it.

thanks,

Luke

0

It should actually already do that... are you decompiling from a jar or class files without jar?

-hendrik

0

you can just uncheck "Confirm navigation triggered decompile" in the configuration panel to get rid of the prompt.

-hendrik

0

Thanks for the hint, Alexey!

I will look into this and hopefully provide an option for this behavior soon.

-hendrik

0

I try decompile class from jar. It decompiled it, but not success.

0

Cool - never even realized that option was there... thanks!

Now for the other cool option: would it be possible to not even have to specify a project-source directory to which to write the decompiled files, but instead have the plugin just write them to a temp-path instead? And then keep the IDEA window title the same as the stub-compiler does ( c:\directory\xxx.jar!com\package\yyy.class )

0

I will look into it... Usually jad simply includes the inner class in its outer class.
Have you checked that?

-hendrik

0

That's certainly possible. I will look into this asap.

Thanks for your feedback!

-hendrik

0

No, JAD say me, that some areas of class it can't decompile. Maybe it not Inners... i'll check it again.

0

Starting point: implement FileEditorProvider. Look at ImageEditor plugin:
http://www.intellij.org/twiki/bin/view/Main/ImageEditorPlugin


Hendrik Schreiber wrote:

Frankly I don't see any place in the API that lets me replace the a file extension to editor mapping. Does anybody know where to find that?

Thanks,

-hendrik


--

Erb

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

0

FileEditorProvider implementation has to also implement ApplicationComponent
and be listed in plugin.xml

Erb wrote:

Starting point: implement FileEditorProvider. Look at ImageEditor plugin:
http://www.intellij.org/twiki/bin/view/Main/ImageEditorPlugin


Hendrik Schreiber wrote:

>> Frankly I don't see any place in the API that lets me replace the a
>> file extension to editor mapping. Does anybody know where to find that?
>>
>> Thanks,
>>
>> -hendrik



--

Erb

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

0

Hendrik Schreiber wrote:

As always, please let me know, when you find that something isn't working as expected by sending me a mail (hs@tagtraum.com).


For projects where I don't want class files to be decompiled for
instance, they're not decompilable by JAD), I would like to be able to
disable IdeaJAD on a per-project basis.

Ciao,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://java.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: 416-643-4846 | Fax: 416-594-1919

0

Gordon,

thanks for your suggestion. A disable switch would probably be a good idea. You might know already that you can turn on a confirmation dialog for navigation triggered decompilation (in the plugin's configuration panel), so that you can stop ideajad from decompiling a file. I know that's not the same as what you are asking for, but I thought I mention it, just in case.

-hendrik


tagtraum industries
http://www.tagtraum.com/

0

it shouldn't be inners.

jad is not the finest decompiler of the world, it's pretty old, too. it unfortunately simply cannot handle a number of things correctly :(

-hendrik

0

Please sign in to leave a comment.