Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] Re: Dynamically generating source for IClassFile ...

Valid argument, I can see 2 extremes to accomplish what you describe. 

First is like you suggest make this method take additionall arguments,
or better yet have separate methods for each operation. This way
you can always ask for what you need, get it and display in appropriate
form, whatever it is.

Another way is to make one generic method like locateSource()
I mentioned and have the behavior of this method to be described
via JDT preference pages in a user-friendly manner. The preferences
will be understood by the actual tool doing decompilation/bytecode
extraction, etc. The only responsibility of JDT in this case is to get
source, whatever it is, and display it in some universal editor.

For the tool I'm working on either approach will do and the current
implementation is more like the latter.
I can see that #1 doesn't exclude #2, so certain standard operatons 
can be defined by the interface, and any plugin specific options can 
be added via preference pages.

Regards,
Vladimir.


-----
Vladimir,

I could imagine situations where I am not interested by a disassembled 
source, but simply by bytecodes (like the output of javap -c).
How would you envisage to have both views interact ? Is this a truly 
separate problem ? Would you support parameters ?

Philippe



Back to the top