public GroupingProviderChainControl(IssueGroup rootGroup, IEnumerable<Type> providers) { this.RootGroupingProvider = new GroupingProvider (rootGroup); availableProviders = providers.ToList(); BuildUi (); }
public GroupingProviderChainControl(IssueGroup rootGroup, IEnumerable <Type> providers) { this.RootGroupingProvider = new GroupingProvider(rootGroup); availableProviders = providers.ToList(); BuildUi(); }
public CodeIssuePadControl() { var buttonRow = new HBox(); runButton.Clicked += StartAnalyzation; buttonRow.PackStart(runButton); cancelButton.Clicked += StopAnalyzation; cancelButton.Sensitive = false; buttonRow.PackStart(cancelButton); var groupingProvider = new CategoryGroupingProvider { Next = new ProviderGroupingProvider() }; rootGroup = new IssueGroup(groupingProvider, "root group"); var groupingProviderControl = new GroupingProviderChainControl(rootGroup, groupingProviders); buttonRow.PackStart(groupingProviderControl); PackStart(buttonRow); store = new TreeStore(textField, nodeField); view.DataSource = store; view.HeadersVisible = false; view.Columns.Add("Name", textField); view.SelectionMode = SelectionMode.Multiple; view.RowActivated += OnRowActivated; view.RowExpanding += OnRowExpanding; view.ButtonPressed += HandleButtonPressed; view.ButtonReleased += HandleButtonReleased; PackStart(view, true); IIssueTreeNode node = rootGroup; node.ChildrenInvalidated += (sender, group) => { Application.Invoke(delegate { ClearSiblingNodes(store.GetFirstNode()); store.Clear(); SyncStateToUi(runner.State); foreach (var child in ((IIssueTreeNode)rootGroup).Children) { var navigator = store.AddNode(); SetNode(navigator, child); SyncNode(navigator); } }); }; node.ChildAdded += HandleRootChildAdded; runner.IssueSink = rootGroup; runner.AnalysisStateChanged += HandleAnalysisStateChanged; }
public CodeIssuePadControl () { var buttonRow = new HBox(); runButton.Clicked += StartAnalyzation; buttonRow.PackStart (runButton); cancelButton.Clicked += StopAnalyzation; cancelButton.Sensitive = false; buttonRow.PackStart (cancelButton); var groupingProvider = new CategoryGroupingProvider { Next = new ProviderGroupingProvider() }; rootGroup = new IssueGroup (groupingProvider, "root group"); var groupingProviderControl = new GroupingProviderChainControl (rootGroup, groupingProviders); buttonRow.PackStart (groupingProviderControl); PackStart (buttonRow); store = new TreeStore (textField, nodeField); view.DataSource = store; view.HeadersVisible = false; view.Columns.Add ("Name", textField); view.SelectionMode = SelectionMode.Multiple; view.RowActivated += OnRowActivated; view.RowExpanding += OnRowExpanding; view.ButtonPressed += HandleButtonPressed; view.ButtonReleased += HandleButtonReleased; PackStart (view, true); IIssueTreeNode node = rootGroup; node.ChildrenInvalidated += (sender, group) => { Application.Invoke (delegate { ClearSiblingNodes (store.GetFirstNode ()); store.Clear (); SyncStateToUi (runner.State); foreach(var child in ((IIssueTreeNode)rootGroup).Children) { var navigator = store.AddNode (); SetNode (navigator, child); SyncNode (navigator); } }); }; node.ChildAdded += HandleRootChildAdded; runner.IssueSink = rootGroup; runner.AnalysisStateChanged += HandleAnalysisStateChanged; }
public IssueGroup GetIssueGroup(IssueSummary issue) { IssueGroup group; var providerCategory = GetGroupingKey(issue); if (providerCategory == null) { return(null); } if (!groups.TryGetValue(providerCategory, out group)) { group = new IssueGroup(Next, GetGroupName(issue)); groups.Add(providerCategory, group); } return(group); }
public IssueGroup GetIssueGroup(IssueGroup parentGroup, IssueSummary issue) { IssueGroup group; var providerCategory = GetGroupingKey(issue); if (providerCategory == null) { return(null); } var key = Tuple.Create(parentGroup, providerCategory); if (!groups.TryGetValue(key, out group)) { group = new IssueGroup(Next, GetGroupName(issue)); groups.Add(key, group); } return(group); }
bool ProcessIssue(IssueSummary issue, out IssueGroup group) { bool groupAdded = false; group = null; if (groupingProvider != null) { group = groupingProvider.GetIssueGroup(issue); } if (group == null) { children.Add(issue); } else if (!groups.Contains(group)) { groupAdded = true; groups.Add(group); children.Add(group); } return(groupAdded); }
public void AddIssue(IssueSummary issue) { IssueGroup group = null; bool groupAdded = false; bool issueAdded = false; lock (_lock) { if (!allIssues.Contains(issue)) { IssueCount++; allIssues.Add(issue); ((IIssueTreeNode)issue).VisibleChanged += HandleVisibleChanged; issueAdded = true; } if (processingEnabled) { groupAdded = ProcessIssue(issue, out group); } } if (issueAdded) { OnTextChanged(new IssueGroupEventArgs(this)); } if (!processingEnabled) { return; } if (groupAdded) { OnChildAdded(new IssueTreeNodeEventArgs(this, group)); } else if (group == null) { OnChildAdded(new IssueTreeNodeEventArgs(this, issue)); } if (group != null) { group.AddIssue(issue); } }
public IssueGroup GetIssueGroup (IssueGroup parent, IssueSummary issue) { return null; }
public GroupingProvider(IssueGroup rootGroup) { this.rootGroup = rootGroup; next = rootGroup.GroupingProvider; }
public GroupingProvider (IssueGroup rootGroup) { this.rootGroup = rootGroup; next = rootGroup.GroupingProvider; }
bool ProcessIssue (IssueSummary issue, out IssueGroup group) { bool groupAdded = false; group = null; if (groupingProvider != null) { group = groupingProvider.GetIssueGroup (issue); } if (group == null) { children.Add (issue); } else if (!groups.Contains (group)) { groupAdded = true; groups.Add (group); children.Add (group); } return groupAdded; }
public IssueGroup GetIssueGroup(IssueGroup parent, IssueSummary issue) { return(null); }
public IssueGroup GetIssueGroup (IssueGroup parent, IssueSummary issue) { throw new NotImplementedException (); }
public IssueGroup GetIssueGroup(IssueGroup parent, IssueSummary issue) { throw new NotImplementedException(); }
public IssueGroup GetIssueGroup (IssueGroup parent, IssueSummary issue) { GetIssueGroupCalled = true; return Group; }