void Fill() { state.Save(); store.Clear(); foreach (ExtensionPoint extep in adesc.ExtensionPoints) { string name; if (extep.Name.Length > 0 && extep.Description.Length > 0) { name = "<b>" + GLib.Markup.EscapeText(extep.Name) + "</b>"; name += "\n<small>" + GLib.Markup.EscapeText(extep.Description) + "</small>"; } else if (extep.Name.Length > 0) { name = "<b>" + GLib.Markup.EscapeText(extep.Name) + "</b>"; } else if (extep.Description.Length > 0) { name = "<b>" + GLib.Markup.EscapeText(extep.Description) + "</b>"; } else { name = "<b>" + GLib.Markup.EscapeText(extep.Path) + "</b>"; } store.AppendValues(extep, "md-extension-point", name); } state.Load(); UpdateButtons(); }
void Fill() { var tvs = new TreeViewState(list, 0); tvs.Save(); store.Clear(); foreach (var s in stashes) { string name = s.FriendlyName; string branch = GitRepository.GetStashBranchName(name); if (branch != null) { if (branch == "_tmp_") { name = GettextCatalog.GetString("Temporary stash created by {0}", BrandingService.ApplicationName); } else { name = GettextCatalog.GetString("Local changes of branch '{0}'", branch); } } if (!string.IsNullOrEmpty(s.Message)) { name += ": " + s.Message.Trim(); } store.AppendValues(s, s.Index.Author.When.LocalDateTime.ToString(), name); } tvs.Load(); }
void Fill() { TreeViewState tvs = new TreeViewState(list, 0); tvs.Save(); store.Clear(); foreach (var s in stashes) { string name = s.Comment; string branch = GitRepository.GetStashBranchName(name); if (branch != null) { if (branch == "_tmp_") { name = GettextCatalog.GetString("Temporary stash created by {0}", BrandingService.ApplicationName); } else { name = GettextCatalog.GetString("Local changes of branch '{0}'", branch); } } store.AppendValues(s, s.DateTime.LocalDateTime.ToString(), name); } tvs.Load(); }
public void Fill() { treeState.Save(); store.Clear(); foreach (CustomExecutionMode mode in ExecutionModeCommandService.GetCustomModes(ctx)) { if (mode.Mode == null) { continue; } string scope = ""; switch (mode.Scope) { case CustomModeScope.Project: scope = GettextCatalog.GetString("Current project"); break; case CustomModeScope.Solution: scope = GettextCatalog.GetString("Current solution"); break; case CustomModeScope.Global: scope = GettextCatalog.GetString("All solutions"); break; } store.AppendValues(mode, mode.Name, mode.Mode.Name, scope, mode.Id); } treeState.Load(); UpdateButtons(); }
void FillRemotes() { TreeViewState state = new TreeViewState(treeRemotes, 4); state.Save(); storeRemotes.Clear(); string currentRemote = repo.GetCurrentRemote(); foreach (RemoteSource remote in repo.GetRemotes()) { string text = remote.Name == currentRemote ? "<b>" + remote.Name + "</b>" : remote.Name; string url; if (remote.FetchUrl == remote.PushUrl) { url = remote.FetchUrl; } else { url = remote.FetchUrl + " (fetch)\n" + remote.PushUrl + " (push)"; } TreeIter it = storeRemotes.AppendValues(remote, text, url, null, remote.Name); foreach (string branch in repo.GetRemoteBranches(remote.Name)) { storeRemotes.AppendValues(it, null, branch, null, branch, remote.Name + "/" + branch); } } state.Load(); }
public void Fill() { state.Save(); store.Clear(); List <AddinDescription> deps = new List <AddinDescription> (); deps.Add(adesc); foreach (Dependency dep in adesc.MainModule.Dependencies) { AddinDependency adep = dep as AddinDependency; if (adep == null) { continue; } Addin ad = data.AddinRegistry.GetAddin(adep.FullAddinId); if (ad != null && ad.Description != null) { deps.Add(ad.Description); } } foreach (Extension ext in adesc.MainModule.Extensions) { AddExtension(ext, deps); } UpdateButtons(); state.Load(); }
public void UpdateDisplay() { treeViewState.Save(); store.Clear(); if (DebuggingService.DebuggerSession == null || DebuggingService.DebuggerSession.IsRunning) { return; } try { ProcessInfo[] currentProcesses = DebuggingService.DebuggerSession.GetProcesses(); if (currentProcesses.Length == 1) { AppendThreads(TreeIter.Zero, currentProcesses [0]); } else { foreach (ProcessInfo p in currentProcesses) { TreeIter it = store.AppendValues(null, p.Id.ToString(), p.Name, p, (int)Pango.Weight.Normal, ""); AppendThreads(it, p); } } } catch (Exception ex) { MessageService.ShowException(ex); } tree.ExpandAll(); treeViewState.Load(); }
void FillList() { state.Save(); store.Clear(); string filter = entryFilter.Text; foreach (ProcessInfo pi in procs) { if (filter.Length == 0 || pi.Id.ToString().Contains(filter) || pi.Name.Contains(filter)) { store.AppendValues(pi, pi.Id.ToString(), pi.Name); } } state.Load(); if (tree.Selection.CountSelectedRows() == 0) { Gtk.TreeIter it; if (store.GetIterFirst(out it)) { tree.Selection.SelectIter(it); } } }
void Fill(string selection) { state.Save(); store.Clear(); TreeIter selIter = TreeIter.Zero; foreach (RegistryInfo reg in AddinAuthoringService.GetRegistries()) { TreeIter it = store.AppendValues(reg.ApplicationName, reg.Description, reg); if (reg.ApplicationName == selection) { selIter = it; } } state.Load(); if (!selIter.Equals(TreeIter.Zero)) { tree.Selection.SelectIter(selIter); } else { if (!tree.Selection.GetSelected(out selIter) && store.GetIterFirst(out selIter)) { tree.Selection.SelectIter(selIter); } } UpdateButtons(); }
async void FillRemotes() { try { var state = new TreeViewState(treeRemotes, 4); state.Save(); storeRemotes.Clear(); var token = destroyTokenSource.Token; string currentRemote = await repo.GetCurrentRemoteAsync(token); if (token.IsCancellationRequested) { return; } foreach (Remote remote in await repo.GetRemotesAsync(token)) { if (token.IsCancellationRequested) { return; } // Take into account fetch/push ref specs. string text = remote.Name == currentRemote ? "<b>" + remote.Name + "</b>" : remote.Name; string url = remote.Url; TreeIter it = storeRemotes.AppendValues(remote, text, url, null, remote.Name); foreach (string branch in repo.GetRemoteBranches(remote.Name)) { storeRemotes.AppendValues(it, null, branch, null, branch, remote.Name + "/" + branch); } } state.Load(); } catch (Exception e) { LoggingService.LogInternalError(e); } }
public void UpdateDisplay() { if (tree.IsRealized) { tree.ScrollToPoint(0, 0); } treeState.Save(); store.Clear(); if (breakpoints != null) { lock (breakpoints) { foreach (BreakEvent be in breakpoints.GetBreakevents()) { if (be.NonUserBreakpoint) { continue; } string hitCount = be.HitCountMode != HitCountMode.None ? be.CurrentHitCount.ToString() : ""; string traceExp = (be.HitAction & HitAction.PrintExpression) != HitAction.None ? be.TraceExpression : ""; string traceVal = (be.HitAction & HitAction.PrintExpression) != HitAction.None ? be.LastTraceValue : ""; string name; var fb = be as FunctionBreakpoint; var bp = be as Breakpoint; var cp = be as Catchpoint; if (fb != null) { if (fb.ParamTypes != null) { name = fb.FunctionName + "(" + string.Join(", ", fb.ParamTypes) + ")"; } else { name = fb.FunctionName; } } else if (bp != null) { name = String.Format("{0}:{1},{2}", bp.FileName, bp.Line, bp.Column); } else if (cp != null) { name = cp.ExceptionName; } else { name = ""; } store.AppendValues(GetIconId(be), be.Enabled, name, be, bp != null ? bp.ConditionExpression : null, traceExp, hitCount, traceVal); } } } treeState.Load(); }
void Fill() { TreeViewState tvs = new TreeViewState(list, 0); tvs.Save(); store.Clear(); foreach (var s in stashes) { store.AppendValues(s, s.DateTime.LocalDateTime.ToString(), s.Comment); } tvs.Load(); }
void FillTags() { TreeViewState state = new TreeViewState(listTags, 1); state.Save(); storeTags.Clear(); foreach (string tag in repo.GetTags()) { storeTags.AppendValues(tag); } state.Load(); }
public void UpdateDisplay() { if (tree.IsRealized) { tree.ScrollToPoint(0, 0); } treeState.Save(); store.Clear(); if (breakpoints != null) { lock (breakpoints) { foreach (Breakpoint bp in breakpoints.GetBreakpoints()) { string hitCount = bp.HitCountMode != HitCountMode.None ? bp.CurrentHitCount.ToString() : ""; string traceExp = bp.HitAction == HitAction.PrintExpression ? bp.TraceExpression : ""; string traceVal = bp.HitAction == HitAction.PrintExpression ? bp.LastTraceValue : ""; string name; if (bp is FunctionBreakpoint) { FunctionBreakpoint fb = (FunctionBreakpoint)bp; if (fb.ParamTypes != null) { name = fb.FunctionName + "(" + string.Join(", ", fb.ParamTypes) + ")"; } else { name = fb.FunctionName; } } else { name = string.Format("{0}:{1},{2}", ((Breakpoint)bp).FileName, bp.Line, bp.Column); } if (bp.Enabled) { store.AppendValues("md-breakpoint", true, name, bp, bp.ConditionExpression, traceExp, hitCount, traceVal); } else { store.AppendValues("md-breakpoint-disabled", false, name, bp, bp.ConditionExpression, traceExp, hitCount, traceVal); } } } } treeState.Load(); }
void Update() { if (tree.IsRealized) { tree.ScrollToPoint(0, 0); } treeViewState.Save(); store.Clear(); try { if (DebuggingService.GetSessions().SelectMany(s => s.GetProcesses()).Count() > 1) { foreach (var session in DebuggingService.GetSessions()) { foreach (var process in session.GetProcesses()) { var iter = store.AppendValues( session.IsRunning ? "md-continue-debug" : "md-pause-debug", process.Id.ToString(), process.Name, process, session == DebuggingService.DebuggerSession ? (int)Pango.Weight.Bold : (int)Pango.Weight.Normal, "", session); if (session.IsRunning) { continue; } AppendThreads(iter, process, session); } } } else { if (!DebuggingService.IsPaused) { return; } AppendThreads(TreeIter.Zero, DebuggingService.DebuggerSession.GetProcesses() [0], DebuggingService.DebuggerSession); } } catch (Exception ex) { LoggingService.LogInternalError(ex); } tree.ExpandAll(); treeViewState.Load(); }
void FillBranches() { TreeViewState state = new TreeViewState(listBranches, 3); state.Save(); storeBranches.Clear(); string currentBranch = repo.GetCurrentBranch(); foreach (var branch in repo.GetBranches()) { string text = branch.Name == currentBranch ? "<b>" + branch.Name + "</b>" : branch.Name; storeBranches.AppendValues(branch, text, true /*branch.Tracking*/, branch.Name); } state.Load(); }
void FillBranches() { var state = new TreeViewState(listBranches, 3); state.Save(); storeBranches.Clear(); string currentBranch = repo.GetCurrentBranch(); foreach (Branch branch in repo.GetBranches()) { string text = branch.FriendlyName == currentBranch ? "<b>" + branch.FriendlyName + "</b>" : branch.FriendlyName; storeBranches.AppendValues(branch, text, branch.IsTracking ? branch.TrackedBranch.FriendlyName : String.Empty, branch.FriendlyName); } state.Load(); }
void FillSelection() { tstateSel.Save(); storeSelection.Clear(); foreach (string exc in selectedClasses) { storeSelection.AppendValues(exc); } tstateSel.Load(); if (treeSelected.Selection.CountSelectedRows() == 0) { TreeIter it; if (storeSelection.GetIterFirst(out it)) { treeSelected.Selection.SelectIter(it); } } }
public void UpdateDisplay() { treeState.Save(); store.Clear(); if (bps != null) { foreach (Breakpoint bp in bps.GetBreakpoints()) { string traceExp = bp.HitAction == HitAction.PrintExpression ? bp.TraceExpression : ""; string traceVal = bp.HitAction == HitAction.PrintExpression ? bp.LastTraceValue : ""; string hitCount = bp.HitCount > 0 ? bp.HitCount.ToString() : ""; string name; if (bp is FunctionBreakpoint) { FunctionBreakpoint fb = (FunctionBreakpoint)bp; if (fb.ParamTypes != null) { name = fb.FunctionName + "(" + string.Join(", ", fb.ParamTypes) + ")"; } else { name = fb.FunctionName; } } else { name = ((Breakpoint)bp).FileName + ":" + bp.Line.ToString(); } if (bp.Enabled) { store.AppendValues("md-breakpoint", true, name, bp, bp.ConditionExpression, traceExp, hitCount, traceVal); } else { store.AppendValues("md-breakpoint-disabled", false, name, bp, bp.ConditionExpression, traceExp, hitCount, traceVal); } } } treeState.Load(); }
void FillRemotes() { TreeViewState state = new TreeViewState(treeRemotes, 4); state.Save(); storeRemotes.Clear(); string currentRemote = repo.GetCurrentRemote(); foreach (var remote in repo.GetRemotes()) { string text = remote.Name == currentRemote ? "<b>" + remote.Name + "</b>" : remote.Name; string url = remote.Path; TreeIter it = storeRemotes.AppendValues(remote, text, url, null, remote.Name); foreach (string branch in repo.GetRemoteBranches(remote.Name)) { storeRemotes.AppendValues(it, null, branch, null, branch, remote.Name + "/" + branch); } } state.Load(); }
void FillRemotes() { var state = new TreeViewState(treeRemotes, 4); state.Save(); storeRemotes.Clear(); string currentRemote = repo.GetCurrentRemote(); foreach (Remote remote in repo.GetRemotes()) { // Take into account fetch/push ref specs. string text = remote.Name == currentRemote ? "<b>" + remote.Name + "</b>" : remote.Name; string url = remote.Url; TreeIter it = storeRemotes.AppendValues(remote, text, url, null, remote.Name); foreach (string branch in repo.GetRemoteBranches(remote.Name)) { storeRemotes.AppendValues(it, null, branch, null, branch, remote.Name + "/" + branch); } } state.Load(); }
void Update() { if (tree.IsRealized) { tree.ScrollToPoint(0, 0); } treeViewState.Save(); store.Clear(); if (!DebuggingService.IsPaused) { return; } try { var processes = DebuggingService.DebuggerSession.GetProcesses(); if (processes.Length == 1) { AppendThreads(TreeIter.Zero, processes[0]); } else { foreach (var process in processes) { TreeIter iter = store.AppendValues(null, process.Id.ToString(), process.Name, process, (int)Pango.Weight.Normal, ""); AppendThreads(iter, process); } } } catch (Exception ex) { LoggingService.LogInternalError(ex); } tree.ExpandAll(); treeViewState.Load(); }
void FillList() { state.Save(); tree.Model = null; store.Clear(); string filter = entryFilter.Text; bool anyPidSet = false; bool anyDescriptionSet = false; foreach (ProcessInfo pi in procs) { if (pi.Id != 0) { anyPidSet = true; } if (pi.Description != null) { anyDescriptionSet = true; } if (filter.Length == 0 || (pi.Id != 0 && pi.Id.ToString().Contains(filter)) || pi.Name.Contains(filter) || (pi.Description?.Contains(filter) ?? false)) { store.AppendValues(pi, pi.Id.ToString(), pi.Name, pi.Description); } } tree.Columns [0].Visible = anyPidSet; tree.Columns [2].Visible = anyDescriptionSet; tree.Model = store; state.Load(); tree.ColumnsAutosize(); if (tree.Selection.CountSelectedRows() == 0) { Gtk.TreeIter it; if (store.GetIterFirst(out it)) { tree.Selection.SelectIter(it); } } }
void FillExceptions() { tstateExc.Save(); storeExceptions.Clear(); string filter = entryFilter.Text.ToLower(); foreach (string t in classes) { if ((filter.Length == 0 || t.ToLower().IndexOf(filter) != -1) && !selectedClasses.Contains(t)) { storeExceptions.AppendValues(t); } } tstateExc.Load(); if (treeExceptions.Selection.CountSelectedRows() == 0) { TreeIter it; if (storeExceptions.GetIterFirst(out it)) { treeExceptions.Selection.SelectIter(it); } } }
public void UpdateDisplay() { treeState.Save(); store.Clear(); if (bps != null) { foreach (Breakpoint bp in bps.GetBreakpoints()) { string traceExp = bp.HitAction == HitAction.PrintExpression ? bp.TraceExpression : ""; string traceVal = bp.HitAction == HitAction.PrintExpression ? bp.LastTraceValue : ""; string hitCount = bp.HitCount > 0 ? bp.HitCount.ToString() : ""; if (bp.Enabled) { store.AppendValues("md-breakpoint", true, bp.FileName + ":" + bp.Line.ToString(), bp, bp.ConditionExpression, traceExp, hitCount, traceVal); } else { store.AppendValues("md-breakpoint-disabled", false, bp.FileName + ":" + bp.Line.ToString(), bp, bp.ConditionExpression, traceExp, hitCount, traceVal); } } } treeState.Load(); }
async void FillBranches() { var state = new TreeViewState(listBranches, 3); state.Save(); storeBranches.Clear(); var token = destroyTokenSource.Token; string currentBranch = await repo.GetCurrentBranchAsync(token); if (token.IsCancellationRequested) { return; } foreach (var branch in await repo.GetBranchesAsync(token)) { if (token.IsCancellationRequested) { return; } string text = branch.FriendlyName == currentBranch ? "<b>" + branch.FriendlyName + "</b>" : branch.FriendlyName; storeBranches.AppendValues(branch, text, branch.IsTracking ? branch.TrackedBranch.FriendlyName : String.Empty, branch.FriendlyName); } state.Load(); }
public void LoadState() { state.Load(); }