Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
a6b4928b
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,发现更多精彩内容 >>
提交
a6b4928b
编写于
6月 19, 2016
作者:
C
CyrusNajmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make all parameters non-optional.
上级
3610aa53
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
45 addition
and
13 deletion
+45
-13
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller.Session.cs
...lementation/IntelliSense/Completion/Controller.Session.cs
+3
-1
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller.Session_FilterModel.cs
...IntelliSense/Completion/Controller.Session_FilterModel.cs
+7
-4
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller.cs
...Core/Implementation/IntelliSense/Completion/Controller.cs
+14
-3
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller_Backspace.cs
...mentation/IntelliSense/Completion/Controller_Backspace.cs
+5
-1
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller_OnTextViewBufferPostChanged.cs
...ense/Completion/Controller_OnTextViewBufferPostChanged.cs
+5
-1
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller_TabKey.cs
...plementation/IntelliSense/Completion/Controller_TabKey.cs
+2
-1
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller_TypeChar.cs
...ementation/IntelliSense/Completion/Controller_TypeChar.cs
+9
-2
未找到文件。
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller.Session.cs
浏览文件 @
a6b4928b
...
...
@@ -101,7 +101,9 @@ private void OnPresenterSessionItemSelected(object sender, PresentationItemEvent
// Update the filter state for the model. Note: if we end up filtering everything
// out we do *not* want to dismiss the completion list.
this
.
FilterModel
(
CompletionFilterReason
.
ItemFiltersChanged
,
dismissIfEmptyAllowed
:
false
,
filterState
:
e
.
FilterState
);
recheckCaretPosition
:
false
,
dismissIfEmptyAllowed
:
false
,
filterState
:
e
.
FilterState
);
}
}
}
...
...
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller.Session_FilterModel.cs
浏览文件 @
a6b4928b
...
...
@@ -19,9 +19,9 @@ internal partial class Session
{
public
void
FilterModel
(
CompletionFilterReason
filterReason
,
bool
recheckCaretPosition
=
false
,
bool
dismissIfEmptyAllowed
=
true
,
ImmutableDictionary
<
CompletionItemFilter
,
bool
>
filterState
=
null
)
bool
recheckCaretPosition
,
bool
dismissIfEmptyAllowed
,
ImmutableDictionary
<
CompletionItemFilter
,
bool
>
filterState
)
{
AssertIsForeground
();
...
...
@@ -46,7 +46,10 @@ internal partial class Session
});
}
public
void
IdentifyBestMatchAndFilterToAllItems
(
CompletionFilterReason
filterReason
,
bool
recheckCaretPosition
=
false
,
bool
dismissIfEmptyAllowed
=
true
)
public
void
IdentifyBestMatchAndFilterToAllItems
(
CompletionFilterReason
filterReason
,
bool
recheckCaretPosition
,
bool
dismissIfEmptyAllowed
)
{
AssertIsForeground
();
...
...
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller.cs
浏览文件 @
a6b4928b
...
...
@@ -143,7 +143,11 @@ private bool StartNewModelComputation(CompletionService completionService, bool
CompletionTrigger
.
Default
,
filterItems
,
dismissIfEmptyAllowed
);
}
private
bool
StartNewModelComputation
(
CompletionService
completionService
,
CompletionTrigger
trigger
,
bool
filterItems
,
bool
dismissIfEmptyAllowed
=
true
)
private
bool
StartNewModelComputation
(
CompletionService
completionService
,
CompletionTrigger
trigger
,
bool
filterItems
,
bool
dismissIfEmptyAllowed
=
true
)
{
AssertIsForeground
();
Contract
.
ThrowIfTrue
(
sessionOpt
!=
null
);
...
...
@@ -183,11 +187,18 @@ private bool StartNewModelComputation(CompletionService completionService, Compl
if
(
filterItems
)
{
sessionOpt
.
FilterModel
(
filterReason
,
dismissIfEmptyAllowed
:
dismissIfEmptyAllowed
);
sessionOpt
.
FilterModel
(
filterReason
,
recheckCaretPosition
:
false
,
dismissIfEmptyAllowed
:
dismissIfEmptyAllowed
,
filterState
:
null
);
}
else
{
sessionOpt
.
IdentifyBestMatchAndFilterToAllItems
(
filterReason
,
dismissIfEmptyAllowed
:
dismissIfEmptyAllowed
);
sessionOpt
.
IdentifyBestMatchAndFilterToAllItems
(
filterReason
,
recheckCaretPosition
:
false
,
dismissIfEmptyAllowed
:
dismissIfEmptyAllowed
);
}
return
true
;
...
...
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller_Backspace.cs
浏览文件 @
a6b4928b
...
...
@@ -100,7 +100,11 @@ private void ExecuteBackspaceOrDelete(ITextView textView, Action nextHandler, bo
else
if
(
model
!=
null
&&
model
.
Trigger
.
Kind
!=
CompletionTriggerKind
.
Deletion
)
{
// Filter the model if it wasn't invoked on backspace.
sessionOpt
.
FilterModel
(
CompletionFilterReason
.
BackspaceOrDelete
);
sessionOpt
.
FilterModel
(
CompletionFilterReason
.
BackspaceOrDelete
,
recheckCaretPosition
:
false
,
dismissIfEmptyAllowed
:
true
,
filterState
:
null
);
}
}
}
...
...
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller_OnTextViewBufferPostChanged.cs
浏览文件 @
a6b4928b
...
...
@@ -30,7 +30,11 @@ internal override void OnTextViewBufferPostChanged(object sender, EventArgs e)
else
{
// Filter the model, recheck the caret position if we haven't computed the initial model yet
sessionOpt
.
FilterModel
(
CompletionFilterReason
.
TypeChar
,
recheckCaretPosition
:
model
==
null
);
sessionOpt
.
FilterModel
(
CompletionFilterReason
.
TypeChar
,
recheckCaretPosition
:
model
==
null
,
dismissIfEmptyAllowed
:
true
,
filterState
:
null
);
}
}
}
...
...
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller_TabKey.cs
浏览文件 @
a6b4928b
...
...
@@ -118,7 +118,8 @@ private bool TryInvokeSnippetCompletion(TabKeyCommandArgs args, CompletionServic
// we delete the last <question> that was typed.
var
textChange
=
new
TextChange
(
TextSpan
.
FromBounds
(
caretPoint
-
1
,
caretPoint
),
string
.
Empty
);
workspace
.
ApplyTextChanges
(
documentId
,
textChange
,
CancellationToken
.
None
);
this
.
StartNewModelComputation
(
completionService
,
new
CompletionTrigger
(
CompletionTriggerKind
.
Snippets
),
filterItems
:
false
);
this
.
StartNewModelComputation
(
completionService
,
new
CompletionTrigger
(
CompletionTriggerKind
.
Snippets
),
filterItems
:
false
);
return
true
;
}
...
...
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller_TypeChar.cs
浏览文件 @
a6b4928b
...
...
@@ -175,7 +175,11 @@ void ICommandHandler<TypeCharCommandArgs>.ExecuteCommand(TypeCharCommandArgs arg
}
// Now filter whatever result we have.
sessionOpt
.
FilterModel
(
CompletionFilterReason
.
TypeChar
);
sessionOpt
.
FilterModel
(
CompletionFilterReason
.
TypeChar
,
recheckCaretPosition
:
false
,
dismissIfEmptyAllowed
:
true
,
filterState
:
null
);
}
else
{
...
...
@@ -201,7 +205,10 @@ void ICommandHandler<TypeCharCommandArgs>.ExecuteCommand(TypeCharCommandArgs arg
// Known to be a filter character for the currently selected item. So just
// filter the session.
sessionOpt
.
FilterModel
(
CompletionFilterReason
.
TypeChar
);
sessionOpt
.
FilterModel
(
CompletionFilterReason
.
TypeChar
,
recheckCaretPosition
:
false
,
dismissIfEmptyAllowed
:
true
,
filterState
:
null
);
return
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录