- doesn't support spaces in filenames (opens e:\Cache.class, but if I rename it to e:\C ache.class, just binary lister view is shown)
- doesn't support Russian characters in path (d:\Development\Java\Диплом\bin\org\spbu\bdd\core\Cache.class wouldn't open)
Reproducable 99% of the time.
The first issue is due to a reasonable assumption in the source code that file Foo.class corresponds to class Foo. If the .class file is renamed to Bar.class, the plugin will fail to locate the generated file Foo.java in the plugin's installation directory. (You can find it there anyway; since a Java class cannot contain any space, you must have renamed the .class file, have you?) This could be fixed by reading from JAD's output (stderr) for the path of the generated .java file.
The second issue is caused by the decompiler JAD itself. It just can't handle "unusual" characters like CJK and Russian in the path. This could be fixed by setting the JAD process' current directory to the .class file's directory.
I'll try to make a patch or something if my time allows.
Update: I've made a mod version and uploaded it here: http://www.4shared.com/zip/HmiBqkZn/tc_jad_plugin_sources_101_mod_.html
. The problems found by XPEHOPE3KA and me have been fixed (hopefully). To have a try please replace your old tc_jad_plugin.wlx with my version.
As I'm more familiar with Visual C++, I just put all necessary source files into one folder and compile. All modifications are marked out in the comment (search for "yyang"). The modified files are decompile.cpp (major patch work), highlight.cpp (1 mod), and listplug.cpp (2 cosmetic mods for VC 2008 and VC 2010 to compile). The included tc_jad_plugin.wlx is compiled with VC6. You can use build.bat to compile your own version (provided cl.exe is on your PATH; remove "/opt:nowin98" if you use VC 2010).
If the .class file itself contains, say, CJK characters, my version won't work. It's a limitation of the JAD decompiler. Copying it to a regular-name tmp file and decompiling that file feels weird to me. Please do it manually.
@esandrei: Please feel free to incorporate my code into your future version. Thanks.