/// <summary> /// Initializes a new instance of the <see cref="BaseCommand"/> class. /// </summary> /// <param name="package">The hosting package.</param> /// <param name="id">The id for the command.</param> protected BaseCommand(EditorConfigPackage package, CommandID id) : base(BaseCommand_Execute, id) { Package = package; BeforeQueryStatus += BaseCommand_BeforeQueryStatus; }
/// <summary> /// Initializes a new instance of the <see cref="CleanupActiveCodeCommand"/> class. /// </summary> /// <param name="package">The hosting package.</param> internal CleanupActiveCodeCommand(EditorConfigPackage package) : base(package, new CommandID(Guids.GuidEditorConfigCommandCleanupActiveCode, (int)PkgCmdIDList.CmdIDEditorConfigCleanupActiveCode)) { CodeCleanupAvailabilityLogic = CodeCleanupAvailabilityLogic.GetInstance(Package); CodeCleanupManager = CodeCleanupManager.GetInstance(Package); }
/// <summary> /// Initializes a new instance of the <see cref="CodeCleanupManager"/> class. /// </summary> /// <param name="package">The hosting package.</param> private CodeCleanupManager(EditorConfigPackage package) { _package = package; _undoTransactionHelper = new UndoTransactionHelper(_package.IDE, "EditorConfig Cleanup"); _codeCleanupAvailabilityLogic = CodeCleanupAvailabilityLogic.GetInstance(_package); }
/// <summary> /// Initializes a new instance of the <see cref="ShellEventListener"/> class. /// </summary> /// <param name="package">The package hosting the event listener.</param> /// <param name="shellService">The shell service.</param> internal ShellEventListener(EditorConfigPackage package, IVsShell shellService) : base(package) { _shellService = shellService; if (_shellService == null) return; _shellService.AdviseBroadcastMessages(this, out _broadcastEventCookie); _shellService.AdviseShellPropertyChanges(this, out _propertyEventCookie); }
/// <summary> /// Initializes a new instance of the <see cref="RunningDocumentTableEventListener"/> class. /// </summary> /// <param name="package">The package hosting the event listener.</param> internal RunningDocumentTableEventListener(EditorConfigPackage package) : base(package) { // Create and store a reference to the running document table. RunningDocumentTable = new RunningDocumentTable(package); // Register with the running document table for events. EventCookie = RunningDocumentTable.Advise(this); }
/// <summary> /// Initializes a new instance of the <see cref="RunningDocumentTableEventListener"/> class. /// </summary> /// <param name="package">The package hosting the event listener.</param> internal RunningDocumentTableEventListener(EditorConfigPackage package) : base(package) { _editorAdaptersFactory = Package.ComponentModel.GetService<IVsEditorAdaptersFactoryService>(); // Create and store a reference to the running document table. RunningDocumentTable = new RunningDocumentTable(package); // Register with the running document table for events. EventCookie = RunningDocumentTable.Advise(this); }
/// <summary> /// Initializes a new instance of the <see cref="RunningDocumentTableEventListener"/> class. /// </summary> /// <param name="package">The package hosting the event listener.</param> internal RunningDocumentTableEventListener(EditorConfigPackage package) : base(package) { _editorAdaptersFactory = Package.ComponentModel.GetService <IVsEditorAdaptersFactoryService>(); // Create and store a reference to the running document table. RunningDocumentTable = new RunningDocumentTable(package); // Register with the running document table for events. EventCookie = RunningDocumentTable.Advise(this); }
/// <summary> /// Initializes a new instance of the <see cref="ShellEventListener"/> class. /// </summary> /// <param name="package">The package hosting the event listener.</param> /// <param name="shellService">The shell service.</param> internal ShellEventListener(EditorConfigPackage package, IVsShell shellService) : base(package) { _shellService = shellService; if (_shellService == null) { return; } _shellService.AdviseBroadcastMessages(this, out _broadcastEventCookie); _shellService.AdviseShellPropertyChanges(this, out _propertyEventCookie); }
/// <summary> /// Gets an instance of the <see cref="CodeCleanupAvailabilityLogic"/> class. /// </summary> /// <param name="package">The hosting package.</param> /// <returns>An instance of the <see cref="CodeCleanupAvailabilityLogic"/> class.</returns> internal static CodeCleanupAvailabilityLogic GetInstance(EditorConfigPackage package) { return _instance ?? (_instance = new CodeCleanupAvailabilityLogic(package)); }
/// <summary> /// Initializes a new instance of the <see cref="ActiveDocumentRestorer" /> class. /// </summary> /// <param name="package">The hosting package.</param> internal ActiveDocumentRestorer(EditorConfigPackage package) { Package = package; StartTracking(); }
/// <summary> /// Gets an instance of the <see cref="CodeCleanupAvailabilityLogic"/> class. /// </summary> /// <param name="package">The hosting package.</param> /// <returns>An instance of the <see cref="CodeCleanupAvailabilityLogic"/> class.</returns> internal static CodeCleanupAvailabilityLogic GetInstance(EditorConfigPackage package) { return(_instance ?? (_instance = new CodeCleanupAvailabilityLogic(package))); }
/// <summary> /// Gets an instance of the <see cref="CodeCleanupManager"/> class. /// </summary> /// <param name="package">The hosting package.</param> /// <returns>An instance of the <see cref="CodeCleanupManager"/> class.</returns> internal static CodeCleanupManager GetInstance(EditorConfigPackage package) { return(_instance ?? (_instance = new CodeCleanupManager(package))); }
/// <summary> /// Initializes a new instance of the <see cref="CodeCleanupAvailabilityLogic"/> class. /// </summary> /// <param name="package">The hosting package.</param> private CodeCleanupAvailabilityLogic(EditorConfigPackage package) { _package = package; }
/// <summary> /// Initializes a new instance of the <see cref="BaseEventListener"/> class. /// </summary> /// <param name="package">The package hosting the event listener.</param> protected BaseEventListener(EditorConfigPackage package) { Package = package; }
/// <summary> /// Gets an instance of the <see cref="CodeCleanupManager"/> class. /// </summary> /// <param name="package">The hosting package.</param> /// <returns>An instance of the <see cref="CodeCleanupManager"/> class.</returns> internal static CodeCleanupManager GetInstance(EditorConfigPackage package) { return _instance ?? (_instance = new CodeCleanupManager(package)); }