public ProjectNotifier(IVisualGitServiceProvider context) : base(context) { uint cookie; if (ErrorHandler.Succeeded(context.GetService<IVsShell>(typeof(SVsShell)).AdviseBroadcastMessages(this, out cookie))) _cookie = cookie; }
public SolutionSettings(IVisualGitServiceProvider context) : base(context) { IVsShell shell = GetService<IVsShell>(typeof(SVsShell)); if (shell == null) throw new InvalidOperationException("IVsShell not available"); object r; if (ErrorHandler.Succeeded(shell.GetProperty((int)__VSSPROPID.VSSPROPID_VirtualRegistryRoot, out r))) _vsUserRoot = (string)r; else _vsUserRoot = @"SOFTWARE\Microsoft\VisualStudio\8.0"; string baseName = _vsUserRoot; if (_vsUserRoot.EndsWith(@"\UserSettings", StringComparison.OrdinalIgnoreCase)) { _inRanu = true; baseName = _vsUserRoot.Substring(0, _vsUserRoot.Length - 13); _vsAppRoot = baseName + @"\Configuration"; } else _vsAppRoot = _vsUserRoot; if (baseName.StartsWith(@"SOFTWARE\", StringComparison.OrdinalIgnoreCase)) baseName = baseName.Substring(9); // Should always trigger if (baseName.StartsWith(@"Microsoft\", StringComparison.OrdinalIgnoreCase)) baseName = baseName.Substring(10); // Give non-ms hives a prefix _hiveSuffix = baseName; }
public VSCommandRouting(IVisualGitServiceProvider context, VSContainerForm form) : base(context) { if (form == null) throw new ArgumentNullException("form"); _form = form; _vsForm = form; if (_routers.Count > 0) _routers.Peek().Enabled = false; Application.AddMessageFilter(this); _routers.Push(this); _installed = true; _vsWpf = !VSVersion.VS2008OrOlder; _map.Add(form, this); _rPct = GetService<IVsRegisterPriorityCommandTarget>(typeof(SVsRegisterPriorityCommandTarget)); if(_rPct != null) { Marshal.ThrowExceptionForHR(_rPct.RegisterPriorityCommandTarget(0, this, out _csCookie)); } ISelectionContextEx sel = GetService<ISelectionContextEx>(typeof(ISelectionContext)); if (sel != null) { _activeStack = sel.PushPopupContext(form); } }
public VisualGitScheduler(IVisualGitServiceProvider context) : base(context) { _timer = new Timer(); _timer.Enabled = false; _timer.Elapsed += new ElapsedEventHandler(OnTimerElapsed); }
public WCTreeNode(IVisualGitServiceProvider context, WCTreeNode parent) { if (context == null) throw new ArgumentNullException("context"); _context = context; _parent = parent; }
public ExportDialog(IVisualGitServiceProvider context) : this() { if (context == null) throw new ArgumentNullException("context"); Context = context; }
protected VisualGitCommandHook(IVisualGitServiceProvider context, Control control) : base(context) { if (control == null) throw new ArgumentNullException("control"); _control = control; }
/// <summary> /// Initializes a new instance of the <see cref="VisualGitIdleArgs"/> class. /// </summary> /// <param name="context">The context.</param> /// <param name="idleFlags">The idle flags.</param> public VisualGitIdleArgs(IVisualGitServiceProvider context, int idleFlags) { if (context == null) throw new ArgumentNullException("context"); _context = context; _periodic = (0 != (idleFlags & (int)_OLEIDLEF.oleidlefPeriodic)); _nonPeriodic = (0 != (idleFlags & (int)_OLEIDLEF.oleidlefNonPeriodic)); _priority = (0 != (idleFlags & (int)_OLEIDLEF.oleidlefPriority)); }
/// <summary> /// Initializes a new instance of the <see cref="ChangeSourceControlRow"/> class. /// </summary> /// <param name="context">The context.</param> /// <param name="project">The project.</param> public ChangeSourceControlRow(IVisualGitServiceProvider context, GitProject project) { if (context == null) throw new ArgumentNullException("context"); else if (project == null) throw new ArgumentNullException("project"); _context = context; _project = project; }
public GitItemData(IVisualGitServiceProvider context, GitItem item) { if (context == null) throw new ArgumentNullException("context"); else if (item == null) throw new ArgumentNullException("item"); _context = context; _item = item; }
public FileIconMapper(IVisualGitServiceProvider context) : base(context) { _imageList = new ImageList(); _imageList.ImageSize = new Size(16, 16); _imageList.ColorDepth = ColorDepth.Depth32Bit; _iconMap = new Dictionary<ProjectIconReference, int>(); _folderMap = new SortedList<WindowsSpecialFolder, int>(); _fileTypeMap = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); }
/// <summary> /// Saves all dirty documents within the provided selection /// </summary> /// <param name="selection">The selection.</param> /// <param name="context">The context.</param> protected static void SaveAllDirtyDocuments(ISelectionContext selection, IVisualGitServiceProvider context) { if (selection == null) throw new ArgumentNullException("selection"); if (context == null) throw new ArgumentNullException("context"); IVisualGitOpenDocumentTracker tracker = context.GetService<IVisualGitOpenDocumentTracker>(); if (tracker != null) tracker.SaveDocuments(selection.GetSelectedFiles(true)); }
public WCSolutionNode(IVisualGitServiceProvider context, GitItem item) : base(context, null, item) { string file = Context.GetService<IVisualGitSolutionSettings>().SolutionFilename; IFileIconMapper iconMapper = context.GetService<IFileIconMapper>(); if (string.IsNullOrEmpty(file)) _imageIndex = iconMapper.GetIconForExtension(".sln"); else _imageIndex = iconMapper.GetIcon(file); }
public void RefreshText(IVisualGitServiceProvider context) { if (context == null) throw new ArgumentNullException("context"); IFileStatusCache cache = context.GetService<IFileStatusCache>(); ImageIndex = PendingChange.IconIndex; GitItem item = cache[FullPath]; if (item == null) throw new InvalidOperationException(); // Item no longer valued PendingChangeStatus pcs = PendingChange.Change ?? new PendingChangeStatus(PendingChangeKind.None); SetValues( pcs.PendingCommitText, "", // Change list GetDirectory(item), PendingChange.FullPath, "", // Locked SafeDate(item.Modified), // Modified PendingChange.Name, PendingChange.RelativePath, PendingChange.Project, GetRevision(PendingChange), PendingChange.FileType, SafeWorkingCopy(item)); if (!SystemInformation.HighContrast) { System.Drawing.Color clr = System.Drawing.Color.Black; if (item.IsConflicted || PendingChange.Kind == PendingChangeKind.WrongCasing) clr = System.Drawing.Color.Red; else if (item.IsDeleteScheduled) clr = System.Drawing.Color.DarkRed; else if (item.Status.IsCopied || item.Status.State == GitStatus.Added) clr = System.Drawing.Color.FromArgb(100, 0, 100); else if (!item.IsVersioned) { if (item.InSolution && !item.IsIgnored) clr = System.Drawing.Color.FromArgb(100, 0, 100); // Same as added+copied else clr = System.Drawing.Color.Black; } else if (item.IsModified) clr = System.Drawing.Color.DarkBlue; ForeColor = clr; } }
public SccProjectFileReference(IVisualGitServiceProvider context, SccProjectData project, SccProjectFile file) { if (context == null) throw new ArgumentNullException("context"); else if (project == null) throw new ArgumentNullException("project"); _context = context; _project = project; _file = file; _refCount = 1; // One should only create a reference if one needs one file.AddReference(this); }
public VSFormContainerPane(IVisualGitServiceProvider context, VSCommandRouting routing, Panel panel) : base(context) { if (context == null) throw new ArgumentNullException("context"); else if (routing == null) throw new ArgumentNullException("routing"); else if (panel == null) throw new ArgumentNullException("panel"); _routing = routing; _panel = panel; }
internal SccDocumentData(IVisualGitServiceProvider context, string name) : base(context) { if (string.IsNullOrEmpty(name)) throw new ArgumentNullException("name"); _name = name; if (GitItem.IsValidPath(name)) { _isFileDocument = true; HookFileChanges(true); } }
public DiffTool(IVisualGitServiceProvider context, string name, string title, string program, string arguments) { if (context == null) throw new ArgumentNullException("context"); else if (string.IsNullOrEmpty(name)) throw new ArgumentNullException("name"); else if (String.IsNullOrEmpty(program)) throw new ArgumentNullException("program"); else if (String.IsNullOrEmpty(arguments)) throw new ArgumentNullException("arguments"); _context = context; _name = name; _title = title ?? name; _program = program; _arguments = arguments; }
public VisualGitSccProvider(IVisualGitServiceProvider context) : base(context) { }
protected override IDisposable DialogRunContext(IVisualGitServiceProvider context) { IVisualGitDialogOwner owner = null; if (context != null) owner = context.GetService<IVisualGitDialogOwner>(); if (owner != null) return owner.InstallFormRouting(this, EventArgs.Empty); else return base.DialogRunContext(context); }
public TextEditorFactory(IVisualGitServiceProvider context) : base(context) { }
public GitSccContext(IVisualGitServiceProvider context) : base(context) { _client = context.GetService<IGitClientPool>().GetNoUIClient(); _statusCache = GetService<IFileStatusCache>(); }
public ProjectListFilter(IVisualGitServiceProvider context, IEnumerable<GitProject> projects) { if (context == null) throw new ArgumentNullException("context"); if (projects == null) throw new ArgumentNullException("projects"); _mapper = context.GetService<IProjectFileMapper>(); List<GitProject> projectList = new List<GitProject>(projects); files.AddRange(_mapper.GetAllFilesOf(projectList)); foreach (GitProject p in projectList) { IGitProjectInfo pi = _mapper.GetProjectInfo(p); if (pi == null) continue; // Ignore solution and non scc projects string dir = pi.ProjectDirectory; if (!string.IsNullOrEmpty(dir) && !folders.Contains(dir)) folders.Add(dir); } }
public ContextCommandHandler(IVisualGitServiceProvider context, Control control) : base(context, control) { }
public VSCommandInstaller(IVisualGitServiceProvider context) : base(context) { }
public SolutionExplorerWindow(IVisualGitServiceProvider context) : base(context) { _manager = new SolutionTreeViewManager(Context); }
public PendingChangeManager(IVisualGitServiceProvider context) : base(context) { }
public DiffTool(IVisualGitServiceProvider context, string name, string title, string program, string arguments, bool replaceQuod) : this(context, name, title, program, replaceQuod ? (arguments ?? "").Replace('\'', '"') : arguments) { }
public OutputPaneManager(IVisualGitServiceProvider context) : base(context) { }
public void Create(IVisualGitServiceProvider context, string fullPath) { if (context == null) throw new ArgumentNullException("context"); _context = context; DynamicFactory.CreateEditor(fullPath, this); OnFrameCreated(EventArgs.Empty); }