Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
40f2ce12
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
40f2ce12
编写于
1月 30, 2015
作者:
R
RoslynTeam
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rolling back (changeset 1408003)
上级
02a05a89
变更
25
隐藏空白更改
内联
并排
Showing
25 changed file
with
256 addition
and
237 deletion
+256
-237
src/Interactive/EditorFeatures/Core/CommandHandlers/InteractiveCompletionCommandHandler.cs
...re/CommandHandlers/InteractiveCompletionCommandHandler.cs
+1
-2
src/Interactive/EditorFeatures/Core/CommandHandlers/InteractiveIntelliSenseCommandHandler.cs
.../CommandHandlers/InteractiveIntelliSenseCommandHandler.cs
+1
-2
src/Interactive/EditorFeatures/Core/Implementation/Completion/Presentation/CompletionPresenter.cs
...ementation/Completion/Presentation/CompletionPresenter.cs
+1
-2
src/Interactive/EditorFeatures/Core/Implementation/Interactive/InteractiveCommandContentTypeLanguageService.cs
...teractive/InteractiveCommandContentTypeLanguageService.cs
+1
-2
src/Interactive/EditorFeatures/VisualBasic/BasicInteractiveEditorFeatures.vbproj
...eatures/VisualBasic/BasicInteractiveEditorFeatures.vbproj
+5
-5
src/InteractiveWindow/Editor/Commands/ClearScreenCommand.cs
src/InteractiveWindow/Editor/Commands/ClearScreenCommand.cs
+1
-1
src/InteractiveWindow/Editor/Commands/CommandClassifierProvider.cs
...activeWindow/Editor/Commands/CommandClassifierProvider.cs
+1
-1
src/InteractiveWindow/Editor/Commands/InteractiveWindowCommands.cs
...activeWindow/Editor/Commands/InteractiveWindowCommands.cs
+1
-1
src/InteractiveWindow/Editor/ContentTypeMetadata.cs
src/InteractiveWindow/Editor/ContentTypeMetadata.cs
+0
-17
src/InteractiveWindow/Editor/IContentTypeMetadata.cs
src/InteractiveWindow/Editor/IContentTypeMetadata.cs
+27
-0
src/InteractiveWindow/Editor/IInteractiveWindow.cs
src/InteractiveWindow/Editor/IInteractiveWindow.cs
+121
-4
src/InteractiveWindow/Editor/InteractiveConstants.cs
src/InteractiveWindow/Editor/InteractiveConstants.cs
+13
-0
src/InteractiveWindow/Editor/InteractiveContentTypeNames.cs
src/InteractiveWindow/Editor/InteractiveContentTypeNames.cs
+21
-0
src/InteractiveWindow/Editor/InteractiveWindow.cs
src/InteractiveWindow/Editor/InteractiveWindow.cs
+13
-121
src/InteractiveWindow/Editor/InteractiveWindow.csproj
src/InteractiveWindow/Editor/InteractiveWindow.csproj
+6
-8
src/InteractiveWindow/Editor/Output/InlineAdornmentProvider.cs
...nteractiveWindow/Editor/Output/InlineAdornmentProvider.cs
+1
-1
src/InteractiveWindow/Editor/Output/OutputClassifierProvider.cs
...teractiveWindow/Editor/Output/OutputClassifierProvider.cs
+1
-1
src/InteractiveWindow/Editor/SmartIndent/InteractiveSmartIndenter.cs
...tiveWindow/Editor/SmartIndent/InteractiveSmartIndenter.cs
+4
-4
src/InteractiveWindow/Editor/SmartIndent/InteractiveSmartIndenterProvider.cs
...ow/Editor/SmartIndent/InteractiveSmartIndenterProvider.cs
+3
-3
src/InteractiveWindow/VisualStudio/CommandIds.cs
src/InteractiveWindow/VisualStudio/CommandIds.cs
+1
-1
src/InteractiveWindow/VisualStudio/Guids.cs
src/InteractiveWindow/VisualStudio/Guids.cs
+1
-1
src/InteractiveWindow/VisualStudio/VisualStudioInteractiveWindow.csproj
...eWindow/VisualStudio/VisualStudioInteractiveWindow.csproj
+5
-6
src/InteractiveWindow/VisualStudio/VsInteractiveWindowCommandFilter.cs
...veWindow/VisualStudio/VsInteractiveWindowCommandFilter.cs
+25
-29
src/InteractiveWindow/VisualStudio/VsInteractiveWindowEditorFactoryService.cs
...w/VisualStudio/VsInteractiveWindowEditorFactoryService.cs
+2
-2
src/InteractiveWindow/VisualStudio/source.extension.vsixmanifest
...eractiveWindow/VisualStudio/source.extension.vsixmanifest
+0
-23
未找到文件。
src/Interactive/EditorFeatures/Core/CommandHandlers/InteractiveCompletionCommandHandler.cs
浏览文件 @
40f2ce12
...
...
@@ -3,12 +3,11 @@
using
System.ComponentModel.Composition
;
using
Microsoft.VisualStudio.Utilities
;
using
Roslyn.Editor.InteractiveWindow
;
using
Roslyn.Editor.InteractiveWindow.Commands
;
namespace
Microsoft.CodeAnalysis.Editor.CommandHandlers
{
[
Export
]
[
ExportCommandHandler
(
PredefinedCommandHandlerNames
.
Completion
,
PredefinedInteractiveCommandsContentTypes
.
InteractiveCommandContentTypeNam
e
)]
[
ExportCommandHandler
(
PredefinedCommandHandlerNames
.
Completion
,
InteractiveContentTypeNames
.
InteractiveCommandContentTyp
e
)]
[
Order
(
After
=
PredefinedCommandHandlerNames
.
SignatureHelp
)]
internal
sealed
class
InteractiveCompletionCommandHandler
:
AbstractCompletionCommandHandler
{
...
...
src/Interactive/EditorFeatures/Core/CommandHandlers/InteractiveIntelliSenseCommandHandler.cs
浏览文件 @
40f2ce12
...
...
@@ -2,11 +2,10 @@
using
System.ComponentModel.Composition
;
using
Roslyn.Editor.InteractiveWindow
;
using
Roslyn.Editor.InteractiveWindow.Commands
;
namespace
Microsoft.CodeAnalysis.Editor.CommandHandlers
{
[
ExportCommandHandler
(
PredefinedCommandHandlerNames
.
IntelliSense
,
PredefinedInteractiveCommandsContentTypes
.
InteractiveCommandContentTypeNam
e
)]
[
ExportCommandHandler
(
PredefinedCommandHandlerNames
.
IntelliSense
,
InteractiveContentTypeNames
.
InteractiveCommandContentTyp
e
)]
internal
sealed
class
InteractiveIntelliSenseCommandHandler
:
AbstractIntelliSenseCommandHandler
{
[
ImportingConstructor
]
...
...
src/Interactive/EditorFeatures/Core/Implementation/Completion/Presentation/CompletionPresenter.cs
浏览文件 @
40f2ce12
...
...
@@ -8,13 +8,12 @@
using
Microsoft.VisualStudio.Text.Editor
;
using
Microsoft.VisualStudio.Utilities
;
using
Roslyn.Editor.InteractiveWindow
;
using
Roslyn.Editor.InteractiveWindow.Commands
;
namespace
Microsoft.CodeAnalysis.Editor.Implementation.Completion.Presentation
{
[
Export
(
typeof
(
IIntelliSensePresenter
<
ICompletionPresenterSession
,
ICompletionSession
>))]
[
Export
(
typeof
(
ICompletionSourceProvider
))]
[
ContentType
(
PredefinedInteractiveCommandsContentTypes
.
InteractiveCommandContentTypeNam
e
)]
[
ContentType
(
InteractiveContentTypeNames
.
InteractiveCommandContentTyp
e
)]
internal
partial
class
CompletionPresenter
:
ForegroundThreadAffinitizedObject
,
IIntelliSensePresenter
<
ICompletionPresenterSession
,
ICompletionSession
>,
ICompletionSourceProvider
{
private
readonly
ICompletionBroker
_completionBroker
;
...
...
src/Interactive/EditorFeatures/Core/Implementation/Interactive/InteractiveCommandContentTypeLanguageService.cs
浏览文件 @
40f2ce12
...
...
@@ -6,7 +6,6 @@
using
Microsoft.CodeAnalysis.Interactive
;
using
Microsoft.VisualStudio.Utilities
;
using
Roslyn.Editor.InteractiveWindow
;
using
Roslyn.Editor.InteractiveWindow.Commands
;
namespace
Microsoft.CodeAnalysis.Editor.Implementation.Interactive
{
...
...
@@ -23,7 +22,7 @@ public InteractiveCommandContentTypeLanguageService(IContentTypeRegistryService
public
IContentType
GetDefaultContentType
()
{
return
_contentTypeRegistry
.
GetContentType
(
PredefinedInteractiveCommandsContentTypes
.
InteractiveCommandContentTypeNam
e
);
return
_contentTypeRegistry
.
GetContentType
(
InteractiveContentTypeNames
.
InteractiveCommandContentTyp
e
);
}
}
}
src/Interactive/EditorFeatures/VisualBasic/BasicInteractiveEditorFeatures.vbproj
浏览文件 @
40f2ce12
...
...
@@ -30,10 +30,6 @@
<Project>
{2523D0E6-DF32-4A3E-8AE0-A19BFFAE2EF6}
</Project>
<Name>
BasicCodeAnalysis
</Name>
</ProjectReference>
<ProjectReference
Include=
"..\..\..\InteractiveWindow\Editor\InteractiveWindow.csproj"
>
<Project>
{01e9bd68-0339-4a13-b42f-a3ca84d164f3}
</Project>
<Name>
InteractiveWindow
</Name>
</ProjectReference>
<ProjectReference
Include=
"..\..\..\Scripting\VisualBasic\BasicScripting.vbproj"
>
<Project>
{3E7DEA65-317B-4F43-A25D-62F18D96CFD7}
</Project>
<Name>
BasicScripting
</Name>
...
...
@@ -66,6 +62,10 @@
<Project>
{8E2A252E-A140-45A6-A81A-2652996EA589}
</Project>
<Name>
InteractiveFeatures
</Name>
</ProjectReference>
<ProjectReference
Include=
"..\..\..\InteractiveWindow\Editor\InteractiveWindow.csproj"
>
<Project>
{01E9BD68-0339-4A13-B42F-A3CA84D164F3}
</Project>
<Name>
InteractiveWindow
</Name>
</ProjectReference>
<ProjectReference
Include=
"..\..\..\EditorFeatures\Text\TextEditorFeatures.csproj"
>
<Project>
{18F5FBB8-7570-4412-8CC7-0A86FF13B7BA}
</Project>
<Name>
TextEditorFeatures
</Name>
...
...
@@ -156,4 +156,4 @@
<Import
Project=
"..\..\..\..\build\VSL.Imports.Closed.targets"
/>
<Import
Project=
"$(SolutionDir)\.nuget\NuGet.targets"
Condition=
"Exists('$(SolutionDir)\.nuget\NuGet.targets')"
/>
</ImportGroup>
</Project>
\ No newline at end of file
</Project>
src/InteractiveWindow/Editor/Commands/ClearScreenCommand.cs
浏览文件 @
40f2ce12
...
...
@@ -11,7 +11,7 @@ internal sealed class ClearScreenCommand : InteractiveWindowCommand
{
public
override
Task
<
ExecutionResult
>
Execute
(
IInteractiveWindow
window
,
string
arguments
)
{
window
.
Operations
.
ClearView
();
window
.
ClearView
();
return
ExecutionResult
.
Succeeded
;
}
...
...
src/InteractiveWindow/Editor/Commands/CommandClassifierProvider.cs
浏览文件 @
40f2ce12
...
...
@@ -8,7 +8,7 @@
namespace
Roslyn.Editor.InteractiveWindow.Commands
{
[
Export
(
typeof
(
IClassifierProvider
))]
[
ContentType
(
PredefinedInteractiveCommandsContentTypes
.
InteractiveCommandContentTypeNam
e
)]
[
ContentType
(
InteractiveContentTypeNames
.
InteractiveCommandContentTyp
e
)]
[
TextViewRole
(
PredefinedTextViewRoles
.
Document
)]
internal
sealed
class
CommandClassifierProvider
:
IClassifierProvider
{
...
...
src/InteractiveWindow/Editor/Commands/InteractiveWindowCommands.cs
浏览文件 @
40f2ce12
...
...
@@ -60,7 +60,7 @@ internal Commands(IInteractiveWindow window, string prefix, IEnumerable<IInterac
this
.
classificationRegistry
=
classificationRegistry
;
if
(
contentTypeRegistry
!=
null
)
{
this
.
commandContentType
=
contentTypeRegistry
.
GetContentType
(
PredefinedInteractiveCommandsContentTypes
.
InteractiveCommandContentTypeNam
e
);
this
.
commandContentType
=
contentTypeRegistry
.
GetContentType
(
InteractiveContentTypeNames
.
InteractiveCommandContentTyp
e
);
}
if
(
window
!=
null
)
...
...
src/InteractiveWindow/Editor/ContentTypeMetadata.cs
已删除
100644 → 0
浏览文件 @
02a05a89
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
Microsoft.VisualStudio.Utilities
;
namespace
Roslyn.Editor.InteractiveWindow
{
internal
class
ContentTypeMetadata
{
public
IEnumerable
<
string
>
ContentTypes
{
get
;
private
set
;
}
public
ContentTypeMetadata
(
IDictionary
<
string
,
object
>
data
)
{
this
.
ContentTypes
=
(
IEnumerable
<
string
>)
data
[
"ContentTypes"
];
}
}
}
src/InteractiveWindow/Editor/IContentTypeMetadata.cs
0 → 100644
浏览文件 @
40f2ce12
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
Microsoft.VisualStudio.Utilities
;
namespace
Roslyn.Editor.InteractiveWindow
{
public
interface
IContentTypeMetadata
{
IEnumerable
<
string
>
ContentTypes
{
get
;
}
}
public
static
class
ContentTypeMetadataHelpers
{
public
static
T
OfContentType
<
T
>(
this
IEnumerable
<
Lazy
<
T
,
IContentTypeMetadata
>>
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
();
}
}
}
src/InteractiveWindow/Editor/IInteractiveWindow.cs
浏览文件 @
40f2ce12
...
...
@@ -55,6 +55,21 @@ IInteractiveEvaluator Evaluator
/// <returns>Returns a started task that finishes as soon as the initialization completes.</returns>
Task
<
ExecutionResult
>
InitializeAsync
();
/// <summary>
/// Clears the REPL window screen.
/// </summary>
void
ClearView
();
/// <summary>
/// Clears the input history.
/// </summary>
void
ClearHistory
();
/// <summary>
/// Clears the current input.
/// </summary>
void
Cancel
();
/// <summary>
/// Closes the underlying text view.
/// </summary>
...
...
@@ -88,6 +103,11 @@ IInteractiveEvaluator Evaluator
/// </remarks>
void
Submit
(
IEnumerable
<
string
>
inputs
);
/// <summary>
/// Resets the execution context clearing all variables.
/// </summary>
Task
<
ExecutionResult
>
ResetAsync
(
bool
initialize
=
true
);
/// <summary>
/// Aborts the current command which is executing.
///
...
...
@@ -185,6 +205,40 @@ bool IsResetting
get
;
}
/// <summary>
/// Attempts to insert a line break. Returns true if a line break is inserted, false if not.
///
/// Will not submit the input.
/// </summary>
bool
BreakLine
();
/// <summary>
/// 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.
/// </summary>
bool
Return
();
/// <summary>
/// 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.
/// </summary>
void
ExecuteInput
();
/// <summary>
/// If the current input is a standard input this will submit the input.
///
/// Returns true if the input was submitted, false otherwise.
/// </summary>
bool
TrySubmitStandardInput
();
/// <summary>
/// Appends a input into the editor buffer and history as if it has been executed.
///
...
...
@@ -192,11 +246,74 @@ bool IsResetting
/// </summary>
void
AddLogicalInput
(
string
input
);
IInteractiveWindowOperations
Operations
{
get
;
}
/// <summary>
/// Advances to the next item in history.
/// </summary>
void
HistoryNext
(
string
search
=
null
);
/// <summary>
/// Advanced to the previous item in history.
/// </summary>
void
HistoryPrevious
(
string
search
=
null
);
/// <summary>
/// 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.
/// </summary>
void
HistorySearchNext
();
/// <summary>
/// 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.
/// </summary>
void
HistorySearchPrevious
();
/// <summary>
/// Deletes the current selection or the character before the caret.
/// </summary>
/// <returns></returns>
bool
Backspace
();
/// <summary>
/// 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.
/// </summary>
/// <param name="extendSelection">True to extend the selection from the current caret position.</param>
void
Home
(
bool
extendSelection
);
/// <summary>
/// Moves to the end of the line.
/// </summary>
/// <param name="extendSelection">True to extend the selection from the current caret position.</param>
void
End
(
bool
extendSelection
);
/// <summary>
/// Selects all of the text in the buffer
/// </summary>
void
SelectAll
();
/// <summary>
/// Pastes the current clipboard contents into the interactive window.
/// </summary>
/// <returns></returns>
bool
Paste
();
/// <summary>
/// Cuts the current selection to the clipboard.
/// </summary>
void
Cut
();
/// <summary>
/// Deletes the current selection.
///
/// Returns true if the selection was deleted
/// </summary>
bool
Delete
();
}
}
src/InteractiveWindow/Editor/
PredefinedInteractiveContentType
s.cs
→
src/InteractiveWindow/Editor/
InteractiveConstant
s.cs
浏览文件 @
40f2ce12
...
...
@@ -3,9 +3,11 @@
namespace
Roslyn.Editor.InteractiveWindow
{
public
static
class
PredefinedInteractiveContentType
s
public
static
class
InteractiveConstant
s
{
public
const
string
InteractiveContentTypeName
=
"Interactive Content"
;
public
const
string
InteractiveOutputContentTypeName
=
"Interactive Output"
;
/// <summary>
/// The additional role found in any REPL editor window.
/// </summary>
public
const
string
InteractiveTextViewRole
=
"REPL"
;
}
}
\ No newline at end of file
src/InteractiveWindow/Editor/InteractiveContentType
Definition
s.cs
→
src/InteractiveWindow/Editor/InteractiveContentType
Name
s.cs
浏览文件 @
40f2ce12
...
...
@@ -3,12 +3,19 @@
namespace
Roslyn.Editor.InteractiveWindow
{
internal
static
class
InteractiveContentTypeDefinition
s
public
static
class
InteractiveContentTypeName
s
{
[
Export
,
Name
(
PredefinedInteractiveContentTypes
.
InteractiveContentTypeName
),
BaseDefinition
(
"text"
),
BaseDefinition
(
"projection"
)]
public
const
string
InteractiveContentType
=
"Roslyn Interactive"
;
public
const
string
InteractiveOutputContentType
=
"Roslyn Interactive Output"
;
public
const
string
InteractiveCommandContentType
=
"Roslyn Interactive Command"
;
[
Export
,
Name
(
InteractiveContentType
),
BaseDefinition
(
"text"
),
BaseDefinition
(
"projection"
)]
internal
static
readonly
ContentTypeDefinition
InteractiveContentTypeDefinition
;
[
Export
,
Name
(
PredefinedInteractiveContentTypes
.
InteractiveOutputContentTypeNam
e
),
BaseDefinition
(
"text"
)]
[
Export
,
Name
(
InteractiveOutputContentTyp
e
),
BaseDefinition
(
"text"
)]
internal
static
readonly
ContentTypeDefinition
InteractiveOutputContentTypeDefinition
;
[
Export
,
Name
(
InteractiveCommandContentType
),
BaseDefinition
(
"code"
)]
internal
static
readonly
ContentTypeDefinition
InteractiveCommandContentTypeDefinition
;
}
}
\ No newline at end of file
src/InteractiveWindow/Editor/InteractiveWindow.cs
浏览文件 @
40f2ce12
...
...
@@ -48,7 +48,6 @@ internal class InteractiveWindow : IInteractiveWindow
private
readonly
IWpfTextView
textView
;
private
readonly
IEditorOperations
editorOperations
;
private
readonly
InteractiveOperations
interactiveOperations
;
private
readonly
History
history
;
private
readonly
TaskScheduler
uiScheduler
;
...
...
@@ -143,7 +142,6 @@ internal class InteractiveWindow : IInteractiveWindow
this
.
host
=
host
;
this
.
Properties
=
new
PropertyCollection
();
this
.
history
=
new
History
();
this
.
interactiveOperations
=
new
InteractiveOperations
(
this
);
this
.
projectionBufferFactory
=
projectionBufferFactory
;
this
.
bufferFactory
=
bufferFactory
;
...
...
@@ -154,8 +152,8 @@ internal class InteractiveWindow : IInteractiveWindow
this
.
smartIndenterService
=
smartIndenterService
;
var
textContentType
=
contentTypeRegistry
.
GetContentType
(
"text"
);
var
replContentType
=
contentTypeRegistry
.
GetContentType
(
PredefinedInteractiveContentTypes
.
InteractiveContentTypeNam
e
);
var
replOutputContentType
=
contentTypeRegistry
.
GetContentType
(
PredefinedInteractiveContentTypes
.
InteractiveOutputContentTypeNam
e
);
var
replContentType
=
contentTypeRegistry
.
GetContentType
(
InteractiveContentTypeNames
.
InteractiveContentTyp
e
);
var
replOutputContentType
=
contentTypeRegistry
.
GetContentType
(
InteractiveContentTypeNames
.
InteractiveOutputContentTyp
e
);
this
.
outputBuffer
=
bufferFactory
.
CreateTextBuffer
(
replOutputContentType
);
this
.
stdInputBuffer
=
bufferFactory
.
CreateTextBuffer
();
...
...
@@ -240,7 +238,7 @@ private ITextViewRoleSet CreateRoleSet()
PredefinedTextViewRoles
.
Editable
,
PredefinedTextViewRoles
.
Interactive
,
PredefinedTextViewRoles
.
Zoomable
,
PredefinedInteractiveTextViewRole
s
.
InteractiveTextViewRole
);
InteractiveConstant
s
.
InteractiveTextViewRole
);
}
public
void
Close
()
...
...
@@ -1190,14 +1188,6 @@ public bool IsResetting
}
}
public
IInteractiveWindowOperations
Operations
{
get
{
return
interactiveOperations
;
}
}
public
bool
Delete
()
{
historySearch
=
null
;
...
...
@@ -1644,7 +1634,7 @@ private string GetActiveCode()
/// <summary>
/// Sets the active code to the specified text w/o executing it.
/// </summary>
private
void
SetActiveCode
(
string
text
)
private
void
SetActiveCode
(
string
text
,
object
editTag
=
null
)
{
// TODO (tomat): this should be handled by the language intellisense provider, not here:
var
completionSession
=
this
.
SessionStack
.
TopSession
;
...
...
@@ -1653,7 +1643,7 @@ private void SetActiveCode(string text)
completionSession
.
Dismiss
();
}
using
(
var
edit
=
currentLanguageBuffer
.
CreateEdit
(
EditOptions
.
None
,
reiteratedVersionNumber
:
null
,
editTag
:
null
))
using
(
var
edit
=
currentLanguageBuffer
.
CreateEdit
(
EditOptions
.
None
,
reiteratedVersionNumber
:
null
,
editTag
:
editTag
))
{
edit
.
Replace
(
new
Span
(
0
,
currentLanguageBuffer
.
CurrentSnapshot
.
Length
),
text
);
edit
.
Apply
();
...
...
@@ -1666,7 +1656,14 @@ private void SetActiveCode(string text)
/// <param name="entry"></param>
private
void
SetActiveCodeToHistory
(
History
.
Entry
entry
)
{
SetActiveCode
(
entry
.
Text
);
object
editTag
=
null
;
if
(
entry
.
OriginalSpan
.
HasValue
)
{
editTag
=
new
RestoreHistoryEditTag
(
entry
.
OriginalSpan
.
Value
);
}
SetActiveCode
(
entry
.
Text
,
editTag
);
}
/// <summary>
...
...
@@ -3019,110 +3016,5 @@ internal List<ReplSpan> ProjectionSpans
}
#
endregion
class
InteractiveOperations
:
IInteractiveWindowOperations
{
private
readonly
InteractiveWindow
window
;
public
InteractiveOperations
(
InteractiveWindow
window
)
{
this
.
window
=
window
;
}
public
bool
Backspace
()
{
return
window
.
Backspace
();
}
public
bool
BreakLine
()
{
return
window
.
BreakLine
();
}
public
void
Cancel
()
{
window
.
Cancel
();
}
public
void
ClearHistory
()
{
window
.
ClearHistory
();
}
public
void
ClearView
()
{
window
.
ClearView
();
}
public
void
Cut
()
{
window
.
Cut
();
}
public
bool
Delete
()
{
return
window
.
Delete
();
}
public
void
End
(
bool
extendSelection
)
{
window
.
End
(
extendSelection
);
}
public
void
ExecuteInput
()
{
window
.
ExecuteInput
();
}
public
void
HistoryNext
(
string
search
=
null
)
{
window
.
HistoryNext
(
search
);
}
public
void
HistoryPrevious
(
string
search
=
null
)
{
window
.
HistoryPrevious
(
search
);
}
public
void
HistorySearchNext
()
{
window
.
HistorySearchNext
();
}
public
void
HistorySearchPrevious
()
{
window
.
HistorySearchPrevious
();
}
public
void
Home
(
bool
extendSelection
)
{
window
.
Home
(
extendSelection
);
}
public
bool
Paste
()
{
return
window
.
Paste
();
}
public
Task
<
ExecutionResult
>
ResetAsync
(
bool
initialize
=
true
)
{
return
window
.
ResetAsync
(
initialize
);
}
public
bool
Return
()
{
return
window
.
Return
();
}
public
void
SelectAll
()
{
window
.
SelectAll
();
}
public
bool
TrySubmitStandardInput
()
{
return
window
.
TrySubmitStandardInput
();
}
}
}
}
src/InteractiveWindow/Editor/InteractiveWindow.csproj
浏览文件 @
40f2ce12
...
...
@@ -10,7 +10,7 @@
<ProjectGuid>
{01E9BD68-0339-4A13-B42F-A3CA84D164F3}
</ProjectGuid>
<OutputType>
Library
</OutputType>
<RootNamespace>
Roslyn.Editor.InteractiveWindow
</RootNamespace>
<AssemblyName>
Microsoft.VisualStudio
.InteractiveWindow
</AssemblyName>
<AssemblyName>
Roslyn
.InteractiveWindow
</AssemblyName>
<!-- TODO -->
<SolutionDir
Condition=
"'$(SolutionDir)' == '' OR '$(SolutionDir)' == '*Undefined*'"
>
..\..\..\
</SolutionDir>
<RestorePackages>
true
</RestorePackages>
...
...
@@ -97,7 +97,6 @@
<Compile
Include=
"Commands\ClearScreenCommand.cs"
/>
<Compile
Include=
"Commands\CommandClassifier.cs"
/>
<Compile
Include=
"Commands\CommandClassifierProvider.cs"
/>
<Compile
Include=
"Commands\PredefinedInteractiveCommandsContentTypes.cs"
/>
<Compile
Include=
"Commands\InteractiveWindowCommandExtensions.cs"
/>
<Compile
Include=
"Commands\InteractiveWindowCommands.cs"
/>
<Compile
Include=
"Commands\HelpCommand.cs"
/>
...
...
@@ -107,7 +106,7 @@
<Compile
Include=
"CustomTrackingSpan.cs"
/>
<Compile
Include=
"ExecutionResult.cs"
/>
<Compile
Include=
"History.cs"
/>
<Compile
Include=
"ContentTypeMetadata.cs"
/>
<Compile
Include=
"
I
ContentTypeMetadata.cs"
/>
<Compile
Include=
"Commands\IInteractiveWindowCommands.cs"
/>
<Compile
Include=
"Commands\IInteractiveWindowCommandsFactory.cs"
/>
<Compile
Include=
"IInteractiveEvaluator.cs"
/>
...
...
@@ -115,9 +114,8 @@
<Compile
Include=
"IInteractiveWindowEditorFactoryService.cs"
/>
<Compile
Include=
"IInteractiveWindowFactoryService.cs"
/>
<Compile
Include=
"Commands\InteractiveCommandsFactory.cs"
/>
<Compile
Include=
"IInteractiveWindowOperations.cs"
/>
<Compile
Include=
"PredefinedInteractiveContentTypes.cs"
/>
<Compile
Include=
"InteractiveContentTypeDefinitions.cs"
/>
<Compile
Include=
"InteractiveConstants.cs"
/>
<Compile
Include=
"InteractiveContentTypeNames.cs"
/>
<Compile
Include=
"InteractiveWindow.cs"
/>
<Compile
Include=
"InteractiveWindowExtensions.cs"
/>
<Compile
Include=
"InteractiveWindowOptions.cs"
/>
...
...
@@ -134,10 +132,10 @@
<Compile
Include=
"Output\ResizingAdorner.cs"
/>
<Compile
Include=
"Output\SortedSpans.cs"
/>
<Compile
Include=
"Output\ZoomableInlineAdornment.cs"
/>
<Compile
Include=
"PredefinedInteractiveTextViewRoles.cs"
/>
<Compile
Include=
"PromptLineMapping.cs"
/>
<Compile
Include=
"ReplInput.cs"
/>
<Compile
Include=
"ReplSpanKind.cs"
/>
<Compile
Include=
"RestoreHistoryEditTag.cs"
/>
<Compile
Include=
"SmartIndent\InteractiveSmartIndenter.cs"
/>
<Compile
Include=
"SmartIndent\InteractiveSmartIndenterProvider.cs"
/>
<Compile
Include=
"SmartUpDownOption.cs"
/>
...
...
@@ -159,4 +157,4 @@
<Import
Project=
"..\..\..\build\VSL.Imports.Closed.targets"
/>
<Import
Project=
"$(SolutionDir)\.nuget\NuGet.targets"
Condition=
"Exists('$(SolutionDir)\.nuget\NuGet.targets')"
/>
</ImportGroup>
</Project>
\ No newline at end of file
</Project>
src/InteractiveWindow/Editor/Output/InlineAdornmentProvider.cs
浏览文件 @
40f2ce12
...
...
@@ -12,7 +12,7 @@ namespace Roslyn.Editor.InteractiveWindow
{
[
Export
(
typeof
(
IViewTaggerProvider
))]
[
TagType
(
typeof
(
IntraTextAdornmentTag
))]
[
ContentType
(
PredefinedInteractiveContentTypes
.
InteractiveContentTypeNam
e
)]
[
ContentType
(
InteractiveContentTypeNames
.
InteractiveContentTyp
e
)]
internal
sealed
class
InlineAdornmentProvider
:
IViewTaggerProvider
{
public
ITagger
<
T
>
CreateTagger
<
T
>(
ITextView
textView
,
ITextBuffer
buffer
)
where
T
:
ITag
...
...
src/InteractiveWindow/Editor/Output/OutputClassifierProvider.cs
浏览文件 @
40f2ce12
...
...
@@ -15,7 +15,7 @@ namespace Roslyn.Editor.InteractiveWindow
/// Classifies error text in interactive window output.
/// </summary>
[
Export
(
typeof
(
IClassifierProvider
))]
[
ContentType
(
PredefinedInteractiveContentTypes
.
InteractiveOutputContentTypeNam
e
)]
[
ContentType
(
InteractiveContentTypeNames
.
InteractiveOutputContentTyp
e
)]
[
TextViewRole
(
PredefinedTextViewRoles
.
Document
)]
internal
sealed
class
OutputClassifierProvider
:
IClassifierProvider
{
...
...
src/InteractiveWindow/Editor/SmartIndent/InteractiveSmartIndenter.cs
浏览文件 @
40f2ce12
...
...
@@ -14,7 +14,7 @@ internal sealed class InteractiveSmartIndenter : ISmartIndent
private
readonly
ISmartIndent
indenter
;
internal
static
InteractiveSmartIndenter
Create
(
IEnumerable
<
Lazy
<
ISmartIndentProvider
,
ContentTypeMetadata
>>
smartIndenterProviders
,
IEnumerable
<
Lazy
<
ISmartIndentProvider
,
I
ContentTypeMetadata
>>
smartIndenterProviders
,
IContentType
contentType
,
ITextView
view
)
{
...
...
@@ -55,8 +55,8 @@ public void Dispose()
// If there are two providers that support the same content type, or
// two providers that support different content types that do not have
// inheritance relationship, we simply return the first we encounter.
private
static
Tuple
<
IContentType
,
Lazy
<
ISmartIndentProvider
,
ContentTypeMetadata
>>
GetProvider
(
IEnumerable
<
Lazy
<
ISmartIndentProvider
,
ContentTypeMetadata
>>
smartIndenterProviders
,
private
static
Tuple
<
IContentType
,
Lazy
<
ISmartIndentProvider
,
I
ContentTypeMetadata
>>
GetProvider
(
IEnumerable
<
Lazy
<
ISmartIndentProvider
,
I
ContentTypeMetadata
>>
smartIndenterProviders
,
IContentType
contentType
)
{
// If there are two providers that both support the
...
...
@@ -67,7 +67,7 @@ public void Dispose()
return
Tuple
.
Create
(
contentType
,
provider
);
}
Tuple
<
IContentType
,
Lazy
<
ISmartIndentProvider
,
ContentTypeMetadata
>>
bestPair
=
null
;
Tuple
<
IContentType
,
Lazy
<
ISmartIndentProvider
,
I
ContentTypeMetadata
>>
bestPair
=
null
;
foreach
(
var
baseType
in
contentType
.
BaseTypes
)
{
var
pair
=
GetProvider
(
smartIndenterProviders
,
baseType
);
...
...
src/InteractiveWindow/Editor/SmartIndent/InteractiveSmartIndenterProvider.cs
浏览文件 @
40f2ce12
...
...
@@ -7,16 +7,16 @@
namespace
Roslyn.Editor.InteractiveWindow
{
[
Export
(
typeof
(
ISmartIndentProvider
))]
[
ContentType
(
PredefinedInteractiveContentTypes
.
InteractiveContentTypeNam
e
)]
[
ContentType
(
InteractiveContentTypeNames
.
InteractiveContentTyp
e
)]
internal
class
InteractiveSmartIndenterProvider
:
ISmartIndentProvider
{
private
readonly
ITextEditorFactoryService
editorFactory
;
private
readonly
IEnumerable
<
Lazy
<
ISmartIndentProvider
,
ContentTypeMetadata
>>
indentProviders
;
private
readonly
IEnumerable
<
Lazy
<
ISmartIndentProvider
,
I
ContentTypeMetadata
>>
indentProviders
;
[
ImportingConstructor
]
public
InteractiveSmartIndenterProvider
(
ITextEditorFactoryService
editorFactory
,
[
ImportMany
]
IEnumerable
<
Lazy
<
ISmartIndentProvider
,
ContentTypeMetadata
>>
indentProviders
)
[
ImportMany
]
IEnumerable
<
Lazy
<
ISmartIndentProvider
,
I
ContentTypeMetadata
>>
indentProviders
)
{
if
(
editorFactory
==
null
)
{
...
...
src/InteractiveWindow/VisualStudio/CommandIds.cs
浏览文件 @
40f2ce12
...
...
@@ -2,7 +2,7 @@
namespace
Roslyn.VisualStudio.InteractiveWindow
{
internal
enum
CommandIds
:
uint
public
enum
CommandIds
:
uint
{
// TODO (crwilcox): should all of these be in the editoroperations?
SmartExecute
=
0x103
,
...
...
src/InteractiveWindow/VisualStudio/Guids.cs
浏览文件 @
40f2ce12
...
...
@@ -4,7 +4,7 @@
namespace
Roslyn.VisualStudio.InteractiveWindow
{
internal
static
class
Guids
public
static
class
Guids
{
// vsct guids:
// This GUID identifies the VsInteractiveWindow type. We need to pass it to VS in a string form.
...
...
src/InteractiveWindow/VisualStudio/VisualStudioInteractiveWindow.csproj
浏览文件 @
40f2ce12
...
...
@@ -14,8 +14,11 @@
<ProjectGuid>
{20BB6FAC-44D2-4D76-ABFE-0C1E163A1A4F}
</ProjectGuid>
<OutputType>
Library
</OutputType>
<UseCodebase>
true
</UseCodebase>
<!-- This project includes the VS SDK targets so we can produce a .pkgdef, but should not produce a .vsix or anything related to it -->
<CreateVsixContainer>
false
</CreateVsixContainer>
<DeployExtension>
false
</DeployExtension>
<RootNamespace>
Microsoft.VisualStudio
</RootNamespace>
<AssemblyName>
Microsoft.VisualStudio.Vs
InteractiveWindow
</AssemblyName>
<AssemblyName>
Roslyn.VisualStudio.
InteractiveWindow
</AssemblyName>
<StartAction>
Program
</StartAction>
<StartProgram>
$(DevEnvDir)devenv.exe
</StartProgram>
<StartArguments>
/rootsuffix RoslynDev /log
</StartArguments>
...
...
@@ -73,7 +76,6 @@
</ItemGroup>
<ItemGroup>
<Compile
Include=
"CommandIds.cs"
/>
<Compile
Include=
"ContentTypeMetadata.cs"
/>
<Compile
Include=
"Guids.cs"
/>
<Compile
Include=
"IVsInteractiveWindowEditorsFactoryService.cs"
/>
<Compile
Include=
"VsInteractiveWindowEditorFactoryService.cs"
/>
...
...
@@ -92,9 +94,6 @@
<DesignTime>
True
</DesignTime>
<DependentUpon>
VSInteractiveWindowResources.resx
</DependentUpon>
</Compile>
<None
Include=
"source.extension.vsixmanifest"
>
<SubType>
Designer
</SubType>
</None>
</ItemGroup>
<ItemGroup>
<EmbeddedResource
Include=
"VSInteractiveWindowResources.resx"
>
...
...
@@ -123,4 +122,4 @@
<Import
Project=
"..\..\..\build\VSL.Imports.Closed.targets"
/>
<Import
Project=
"$(SolutionDir)\.nuget\NuGet.targets"
Condition=
"Exists('$(SolutionDir)\.nuget\NuGet.targets')"
/>
</ImportGroup>
</Project>
\ No newline at end of file
</Project>
src/InteractiveWindow/VisualStudio/VsInteractiveWindowCommandFilter.cs
浏览文件 @
40f2ce12
...
...
@@ -158,7 +158,7 @@ private int PreEditorCommandFilterExec(ref Guid pguidCmdGroup, uint nCmdID, uint
switch
((
CommandIds
)
nCmdID
)
{
case
CommandIds
.
BreakLine
:
if
(
_window
.
Operations
.
BreakLine
())
if
(
_window
.
BreakLine
())
{
return
VSConstants
.
S_OK
;
}
...
...
@@ -170,7 +170,7 @@ private int PreEditorCommandFilterExec(ref Guid pguidCmdGroup, uint nCmdID, uint
switch
((
VSConstants
.
VSStd2KCmdID
)
nCmdID
)
{
case
VSConstants
.
VSStd2KCmdID
.
RETURN
:
if
(
_window
.
Operations
.
Return
())
if
(
_window
.
Return
())
{
return
VSConstants
.
S_OK
;
}
...
...
@@ -182,7 +182,7 @@ private int PreEditorCommandFilterExec(ref Guid pguidCmdGroup, uint nCmdID, uint
// break;
case
VSConstants
.
VSStd2KCmdID
.
BACKSPACE
:
if
(
_window
.
Operations
.
Backspace
())
if
(
_window
.
Backspace
())
{
return
VSConstants
.
S_OK
;
}
...
...
@@ -193,7 +193,7 @@ private int PreEditorCommandFilterExec(ref Guid pguidCmdGroup, uint nCmdID, uint
if
(
_window
.
CurrentLanguageBuffer
!=
null
&&
!
_window
.
IsRunning
&&
CaretAtEnd
&&
UseSmartUpDown
)
{
_window
.
Operations
.
HistoryPrevious
();
_window
.
HistoryPrevious
();
return
VSConstants
.
S_OK
;
}
break
;
...
...
@@ -201,7 +201,7 @@ private int PreEditorCommandFilterExec(ref Guid pguidCmdGroup, uint nCmdID, uint
case
VSConstants
.
VSStd2KCmdID
.
DOWN
:
if
(
_window
.
CurrentLanguageBuffer
!=
null
&&
!
_window
.
IsRunning
&&
CaretAtEnd
&&
UseSmartUpDown
)
{
_window
.
Operations
.
HistoryNext
();
_window
.
HistoryNext
();
return
VSConstants
.
S_OK
;
}
break
;
...
...
@@ -209,24 +209,24 @@ private int PreEditorCommandFilterExec(ref Guid pguidCmdGroup, uint nCmdID, uint
case
VSConstants
.
VSStd2KCmdID
.
CANCEL
:
if
(
_window
.
TextView
.
Selection
.
IsEmpty
)
{
_window
.
Operations
.
Cancel
();
_window
.
Cancel
();
}
break
;
case
VSConstants
.
VSStd2KCmdID
.
BOL
:
_window
.
Operations
.
Home
(
false
);
_window
.
Home
(
false
);
return
VSConstants
.
S_OK
;
case
VSConstants
.
VSStd2KCmdID
.
BOL_EXT
:
_window
.
Operations
.
Home
(
true
);
_window
.
Home
(
true
);
return
VSConstants
.
S_OK
;
case
VSConstants
.
VSStd2KCmdID
.
EOL
:
_window
.
Operations
.
End
(
false
);
_window
.
End
(
false
);
return
VSConstants
.
S_OK
;
case
VSConstants
.
VSStd2KCmdID
.
EOL_EXT
:
_window
.
Operations
.
End
(
true
);
_window
.
End
(
true
);
return
VSConstants
.
S_OK
;
}
}
...
...
@@ -236,22 +236,22 @@ private int PreEditorCommandFilterExec(ref Guid pguidCmdGroup, uint nCmdID, uint
switch
((
VSConstants
.
VSStd97CmdID
)
nCmdID
)
{
case
VSConstants
.
VSStd97CmdID
.
Paste
:
_window
.
Operations
.
Paste
();
_window
.
Paste
();
return
VSConstants
.
S_OK
;
case
VSConstants
.
VSStd97CmdID
.
Cut
:
_window
.
Operations
.
Cut
();
_window
.
Cut
();
return
VSConstants
.
S_OK
;
case
VSConstants
.
VSStd97CmdID
.
Delete
:
if
(
_window
.
Operations
.
Delete
())
if
(
_window
.
Delete
())
{
return
VSConstants
.
S_OK
;
}
break
;
case
VSConstants
.
VSStd97CmdID
.
SelectAll
:
_window
.
Operations
.
SelectAll
();
_window
.
SelectAll
();
return
VSConstants
.
S_OK
;
}
}
...
...
@@ -301,15 +301,11 @@ private int PreLanguageCommandFilterQueryStatus(ref Guid pguidCmdGroup, uint cCm
}
}
if
(
nextTarget
!=
null
)
{
var
result
=
nextTarget
.
QueryStatus
(
ref
pguidCmdGroup
,
cCmds
,
prgCmds
,
pCmdText
);
var
result
=
nextTarget
.
QueryStatus
(
ref
pguidCmdGroup
,
cCmds
,
prgCmds
,
pCmdText
);
#if DUMP_COMMANDS
//DumpCmd("QS", result, ref pguidCmdGroup, prgCmds[0].cmdID, prgCmds[0].cmdf);
#endif
return
result
;
}
return
VSConstants
.
E_FAIL
;
return
result
;
}
private
int
PreLanguageCommandFilterExec
(
ref
Guid
pguidCmdGroup
,
uint
nCmdID
,
uint
nCmdexecopt
,
IntPtr
pvaIn
,
IntPtr
pvaOut
)
...
...
@@ -321,16 +317,16 @@ private int PreLanguageCommandFilterExec(ref Guid pguidCmdGroup, uint nCmdID, ui
switch
((
CommandIds
)
nCmdID
)
{
case
CommandIds
.
AbortExecution
:
_window
.
AbortCommand
();
return
VSConstants
.
S_OK
;
case
CommandIds
.
Reset
:
_window
.
Operations
.
ResetAsync
();
return
VSConstants
.
S_OK
;
case
CommandIds
.
SmartExecute
:
_window
.
Operations
.
ExecuteInput
();
return
VSConstants
.
S_OK
;
case
CommandIds
.
HistoryNext
:
_window
.
Operations
.
HistoryNext
();
return
VSConstants
.
S_OK
;
case
CommandIds
.
HistoryPrevious
:
_window
.
Operations
.
HistoryPrevious
();
return
VSConstants
.
S_OK
;
case
CommandIds
.
ClearScreen
:
_window
.
Operations
.
ClearView
();
return
VSConstants
.
S_OK
;
case
CommandIds
.
Reset
:
_window
.
ResetAsync
();
return
VSConstants
.
S_OK
;
case
CommandIds
.
SmartExecute
:
_window
.
ExecuteInput
();
return
VSConstants
.
S_OK
;
case
CommandIds
.
HistoryNext
:
_window
.
HistoryNext
();
return
VSConstants
.
S_OK
;
case
CommandIds
.
HistoryPrevious
:
_window
.
HistoryPrevious
();
return
VSConstants
.
S_OK
;
case
CommandIds
.
ClearScreen
:
_window
.
ClearView
();
return
VSConstants
.
S_OK
;
case
CommandIds
.
SearchHistoryNext
:
_window
.
Operations
.
HistorySearchNext
();
_window
.
HistorySearchNext
();
return
VSConstants
.
S_OK
;
case
CommandIds
.
SearchHistoryPrevious
:
_window
.
Operations
.
HistorySearchPrevious
();
_window
.
HistorySearchPrevious
();
return
VSConstants
.
S_OK
;
}
}
...
...
@@ -339,11 +335,11 @@ private int PreLanguageCommandFilterExec(ref Guid pguidCmdGroup, uint nCmdID, ui
switch
((
VSConstants
.
VSStd2KCmdID
)
nCmdID
)
{
case
VSConstants
.
VSStd2KCmdID
.
TYPECHAR
:
_window
.
Operations
.
Delete
();
_window
.
Delete
();
break
;
case
VSConstants
.
VSStd2KCmdID
.
RETURN
:
if
(
_window
.
Operations
.
TrySubmitStandardInput
())
if
(
_window
.
TrySubmitStandardInput
())
{
return
VSConstants
.
S_OK
;
}
...
...
src/InteractiveWindow/VisualStudio/VsInteractiveWindowEditorFactoryService.cs
浏览文件 @
40f2ce12
...
...
@@ -26,10 +26,10 @@ internal sealed class VsInteractiveWindowEditorFactoryService : IInteractiveWind
private
readonly
IOleServiceProvider
_provider
;
private
readonly
IVsEditorAdaptersFactoryService
_adapterFactory
;
private
readonly
IContentTypeRegistryService
_contentTypeRegistry
;
private
readonly
IEnumerable
<
Lazy
<
IVsInteractiveWindowOleCommandTargetProvider
,
ContentTypeMetadata
>>
_oleCommandTargetProviders
;
private
readonly
IEnumerable
<
Lazy
<
IVsInteractiveWindowOleCommandTargetProvider
,
I
ContentTypeMetadata
>>
_oleCommandTargetProviders
;
[
ImportingConstructor
]
public
VsInteractiveWindowEditorFactoryService
(
IVsEditorAdaptersFactoryService
adaptersFactory
,
IContentTypeRegistryService
contentTypeRegistry
,
[
ImportMany
]
IEnumerable
<
Lazy
<
IVsInteractiveWindowOleCommandTargetProvider
,
ContentTypeMetadata
>>
oleCommandTargetProviders
)
public
VsInteractiveWindowEditorFactoryService
(
IVsEditorAdaptersFactoryService
adaptersFactory
,
IContentTypeRegistryService
contentTypeRegistry
,
[
ImportMany
]
IEnumerable
<
Lazy
<
IVsInteractiveWindowOleCommandTargetProvider
,
I
ContentTypeMetadata
>>
oleCommandTargetProviders
)
{
_adapterFactory
=
adaptersFactory
;
_provider
=
(
IOleServiceProvider
)
InteractiveWindowPackage
.
GetGlobalService
(
typeof
(
IOleServiceProvider
));
...
...
src/InteractiveWindow/VisualStudio/source.extension.vsixmanifest
已删除
100644 → 0
浏览文件 @
02a05a89
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest
Version=
"2.0.0"
xmlns=
"http://schemas.microsoft.com/developer/vsx-schema/2011"
xmlns:d=
"http://schemas.microsoft.com/developer/vsx-schema-design/2011"
>
<Metadata>
<Identity
Id=
"1F42C6D0-F876-4AF0-8185-1BEB0A325BB2"
Version=
"|%CurrentProject%;GetBuildVersion|"
Language=
"en-US"
Publisher=
"Microsoft"
/>
<DisplayName>
VisualStudio Interactive Components
</DisplayName>
<Description>
Interactive components for Visual Studio.
</Description>
</Metadata>
<Installation>
<InstallationTarget
Id=
"Microsoft.VisualStudio.Pro"
Version=
"[14.0,]"
/>
<InstallationTarget
Version=
"[14.0,]"
Id=
"Microsoft.VisualStudio.VSWinDesktopExpress"
/>
<InstallationTarget
Version=
"[14.0,]"
Id=
"Microsoft.VisualStudio.VWDExpress"
/>
<InstallationTarget
Version=
"[14.0,]"
Id=
"Microsoft.VisualStudio.VSWinExpress"
/>
</Installation>
<Dependencies>
<Dependency
Id=
"Microsoft.Framework.NDP"
DisplayName=
"Microsoft .NET Framework"
d:Source=
"Manual"
Version=
"[4.5,)"
/>
</Dependencies>
<Assets>
<Asset
Type=
"Microsoft.VisualStudio.MefComponent"
Path=
"Microsoft.VisualStudio.InteractiveWindow.dll"
/>
<Asset
Type=
"Microsoft.VisualStudio.MefComponent"
Path=
"Microsoft.VisualStudio.VsInteractiveWindow.dll"
/>
<Asset
Type=
"Microsoft.VisualStudio.VsPackage"
Path=
"Microsoft.VisualStudio.VsInteractiveWindow.pkgdef"
/>
<Asset
Type=
"Microsoft.VisualStudio.VsPackage"
Path=
"BindingPath.pkgdef"
/>
</Assets>
</PackageManifest>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录