(older archive entries before 2007 are not shown here, but included in the onsite-search)
Mailing List - Entries of 2012
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[QF-Test] Eclipse Class Loading/Imports in SUT scripts
Hello,We seem to be having a bit of a problem with getting access to certain classes within Eclipse in an SUT Jython script.
I have tried the following to get access to org.eclipse.ui.PlatformUI and none have worked:
Copying Eclipse plugin jars to QF-Test's plugin directory: This gave us the class but outside the context of our application. Also found that it's not recommended to do it this way.
Importing PlatformUI without any jars in the plugins directory: Resulted in an ImportError as Jython's ClassLoader is not very good with Eclipse classes.
Getting the ClassLoader and calling loadClass() from an existing component using rc.getComponent("WorkbenchWindow").getClass().getClassLoader().loadClass("org.eclipse.ui.PlatformUI"): This throws a ClassNotFoundException.
Getting QF-Test's run-context ClassLoader and calling loadClass() using rc.context.__class__.getClassLoader().loadClass("org.eclipse.ui.PlatformUI"): This also throws a ClassNotFoundException
It is worth noting that using the latter two methods above to access any class under org.eclipse.swt.widgets works absolutely fine.
My question then is this: How can we get access to the classes in eclipse bundles outside of SWT using Jython?
Any help is very much appreciated. Regards, Stephen -- Stephen Bayne CriticalBlue Ltd