1 19 20 package org.netbeans.modules.tasklist.bugs; 21 22 import java.util.List ; 23 import org.netbeans.modules.tasklist.core.Task; 24 import org.netbeans.modules.tasklist.core.TaskList; 25 import org.netbeans.modules.tasklist.bugs.bugzilla.BZBugEngine; 26 import org.netbeans.modules.tasklist.bugs.issuezilla.IZBugEngine; 27 import org.openide.util.NbBundle; 28 29 30 31 32 33 37 public class BugList extends TaskList { 39 private BugQuery mQuery; 40 41 final static String USER_CATEGORY = "bugs"; 44 45 public BugList(BugQuery inQuery) { 46 mQuery = inQuery; 47 } 48 49 private static BugList tasklist = null; 50 51 public static BugList getDefault(BugQuery inQuery) { 52 tasklist = new BugList(inQuery); 54 55 tasklist.refresh(); 57 return tasklist; 59 } 60 61 62 63 public void save() { 64 } 65 66 public void refresh() { 67 if (mQuery != null) { 68 BugEngine engine = BugEngines.get(mQuery.getBugEngine()); 69 engine.refresh(mQuery, this); 70 } 71 } 72 73 74 public void setBugs(List issues) { 75 addRemove(issues, getTasks(), false, null, null); 76 } 77 78 85 86 public void viewBug(Bug bug) { 87 BugEngine engine = bug.getEngine(); 89 engine.viewBug(bug, mQuery.getBaseUrl()); 90 } 91 92 } 93 | Popular Tags |