* @since 3.6
*/
public static TestRunSession importTestRunSession(final String url, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
{
monitor.beginTask(ModelMessages.JUnitModel_importing_from_url, IProgressMonitor.UNKNOWN);
final TestRunHandler handler = new TestRunHandler();
final CoreException[] exception = {null};
final TestRunSession[] session = {null};
Thread importThread = new Thread("JUnit URL importer")
{ //$NON-NLS-1$
public void run()
{
try
{
SAXParserFactory parserFactory = SAXParserFactory.newInstance();
// parserFactory.setValidating(true); // TODO: add DTD and debug flag
SAXParser parser = parserFactory.newSAXParser();
parser.parse(url, handler);
session[0] = handler.getTestRunSession();
}
catch (ParserConfigurationException e)
{
storeImportError(e);
}