My name is Shekhar. I am working in IOPSIS Software, INDIA (www.iopsis.com).
My prob: Modifying the import classes and fully qualified classes@ runtime using javassist.
Details: (IBM created this prob:) anyways... )
Prob is that Eclipse IDE (open source) does not allow java swing components in its plugins, ie: I cannot develope a plugin for eclipse in Java Swing. It has to be developed in SWT. (Std Widget Toolkit)
However Netbeans IDE allows pluging made in java swing (netbeans is supported by java), so here we have our prob, my Co. has devloped plugins in java swing for netbeans which are working fine, but if we want to use those already developed pluging in eclipse,
1) have to change the import statement for all the classes.(not feasable).
2) change their classes @runtime by javassist to match SwingWT API Classes (http://swingwt.sourceforge.net/)
eg: to swingwtx.swingwt instead of javax.swing.
All i need to know that is it possible? and how? your help will be appreciated, ne links, directions, code, examples are all welcome.
If what you need is only simple class name
replacement, you can call replaceClassName()
in CtClass for doing that. Please read the tutorial.