Example code for Headless Bugzilla use [message #590037] |
Wed, 11 June 2008 21:29 |
David Marple Messages: 4 Registered: July 2009 |
Junior Member |
|
|
Hi,
The Example code for Headless use of the Bugzilla
API( http://wiki.eclipse.org/Mylyn/Integrator_Reference#Quick_Exa mple)
doesn't seem work for me; there is no class AbstractRepositoryTask that I
can locate. The following code seems to work, but only for a few bugzilla
(eclipse works, redhat doesn't) repositories; the rest end with a core
exception thrown when it parses the HTML:
BugzillaRepositoryConnector connector = new
BugzillaRepositoryConnector();
connector.init(new TaskList());
TaskRepository repository = new
TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND,
"https://bugzilla.redhat.com/");
AbstractTaskDataHandler handler = connector.getTaskDataHandler();
RepositoryTaskData taskdata = null;
try{
taskdata = handler.getTaskData(repository, "123", new
NullProgressMonitor());
}catch(CoreException e){
System.out.println("Couldn't get task data for bug
123"+((RepositoryStatus)e.getStatus()).getHtmlMessage());
e.printStackTrace();
}
I'm not quite sure where to go from here
Thanks,
David Marple
|
|
|
Powered by
FUDForum. Page generated in 0.03631 seconds