// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespaceRoslyn.VisualStudio.InteractiveWindow
{
publicenumCommandIds:uint
{
// TODO (crwilcox): should all of these be in the editoroperations?
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem;
namespaceRoslyn.VisualStudio.InteractiveWindow
{
publicstaticclassGuids
{
// vsct guids:
// This GUID identifies the VsInteractiveWindow type. We need to pass it to VS in a string form.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem;
usingRoslyn.Editor.InteractiveWindow;
namespaceRoslyn.VisualStudio.InteractiveWindow
{
/// <summary>
/// Provides access to an interactive window being hosted inside of Visual Studio's process using the
/// default tool window.
///
/// These tool windows are created using ProvideInteractiveWindowAttribute which provides the normal
/// tool window registration options. Instances of the tool window are then created using
/// IVsInteractiveWindowFactory when VS calls on your packages IVsToolWindowFactory.CreateToolWindow
/// method.
/// </summary>
publicinterfaceIVsInteractiveWindow
{
/// <summary>
/// Gets the interactive window instance.
/// </summary>
IInteractiveWindowInteractiveWindow{get;}
/// <summary>
/// Shows the window.
/// </summary>
voidShow(boolfocus);
/// <summary>
/// Configures the window for the specified VS language service guid language preferences.
///
/// Also installs a language appropriate command filter if one is exported via IVsInteractiveWindowOleCommandTargetProvider.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem;
usingMicrosoft.VisualStudio.Text.Editor;
usingRoslyn.Editor.InteractiveWindow;
namespaceMicrosoft.VisualStudio
{
/// <summary>
/// Provides access to information and settings for an interactive window created inside of Visual Studio.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingMicrosoft.VisualStudio.OLE.Interop;
usingMicrosoft.VisualStudio.Text.Editor;
namespaceRoslyn.VisualStudio.InteractiveWindow
{
/// <summary>
/// The implementer is given a chance to attach a command filter that routes language services
/// commands into the Interactive Window command filter chain.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem;
usingSystem.ComponentModel;
usingSystem.Runtime.InteropServices;
usingMicrosoft.VisualStudio.Shell;
usingMicrosoft.VisualStudio.Shell.Interop;
usingRoslyn.Utilities;
namespaceRoslyn.VisualStudio.InteractiveWindow
{
/// <summary>
/// This is the class that implements the package exposed by this assembly.
///
/// The minimum requirement for a class to be considered a valid package for Visual Studio
/// is to implement the IVsPackage interface and register itself with the shell.
/// This package uses the helper classes defined inside the Managed Package Framework (MPF)
/// to do it: it derives from the Package class that provides the implementation of the
/// IVsPackage interface and uses the registration attributes defined in the framework to
/// register itself and its components with the shell.
/// </summary>
// This attribute tells the PkgDef creation utility (CreatePkgDef.exe) that this class is
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem.Reflection;
usingSystem.Runtime.CompilerServices;
usingSystem.Runtime.InteropServices;
[assembly:AssemblyTitle("Visual Studio Interactive Window")]
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem;
usingSystem.Drawing;
usingSystem.Globalization;
usingMicrosoft.VisualStudio.Shell;
namespaceRoslyn.VisualStudio.InteractiveWindow
{
/// <summary>
/// This attribute declares that a package own an interactive window. Visual Studio uses this
/// information to handle the positioning and persistence of your window. The attributes on a
/// package do not control the behavior of the package, but they can be used by registration
/// tools to register the proper information with Visual Studio.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem;
usingSystem.Diagnostics;
namespaceRoslyn.VisualStudio.InteractiveWindow
{
internalstaticclassSpecializedCollections
{
internalstaticclassEmpty
{
internalclassArray<T>
{
publicstaticreadonlyT[]Instance=newT[0];
}
}
publicstaticT[]EmptyArray<T>()
{
returnEmpty.Array<T>.Instance;
}
}
internalstaticclassExceptionUtilities
{
[DebuggerDisplay("Unreachable")]
publicstaticExceptionUnreachable
{
get
{
Debug.Fail("This code path should not be reachable");
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Dumps commands in QueryStatus and Exec.
// #define DUMP_COMMANDS
usingSystem;
usingSystem.Windows;
usingSystem.Windows.Input;
usingMicrosoft.VisualStudio;
usingMicrosoft.VisualStudio.ComponentModelHost;
usingMicrosoft.VisualStudio.Editor;
usingMicrosoft.VisualStudio.OLE.Interop;
usingMicrosoft.VisualStudio.Shell;
usingMicrosoft.VisualStudio.Shell.Interop;
usingMicrosoft.VisualStudio.Text.Editor;
usingMicrosoft.VisualStudio.TextManager.Interop;
usingRoslyn.Editor.InteractiveWindow;
namespaceRoslyn.VisualStudio.InteractiveWindow
{
/// <summary>
/// Default tool window for hosting interactive windows inside of Visual Studio. This hooks up support for
/// find in windows, forwarding commands down to the text view adapter, and providing access for setting
/// VS specific concepts (such as language service GUIDs) for the interactive window.
///
/// Interactive windows can also be hosted outside of this tool window if the user creates an IInteractiveWindow
/// directly. In that case the user is responsible for doing what this class does themselves. But the
/// interactive window will be properly initialized for running inside of Visual Studio's process by our
/// VsInteractiveWindowEditorsFactoryService which handles all of the mapping of VS commands to API calls
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.