/// <summary> /// Standard constructor for the tool window. /// </summary> public EditorWindow() : base(null) { // Set the window title reading it from the resources. this.Caption = Resources.ToolWindowTitle; // Set the image that will appear on the tab of the window frame // when docked with an other window // The resource ID correspond to the one defined in the resx file // while the Index is the offset in the bitmap strip. Each image in // the strip being 16x16. this.BitmapResourceID = 301; this.BitmapIndex = 1; // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable, // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on // the object returned by the Content property. var services = new VisualStudioServices(PluginPackage.DTE); var editor = new Editor(services); base.Content = editor.GUI; editor.Initialize(); }
/// <summary> /// Initialize instance of <see cref="GUIManager" />. /// </summary> /// <param name="gui">Gui managed by current manager.</param> /// <param name="vs">Available services exposed by visual studio.</param> public GUIManager(EditorGUI gui, VisualStudioServices vs = null) { _gui = gui; if (vs == null) { //create empty services vs = new VisualStudioServices(null); } _vs = vs; //initialize logging as soon as possible if (_vs != null) { _vs.Log.OnLog += logHandler; } }
/// <summary> /// Initialize new instance of <see cref="VsProjectAssembly" /> from given <see cref="Project" />. /// </summary> /// <param name="assemblyProject">Project that will be represented by initialized assembly.</param> /// <param name="vs">The visual studio services.</param> /// <param name="namesProvider">The <see cref="CodeElement"/> names provider.</param> /// <param name="infoBuilder">The method signature information builder.</param> /// <param name="itemBuilder">The method item builder.</param> public VsProjectAssembly(Project assemblyProject, VisualStudioServices vs, CodeElementNamesProvider namesProvider, MethodInfoBuilder infoBuilder, MethodItemBuilder itemBuilder) { VS = vs; _assemblyProject = assemblyProject.Object as VSProject; _referenceEvents = _assemblyProject.Events.ReferencesEvents; _namesProvider = namesProvider; Searcher = new CodeElementSearcher(this); InfoBuilder = infoBuilder; ItemBuilder = itemBuilder; InfoBuilder.Initialize(this); ItemBuilder.Initialize(this); OnTypeSystemInitialized += initializeAssembly; }
/// <summary> /// Initializes a new instance of the <see cref="UserExtensionImporter"/> class. /// </summary> /// <param name="vs">Exported services.</param> internal UserExtensionImporter(VisualStudioServices vs) { VisualStudioServices = vs; }
/// <summary> /// Initialize instance of <see cref="Editor" /> which provides editor services to user. /// </summary> /// <param name="vs">Services for Visual Studio interoperability.</param> internal Editor(VisualStudioServices vs) { _vs = vs; GUI = new EditorGUI(); }
/// <summary> /// Initialize new instance of assembly provider for C# projects within Visual Studio /// </summary> /// <param name="project">Project which assembly will be provided</param> /// <param name="visualStudioServices">Services for communicating with Visual Studio</param> public CSharpAssembly(Project project, VisualStudioServices visualStudioServices) : base(project, visualStudioServices, new CSharpNames(), new CSharpMethodInfoBuilder(), new CSharpMethodBuilder()) { }