diff --git a/Roslyn.sln b/Roslyn.sln
index 79850854925e1..412e1d9c03896 100644
--- a/Roslyn.sln
+++ b/Roslyn.sln
@@ -117,8 +117,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpScriptingTest", "src\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteractiveFeatures", "src\Interactive\Features\InteractiveFeatures.csproj", "{8E2A252E-A140-45A6-A81A-2652996EA589}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteractiveWindow", "src\InteractiveWindow\Editor\InteractiveWindow.csproj", "{01E9BD68-0339-4A13-B42F-A3CA84D164F3}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpEditorServicesTest", "src\EditorFeatures\CSharpTest\CSharpEditorServicesTest.csproj", "{AC2BCEFB-9298-4621-AC48-1FF5E639E48D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpEditorServicesTest2", "src\EditorFeatures\CSharpTest2\CSharpEditorServicesTest2.csproj", "{16E93074-4252-466C-89A3-3B905ABAF779}"
@@ -143,10 +141,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csi", "src\Interactive\csi\
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "vbi", "src\Interactive\vbi\vbi.vbproj", "{6E62A0FF-D0DC-4109-9131-AB8E60CDFF7B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteractiveWindowTest", "src\InteractiveWindow\EditorTest\InteractiveWindowTest.csproj", "{7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisualStudioInteractiveWindow", "src\InteractiveWindow\VisualStudio\VisualStudioInteractiveWindow.csproj", "{20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServicesVisualStudio", "src\VisualStudio\Core\Def\ServicesVisualStudio.csproj", "{86FD5B9A-4FA0-4B10-B59F-CFAF077A859C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServicesVisualStudioImpl", "src\VisualStudio\Core\Impl\ServicesVisualStudioImpl.csproj", "{C0E80510-4FBE-4B0C-AF2C-4F473787722C}"
@@ -1420,26 +1414,6 @@ Global
{8E2A252E-A140-45A6-A81A-2652996EA589}.Release|x64.Build.0 = Release|Any CPU
{8E2A252E-A140-45A6-A81A-2652996EA589}.Release|x86.ActiveCfg = Release|Any CPU
{8E2A252E-A140-45A6-A81A-2652996EA589}.Release|x86.Build.0 = Release|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Debug|ARM.Build.0 = Debug|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Debug|x64.ActiveCfg = Debug|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Debug|x64.Build.0 = Debug|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Debug|x86.ActiveCfg = Debug|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Debug|x86.Build.0 = Debug|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Release|Any CPU.Build.0 = Release|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Release|ARM.ActiveCfg = Release|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Release|ARM.Build.0 = Release|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Release|x64.ActiveCfg = Release|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Release|x64.Build.0 = Release|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Release|x86.ActiveCfg = Release|Any CPU
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}.Release|x86.Build.0 = Release|Any CPU
{AC2BCEFB-9298-4621-AC48-1FF5E639E48D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC2BCEFB-9298-4621-AC48-1FF5E639E48D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC2BCEFB-9298-4621-AC48-1FF5E639E48D}.Debug|ARM.ActiveCfg = Debug|Any CPU
@@ -1674,46 +1648,6 @@ Global
{6E62A0FF-D0DC-4109-9131-AB8E60CDFF7B}.Release|x64.Build.0 = Release|Any CPU
{6E62A0FF-D0DC-4109-9131-AB8E60CDFF7B}.Release|x86.ActiveCfg = Release|Any CPU
{6E62A0FF-D0DC-4109-9131-AB8E60CDFF7B}.Release|x86.Build.0 = Release|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Debug|ARM.Build.0 = Debug|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Debug|x64.ActiveCfg = Debug|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Debug|x64.Build.0 = Debug|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Debug|x86.ActiveCfg = Debug|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Debug|x86.Build.0 = Debug|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Release|Any CPU.Build.0 = Release|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Release|ARM.ActiveCfg = Release|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Release|ARM.Build.0 = Release|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Release|x64.ActiveCfg = Release|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Release|x64.Build.0 = Release|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Release|x86.ActiveCfg = Release|Any CPU
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3}.Release|x86.Build.0 = Release|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Debug|ARM.Build.0 = Debug|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Debug|x64.ActiveCfg = Debug|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Debug|x64.Build.0 = Debug|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Debug|x86.ActiveCfg = Debug|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Debug|x86.Build.0 = Debug|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Release|Any CPU.Build.0 = Release|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Release|ARM.ActiveCfg = Release|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Release|ARM.Build.0 = Release|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Release|x64.ActiveCfg = Release|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Release|x64.Build.0 = Release|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Release|x86.ActiveCfg = Release|Any CPU
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}.Release|x86.Build.0 = Release|Any CPU
{86FD5B9A-4FA0-4B10-B59F-CFAF077A859C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{86FD5B9A-4FA0-4B10-B59F-CFAF077A859C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{86FD5B9A-4FA0-4B10-B59F-CFAF077A859C}.Debug|ARM.ActiveCfg = Debug|Any CPU
@@ -3233,7 +3167,6 @@ Global
{066F0DBD-C46C-4C20-AFEC-99829A172625} = {38940C5F-97FD-4B2A-B2CD-C4E4EF601B05}
{2DAE4406-7A89-4B5F-95C3-BC5422CE47CE} = {38940C5F-97FD-4B2A-B2CD-C4E4EF601B05}
{8E2A252E-A140-45A6-A81A-2652996EA589} = {2491A9B9-C0A8-49EE-9077-A32DE76E1E94}
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3} = {999FBDA2-33DA-4F74-B957-03AC72CCE5EC}
{AC2BCEFB-9298-4621-AC48-1FF5E639E48D} = {EE97CB90-33BB-4F3A-9B3D-69375DEC6AC6}
{16E93074-4252-466C-89A3-3B905ABAF779} = {EE97CB90-33BB-4F3A-9B3D-69375DEC6AC6}
{8CEE3609-A5A9-4A9B-86D7-33118F5D6B33} = {EE97CB90-33BB-4F3A-9B3D-69375DEC6AC6}
@@ -3246,8 +3179,6 @@ Global
{8CEE3609-A5A9-4A9B-86D7-33118F5D6B34} = {5CA5F70E-0FDB-467B-B22C-3CD5994F0087}
{14118347-ED06-4608-9C45-18228273C712} = {5CA5F70E-0FDB-467B-B22C-3CD5994F0087}
{6E62A0FF-D0DC-4109-9131-AB8E60CDFF7B} = {5CA5F70E-0FDB-467B-B22C-3CD5994F0087}
- {7F3CB45E-4993-4FA4-8D6A-C2DFFED2DFC3} = {999FBDA2-33DA-4F74-B957-03AC72CCE5EC}
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F} = {999FBDA2-33DA-4F74-B957-03AC72CCE5EC}
{86FD5B9A-4FA0-4B10-B59F-CFAF077A859C} = {8DBA5174-B0AA-4561-82B1-A46607697753}
{C0E80510-4FBE-4B0C-AF2C-4F473787722C} = {8DBA5174-B0AA-4561-82B1-A46607697753}
{7BE3DEEB-87F8-4E15-9C21-4F94B0B1C2D6} = {8DBA5174-B0AA-4561-82B1-A46607697753}
diff --git a/build/config/SignToolData.json b/build/config/SignToolData.json
index d837a6b2d20ae..6d0b33030708a 100644
--- a/build/config/SignToolData.json
+++ b/build/config/SignToolData.json
@@ -37,7 +37,6 @@
"Microsoft.DiaSymReader.PortablePdb.dll",
"Microsoft.VisualStudio.CSharp.Repl.dll",
"Microsoft.VisualStudio.InteractiveServices.dll",
- "Microsoft.VisualStudio.InteractiveWindow.dll",
"Microsoft.VisualStudio.LanguageServices.CSharp.dll",
"Microsoft.VisualStudio.LanguageServices.dll",
"Microsoft.VisualStudio.LanguageServices.Implementation.dll",
@@ -46,7 +45,6 @@
"Microsoft.VisualStudio.LanguageServices.VisualBasic.dll",
"Microsoft.VisualStudio.LanguageServices.Xaml.dll",
"Microsoft.VisualStudio.VisualBasic.Repl.dll",
- "Microsoft.VisualStudio.VsInteractiveWindow.dll",
"Pdb2Xml.exe",
"Roslyn.Compilers.Extension.dll",
"Roslyn.Hosting.Diagnostics.dll",
@@ -90,7 +88,6 @@
"strongName": null,
"values": [
"ExpressionEvaluatorPackage.vsix",
- "Microsoft.VisualStudio.VsInteractiveWindow.vsix",
"Roslyn.Compilers.Extension.vsix",
"Roslyn.Deployment.Full.vsix",
"Roslyn.Deployment.Full.Next.vsix",
diff --git a/src/Deployment/Roslyn.csproj b/src/Deployment/Roslyn.csproj
index 4464174ab6efc..b3441fc607eee 100644
--- a/src/Deployment/Roslyn.csproj
+++ b/src/Deployment/Roslyn.csproj
@@ -44,13 +44,6 @@
false
VSIXContainerProjectOutputGroup%3b
-
- {20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}
- VisualStudioInteractiveWindow
- Vsixes
- false
- VSIXContainerProjectOutputGroup%3b
-
{C467FEFA-337D-4705-BB5A-BDF41A555FDC}
VisualStudioSetupInteractive
@@ -74,4 +67,4 @@
-
+
\ No newline at end of file
diff --git a/src/Deployment/source.extension.vsixmanifest b/src/Deployment/source.extension.vsixmanifest
index a9d58d518fac7..919d735694f1e 100644
--- a/src/Deployment/source.extension.vsixmanifest
+++ b/src/Deployment/source.extension.vsixmanifest
@@ -29,15 +29,6 @@
Location="|VisualStudioSetup;VSIXContainerProjectOutputGroup|"
Id="|VisualStudioSetup;VSIXIdentifierProjectOutputGroup|" />
-
-
{8E2A252E-A140-45A6-A81A-2652996EA589}
InteractiveFeatures
-
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}
- InteractiveWindow
-
{18F5FBB8-7570-4412-8CC7-0A86FF13B7BA}
TextEditorFeatures
diff --git a/src/EditorFeatures/CSharpTest/project.json b/src/EditorFeatures/CSharpTest/project.json
index 722161ece64e1..5d2b101df3582 100644
--- a/src/EditorFeatures/CSharpTest/project.json
+++ b/src/EditorFeatures/CSharpTest/project.json
@@ -4,6 +4,10 @@
"version": "14.3.25407",
"suppressParent": "all"
},
+ "RoslynDependencies.Microsoft.VisualStudio.Text.Internal": {
+ "version": "14.3.25407",
+ "suppressParent": "all"
+ },
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
diff --git a/src/EditorFeatures/CSharpTest2/CSharpEditorServicesTest2.csproj b/src/EditorFeatures/CSharpTest2/CSharpEditorServicesTest2.csproj
index a8ed0f856fc82..da9ef996c56b4 100644
--- a/src/EditorFeatures/CSharpTest2/CSharpEditorServicesTest2.csproj
+++ b/src/EditorFeatures/CSharpTest2/CSharpEditorServicesTest2.csproj
@@ -51,10 +51,6 @@
{8E2A252E-A140-45A6-A81A-2652996EA589}
InteractiveFeatures
-
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}
- InteractiveWindow
-
{18F5FBB8-7570-4412-8CC7-0A86FF13B7BA}
TextEditorFeatures
diff --git a/src/EditorFeatures/Core/EditorFeatures.csproj b/src/EditorFeatures/Core/EditorFeatures.csproj
index 2a4f0143bd390..0e934b5966d19 100644
--- a/src/EditorFeatures/Core/EditorFeatures.csproj
+++ b/src/EditorFeatures/Core/EditorFeatures.csproj
@@ -40,10 +40,6 @@
{18F5FBB8-7570-4412-8CC7-0A86FF13B7BA}
TextEditorFeatures
-
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}
- InteractiveWindow
-
true
diff --git a/src/EditorFeatures/Core/project.json b/src/EditorFeatures/Core/project.json
index 79161ac3e8b82..77cfff01e1bb4 100644
--- a/src/EditorFeatures/Core/project.json
+++ b/src/EditorFeatures/Core/project.json
@@ -1,6 +1,14 @@
{
"dependencies": {
"System.Collections.Immutable": "1.2.0",
+ "Microsoft.VisualStudio.InteractiveWindow": {
+ "version": "2.0.0-beta5-60820-04",
+ "suppressParent": "all"
+ },
+ "RoslynDependencies.Microsoft.VisualStudio.Text.Internal": {
+ "version": "14.3.25407",
+ "suppressParent": "all"
+ },
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
@@ -9,6 +17,10 @@
"version": "14.3.25407",
"suppressParent": "all"
},
+ "Microsoft.VisualStudio.Language.StandardClassification": {
+ "version": "14.3.25407",
+ "suppressParent": "all"
+ },
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
diff --git a/src/EditorFeatures/Next/EditorFeatures.Next.csproj b/src/EditorFeatures/Next/EditorFeatures.Next.csproj
index cceaf345eb59a..23d519d6fded0 100644
--- a/src/EditorFeatures/Next/EditorFeatures.Next.csproj
+++ b/src/EditorFeatures/Next/EditorFeatures.Next.csproj
@@ -43,11 +43,6 @@
{18F5FBB8-7570-4412-8CC7-0A86FF13B7BA}
TextEditorFeatures
-
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}
- InteractiveWindow
- InteractiveWindow
-
true
diff --git a/src/EditorFeatures/Test/EditorServicesTest.csproj b/src/EditorFeatures/Test/EditorServicesTest.csproj
index d83c87e120528..d8020f03d0d7b 100644
--- a/src/EditorFeatures/Test/EditorServicesTest.csproj
+++ b/src/EditorFeatures/Test/EditorServicesTest.csproj
@@ -87,10 +87,6 @@
{8E2A252E-A140-45A6-A81A-2652996EA589}
InteractiveFeatures
-
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}
- InteractiveWindow
-
{18F5FBB8-7570-4412-8CC7-0A86FF13B7BA}
TextEditorFeatures
diff --git a/src/EditorFeatures/Test/project.json b/src/EditorFeatures/Test/project.json
index 45626f1b2a425..03e484e86f561 100644
--- a/src/EditorFeatures/Test/project.json
+++ b/src/EditorFeatures/Test/project.json
@@ -7,6 +7,10 @@
"version": "14.3.25407",
"suppressParent": "all"
},
+ "RoslynDependencies.Microsoft.VisualStudio.Text.Internal" : {
+ "version": "14.3.25407",
+ "suppressParent": "all"
+ },
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
@@ -15,6 +19,10 @@
"version": "14.3.25407",
"suppressParent": "all"
},
+ "Microsoft.VisualStudio.Language.StandardClassification": {
+ "version": "14.3.25407",
+ "suppressParent": "all"
+ },
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
diff --git a/src/EditorFeatures/Test2/EditorServicesTest2.vbproj b/src/EditorFeatures/Test2/EditorServicesTest2.vbproj
index bee08878508fb..2b1ce8faf6918 100644
--- a/src/EditorFeatures/Test2/EditorServicesTest2.vbproj
+++ b/src/EditorFeatures/Test2/EditorServicesTest2.vbproj
@@ -25,10 +25,6 @@
{2523D0E6-DF32-4A3E-8AE0-A19BFFAE2EF6}
BasicCodeAnalysis
-
- {01e9bd68-0339-4a13-b42f-a3ca84d164f3}
- InteractiveWindow
-
{92412d1a-0f23-45b5-b196-58839c524917}
InteractiveEditorFeatures
diff --git a/src/EditorFeatures/Test2/project.json b/src/EditorFeatures/Test2/project.json
index 4e21b993d96d7..808643fa1b265 100644
--- a/src/EditorFeatures/Test2/project.json
+++ b/src/EditorFeatures/Test2/project.json
@@ -1,9 +1,17 @@
{
"dependencies": {
+ "Microsoft.VisualStudio.InteractiveWindow": {
+ "version": "2.0.0-beta5-60820-04",
+ "suppressParent": "all"
+ },
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
},
+ "RoslynDependencies.Microsoft.VisualStudio.Text.Internal": {
+ "version": "14.3.25407",
+ "suppressParent": "all"
+ },
"RoslynDependencies.Microsoft.VisualStudio.Language.CallHierarchy": {
"version": "14.3.25407",
"suppressParent": "all"
diff --git a/src/EditorFeatures/TestUtilities/project.json b/src/EditorFeatures/TestUtilities/project.json
index 18965b3c8699e..761bb8af4b7c5 100644
--- a/src/EditorFeatures/TestUtilities/project.json
+++ b/src/EditorFeatures/TestUtilities/project.json
@@ -12,10 +12,18 @@
"version": "14.2.19-pre",
"suppressParent": "all"
},
+ "RoslynDependencies.Microsoft.VisualStudio.Text.Internal": {
+ "version": "14.3.25407",
+ "suppressParent": "all"
+ },
"RoslynDependencies.Microsoft.VisualStudio.Platform.VSEditor": {
"version": "14.3.25407",
"suppressParent": "all"
},
+ "Microsoft.VisualStudio.Language.StandardClassification" : {
+ "version": "14.3.25407",
+ "suppressParent": "all"
+ },
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
diff --git a/src/EditorFeatures/VisualBasicTest/project.json b/src/EditorFeatures/VisualBasicTest/project.json
index 470c679f3a07f..a1dbadbc1bb70 100644
--- a/src/EditorFeatures/VisualBasicTest/project.json
+++ b/src/EditorFeatures/VisualBasicTest/project.json
@@ -4,6 +4,10 @@
"version": "14.3.25407",
"suppressParent": "all"
},
+ "RoslynDependencies.Microsoft.VisualStudio.Text.Internal": {
+ "version": "14.3.25407",
+ "suppressParent": "all"
+ },
"RoslynDependencies.Microsoft.VisualStudio.Language.NavigateTo.Interfaces": {
"version": "14.3.25407",
"suppressParent": "all"
diff --git a/src/Interactive/EditorFeatures/CSharp/CSharpInteractiveEditorFeatures.csproj b/src/Interactive/EditorFeatures/CSharp/CSharpInteractiveEditorFeatures.csproj
index 39407c19fbc97..05f924469944a 100644
--- a/src/Interactive/EditorFeatures/CSharp/CSharpInteractiveEditorFeatures.csproj
+++ b/src/Interactive/EditorFeatures/CSharp/CSharpInteractiveEditorFeatures.csproj
@@ -52,10 +52,6 @@
{8E2A252E-A140-45A6-A81A-2652996EA589}
InteractiveFeatures
-
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}
- InteractiveWindow
-
{18F5FBB8-7570-4412-8CC7-0A86FF13B7BA}
TextEditorFeatures
diff --git a/src/Interactive/EditorFeatures/CSharp/project.json b/src/Interactive/EditorFeatures/CSharp/project.json
index 0ef014f0ada83..2017e667f28da 100644
--- a/src/Interactive/EditorFeatures/CSharp/project.json
+++ b/src/Interactive/EditorFeatures/CSharp/project.json
@@ -1,5 +1,9 @@
{
"dependencies": {
+ "Microsoft.VisualStudio.InteractiveWindow": {
+ "version": "2.0.0-beta5-60820-04",
+ "suppressParent": "all"
+ },
"Microsoft.VisualStudio.Text.UI.Wpf": {
"version": "14.3.25407",
"suppressParent": "all"
diff --git a/src/Interactive/EditorFeatures/Core/InteractiveEditorFeatures.csproj b/src/Interactive/EditorFeatures/Core/InteractiveEditorFeatures.csproj
index 2d775e0bee35a..f1b893a1686c0 100644
--- a/src/Interactive/EditorFeatures/Core/InteractiveEditorFeatures.csproj
+++ b/src/Interactive/EditorFeatures/Core/InteractiveEditorFeatures.csproj
@@ -41,10 +41,6 @@
{8E2A252E-A140-45A6-A81A-2652996EA589}
InteractiveFeatures
-
- {01E9BD68-0339-4A13-B42F-A3CA84D164F3}
- InteractiveWindow
-
{18F5FBB8-7570-4412-8CC7-0A86FF13B7BA}
TextEditorFeatures
diff --git a/src/Interactive/EditorFeatures/Core/project.json b/src/Interactive/EditorFeatures/Core/project.json
index f5d02718dc612..67d316409d811 100644
--- a/src/Interactive/EditorFeatures/Core/project.json
+++ b/src/Interactive/EditorFeatures/Core/project.json
@@ -1,5 +1,9 @@
{
"dependencies": {
+ "Microsoft.VisualStudio.InteractiveWindow": {
+ "version": "2.0.0-beta5-60820-04",
+ "suppressParent": "all"
+ },
"Microsoft.VisualStudio.Language.Intellisense": {
"version": "14.3.25407",
"suppressParent": "all"
@@ -7,6 +11,10 @@
"Microsoft.VisualStudio.Editor": {
"version": "14.3.25407",
"suppressParent": "all"
+ },
+ "Microsoft.VisualStudio.Language.StandardClassification": {
+ "version": "14.3.25407",
+ "suppressParent": "all"
}
},
"frameworks": {
diff --git a/src/Interactive/EditorFeatures/VisualBasic/BasicInteractiveEditorFeatures.vbproj b/src/Interactive/EditorFeatures/VisualBasic/BasicInteractiveEditorFeatures.vbproj
index e6e45e66e8877..c1e284c7ba352 100644
--- a/src/Interactive/EditorFeatures/VisualBasic/BasicInteractiveEditorFeatures.vbproj
+++ b/src/Interactive/EditorFeatures/VisualBasic/BasicInteractiveEditorFeatures.vbproj
@@ -19,10 +19,6 @@
{2523D0E6-DF32-4A3E-8AE0-A19BFFAE2EF6}
BasicCodeAnalysis
-
- {01e9bd68-0339-4a13-b42f-a3ca84d164f3}
- InteractiveWindow
-
{3E7DEA65-317B-4F43-A25D-62F18D96CFD7}
BasicScripting
diff --git a/src/Interactive/EditorFeatures/VisualBasic/project.json b/src/Interactive/EditorFeatures/VisualBasic/project.json
index 0e711c6eaecdd..e46ebc8c3daa4 100644
--- a/src/Interactive/EditorFeatures/VisualBasic/project.json
+++ b/src/Interactive/EditorFeatures/VisualBasic/project.json
@@ -1,5 +1,9 @@
{
"dependencies": {
+ "Microsoft.VisualStudio.InteractiveWindow": {
+ "version": "2.0.0-beta5-60820-04",
+ "suppressParent": "all"
+ },
"Microsoft.VisualStudio.Text.UI": {
"version": "14.3.25407",
"suppressParent": "all"
diff --git a/src/InteractiveWindow/Editor/BufferBlock.cs b/src/InteractiveWindow/Editor/BufferBlock.cs
deleted file mode 100644
index 978a8115272c1..0000000000000
--- a/src/InteractiveWindow/Editor/BufferBlock.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.IO;
-using System.Runtime.Serialization;
-using System.Runtime.Serialization.Json;
-using System.Text;
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- ///
- /// REPL session buffer: input, output, or prompt.
- ///
- [DataContract]
- internal struct BufferBlock
- {
- [DataMember(Name = "kind")]
- internal readonly ReplSpanKind Kind;
-
- [DataMember(Name = "content")]
- internal readonly string Content;
-
- internal BufferBlock(ReplSpanKind kind, string content)
- {
- Kind = kind;
- Content = content;
- }
-
- internal static string Serialize(BufferBlock[] blocks)
- {
- var serializer = new DataContractJsonSerializer(typeof(BufferBlock[]));
- using (var stream = new MemoryStream())
- {
- serializer.WriteObject(stream, blocks);
- return Encoding.UTF8.GetString(stream.GetBuffer(), 0, (int)stream.Length);
- }
- }
-
- ///
- internal static BufferBlock[] Deserialize(string str)
- {
- var serializer = new DataContractJsonSerializer(typeof(BufferBlock[]));
- try
- {
- var bytes = Encoding.UTF8.GetBytes(str);
- using (var stream = new MemoryStream(bytes))
- {
- var obj = serializer.ReadObject(stream);
- return (BufferBlock[])obj;
- }
- }
- catch (Exception e)
- {
- throw new InvalidDataException(e.Message, e);
- }
- }
- }
-}
diff --git a/src/InteractiveWindow/Editor/Commands/CancelExecutionCommand.cs b/src/InteractiveWindow/Editor/Commands/CancelExecutionCommand.cs
deleted file mode 100644
index ebb1c77cdb0fc..0000000000000
--- a/src/InteractiveWindow/Editor/Commands/CancelExecutionCommand.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-#if TODO
-using System.ComponentModel.Composition;
-using System.Reflection;
-using System.Threading.Tasks;
-using System.Windows.Controls;
-using System.Windows.Media.Imaging;
-
-namespace Microsoft.VisualStudio.InteractiveWindow {
- [Export(typeof(IInteractiveWindowCommand))]
- internal sealed class CancelExecutionCommand : InteractiveWindowCommand {
- public override Task Execute(IInteractiveWindow window, string arguments) {
- window.AbortCommand();
- return ExecutionResult.Succeeded;
- }
-
- public override string Description {
- get { return "Stops execution of the current command."; }
- }
-
- public override object ButtonContent {
- get {
- var image = new BitmapImage();
- image.BeginInit();
- image.StreamSource = Assembly.GetExecutingAssembly().GetManifestResourceStream("Microsoft.VisualStudio.Resources.CancelEvaluation.gif");
- image.EndInit();
- var res = new Image();
- res.Source = image;
- res.Width = res.Height = 16;
- return res;
- }
- }
- }
-}
-#endif
\ No newline at end of file
diff --git a/src/InteractiveWindow/Editor/Commands/ClearScreenCommand.cs b/src/InteractiveWindow/Editor/Commands/ClearScreenCommand.cs
deleted file mode 100644
index b2617e074c79d..0000000000000
--- a/src/InteractiveWindow/Editor/Commands/ClearScreenCommand.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.ComponentModel.Composition;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Microsoft.VisualStudio.InteractiveWindow.Commands
-{
- [Export(typeof(IInteractiveWindowCommand))]
- internal sealed class ClearScreenCommand : InteractiveWindowCommand
- {
- public override Task Execute(IInteractiveWindow window, string arguments)
- {
- window.Operations.ClearView();
- return ExecutionResult.Succeeded;
- }
-
- public override string Description
- {
- get { return InteractiveWindowResources.ClearScreenCommandDescription; }
- }
-
- public override IEnumerable Names
- {
- get { yield return "cls"; yield return "clear"; }
- }
- }
-}
diff --git a/src/InteractiveWindow/Editor/Commands/CommandClassifier.cs b/src/InteractiveWindow/Editor/Commands/CommandClassifier.cs
deleted file mode 100644
index 79cd2075d4240..0000000000000
--- a/src/InteractiveWindow/Editor/Commands/CommandClassifier.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using Microsoft.VisualStudio.Language.StandardClassification;
-using Microsoft.VisualStudio.Text;
-using Microsoft.VisualStudio.Text.Classification;
-
-namespace Microsoft.VisualStudio.InteractiveWindow.Commands
-{
- internal sealed class CommandClassifier : IClassifier
- {
- private readonly IStandardClassificationService _registry;
- private readonly IInteractiveWindowCommands _commands;
-
- public CommandClassifier(IStandardClassificationService registry, IInteractiveWindowCommands commands)
- {
- _registry = registry;
- _commands = commands;
- }
-
- public IList GetClassificationSpans(SnapshotSpan span)
- {
- return _commands.Classify(span).ToArray();
- }
-
-#pragma warning disable 67 // unused event
- // This event gets raised if a non-text change would affect the classification in some way,
- // for example typing /* would cause the classification to change in C# without directly
- // affecting the span.
- public event EventHandler ClassificationChanged;
-#pragma warning restore 67
- }
-}
\ No newline at end of file
diff --git a/src/InteractiveWindow/Editor/Commands/CommandClassifierProvider.cs b/src/InteractiveWindow/Editor/Commands/CommandClassifierProvider.cs
deleted file mode 100644
index f3ee368606869..0000000000000
--- a/src/InteractiveWindow/Editor/Commands/CommandClassifierProvider.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.ComponentModel.Composition;
-using Microsoft.VisualStudio.Language.StandardClassification;
-using Microsoft.VisualStudio.Text;
-using Microsoft.VisualStudio.Text.Classification;
-using Microsoft.VisualStudio.Text.Editor;
-using Microsoft.VisualStudio.Utilities;
-
-namespace Microsoft.VisualStudio.InteractiveWindow.Commands
-{
- [Export(typeof(IClassifierProvider))]
- [ContentType(PredefinedInteractiveCommandsContentTypes.InteractiveCommandContentTypeName)]
- internal sealed class CommandClassifierProvider : IClassifierProvider
- {
- [Import]
- public IStandardClassificationService ClassificationRegistry { get; set; }
-
- public IClassifier GetClassifier(ITextBuffer textBuffer)
- {
- var commands = textBuffer.GetInteractiveWindow().GetInteractiveCommands();
- if (commands != null)
- {
- return new CommandClassifier(ClassificationRegistry, commands);
- }
-
- return null;
- }
- }
-}
diff --git a/src/InteractiveWindow/Editor/Commands/HelpCommand.cs b/src/InteractiveWindow/Editor/Commands/HelpCommand.cs
deleted file mode 100644
index 04fa1969c5663..0000000000000
--- a/src/InteractiveWindow/Editor/Commands/HelpCommand.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.Composition;
-using System.Threading.Tasks;
-
-namespace Microsoft.VisualStudio.InteractiveWindow.Commands
-{
- [Export(typeof(IInteractiveWindowCommand))]
- internal sealed class HelpReplCommand : InteractiveWindowCommand
- {
- internal const string CommandName = "help";
-
- public override string Description
- {
- get { return InteractiveWindowResources.HelpCommandDescription; }
- }
-
- public override IEnumerable Names
- {
- get { yield return CommandName; }
- }
-
- public override string CommandLine
- {
- get { return InteractiveWindowResources.CommandNamePlaceholder; }
- }
-
- public override Task Execute(IInteractiveWindow window, string arguments)
- {
- string commandName;
- IInteractiveWindowCommand command;
- if (!ParseArguments(window, arguments, out commandName, out command))
- {
- window.ErrorOutputWriter.WriteLine(string.Format(InteractiveWindowResources.UnknownCommand, commandName));
- ReportInvalidArguments(window);
- return ExecutionResult.Failed;
- }
-
- var commands = (IInteractiveWindowCommands)window.Properties[typeof(IInteractiveWindowCommands)];
- if (command != null)
- {
- commands.DisplayCommandHelp(command);
- }
- else
- {
- commands.DisplayHelp();
- }
-
- return ExecutionResult.Succeeded;
- }
-
- private static readonly char[] s_whitespaceChars = new[] { '\r', '\n', ' ', '\t' };
-
- private bool ParseArguments(IInteractiveWindow window, string arguments, out string commandName, out IInteractiveWindowCommand command)
- {
- string name = arguments.Split(s_whitespaceChars)[0];
-
- if (name.Length == 0)
- {
- command = null;
- commandName = null;
- return true;
- }
-
- var commands = window.GetInteractiveCommands();
- string prefix = commands.CommandPrefix;
-
- // display help on a particular command:
- command = commands[name];
-
- if (command == null && name.StartsWith(prefix, StringComparison.Ordinal))
- {
- name = name.Substring(prefix.Length);
- command = commands[name];
- }
-
- commandName = name;
- return command != null;
- }
- }
-}
diff --git a/src/InteractiveWindow/Editor/Commands/IInteractiveWindowCommand.cs b/src/InteractiveWindow/Editor/Commands/IInteractiveWindowCommand.cs
deleted file mode 100644
index c47c827034b62..0000000000000
--- a/src/InteractiveWindow/Editor/Commands/IInteractiveWindowCommand.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Microsoft.VisualStudio.Language.StandardClassification;
-using Microsoft.VisualStudio.Text;
-using Microsoft.VisualStudio.Text.Classification;
-
-namespace Microsoft.VisualStudio.InteractiveWindow.Commands
-{
- ///
- /// Represents a command which can be run from a REPL window.
- ///
- /// This interface is a MEF contract and can be implemented and exported to add commands to the REPL window.
- ///
- public interface IInteractiveWindowCommand
- {
- ///
- /// Asynchronously executes the command with specified arguments and calls back the given completion when finished.
- ///
- /// The interactive window.
- /// Command arguments.
- /// The task that completes the execution.
- Task Execute(IInteractiveWindow window, string arguments);
-
- ///
- /// Gets a brief (ideally single-line) description of the REPL command which is displayed when the user asks for help.
- ///
- string Description
- {
- get;
- }
-
- ///
- /// A single line parameters listing, or null if the command doesn't take any parameters. For example, "[on|off]".
- ///
- string CommandLine
- {
- get;
- }
-
- ///
- /// Gets detailed description of the command usage.
- ///
- ///
- /// Returns a sequence of lines.
- ///
- IEnumerable DetailedDescription
- {
- get;
- }
-
- ///
- /// Parameter name and description for parameters of the command.
- ///
- IEnumerable> ParametersDescription
- {
- get;
- }
-
- ///
- /// The name of the command. May not contain any whitespace characters.
- ///
- IEnumerable Names
- {
- get;
- }
-
- ///
- /// Provides classification for command arguments.
- ///
- IEnumerable ClassifyArguments(ITextSnapshot snapshot, Span argumentsSpan, Span spanToClassify);
- }
-}
diff --git a/src/InteractiveWindow/Editor/Commands/IInteractiveWindowCommands.cs b/src/InteractiveWindow/Editor/Commands/IInteractiveWindowCommands.cs
deleted file mode 100644
index 8f2b8c4f8b4c5..0000000000000
--- a/src/InteractiveWindow/Editor/Commands/IInteractiveWindowCommands.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Microsoft.VisualStudio.Text;
-using Microsoft.VisualStudio.Text.Classification;
-
-namespace Microsoft.VisualStudio.InteractiveWindow.Commands
-{
- ///
- /// Provides handling of meta-commands in the interactive window. Instances can be
- /// created using the service.
- ///
- public interface IInteractiveWindowCommands
- {
- ///
- /// Checks to see if the current input is in command mode (it is prefixed with the
- /// command prefix).
- ///
- bool InCommand
- {
- get;
- }
-
- ///
- /// Gets the prefix which is used for interactive window commands.
- ///
- string CommandPrefix { get; }
-
- ///
- /// Attempts to execute the command and returns the execution result.
- ///
- /// Returns null if the current command is unrecognized.
- ///
- ///
- Task TryExecuteCommand();
-
- ///
- /// Gets the registered list of commands that this IInteractiveWindowCommands was created with.
- ///
- ///
- IEnumerable GetCommands();
-
- ///
- /// Gets an individual command by name.
- ///
- IInteractiveWindowCommand this[string name]
- {
- get;
- }
-
- ///
- /// Displays help into the interactive window for the specified command.
- ///
- void DisplayCommandHelp(IInteractiveWindowCommand command);
-
- ///
- /// Displays usage information in the interactive window for the specified command.
- ///
- void DisplayCommandUsage(IInteractiveWindowCommand command, TextWriter writer, bool displayDetails);
-
- ///
- /// Displays help for all of the available commands.
- ///
- void DisplayHelp();
-
- ///
- /// Classifies the specified command snapshot.
- ///
- IEnumerable Classify(SnapshotSpan span);
- }
-}
diff --git a/src/InteractiveWindow/Editor/Commands/IInteractiveWindowCommandsFactory.cs b/src/InteractiveWindow/Editor/Commands/IInteractiveWindowCommandsFactory.cs
deleted file mode 100644
index 4978f212bea0b..0000000000000
--- a/src/InteractiveWindow/Editor/Commands/IInteractiveWindowCommandsFactory.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Microsoft.VisualStudio.InteractiveWindow.Commands
-{
- ///
- /// Creates an which handles updating the context type for the command type,
- /// classification of commands, and execution of commands.
- ///
- ///
- /// Engines need to use this interface to respond to checks if code can be executed and to
- /// execute text when in a command mode.
- ///
- /// The commands that are available for this interactive window are provided at creation time
- /// along with the prefix which commands should be prefaced with.
- ///
- public interface IInteractiveWindowCommandsFactory
- {
- ///
- /// Creates the IInteractiveCommands instance.
- ///
- IInteractiveWindowCommands CreateInteractiveCommands(IInteractiveWindow window, string prefix, IEnumerable commands);
- }
-}
diff --git a/src/InteractiveWindow/Editor/Commands/InteractiveCommandsFactory.cs b/src/InteractiveWindow/Editor/Commands/InteractiveCommandsFactory.cs
deleted file mode 100644
index 64c1af96de298..0000000000000
--- a/src/InteractiveWindow/Editor/Commands/InteractiveCommandsFactory.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.Composition;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Microsoft.VisualStudio.Language.StandardClassification;
-using Microsoft.VisualStudio.Utilities;
-
-namespace Microsoft.VisualStudio.InteractiveWindow.Commands
-{
- [Export(typeof(IInteractiveWindowCommandsFactory))]
- internal class InteractiveCommandsFactory : IInteractiveWindowCommandsFactory
- {
- private readonly IContentTypeRegistryService _contentTypeRegistry;
- private readonly IStandardClassificationService _standardClassification;
-
- [ImportingConstructor]
- public InteractiveCommandsFactory(IContentTypeRegistryService contentTypeRegistry, IStandardClassificationService classification)
- {
- _contentTypeRegistry = contentTypeRegistry;
- _standardClassification = classification;
- }
-
- public IInteractiveWindowCommands CreateInteractiveCommands(IInteractiveWindow window, string prefix, IEnumerable commands)
- {
- return new Commands(window, prefix, commands.ToArray(), _contentTypeRegistry, _standardClassification);
- }
- }
-}
diff --git a/src/InteractiveWindow/Editor/Commands/InteractiveWindowCommand.cs b/src/InteractiveWindow/Editor/Commands/InteractiveWindowCommand.cs
deleted file mode 100644
index 1d2a95e2bd677..0000000000000
--- a/src/InteractiveWindow/Editor/Commands/InteractiveWindowCommand.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.VisualStudio.Text;
-using Microsoft.VisualStudio.Text.Classification;
-using Microsoft.VisualStudio.Utilities;
-
-namespace Microsoft.VisualStudio.InteractiveWindow.Commands
-{
- ///
- /// Represents a command which can be run from a REPL window.
- ///
- /// This interface is a MEF contract and can be implemented and exported to add commands to the REPL window.
- ///
- [ContentType(PredefinedInteractiveCommandsContentTypes.InteractiveCommandContentTypeName)]
- internal abstract class InteractiveWindowCommand : IInteractiveWindowCommand
- {
- public abstract Task Execute(IInteractiveWindow window, string arguments);
-
- public abstract string Description { get; }
-
- public abstract IEnumerable Names { get; }
-
- public virtual IEnumerable ClassifyArguments(ITextSnapshot snapshot, Span argumentsSpan, Span spanToClassify)
- {
- return Enumerable.Empty();
- }
-
- public virtual string CommandLine
- {
- get { return null; }
- }
-
- public virtual IEnumerable DetailedDescription
- {
- get { return null; }
- }
-
- public virtual IEnumerable> ParametersDescription
- {
- get { return null; }
- }
-
- protected void ReportInvalidArguments(IInteractiveWindow window)
- {
- var commands = (IInteractiveWindowCommands)window.Properties[typeof(IInteractiveWindowCommands)];
- commands.DisplayCommandUsage(this, window.ErrorOutputWriter, displayDetails: false);
- }
- }
-}
diff --git a/src/InteractiveWindow/Editor/Commands/InteractiveWindowCommandExtensions.cs b/src/InteractiveWindow/Editor/Commands/InteractiveWindowCommandExtensions.cs
deleted file mode 100644
index 431fc4e96f5a8..0000000000000
--- a/src/InteractiveWindow/Editor/Commands/InteractiveWindowCommandExtensions.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Microsoft.VisualStudio.InteractiveWindow.Commands
-{
- public static class InteractiveWindowCommandExtensions
- {
- ///
- /// Gets the IInteractiveWindowCommands instance for the current interactive window if one is defined.
- ///
- /// Returns null if the interactive commands have not been created for this window.
- ///
- public static IInteractiveWindowCommands GetInteractiveCommands(this IInteractiveWindow window)
- {
- IInteractiveWindowCommands commands;
- if (window.Properties.TryGetProperty(typeof(IInteractiveWindowCommands), out commands))
- {
- return commands;
- }
-
- return null;
- }
- }
-}
diff --git a/src/InteractiveWindow/Editor/Commands/InteractiveWindowCommands.cs b/src/InteractiveWindow/Editor/Commands/InteractiveWindowCommands.cs
deleted file mode 100644
index adc5d1d9ecd02..0000000000000
--- a/src/InteractiveWindow/Editor/Commands/InteractiveWindowCommands.cs
+++ /dev/null
@@ -1,379 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Microsoft.VisualStudio.Language.StandardClassification;
-using Microsoft.VisualStudio.Text;
-using Microsoft.VisualStudio.Text.Classification;
-using Microsoft.VisualStudio.Utilities;
-
-namespace Microsoft.VisualStudio.InteractiveWindow.Commands
-{
- internal sealed class Commands : IInteractiveWindowCommands
- {
- private const string _commandSeparator = ", ";
-
- private readonly Dictionary _commands;
- private readonly int _maxCommandNameLength;
- private readonly IInteractiveWindow _window;
- private readonly IContentType _commandContentType;
- private readonly IStandardClassificationService _classificationRegistry;
- private IContentType _languageContentType;
- private ITextBuffer _previousBuffer;
-
- public string CommandPrefix { get; set; }
-
- public bool InCommand
- {
- get
- {
- return _window.CurrentLanguageBuffer.ContentType == _commandContentType;
- }
- }
-
- internal Commands(IInteractiveWindow window, string prefix, IEnumerable commands, IContentTypeRegistryService contentTypeRegistry = null, IStandardClassificationService classificationRegistry = null)
- {
- CommandPrefix = prefix;
- _window = window;
-
- Dictionary commandsDict = new Dictionary();
- foreach (var command in commands)
- {
- int length = 0;
- foreach (var name in command.Names)
- {
- if (commandsDict.ContainsKey(name))
- {
- throw new InvalidOperationException(string.Format(InteractiveWindowResources.DuplicateCommand, string.Join(_commandSeparator, command.Names)));
- }
- if (length != 0)
- {
- length += _commandSeparator.Length;
- }
- // plus the length of `#` for display purpose
- length += name.Length + 1;
-
- commandsDict[name] = command;
- }
- if (length == 0)
- {
- throw new InvalidOperationException(string.Format(InteractiveWindowResources.MissingCommandName, command.GetType().Name));
- }
- _maxCommandNameLength = Math.Max(_maxCommandNameLength, length);
- }
-
- _commands = commandsDict;
-
- _classificationRegistry = classificationRegistry;
-
- if (contentTypeRegistry != null)
- {
- _commandContentType = contentTypeRegistry.GetContentType(PredefinedInteractiveCommandsContentTypes.InteractiveCommandContentTypeName);
- }
-
- if (window != null)
- {
- window.SubmissionBufferAdded += Window_SubmissionBufferAdded;
- window.Properties[typeof(IInteractiveWindowCommands)] = this;
- }
- }
-
- private void Window_SubmissionBufferAdded(object sender, SubmissionBufferAddedEventArgs e)
- {
- if (_previousBuffer != null)
- {
- _previousBuffer.Changed -= NewBufferChanged;
- }
-
- _languageContentType = e.NewBuffer.ContentType;
- e.NewBuffer.Changed += NewBufferChanged;
- _previousBuffer = e.NewBuffer;
- }
-
- private void NewBufferChanged(object sender, TextContentChangedEventArgs e)
- {
- bool isCommand = IsCommand(e.After.GetExtent());
-
- ITextBuffer buffer = e.After.TextBuffer;
- IContentType contentType = buffer.ContentType;
- IContentType newContentType = null;
-
- if (contentType == _languageContentType)
- {
- if (isCommand)
- {
- newContentType = _commandContentType;
- }
- }
- else
- {
- if (!isCommand)
- {
- newContentType = _languageContentType;
- }
- }
-
- if (newContentType != null)
- {
- buffer.ChangeContentType(newContentType, editTag: null);
- }
- }
-
- internal bool IsCommand(SnapshotSpan span)
- {
- SnapshotSpan prefixSpan, commandSpan, argumentsSpan;
- return TryParseCommand(span, out prefixSpan, out commandSpan, out argumentsSpan) != null;
- }
-
- internal IInteractiveWindowCommand TryParseCommand(SnapshotSpan span, out SnapshotSpan prefixSpan, out SnapshotSpan commandSpan, out SnapshotSpan argumentsSpan)
- {
- string prefix = CommandPrefix;
-
- SnapshotSpan trimmed = span.TrimStart();
- if (!trimmed.StartsWith(prefix))
- {
- prefixSpan = commandSpan = argumentsSpan = default(SnapshotSpan);
- return null;
- }
-
- prefixSpan = trimmed.SubSpan(0, prefix.Length);
- var nameAndArgs = trimmed.SubSpan(prefix.Length).TrimStart();
- SnapshotPoint nameEnd = nameAndArgs.IndexOfAnyWhiteSpace() ?? span.End;
- commandSpan = new SnapshotSpan(span.Snapshot, Span.FromBounds(nameAndArgs.Start.Position, nameEnd.Position));
-
- argumentsSpan = new SnapshotSpan(span.Snapshot, Span.FromBounds(nameEnd.Position, span.End.Position)).Trim();
-
- return this[commandSpan.GetText()];
- }
-
- public IInteractiveWindowCommand this[string name]
- {
- get
- {
- IInteractiveWindowCommand command;
- _commands.TryGetValue(name, out command);
- return command;
- }
- }
-
- public IEnumerable GetCommands()
- {
- return _commands.Values;
- }
-
- internal IEnumerable Help()
- {
- // The magic number `19` here is calculated based on how the description is dispayed for other help entries to keep the texts aligned
- // (As of now other help entries include REPL commands and script derectives, both have manually formatted help description strings.
- string format = "{0,-" + Math.Max(19, _maxCommandNameLength) + "} {1}";
- return _commands.GroupBy(entry => entry.Value).
- Select(group => string.Format(format, string.Join(_commandSeparator, group.Key.Names.Select(s => CommandPrefix + s)), group.Key.Description)).
- OrderBy(line => line);
- }
-
- public IEnumerable Classify(SnapshotSpan span)
- {
- SnapshotSpan prefixSpan, commandSpan, argumentsSpan;
- var command = TryParseCommand(span.Snapshot.GetExtent(), out prefixSpan, out commandSpan, out argumentsSpan);
- if (command == null)
- {
- yield break;
- }
-
- if (span.OverlapsWith(prefixSpan))
- {
- yield return Classification(span.Snapshot, prefixSpan, _classificationRegistry.Keyword);
- }
-
- if (span.OverlapsWith(commandSpan))
- {
- yield return Classification(span.Snapshot, commandSpan, _classificationRegistry.Keyword);
- }
-
- if (argumentsSpan.Length > 0)
- {
- foreach (var classifiedSpan in command.ClassifyArguments(span.Snapshot, argumentsSpan.Span, span.Span))
- {
- yield return classifiedSpan;
- }
- }
- }
-
- private ClassificationSpan Classification(ITextSnapshot snapshot, Span span, IClassificationType classificationType)
- {
- return new ClassificationSpan(new SnapshotSpan(snapshot, span), classificationType);
- }
-
- ///
- /// Null if parsing fails, the result of execution otherwise.
- ///
- public Task TryExecuteCommand()
- {
- var span = _window.CurrentLanguageBuffer.CurrentSnapshot.GetExtent();
-
- SnapshotSpan prefixSpan, commandSpan, argumentsSpan;
- var command = TryParseCommand(span, out prefixSpan, out commandSpan, out argumentsSpan);
- if (command == null)
- {
- return null;
- }
-
- return ExecuteCommandAsync(command, argumentsSpan.GetText());
- }
-
- private async Task ExecuteCommandAsync(IInteractiveWindowCommand command, string arguments)
- {
- try
- {
- return await command.Execute(_window, arguments).ConfigureAwait(false);
- }
- catch (Exception e)
- {
- _window.ErrorOutputWriter.WriteLine(InteractiveWindowResources.CommandFailed, command.Names.First(), e.Message);
- return ExecutionResult.Failure;
- }
- }
-
- private const string HelpIndent = " ";
-
- private static readonly string[] s_CSVBScriptDirectives = new[]
- {
- "#r " + InteractiveWindowResources.RefHelp,
- "#load " + InteractiveWindowResources.LoadHelp
- };
-
- private static readonly string[] s_shortcutDescriptions = new[]
- {
- "Enter " + InteractiveWindowResources.EnterHelp,
- "Ctrl-Enter " + InteractiveWindowResources.CtrlEnterHelp1,
- " " + InteractiveWindowResources.CtrlEnterHelp2,
- "Shift-Enter " + InteractiveWindowResources.ShiftEnterHelp,
- "Escape " + InteractiveWindowResources.EscapeHelp,
- "Alt-UpArrow " + InteractiveWindowResources.AltUpArrowHelp,
- "Alt-DownArrow " + InteractiveWindowResources.AltDownArrowHelp,
- "Ctrl-Alt-UpArrow " + InteractiveWindowResources.CtrlAltUpArrowHelp,
- "Ctrl-Alt-DownArrow " + InteractiveWindowResources.CtrlAltDownArrowHelp,
- "Ctrl-K, Ctrl-Enter " + InteractiveWindowResources.CtrlKCtrlEnterHelp,
- "Ctrl-E, Ctrl-Enter " + InteractiveWindowResources.CtrlECtrlEnterHelp,
- "Ctrl-A " + InteractiveWindowResources.CtrlAHelp
- };
-
- private static readonly string[] s_shortcutDescriptionsSmartUpDown = new[]
- {
- "UpArrow " + InteractiveWindowResources.UpArrowHelp1,
- " " + InteractiveWindowResources.UpArrowHelp2,
- "DownArrow " + InteractiveWindowResources.DownArrowHelp1,
- " " + InteractiveWindowResources.DownArrowHelp2
- };
-
-
- internal string ShortcutDescriptions
- {
- get
- {
- var sb = new StringBuilder();
- foreach (var line in s_shortcutDescriptions)
- {
- sb.Append(HelpIndent + line + "\r\n");
- }
- if (UseSmartUpDown)
- {
- foreach (var line in s_shortcutDescriptionsSmartUpDown)
- {
- sb.Append(HelpIndent + line + "\r\n");
- }
- }
- return sb.ToString();
- }
- }
-
- public void DisplayHelp()
- {
- _window.WriteLine(InteractiveWindowResources.KeyboardShortcuts);
- _window.Write(ShortcutDescriptions);
-
- _window.WriteLine(InteractiveWindowResources.ReplCommands);
- foreach (var line in Help())
- {
- _window.Write(HelpIndent);
- _window.WriteLine(line);
- }
-
- // Hack: Display script directives only in CS/VB interactive window
- // TODO: https://github.com/dotnet/roslyn/issues/6441
- var evaluatorTypeName = _window.Evaluator.GetType().Name;
- if (evaluatorTypeName == "CSharpInteractiveEvaluator" ||
- evaluatorTypeName == "VisualBasicInteractiveEvaluator")
- {
- _window.WriteLine(InteractiveWindowResources.CSVBScriptDirectives);
- foreach (var line in s_CSVBScriptDirectives)
- {
- _window.Write(HelpIndent);
- _window.WriteLine(line);
- }
- }
- }
-
- public void DisplayCommandUsage(IInteractiveWindowCommand command, TextWriter writer, bool displayDetails)
- {
- if (displayDetails)
- {
- writer.WriteLine(command.Description);
- writer.WriteLine(string.Empty);
- }
-
- writer.WriteLine(InteractiveWindowResources.Usage);
- writer.Write(HelpIndent);
- writer.Write(CommandPrefix);
- writer.Write(string.Join(_commandSeparator + CommandPrefix, command.Names));
-
- string commandLine = command.CommandLine;
- if (commandLine != null)
- {
- writer.Write(" ");
- writer.Write(commandLine);
- }
-
- if (displayDetails)
- {
- writer.WriteLine(string.Empty);
-
- var paramsDesc = command.ParametersDescription;
- if (paramsDesc != null && paramsDesc.Any())
- {
- writer.WriteLine(string.Empty);
- writer.WriteLine(InteractiveWindowResources.Parameters);
-
- int maxParamNameLength = paramsDesc.Max(entry => entry.Key.Length);
- string paramHelpLineFormat = HelpIndent + "{0,-" + maxParamNameLength + "} {1}";
-
- foreach (var paramDesc in paramsDesc)
- {
- writer.WriteLine(string.Format(paramHelpLineFormat, paramDesc.Key, paramDesc.Value));
- }
- }
-
- IEnumerable details = command.DetailedDescription;
- if (details != null && details.Any())
- {
- writer.WriteLine(string.Empty);
- foreach (var line in details)
- {
- writer.WriteLine(line);
- }
- }
- }
- }
-
- public void DisplayCommandHelp(IInteractiveWindowCommand command)
- {
- DisplayCommandUsage(command, _window.OutputWriter, displayDetails: true);
- }
-
- private bool UseSmartUpDown => _window.TextView.Options.GetOptionValue(InteractiveWindowOptions.SmartUpDown);
- }
-}
diff --git a/src/InteractiveWindow/Editor/Commands/PredefinedInteractiveCommandsContentTypes.cs b/src/InteractiveWindow/Editor/Commands/PredefinedInteractiveCommandsContentTypes.cs
deleted file mode 100644
index 6f9a07a5ee29a..0000000000000
--- a/src/InteractiveWindow/Editor/Commands/PredefinedInteractiveCommandsContentTypes.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.ComponentModel.Composition;
-using Microsoft.VisualStudio.Utilities;
-
-#pragma warning disable CS0649 // field is not assigned to
-
-namespace Microsoft.VisualStudio.InteractiveWindow.Commands
-{
- public static class PredefinedInteractiveCommandsContentTypes
- {
- public const string InteractiveCommandContentTypeName = "Interactive Command";
-
- [Export, Name(InteractiveCommandContentTypeName), BaseDefinition("code")]
- internal static readonly ContentTypeDefinition InteractiveCommandContentTypeDefinition;
- }
-}
diff --git a/src/InteractiveWindow/Editor/Commands/ResetCommand.cs b/src/InteractiveWindow/Editor/Commands/ResetCommand.cs
deleted file mode 100644
index 9f8f3bad27747..0000000000000
--- a/src/InteractiveWindow/Editor/Commands/ResetCommand.cs
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.Composition;
-using System.Threading.Tasks;
-using Microsoft.VisualStudio.Language.StandardClassification;
-using Microsoft.VisualStudio.Text;
-using Microsoft.VisualStudio.Text.Classification;
-
-namespace Microsoft.VisualStudio.InteractiveWindow.Commands
-{
- [Export(typeof(IInteractiveWindowCommand))]
- internal sealed class ResetCommand : InteractiveWindowCommand
- {
- private const string CommandName = "reset";
- private const string NoConfigParameterName = "noconfig";
- private static readonly int s_noConfigParameterNameLength = NoConfigParameterName.Length;
- private readonly IStandardClassificationService _registry;
-
- [ImportingConstructor]
- public ResetCommand(IStandardClassificationService registry)
- {
- _registry = registry;
- }
-
- public override string Description
- {
- get { return InteractiveWindowResources.ResetCommandDescription; }
- }
-
- public override IEnumerable Names
- {
- get { yield return CommandName; }
- }
-
- public override string CommandLine
- {
- get { return "[" + NoConfigParameterName + "]"; }
- }
-
- public override IEnumerable> ParametersDescription
- {
- get
- {
- yield return new KeyValuePair(NoConfigParameterName, InteractiveWindowResources.ResetCommandParametersDescription);
- }
- }
-
- public override Task Execute(IInteractiveWindow window, string arguments)
- {
- bool initialize;
- if (!TryParseArguments(arguments, out initialize))
- {
- ReportInvalidArguments(window);
- return ExecutionResult.Failed;
- }
-
- return window.Operations.ResetAsync(initialize);
- }
-
- public override IEnumerable ClassifyArguments(ITextSnapshot snapshot, Span argumentsSpan, Span spanToClassify)
- {
- string arguments = snapshot.GetText(argumentsSpan);
- int argumentsStart = argumentsSpan.Start;
- foreach (var pos in GetNoConfigPositions(arguments))
- {
- var snapshotSpan = new SnapshotSpan(snapshot, new Span(argumentsStart + pos, s_noConfigParameterNameLength));
- yield return new ClassificationSpan(snapshotSpan, _registry.Keyword);
- }
- }
-
- ///
- /// Internal for testing.
- ///
- internal static IEnumerable GetNoConfigPositions(string arguments)
- {
- int startIndex = 0;
- while (true)
- {
- int index = arguments.IndexOf(NoConfigParameterName, startIndex, StringComparison.Ordinal);
- if (index < 0) yield break;
-
- if ((index == 0 || char.IsWhiteSpace(arguments[index - 1])) &&
- (index + s_noConfigParameterNameLength == arguments.Length || char.IsWhiteSpace(arguments[index + s_noConfigParameterNameLength])))
- {
- yield return index;
- }
-
- startIndex = index + s_noConfigParameterNameLength;
- }
- }
-
- ///
- /// Internal for testing.
- ///
- internal static bool TryParseArguments(string arguments, out bool initialize)
- {
- var trimmed = arguments.Trim();
- if (trimmed.Length == 0)
- {
- initialize = true;
- return true;
- }
- else if (string.Equals(trimmed, NoConfigParameterName, StringComparison.Ordinal))
- {
- initialize = false;
- return true;
- }
-
- initialize = false;
- return false;
- }
- }
-}
diff --git a/src/InteractiveWindow/Editor/ContentTypeMetadata.cs b/src/InteractiveWindow/Editor/ContentTypeMetadata.cs
deleted file mode 100644
index 7f6b69d09df0b..0000000000000
--- a/src/InteractiveWindow/Editor/ContentTypeMetadata.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using Microsoft.VisualStudio.Utilities;
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- internal class ContentTypeMetadata
- {
- public IEnumerable ContentTypes { get; }
-
- public ContentTypeMetadata(IDictionary data)
- {
- this.ContentTypes = (IEnumerable)data["ContentTypes"];
- }
- }
-
- internal static class ContentTypeMetadataHelpers
- {
- public static T OfContentType(
- this IEnumerable> exports,
- IContentType contentType,
- IContentTypeRegistryService contentTypeRegistry)
- {
- return (from export in exports
- from exportedContentTypeName in export.Metadata.ContentTypes
- let exportedContentType = contentTypeRegistry.GetContentType(exportedContentTypeName)
- where exportedContentType.IsOfType(contentType.TypeName)
- select export.Value).SingleOrDefault();
- }
- }
-}
diff --git a/src/InteractiveWindow/Editor/CustomTrackingSpan.cs b/src/InteractiveWindow/Editor/CustomTrackingSpan.cs
deleted file mode 100644
index 94d9f85a904aa..0000000000000
--- a/src/InteractiveWindow/Editor/CustomTrackingSpan.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Diagnostics;
-using Microsoft.VisualStudio.Text;
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- ///
- /// This is a custom span which is like an EdgeInclusive span. We need a custom span because elision buffers
- /// do not allow EdgeInclusive unless it spans the entire buffer. We create snippets of our language spans
- /// and these are initially zero length. When we insert at the beginning of these we'll end up keeping the
- /// span zero length if we're just EdgePositive tracking.
- ///
- [DebuggerDisplay("{GetDebuggerDisplay(), nq}")]
- internal sealed class CustomTrackingSpan : ITrackingSpan
- {
- private readonly ITrackingPoint _start;
- private readonly ITrackingPoint _end;
-
- public CustomTrackingSpan(ITextSnapshot snapshot, Span span, bool canAppend = false)
- {
- _start = snapshot.CreateTrackingPoint(span.Start, PointTrackingMode.Negative);
- _end = snapshot.CreateTrackingPoint(span.End, canAppend ? PointTrackingMode.Positive : PointTrackingMode.Negative);
- }
-
- #region ITrackingSpan Members
-
- public SnapshotPoint GetEndPoint(ITextSnapshot snapshot)
- {
- return _end.GetPoint(snapshot);
- }
-
- public Span GetSpan(ITextVersion version)
- {
- return Span.FromBounds(_start.GetPosition(version), _end.GetPosition(version));
- }
-
- public SnapshotSpan GetSpan(ITextSnapshot snapshot)
- {
- return new SnapshotSpan(snapshot, Span.FromBounds(_start.GetPoint(snapshot), _end.GetPoint(snapshot)));
- }
-
- public SnapshotPoint GetStartPoint(ITextSnapshot snapshot)
- {
- return _start.GetPoint(snapshot);
- }
-
- public string GetText(ITextSnapshot snapshot)
- {
- return GetSpan(snapshot).GetText();
- }
-
- public ITextBuffer TextBuffer
- {
- get { return _start.TextBuffer; }
- }
-
- public TrackingFidelityMode TrackingFidelity
- {
- get { return TrackingFidelityMode.Forward; }
- }
-
- public SpanTrackingMode TrackingMode
- {
- get { return SpanTrackingMode.Custom; }
- }
-
- #endregion
-
- private string GetDebuggerDisplay()
- {
- return "CustomSpan: " + GetSpan(_start.TextBuffer.CurrentSnapshot).ToString();
- }
- }
-}
diff --git a/src/InteractiveWindow/Editor/ExecutionResult.cs b/src/InteractiveWindow/Editor/ExecutionResult.cs
deleted file mode 100644
index 5cfbd66e3c8ee..0000000000000
--- a/src/InteractiveWindow/Editor/ExecutionResult.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Threading.Tasks;
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- ///
- /// The result of command execution.
- ///
- public struct ExecutionResult
- {
- public static readonly ExecutionResult Success = new ExecutionResult(true);
- public static readonly ExecutionResult Failure = new ExecutionResult(false);
- public static readonly Task Succeeded = Task.FromResult(Success);
- public static readonly Task Failed = Task.FromResult(Failure);
-
- private readonly bool _isSuccessful;
-
- public ExecutionResult(bool isSuccessful)
- {
- _isSuccessful = isSuccessful;
- }
-
- public bool IsSuccessful
- {
- get
- {
- return _isSuccessful;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/InteractiveWindow/Editor/History.cs b/src/InteractiveWindow/Editor/History.cs
deleted file mode 100644
index 6c1c5ef959bce..0000000000000
--- a/src/InteractiveWindow/Editor/History.cs
+++ /dev/null
@@ -1,257 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Collections.Generic;
-using System.Diagnostics;
-using Microsoft.VisualStudio.Text;
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- internal class History
- {
- internal sealed class Entry
- {
- ///
- /// The cached text of this entry, which may exist if we've detached from the span.
- ///
- private string _cachedText;
-
- ///
- /// The span of the original submission of this text.
- ///
- private SnapshotSpan? _originalSpan;
-
- public bool Command { get; set; }
- public bool Failed { get; set; }
-
- public SnapshotSpan? OriginalSpan { get { return _originalSpan; } }
-
- public string Text
- {
- get
- {
- if (_cachedText != null)
- {
- return _cachedText;
- }
-
- return _originalSpan.Value.GetText();
- }
- }
-
- internal void ForgetOriginalBuffer()
- {
- if (_originalSpan.HasValue)
- {
- _cachedText = _originalSpan.Value.GetText();
- _originalSpan = null;
- }
- }
-
- public Entry(SnapshotSpan span)
- {
- _originalSpan = span;
- }
- }
-
- private readonly List _history;
- private readonly int _maxLength;
-
- private int _current;
- private bool _live;
-
- internal string UncommittedInput { get; set; }
-
- internal History()
- : this(maxLength: 50)
- {
- }
-
- internal History(int maxLength)
- {
- _maxLength = maxLength;
- _current = -1;
- _history = new List();
- }
-
- internal void Clear()
- {
- _current = -1;
- _live = false;
- _history.Clear();
- }
-
- internal void ForgetOriginalBuffers()
- {
- foreach (var entry in _history)
- {
- entry.ForgetOriginalBuffer();
- }
- }
-
- internal int MaxLength
- {
- get { return _maxLength; }
- }
-
- internal int Length
- {
- get { return _history.Count; }
- }
-
- internal IEnumerable Items
- {
- get { return _history; }
- }
-
- internal Entry Last
- {
- get
- {
- if (_history.Count > 0)
- {
- return _history[_history.Count - 1];
- }
- else
- {
- return null;
- }
- }
- }
-
- internal void Add(SnapshotSpan span)
- {
- var entry = new Entry(span);
- var text = span.GetText();
-
- _live = false;
- if (Length == 0 || Last.Text != text)
- {
- _history.Add(entry);
- }
-
- //If text at current location in history is not the same as the text you are adding then
- //new command was typed and submitted while navigating history. In this case the _current
- //gets reset.
- if (_history[(_current == -1) ? Length - 1 : _current].Text != text)
- {
- _current = -1;
- }
-
- if (Length > MaxLength)
- {
- _history.RemoveAt(0);
- if (_current > 0)
- {
- _current--;
- }
- }
- }
-
- internal Entry GetNext(string pattern)
- {
- var next = MoveNext(pattern);
- if (next == null)
- {
- // if we hit the end of history list, reset _current to stop navigating history.
- _current = -1;
- }
- return next;
- }
-
- internal Entry GetPrevious(string pattern)
- {
- var startPos = _current;
- Entry next;
- next = MovePrevious(pattern);
- if (next == null)
- {
- _current = startPos;
- return null;
- }
-
- return next;
- }
-
- private Entry MoveNext(string pattern)
- {
- if (Length == 0) return null;
-
- bool wasCurrentUninitialized = (_current == -1);
-
- // if current in un-initialized then we are not navigating history yet so
- // there is no next entry.
- if (wasCurrentUninitialized) return null;
-
- //indicates that history search/navigation is in progress
- _live = true;
-
- _current++;
-
- for (; _current < Length; _current++)
- {
- Entry entry;
- if (TryMatch(pattern, out entry)) return entry;
- }
-
- return null;
- }
-
- private Entry MovePrevious(string pattern)
- {
- if (Length == 0) return null;
- bool wasLive = _live;
-
- //indicates that history search/navigation is in progress
- _live = true;
-
- bool wasCurrentUninitialized = (_current == -1);
-
- // if current in un-initialized then we are not navigating history yet so
- // current needs to be set to last entry before navigating previous.
- if (wasCurrentUninitialized)
- {
- _current = Length - 1;
- Entry entry;
- if (TryMatch(pattern, out entry)) return entry;
- }
-
- bool patternEmpty = string.IsNullOrWhiteSpace(pattern);
- if (!wasLive && patternEmpty)
- {
- //return the current entry again ( handles case up, up, enter, up)
- Entry entry;
- if (TryMatch(pattern, out entry)) return entry;
- }
-
- for (_current--; _current >= 0; _current--)
- {
- Entry entry;
- if (TryMatch(pattern, out entry)) return entry;
- }
-
- return null;
- }
-
-
- private bool TryMatch(string pattern, out Entry entry)
- {
- bool patternEmpty = string.IsNullOrWhiteSpace(pattern);
- var tmpEntry = _history[_current];
- if (patternEmpty || Matches(tmpEntry.Text, pattern))
- {
- entry = tmpEntry;
- return true;
- }
- else
- {
- entry = null;
- return false;
- }
- }
-
- private static bool Matches(string entry, string pattern)
- {
- return entry.Contains(pattern);
- }
- }
-}
diff --git a/src/InteractiveWindow/Editor/IInteractiveEvaluator.cs b/src/InteractiveWindow/Editor/IInteractiveEvaluator.cs
deleted file mode 100644
index 8fea40a02d864..0000000000000
--- a/src/InteractiveWindow/Editor/IInteractiveEvaluator.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Threading.Tasks;
-using Microsoft.VisualStudio.Text;
-using Microsoft.VisualStudio.Text.Editor;
-using Microsoft.VisualStudio.Utilities;
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- ///
- /// Implements an evaluator for a specific REPL implementation. The evaluator is provided to the
- /// REPL implementation by the IInteractiveEngineProvider interface.
- ///
- public interface IInteractiveEvaluator : IDisposable
- {
- ///
- /// Gets or sets Interactive Window the engine is currently attached to.
- ///
- IInteractiveWindow CurrentWindow { get; set; }
-
- ///
- /// Initializes the interactive session.
- ///
- /// Task that completes the initialization.
- Task InitializeAsync();
-
- ///
- /// Re-starts the interpreter. Usually this closes the current process (if alive) and starts
- /// a new interpreter.
- ///
- /// Task that completes reset and initialization of the new process.
- Task ResetAsync(bool initialize = true);
-
- // Parsing and Execution
-
- ///
- /// Returns true if the text can be executed. Used to determine if there is a whole statement entered
- /// in the REPL window.
- ///
- bool CanExecuteCode(string text);
-
- ///
- /// Asynchronously executes the specified text.
- ///
- /// The code snippet to execute.
- /// Task that completes the execution.
- Task ExecuteCodeAsync(string text);
-
- ///
- /// Formats the contents of the clipboard in a manner reasonable for the language. Returns null if the
- /// current clipboard cannot be formatted.
- ///
- ///
- ///
- /// By default if the clipboard contains text it will be pasted. The language can format
- /// additional forms here - for example CSV data can be formatted in a language compatible
- /// manner.
- ///
- string FormatClipboard();
-
- ///
- /// Aborts the current running command.
- ///
- void AbortExecution();
-
- ///
- /// Retrieves the prompt string.
- ///
- /// The prompt string.
- string GetPrompt();
- }
-}
diff --git a/src/InteractiveWindow/Editor/IInteractiveWindow.cs b/src/InteractiveWindow/Editor/IInteractiveWindow.cs
deleted file mode 100644
index 6d01ad224e5e9..0000000000000
--- a/src/InteractiveWindow/Editor/IInteractiveWindow.cs
+++ /dev/null
@@ -1,242 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Threading.Tasks;
-using System.Windows;
-using Microsoft.VisualStudio.Text;
-using Microsoft.VisualStudio.Text.Editor;
-using Microsoft.VisualStudio.Text.Operations;
-using Microsoft.VisualStudio.Utilities;
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- ///
- /// An implementation of a Read Eval Print Loop Window for iteratively developing code.
- ///
- /// Instances of the repl window can be created by using MEF to import the IInteractiveWindowProvider interface.
- ///
- public interface IInteractiveWindow : IDisposable, IPropertyOwner
- {
- ///
- /// Gets the text view which the interactive window is running and writing output to.
- ///
- IWpfTextView TextView
- {
- get;
- }
-
- ///
- /// Gets the current language buffer.
- ///
- ITextBuffer CurrentLanguageBuffer
- {
- get;
- }
-
- ///
- /// Gets the output editor buffer.
- ///
- ITextBuffer OutputBuffer
- {
- get;
- }
-
- ///
- /// The language evaluator used in Repl Window
- ///
- IInteractiveEvaluator Evaluator
- {
- get;
- }
-
- ///
- /// Initializes the execution environment and shows the initial prompt.
- ///
- /// Returns a started task that finishes as soon as the initialization completes.
- Task InitializeAsync();
-
- ///
- /// Closes the underlying text view.
- ///
- void Close();
-
- ///
- /// Insert the specified text to the active code buffer at the current caret position.
- ///
- /// Text to insert.
- ///
- /// Overwrites the current selection.
- ///
- /// If the REPL is in the middle of code execution the text is inserted at the end of a pending input buffer.
- /// When the REPL is ready for input the pending input is inserted into the active code input.
- ///
- void InsertCode(string text);
-
- ///
- /// Submits a sequence of inputs one by one.
- ///
- ///
- /// Code snippets or REPL commands to submit.
- ///
- ///
- /// Enqueues given code snippets for submission at the earliest time the REPL is prepared to
- /// accept submissions. Any submissions are postponed until execution of the current
- /// submission (if there is any) is finished or aborted.
- ///
- /// The REPL processes the given inputs one by one creating a prompt, input span and possibly output span for each input.
- /// This method may be reentered if any of the inputs evaluates to a command that invokes this method.
- ///
- Task SubmitAsync(IEnumerable inputs);
-
- ///
- /// Output writer.
- ///
- /// REVIEW: Remove, other people can wrap Write APIS
- ///
- TextWriter OutputWriter
- {
- get;
- }
-
- ///
- /// Error output writer.
- ///
- /// REVIEW: Remove, other people can wrap Write APIS
- ///
- TextWriter ErrorOutputWriter
- {
- get;
- }
-
- ///
- /// Writes string followed by a line break into the output buffer.
- ///
- /// Text to write. Might be null.
- ///
- /// The offset in the output subject buffer where the text is inserted and the length of the inserted text including the line break.
- ///
- ///
- /// Note that the text might not be written to the editor buffer immediately but be buffered.
- /// The returned offsets might thus be beyond the current length of the editor buffer.
- ///
- Span WriteLine(string text);
-
- ///
- /// Writes a line into the output buffer.
- ///
- /// Text to write. Might be null.
- ///
- /// The offset in the output subject buffer where the text is inserted.
- ///
- ///
- /// Note that the text might not be written to the editor buffer immediately but be buffered.
- /// The returned offset might thus be beyond the current length of the editor buffer.
- ///
- Span Write(string text);
-
- ///
- /// Writes string followed by a line break into the error buffer.
- ///
- /// Text to write. Might be null.
- ///
- /// The offset in the output subject buffer where the text is inserted and the length of the inserted text including the line break.
- ///
- ///
- /// Note that the text might not be written to the editor buffer immediately but be buffered.
- /// The returned offsets might thus be beyond the current length of the editor buffer.
- ///
- Span WriteErrorLine(string text);
-
- ///
- /// Writes a line into the error buffer.
- ///
- /// Text to write. Might be null.
- ///
- /// The offset in the output subject buffer where the text is inserted.
- ///
- ///
- /// Note that the text might not be written to the editor buffer immediately but be buffered.
- /// The returned offset might thus be beyond the current length of the editor buffer.
- ///
- Span WriteError(string text);
-
- ///
- /// Writes a UI object to the REPL window.
- ///
- ///
- /// Flushes all text previously written to the output buffer before the element is inserted.
- ///
- void Write(UIElement element);
-
- void FlushOutput();
-
- ///
- /// Reads input from the REPL window.
- ///
- /// The entered input or null if cancelled.
- TextReader ReadStandardInput();
-
- ///
- /// Event triggered when the REPL is ready to accept input.
- ///
- ///
- /// Called on the UI thread.
- ///
- event Action ReadyForInput;
-
- event EventHandler SubmissionBufferAdded;
-
- ///
- /// True if there is currently an input being executed.
- ///
- ///
- ///
- /// This value can only be reliably queried on the UI thread, otherwise the value
- /// is transient.
- ///
- bool IsRunning
- {
- get;
- }
-
- ///
- /// True if the interactive evaluator is currently resetting.
- ///
- ///
- ///
- /// This value can only be reliably queried on the UI thread, otherwise the value
- /// is transient.
- ///
- bool IsResetting
- {
- get;
- }
-
- ///
- /// True if the interactive evaluator is currently resetting.
- ///
- ///
- ///
- /// This value can only be reliably queried on the UI thread, otherwise the value
- /// is transient.
- ///
- bool IsInitializing
- {
- get;
- }
-
- ///
- /// Appends a input into the editor buffer and history as if it has been executed.
- ///
- /// The input is not executed.
- ///
- void AddInput(string input);
-
- IInteractiveWindowOperations Operations
- {
- get;
- }
- }
-}
diff --git a/src/InteractiveWindow/Editor/IInteractiveWindow2.cs b/src/InteractiveWindow/Editor/IInteractiveWindow2.cs
deleted file mode 100644
index 3376971ac1844..0000000000000
--- a/src/InteractiveWindow/Editor/IInteractiveWindow2.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- public interface IInteractiveWindow2 : IInteractiveWindow
- {
- ///
- /// Adds to the history as if it has been executed.
- /// Method doesn't execute and doesn't affect current user input.
- ///
- /// The interactive window has not been initialized or is resettings.
- void AddToHistory(string input);
- }
-}
\ No newline at end of file
diff --git a/src/InteractiveWindow/Editor/IInteractiveWindowEditorFactoryService.cs b/src/InteractiveWindow/Editor/IInteractiveWindowEditorFactoryService.cs
deleted file mode 100644
index 1f0d10027552a..0000000000000
--- a/src/InteractiveWindow/Editor/IInteractiveWindowEditorFactoryService.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using Microsoft.VisualStudio.Text;
-using Microsoft.VisualStudio.Text.Editor;
-using Microsoft.VisualStudio.Text.Projection;
-using Microsoft.VisualStudio.Utilities;
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- ///
- /// Implements the service that creates text views and buffers for the interactive window.
- ///
- /// There is a single implementation of this service for each MEF composition catalog. The
- /// service understands how the editors and buffers need to be created and sets them up
- /// so that commands are properly routed to the editor window.
- ///
- /// This service is imported by
- /// to use in the creation of s.
- ///
- public interface IInteractiveWindowEditorFactoryService
- {
- ///
- /// Creates a new text view for an interactive window.
- ///
- /// The interactive window the text view is being created for.
- /// The projection buffer used for displaying the interactive window
- /// The requested text view roles.
- IWpfTextView CreateTextView(IInteractiveWindow window, ITextBuffer buffer, ITextViewRoleSet roles);
-
- ///
- /// Creates a new input buffer for the interactive window.
- ///
- ITextBuffer CreateAndActivateBuffer(IInteractiveWindow window);
- }
-}
diff --git a/src/InteractiveWindow/Editor/IInteractiveWindowFactoryService.cs b/src/InteractiveWindow/Editor/IInteractiveWindowFactoryService.cs
deleted file mode 100644
index 6ecf424625c27..0000000000000
--- a/src/InteractiveWindow/Editor/IInteractiveWindowFactoryService.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- ///
- /// Creates instances of the IInteractiveWindow.
- ///
- public interface IInteractiveWindowFactoryService
- {
- ///
- /// Creates a new interactive window which runs against the provided interactive evaluator.
- ///
- IInteractiveWindow CreateWindow(IInteractiveEvaluator evaluator);
- }
-}
diff --git a/src/InteractiveWindow/Editor/IInteractiveWindowOperations.cs b/src/InteractiveWindow/Editor/IInteractiveWindowOperations.cs
deleted file mode 100644
index 2b4b551f520c4..0000000000000
--- a/src/InteractiveWindow/Editor/IInteractiveWindowOperations.cs
+++ /dev/null
@@ -1,136 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Threading.Tasks;
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- ///
- /// Provides access to low level editor operations on the REPL window.
- ///
- public interface IInteractiveWindowOperations
- {
- ///
- /// Deletes the current selection or the character before the caret.
- ///
- ///
- bool Backspace();
-
- ///
- /// Attempts to insert a line break. Returns true if a line break is inserted, false if not.
- ///
- /// Will not submit the input.
- ///
- bool BreakLine();
-
- ///
- /// Clears the input history.
- ///
- void ClearHistory();
-
- ///
- /// Clears the REPL window screen.
- ///
- void ClearView();
-
- ///
- /// Advances to the next item in history.
- ///
- void HistoryNext(string search = null);
-
- ///
- /// Advanced to the previous item in history.
- ///
- void HistoryPrevious(string search = null);
-
- ///
- /// If no search has been performed captures the current input as
- /// the search string. Then searches through history for the next
- /// match against the current search string.
- ///
- void HistorySearchNext();
-
- ///
- /// If no search has been performed captures the current input as
- /// the search string. Then searches through history for the previous
- /// match against the current search string.
- ///
- void HistorySearchPrevious();
-
- ///
- /// Moves to the beginning of the line.
- ///
- /// When in a language buffer the caret is moved to the beginning of the
- /// input region not into the prompt region.
- ///
- /// The caret is moved to the first non-whitespace character.
- ///
- /// True to extend the selection from the current caret position.
- void Home(bool extendSelection);
-
- ///
- /// Moves to the end of the line.
- ///
- /// True to extend the selection from the current caret position.
- void End(bool extendSelection);
-
- ///
- /// Selects all of the text in the buffer
- ///
- void SelectAll();
-
- ///
- /// Pastes the current clipboard contents into the interactive window.
- ///
- ///
- bool Paste();
-
- ///
- /// Cuts the current selection to the clipboard.
- ///
- void Cut();
-
- ///
- /// Deletes the current selection.
- ///
- /// Returns true if the selection was deleted
- ///
- bool Delete();
-
- ///
- /// Handles the user pressing return/enter.
- ///
- /// If the caret is at the end of an input submits the current input. Otherwise if the caret is
- /// in a language buffer it inserts a newline.
- ///
- /// If not inside of a buffer the caret well be moved to the current language buffer if possible.
- ///
- /// Returns true if the return was successfully processed.
- ///
- bool Return();
-
- ///
- /// If the current input is a standard input this will submit the input.
- ///
- /// Returns true if the input was submitted, false otherwise.
- ///
- bool TrySubmitStandardInput();
-
- ///
- /// Resets the execution context clearing all variables.
- ///
- Task ResetAsync(bool initialize = true);
-
- ///
- /// Executes the current input regardless of the caret position within the input.
- ///
- /// If the caret is in a previously executed input then the input is pasted to the
- /// end of the current input and not executed.
- ///
- void ExecuteInput();
-
- ///
- /// Clears the current input.
- ///
- void Cancel();
- }
-}
diff --git a/src/InteractiveWindow/Editor/IInteractiveWindowOperations2.cs b/src/InteractiveWindow/Editor/IInteractiveWindowOperations2.cs
deleted file mode 100644
index 5410c28d04a33..0000000000000
--- a/src/InteractiveWindow/Editor/IInteractiveWindowOperations2.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- public interface IInteractiveWindowOperations2 : IInteractiveWindowOperations
- {
- ///
- /// Copies the current selection to the clipboard.
- ///
- void Copy();
-
- ///
- /// Copies code from user inputs to clipboard.
- /// If selection is empty, then copy from current line, otherwise copy from selected lines.
- ///
- void CopyCode();
-
- ///
- /// Delete Line; Delete all selected lines, or the current line if no selection.
- ///
- void DeleteLine();
-
- ///
- /// Line Cut; Cut all selected lines, or the current line if no selection, to the clipboard.
- ///
- void CutLine();
-
- ///
- /// Handles character typed in by user.
- ///
- void TypeChar(char typedChar);
- }
-}
diff --git a/src/InteractiveWindow/Editor/InteractiveClipboardFormat.cs b/src/InteractiveWindow/Editor/InteractiveClipboardFormat.cs
deleted file mode 100644
index 11d1232f16240..0000000000000
--- a/src/InteractiveWindow/Editor/InteractiveClipboardFormat.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.IO;
-using System.Text;
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- ///
- /// Implements deserialization for clipboard objects created by Interactive Window Copy operations.
- ///
- public static class InteractiveClipboardFormat
- {
- ///
- /// Unique identifier for the clipboard format.
- ///
- public const string Tag = "89344A36-9821-495A-8255-99A63969F87D";
-
- ///
- /// Deserializes clipboard object.
- ///
- /// Object retrieved fromt the clipboard
- /// The value is not of the expected format.
- public static string Deserialize(object value)
- {
- if (value == null)
- {
- throw new ArgumentNullException(nameof(value));
- }
-
- var text = value as string;
- if (text == null)
- {
- throw new InvalidDataException();
- }
-
- var blocks = BufferBlock.Deserialize(text);
-
- var result = new StringBuilder();
- foreach (var block in blocks)
- {
- switch (block.Kind)
- {
- // the actual linebreak was converted to regular Input when copied
- // This LineBreak block was created by coping box selection and is used as line separator when pasted
- case ReplSpanKind.LineBreak:
- result.Append(block.Content);
- break;
-
- case ReplSpanKind.Input:
- case ReplSpanKind.Output:
- case ReplSpanKind.StandardInput:
- result.Append(block.Content);
- break;
- }
- }
-
- return result.ToString();
- }
- }
-}
diff --git a/src/InteractiveWindow/Editor/InteractiveContentTypeDefinitions.cs b/src/InteractiveWindow/Editor/InteractiveContentTypeDefinitions.cs
deleted file mode 100644
index 6396b57ca3a5a..0000000000000
--- a/src/InteractiveWindow/Editor/InteractiveContentTypeDefinitions.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.ComponentModel.Composition;
-using Microsoft.VisualStudio.Utilities;
-
-#pragma warning disable CS0649 // field is not assigned to
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- internal static class InteractiveContentTypeDefinitions
- {
- [Export, Name(PredefinedInteractiveContentTypes.InteractiveContentTypeName), BaseDefinition("text"), BaseDefinition("projection")]
- internal static readonly ContentTypeDefinition InteractiveContentTypeDefinition;
-
- [Export, Name(PredefinedInteractiveContentTypes.InteractiveOutputContentTypeName), BaseDefinition("text")]
- internal static readonly ContentTypeDefinition InteractiveOutputContentTypeDefinition;
- }
-}
\ No newline at end of file
diff --git a/src/InteractiveWindow/Editor/InteractiveWindow.EditResolver.cs b/src/InteractiveWindow/Editor/InteractiveWindow.EditResolver.cs
deleted file mode 100644
index c263c4e867969..0000000000000
--- a/src/InteractiveWindow/Editor/InteractiveWindow.EditResolver.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Diagnostics;
-using Microsoft.VisualStudio.Text;
-using Microsoft.VisualStudio.Text.Projection;
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- internal partial class InteractiveWindow
- {
- private sealed class EditResolver : IProjectionEditResolver
- {
- private readonly InteractiveWindow _window;
-
- public EditResolver(InteractiveWindow window)
- {
- _window = window;
- }
-
- // We always favor the last buffer of our language type. This handles cases where we're on a boundary between a prompt and a language
- // buffer - we favor the language buffer because the prompts cannot be edited. In the case of two language buffers this also works because
- // our spans are laid out like:
- //
- //
- //
- // In the case where the prompts are in the margin we have an insertion conflict between the two language spans. But because
- // lang span 1 includes the new line in order to be on the boundary we need to be on lang span 2's line.
- //
- // This works the same way w/ our input buffer where the input buffer present instead of .
-
- void IProjectionEditResolver.FillInInsertionSizes(SnapshotPoint projectionInsertionPoint, ReadOnlyCollection sourceInsertionPoints, string insertionText, IList insertionSizes)
- {
- int index = _window.UIThread(uiOnly => IndexOfEditableBuffer(sourceInsertionPoints, uiOnly));
- if (index != -1)
- {
- insertionSizes[index] = insertionText.Length;
- }
- }
-
- int IProjectionEditResolver.GetTypicalInsertionPosition(SnapshotPoint projectionInsertionPoint, ReadOnlyCollection sourceInsertionPoints)
- {
- int index = _window.UIThread(uiOnly => IndexOfEditableBuffer(sourceInsertionPoints, uiOnly));
- return index != -1 ? index : 0;
- }
-
- void IProjectionEditResolver.FillInReplacementSizes(SnapshotSpan projectionReplacementSpan, ReadOnlyCollection sourceReplacementSpans, string insertionText, IList insertionSizes)
- {
- int index = _window.UIThread(uiOnly => IndexOfEditableBuffer(sourceReplacementSpans, uiOnly));
- if (index != -1)
- {
- insertionSizes[index] = insertionText.Length;
- }
- }
-
- private int IndexOfEditableBuffer(ReadOnlyCollection points, UIThreadOnly uiOnly)
- {
- Debug.Assert(_window.OnUIThread());
- for (int i = points.Count - 1; i >= 0; i--)
- {
- if (IsEditableBuffer(points[i].Snapshot.TextBuffer, uiOnly))
- {
- return i;
- }
- }
-
- return -1;
- }
-
- private int IndexOfEditableBuffer(ReadOnlyCollection spans, UIThreadOnly uiOnly)
- {
- Debug.Assert(_window.OnUIThread());
- for (int i = spans.Count - 1; i >= 0; i--)
- {
- if (IsEditableBuffer(spans[i].Snapshot.TextBuffer, uiOnly))
- {
- return i;
- }
- }
-
- return -1;
- }
-
- private bool IsEditableBuffer(ITextBuffer buffer, UIThreadOnly uiOnly)
- {
- return buffer == uiOnly.CurrentLanguageBuffer || buffer == uiOnly.StandardInputBuffer;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/InteractiveWindow/Editor/InteractiveWindow.PendingSubmission.cs b/src/InteractiveWindow/Editor/InteractiveWindow.PendingSubmission.cs
deleted file mode 100644
index 6b232729f0161..0000000000000
--- a/src/InteractiveWindow/Editor/InteractiveWindow.PendingSubmission.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Threading.Tasks;
-
-namespace Microsoft.VisualStudio.InteractiveWindow
-{
- internal partial class InteractiveWindow
- {
- private class PendingSubmission
- {
- public readonly string Input;
-
- ///
- /// Set only on the last submission in each batch (to notify the caller).
- ///
- public readonly TaskCompletionSource