[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jdt-core-dev] decompiler plugin
|
Hello,
I'm trying to fix my Java decompiler plugin
(http://sourceforge.net/projects/jadclipse) which is currently broken becase
of the recent changes in org.eclipse.jdt.internal.core.BufferManager. The
way it was implemented before wasn't 100% clean but it worked. In a
nutshell, I called BufferManager.getDefaultBufferManager().openBuffer() with
decompiled source sometime before the method getSource() would be called on
a ClassFile if that file had no source attached to it. Now openBuffer() is
gone without replacement.
I poked around and I see 2 limited workarounds:
1. Subclass SourceMapper and set it on JarPackageFragmentRoot. Not even sure
if this will work but if it will I won't be able to decompile class files
that are not in jar files (there's no SourceMapper for JavaProject).
2. Create an editor that is not based on ClassFileEditor, in this case I
will loose syntax coloring and potentially other goodies.
Another route I took was to implement a custom document provider and use it
in a sublcass of ClassFileEditor. This failed because of private logic in
ClassFileEditor that displays SourceAttachmentForm. It would made a
difference if it was protected and not private, but it is not.
Is there anything I'm missing here? Any ideas?
Thanks and regards,
Vladimir.