Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
ced1335a
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ced1335a
编写于
9月 02, 2019
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - less null
上级
a4be32a8
变更
14
显示空白变更内容
内联
并排
Showing
14 changed file
with
22 addition
and
24 deletion
+22
-24
src/vs/base/browser/dnd.ts
src/vs/base/browser/dnd.ts
+1
-1
src/vs/base/common/labels.ts
src/vs/base/common/labels.ts
+1
-1
src/vs/workbench/browser/composite.ts
src/vs/workbench/browser/composite.ts
+2
-2
src/vs/workbench/browser/parts/compositePart.ts
src/vs/workbench/browser/parts/compositePart.ts
+1
-2
src/vs/workbench/browser/parts/editor/textDiffEditor.ts
src/vs/workbench/browser/parts/editor/textDiffEditor.ts
+1
-1
src/vs/workbench/browser/parts/editor/textResourceEditor.ts
src/vs/workbench/browser/parts/editor/textResourceEditor.ts
+1
-1
src/vs/workbench/browser/parts/editor/titleControl.ts
src/vs/workbench/browser/parts/editor/titleControl.ts
+1
-1
src/vs/workbench/common/composite.ts
src/vs/workbench/common/composite.ts
+1
-1
src/vs/workbench/common/editor.ts
src/vs/workbench/common/editor.ts
+5
-5
src/vs/workbench/common/editor/dataUriEditorInput.ts
src/vs/workbench/common/editor/dataUriEditorInput.ts
+2
-3
src/vs/workbench/common/editor/untitledEditorInput.ts
src/vs/workbench/common/editor/untitledEditorInput.ts
+2
-2
src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.ts
...rkbench/contrib/files/browser/editors/binaryFileEditor.ts
+1
-1
src/vs/workbench/services/editor/browser/editorService.ts
src/vs/workbench/services/editor/browser/editorService.ts
+2
-2
src/vs/workbench/services/preferences/common/preferencesEditorInput.ts
...nch/services/preferences/common/preferencesEditorInput.ts
+1
-1
未找到文件。
src/vs/base/browser/dnd.ts
浏览文件 @
ced1335a
src/vs/base/common/labels.ts
浏览文件 @
ced1335a
...
...
@@ -283,7 +283,7 @@ interface ISegment {
* @param value string to which templating is applied
* @param values the values of the templates to use
*/
export
function
template
(
template
:
string
,
values
:
{
[
key
:
string
]:
string
|
ISeparator
|
null
}
=
Object
.
create
(
null
)):
string
{
export
function
template
(
template
:
string
,
values
:
{
[
key
:
string
]:
string
|
ISeparator
|
undefined
|
null
}
=
Object
.
create
(
null
)):
string
{
const
segments
:
ISegment
[]
=
[];
let
inVariable
=
false
;
...
...
src/vs/workbench/browser/composite.ts
浏览文件 @
ced1335a
...
...
@@ -84,8 +84,8 @@ export abstract class Composite extends Component implements IComposite {
this
.
visible
=
false
;
}
getTitle
():
string
|
null
{
return
null
;
getTitle
():
string
|
undefined
{
return
undefined
;
}
protected
get
telemetryService
():
ITelemetryService
{
...
...
src/vs/workbench/browser/parts/compositePart.ts
浏览文件 @
ced1335a
...
...
@@ -32,7 +32,6 @@ import { attachProgressBarStyler } from 'vs/platform/theme/common/styler';
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
Dimension
,
append
,
$
,
addClass
,
hide
,
show
,
addClasses
}
from
'
vs/base/browser/dom
'
;
import
{
AnchorAlignment
}
from
'
vs/base/browser/ui/contextview/contextview
'
;
import
{
withNullAsUndefined
}
from
'
vs/base/common/types
'
;
export
interface
ICompositeTitleLabel
{
...
...
@@ -240,7 +239,7 @@ export abstract class CompositePart<T extends Composite> extends Part {
// Update title with composite title if it differs from descriptor
const
descriptor
=
this
.
registry
.
getComposite
(
composite
.
getId
());
if
(
descriptor
&&
descriptor
.
name
!==
composite
.
getTitle
())
{
this
.
updateTitle
(
composite
.
getId
(),
withNullAsUndefined
(
composite
.
getTitle
()
));
this
.
updateTitle
(
composite
.
getId
(),
composite
.
getTitle
(
));
}
// Handle Composite Actions
...
...
src/vs/workbench/browser/parts/editor/textDiffEditor.ts
浏览文件 @
ced1335a
...
...
@@ -61,7 +61,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditor {
return
new
EditorMemento
(
this
.
getId
(),
key
,
Object
.
create
(
null
),
limit
,
editorGroupService
);
// do not persist in storage as diff editors are never persisted
}
getTitle
():
string
|
null
{
getTitle
():
string
|
undefined
{
if
(
this
.
input
)
{
return
this
.
input
.
getName
();
}
...
...
src/vs/workbench/browser/parts/editor/textResourceEditor.ts
浏览文件 @
ced1335a
...
...
@@ -46,7 +46,7 @@ export class AbstractTextResourceEditor extends BaseTextEditor {
super
(
id
,
telemetryService
,
instantiationService
,
storageService
,
configurationService
,
themeService
,
textFileService
,
editorService
,
editorGroupService
,
windowService
);
}
getTitle
():
string
|
null
{
getTitle
():
string
|
undefined
{
if
(
this
.
input
)
{
return
this
.
input
.
getName
();
}
...
...
src/vs/workbench/browser/parts/editor/titleControl.ts
浏览文件 @
ced1335a
...
...
@@ -274,7 +274,7 @@ export abstract class TitleControl extends Themable {
label
=
localize
(
'
draggedEditorGroup
'
,
"
{0} (+{1})
"
,
label
,
this
.
group
.
count
-
1
);
}
applyDragImage
(
e
,
label
,
'
monaco-editor-group-drag-image
'
);
applyDragImage
(
e
,
withUndefinedAsNull
(
label
)
,
'
monaco-editor-group-drag-image
'
);
}
}));
...
...
src/vs/workbench/common/composite.ts
浏览文件 @
ced1335a
...
...
@@ -15,7 +15,7 @@ export interface IComposite {
/**
* Returns the name of this composite to show in the title area.
*/
getTitle
():
string
|
null
;
getTitle
():
string
|
undefined
;
/**
* Returns the primary actions of the composite.
...
...
src/vs/workbench/common/editor.ts
浏览文件 @
ced1335a
...
...
@@ -292,7 +292,7 @@ export interface IEditorInput extends IDisposable {
/**
* Returns the display name of this input.
*/
getName
():
string
|
null
;
getName
():
string
|
undefined
;
/**
* Returns the display description of this input.
...
...
@@ -302,7 +302,7 @@ export interface IEditorInput extends IDisposable {
/**
* Returns the display title of this input.
*/
getTitle
(
verbosity
?:
Verbosity
):
string
|
null
;
getTitle
(
verbosity
?:
Verbosity
):
string
|
undefined
;
/**
* Resolves the input.
...
...
@@ -358,8 +358,8 @@ export abstract class EditorInput extends Disposable implements IEditorInput {
* Returns the name of this input that can be shown to the user. Examples include showing the name of the input
* above the editor area when the input is shown.
*/
getName
():
string
|
null
{
return
null
;
getName
():
string
|
undefined
{
return
undefined
;
}
/**
...
...
@@ -374,7 +374,7 @@ export abstract class EditorInput extends Disposable implements IEditorInput {
* Returns the title of this input that can be shown to the user. Examples include showing the title of
* the input above the editor area as hover over the input label.
*/
getTitle
(
verbosity
?:
Verbosity
):
string
|
null
{
getTitle
(
verbosity
?:
Verbosity
):
string
|
undefined
{
return
this
.
getName
();
}
...
...
src/vs/workbench/common/editor/dataUriEditorInput.ts
浏览文件 @
ced1335a
...
...
@@ -8,7 +8,6 @@ import { URI } from 'vs/base/common/uri';
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
BinaryEditorModel
}
from
'
vs/workbench/common/editor/binaryEditorModel
'
;
import
{
DataUri
}
from
'
vs/base/common/resources
'
;
import
{
withUndefinedAsNull
}
from
'
vs/base/common/types
'
;
/**
* An editor input to present data URIs in a binary editor. Data URIs have the form of:
...
...
@@ -51,8 +50,8 @@ export class DataUriEditorInput extends EditorInput {
return
DataUriEditorInput
.
ID
;
}
getName
():
string
|
null
{
return
withUndefinedAsNull
(
this
.
name
)
;
getName
():
string
|
undefined
{
return
this
.
name
;
}
getDescription
():
string
|
undefined
{
...
...
src/vs/workbench/common/editor/untitledEditorInput.ts
浏览文件 @
ced1335a
...
...
@@ -107,7 +107,7 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport
return
this
.
labelService
.
getUriLabel
(
this
.
resource
);
}
getTitle
(
verbosity
:
Verbosity
):
string
|
null
{
getTitle
(
verbosity
:
Verbosity
):
string
|
undefined
{
if
(
!
this
.
hasAssociatedFilePath
)
{
return
this
.
getName
();
}
...
...
@@ -121,7 +121,7 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport
return
this
.
longTitle
;
}
return
null
;
return
undefined
;
}
isDirty
():
boolean
{
...
...
src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.ts
浏览文件 @
ced1335a
...
...
@@ -57,7 +57,7 @@ export class BinaryFileEditor extends BaseBinaryResourceEditor {
}
}
getTitle
():
string
|
null
{
getTitle
():
string
|
undefined
{
return
this
.
input
?
this
.
input
.
getName
()
:
nls
.
localize
(
'
binaryFileEditor
'
,
"
Binary File Viewer
"
);
}
}
src/vs/workbench/services/editor/browser/editorService.ts
浏览文件 @
ced1335a
...
...
@@ -635,10 +635,10 @@ export class EditorService extends Disposable implements EditorServiceImpl {
return
input
;
}
private
toDiffLabel
(
input
:
EditorInput
):
string
|
null
{
private
toDiffLabel
(
input
:
EditorInput
):
string
|
undefined
{
const
res
=
input
.
getResource
();
if
(
!
res
)
{
return
null
;
return
undefined
;
}
// Do not try to extract any paths from simple untitled editors
...
...
src/vs/workbench/services/preferences/common/preferencesEditorInput.ts
浏览文件 @
ced1335a
...
...
@@ -21,7 +21,7 @@ export class PreferencesEditorInput extends SideBySideEditorInput {
return
PreferencesEditorInput
.
ID
;
}
getTitle
(
verbosity
:
Verbosity
):
string
|
null
{
getTitle
(
verbosity
:
Verbosity
):
string
|
undefined
{
return
this
.
master
.
getTitle
(
verbosity
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录