コード例 #1
0
        private void runRefreshThread()
        {
            Thread worker = new Thread(new ThreadStart(delegate
            {
                try
                {
                    status.setInfo("Retrieving issue details...");
                    issue = facade.getIssue(issue.Server, issue.Key);
                    status.setInfo("Issue details retrieved");
                }
                catch (Exception e)
                {
                    status.setError("Failed to retrieve issue details", e);
                }
                rebuildAllPanels(true);
            }));

            worker.Start();
        }
コード例 #2
0
        public void rebuildModelWithRecentlyViewedIssues(JiraIssueListModel model)
        {
            lock (this)
            {
                ICollection <RecentlyViewedIssue> issues  = RecentlyViewedIssuesModel.Instance.Issues;
                ICollection <JiraServer>          servers = JiraServerModel.Instance.getAllServers();

                List <JiraIssue> list = new List <JiraIssue>(issues.Count);
                foreach (RecentlyViewedIssue issue in issues)
                {
                    JiraServer server = findServer(issue.ServerGuid, servers);
                    if (server != null)
                    {
                        list.Add(facade.getIssue(server, issue.IssueKey));
                    }
                }

                model.clear(false);
                model.addIssues(list);
            }
        }