Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] decompiler plugin

Sorry Vladimir, but we cannot encourage you to use or subclass internal
classes. They will almost certainly change in a future build.

For the JDT/Core part, have you considered creating a working copy using
IClassFile.getWorkingCopy(IProgressMonitor, IBufferFactory)?

For the UI part, you should probably post a message to the jdt-ui mailing
list.

Jerome



                                                                                                                                              
                      "Vladimir                                                                                                               
                      Grishchenko"                To:      <jdt-core-dev@xxxxxxxxxxx>                                                         
                      <vladgri@xxxxxxxxxx         cc:                                                                                         
                      m>                          Subject: [jdt-core-dev] decompiler plugin                                                   
                      Sent by:                                                                                                                
                      jdt-core-dev-admin@                                                                                                     
                      eclipse.org                                                                                                             
                                                                                                                                              
                                                                                                                                              
                      06/02/2002 07:44 AM                                                                                                     
                      Please respond to                                                                                                       
                      jdt-core-dev                                                                                                            
                                                                                                                                              
                                                                                                                                              



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.
_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-core-dev






Back to the top