/// <summary> /// Creates an instance of this class /// </summary> protected VsxToolWindowPane() : base(null) { // --- Set package and content information ServiceProvider = Package = VsxPackage.GetPackage <TPackage>(); base.Content = Content = new TControl(); // --- Obtain caption info var typeInfo = GetType().GetTypeInfo(); var captionAttr = typeInfo.GetCustomAttribute <CaptionAttribute>(); if (captionAttr != null) { Caption = BaseCaption = captionAttr.Value; } // --- Obtain toolbar info var toolBarAttr = typeInfo.GetCustomAttribute <ToolWindowToolbarAttribute>(); if (toolBarAttr != null) { VsxPackage.CommandSets.TryGetValue(toolBarAttr.CommandSet, out IVsxCommandSet commandSet); if (commandSet != null) { ToolBar = new CommandID(commandSet.Guid, toolBarAttr.CommandId); ToolBarLocation = (int)toolBarAttr.Location; } } }
/// <summary> /// Sites the object in the specified package /// </summary> /// <param name="package"></param> public void Site(VsxPackage package) { Package = (TPackage)package; var guid = GetType().GetTypeInfo().GetCustomAttribute <GuidAttribute>(); if (guid == null) { return; } GuidString = guid.Value; Guid = new Guid(guid.Value); }
/// <summary> /// Initializes a new instance of the <see cref="T:System.Object" /> class. /// </summary> protected EditorPaneBase() { Package = VsxPackage.GetPackage <TPackage>(); VsUiShell = (IVsUIShell)Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(SVsUIShell)); }
/// <summary> /// Explicitly defined default constructor. Initialize new instance of the /// EditorFactory object. /// </summary> protected EditorFactoryBase() { Package = VsxPackage.GetPackage <TPackage>(); }
public TaskListWindow() { _taskProvider = new TaskProvider(VsxPackage.GetPackage <SpectNetPackage>()); }
public ErrorListWindow() { _errorListProvider = new ErrorListProvider(VsxPackage.GetPackage <SpectNetPackage>()); }