blob: 6cf39e8002c6a0b0350de1df0a3d9e6089e01b55 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/*******************************************************************************
* Copyright (c) 2004 - 2006 University Of British Columbia and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* University Of British Columbia - initial API and implementation
*******************************************************************************/
package org.eclipse.mylar.internal.bugzilla.ui.tasklist;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.mylar.internal.bugzilla.ui.BugzillaOpenStructure;
import org.eclipse.mylar.internal.bugzilla.ui.ViewBugzillaAction;
import org.eclipse.mylar.internal.core.util.MylarStatusHandler;
/**
* @author Mik Kersten
*/
public class OpenBugzillaReportJob implements IRunnableWithProgress {
private int id;
private String serverUrl;
public OpenBugzillaReportJob(String serverUrl, int id) {
this.id = id;
this.serverUrl = serverUrl;
}
public void run(IProgressMonitor monitor) {
try {
monitor.beginTask("Opening Bugzilla Report", 10);
List<BugzillaOpenStructure> list = new ArrayList<BugzillaOpenStructure>(1);
list.add(new BugzillaOpenStructure(serverUrl, id, -1));
new ViewBugzillaAction("Open Bug " + id, list).run(monitor);
monitor.done();
} catch (Exception e) {
MylarStatusHandler.fail(e, "Unable to open Bug report: " + id, true);
}
}
}
|