Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
d1f9e098
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,发现更多精彩内容 >>
未验证
提交
d1f9e098
编写于
12月 14, 2017
作者:
S
Sandeep Somavarapu
提交者:
GitHub
12月 14, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into sandy081/fileOutput
上级
67c70614
7a49e546
变更
40
隐藏空白更改
内联
并排
Showing
40 changed file
with
315 addition
and
279 deletion
+315
-279
extensions/typescript/src/utils/languageConfigurations.ts
extensions/typescript/src/utils/languageConfigurations.ts
+3
-3
src/vs/editor/browser/controller/textAreaHandler.ts
src/vs/editor/browser/controller/textAreaHandler.ts
+45
-17
src/vs/editor/contrib/hover/modesContentHover.ts
src/vs/editor/contrib/hover/modesContentHover.ts
+1
-1
src/vs/editor/contrib/quickFix/quickFixCommands.ts
src/vs/editor/contrib/quickFix/quickFixCommands.ts
+1
-1
src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts
...nch/api/electron-browser/mainThreadDocumentsAndEditors.ts
+2
-2
src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts
...vs/workbench/api/electron-browser/mainThreadFileSystem.ts
+3
-1
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+37
-38
src/vs/workbench/api/node/extHostDocumentsAndEditors.ts
src/vs/workbench/api/node/extHostDocumentsAndEditors.ts
+8
-5
src/vs/workbench/api/node/extHostFileSystem.ts
src/vs/workbench/api/node/extHostFileSystem.ts
+19
-19
src/vs/workbench/api/node/extHostLanguageFeatures.ts
src/vs/workbench/api/node/extHostLanguageFeatures.ts
+41
-41
src/vs/workbench/api/node/extHostWorkspace.ts
src/vs/workbench/api/node/extHostWorkspace.ts
+12
-3
src/vs/workbench/browser/actions/workspaceActions.ts
src/vs/workbench/browser/actions/workspaceActions.ts
+9
-9
src/vs/workbench/browser/parts/editor/editorStatus.ts
src/vs/workbench/browser/parts/editor/editorStatus.ts
+2
-2
src/vs/workbench/browser/parts/panel/panelActions.ts
src/vs/workbench/browser/parts/panel/panelActions.ts
+2
-2
src/vs/workbench/electron-browser/actions.ts
src/vs/workbench/electron-browser/actions.ts
+9
-9
src/vs/workbench/node/extensionHostMain.ts
src/vs/workbench/node/extensionHostMain.ts
+3
-2
src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts
.../workbench/parts/cli/electron-browser/cli.contribution.ts
+2
-2
src/vs/workbench/parts/debug/browser/debugActions.ts
src/vs/workbench/parts/debug/browser/debugActions.ts
+35
-35
src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts
.../workbench/parts/debug/browser/debugEditorModelManager.ts
+1
-1
src/vs/workbench/parts/debug/browser/debugViewlet.ts
src/vs/workbench/parts/debug/browser/debugViewlet.ts
+4
-4
src/vs/workbench/parts/debug/electron-browser/breakpointsView.ts
...workbench/parts/debug/electron-browser/breakpointsView.ts
+4
-4
src/vs/workbench/parts/debug/electron-browser/electronDebugActions.ts
...ench/parts/debug/electron-browser/electronDebugActions.ts
+4
-4
src/vs/workbench/parts/extensions/browser/extensionsActions.ts
...s/workbench/parts/extensions/browser/extensionsActions.ts
+29
-29
src/vs/workbench/parts/extensions/common/extensionsInput.ts
src/vs/workbench/parts/extensions/common/extensionsInput.ts
+1
-1
src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts
...parts/extensions/electron-browser/extensionTipsService.ts
+14
-20
src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts
...ch/parts/extensions/electron-browser/extensionsActions.ts
+2
-2
src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts
...ts/extensions/electron-browser/runtimeExtensionsEditor.ts
+5
-5
src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts
...nch/parts/files/electron-browser/views/openEditorsView.ts
+3
-3
src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts
...arts/preferences/browser/keybindingsEditorContribution.ts
+1
-1
src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts
.../workbench/parts/scm/electron-browser/scm.contribution.ts
+1
-1
src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts
...ench/parts/themes/electron-browser/themes.contribution.ts
+3
-3
src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts
...kbench/parts/update/electron-browser/releaseNotesInput.ts
+1
-1
src/vs/workbench/parts/update/electron-browser/update.ts
src/vs/workbench/parts/update/electron-browser/update.ts
+1
-1
src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts
...kbench/parts/welcome/page/electron-browser/welcomePage.ts
+1
-1
src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.ts
.../walkThrough/electron-browser/editor/editorWalkThrough.ts
+1
-1
src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts
...ench/test/electron-browser/api/extHostApiCommands.test.ts
+1
-1
src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts
...ectron-browser/api/extHostDocumentSaveParticipant.test.ts
+1
-1
src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts
...t/electron-browser/api/extHostDocumentsAndEditors.test.ts
+1
-1
src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts
...test/electron-browser/api/extHostLanguageFeatures.test.ts
+1
-1
src/vs/workbench/test/electron-browser/api/extHostTextEditors.test.ts
...ench/test/electron-browser/api/extHostTextEditors.test.ts
+1
-1
未找到文件。
extensions/typescript/src/utils/languageConfigurations.ts
浏览文件 @
d1f9e098
...
...
@@ -30,16 +30,16 @@ export const jsTsLanguageConfiguration = {
action
:
{
indentAction
:
IndentAction
.
None
,
appendText
:
'
*
'
}
},
{
// e.g. * ...|
beforeText
:
/^
(\t
|
(\ \ ))
*
\ \*(\
([^\*]
|
\*(?!\/))
*
)?
$/
,
beforeText
:
/^
(\t
|
[
])
*
[
]\*([
]
([^\*]
|
\*(?!\/))
*
)?
$/
,
action
:
{
indentAction
:
IndentAction
.
None
,
appendText
:
'
*
'
}
},
{
// e.g. */|
beforeText
:
/^
(\t
|
(\ \ ))
*
\
\*\/\s
*$/
,
beforeText
:
/^
(\t
|
[
])
*
[
]
\*\/\s
*$/
,
action
:
{
indentAction
:
IndentAction
.
None
,
removeText
:
1
}
},
{
// e.g. *-----*/|
beforeText
:
/^
(\t
|
(\ \ ))
*
\
\*[^/]
*
\*\/\s
*$/
,
beforeText
:
/^
(\t
|
[
])
*
[
]
\*[^/]
*
\*\/\s
*$/
,
action
:
{
indentAction
:
IndentAction
.
None
,
removeText
:
1
}
}
]
...
...
src/vs/editor/browser/controller/textAreaHandler.ts
浏览文件 @
d1f9e098
...
...
@@ -51,6 +51,39 @@ class VisibleTextAreaData {
const
canUseZeroSizeTextarea
=
(
browser
.
isEdgeOrIE
||
browser
.
isFirefox
);
interface
LocalClipboardMetadata
{
lastCopiedValue
:
string
;
isFromEmptySelection
:
boolean
;
}
/**
* Every time we write to the clipboard, we record a bit of extra metadata here.
* Every time we read from the cipboard, if the text matches our last written text,
* we can fetch the previous metadata.
*/
class
LocalClipboardMetadataManager
{
public
static
INSTANCE
=
new
LocalClipboardMetadataManager
();
private
_lastState
:
LocalClipboardMetadata
;
constructor
()
{
this
.
_lastState
=
null
;
}
public
set
(
state
:
LocalClipboardMetadata
):
void
{
this
.
_lastState
=
state
;
}
public
get
(
pastedText
:
string
):
LocalClipboardMetadata
{
if
(
this
.
_lastState
&&
this
.
_lastState
.
lastCopiedValue
===
pastedText
)
{
// match!
return
this
.
_lastState
;
}
this
.
_lastState
=
null
;
return
null
;
}
}
export
class
TextAreaHandler
extends
ViewPart
{
private
readonly
_viewController
:
ViewController
;
...
...
@@ -70,8 +103,6 @@ export class TextAreaHandler extends ViewPart {
*/
private
_visibleTextArea
:
VisibleTextAreaData
;
private
_selections
:
Selection
[];
private
_lastCopiedValue
:
string
;
private
_lastCopiedValueIsFromEmptySelection
:
boolean
;
public
readonly
textArea
:
FastDomNode
<
HTMLTextAreaElement
>
;
public
readonly
textAreaCover
:
FastDomNode
<
HTMLElement
>
;
...
...
@@ -97,8 +128,6 @@ export class TextAreaHandler extends ViewPart {
this
.
_visibleTextArea
=
null
;
this
.
_selections
=
[
new
Selection
(
1
,
1
,
1
,
1
)];
this
.
_lastCopiedValue
=
null
;
this
.
_lastCopiedValueIsFromEmptySelection
=
false
;
// Text Area (The focus will always be in the textarea when the cursor is blinking)
this
.
textArea
=
createFastDomNode
(
document
.
createElement
(
'
textarea
'
));
...
...
@@ -134,18 +163,15 @@ export class TextAreaHandler extends ViewPart {
getPlainTextToCopy
:
():
string
=>
{
const
whatToCopy
=
this
.
_context
.
model
.
getPlainTextToCopy
(
this
.
_selections
,
this
.
_emptySelectionClipboard
);
if
(
this
.
_emptySelectionClipboard
)
{
if
(
browser
.
isFirefox
)
{
// When writing "LINE\r\n" to the clipboard and then pasting,
// Firefox pastes "LINE\n", so let's work around this quirk
this
.
_lastCopiedValue
=
whatToCopy
.
replace
(
/
\r\n
/g
,
'
\n
'
);
}
else
{
this
.
_lastCopiedValue
=
whatToCopy
;
}
// When writing "LINE\r\n" to the clipboard and then pasting,
// Firefox pastes "LINE\n", so let's work around this quirk
const
lastCopiedValue
=
(
browser
.
isFirefox
?
whatToCopy
.
replace
(
/
\r\n
/g
,
'
\n
'
)
:
whatToCopy
);
const
metadata
:
LocalClipboardMetadata
=
{
lastCopiedValue
:
lastCopiedValue
,
isFromEmptySelection
:
(
this
.
_emptySelectionClipboard
&&
this
.
_selections
.
length
===
1
&&
this
.
_selections
[
0
].
isEmpty
())
};
let
selections
=
this
.
_selections
;
this
.
_lastCopiedValueIsFromEmptySelection
=
(
selections
.
length
===
1
&&
selections
[
0
].
isEmpty
());
}
LocalClipboardMetadataManager
.
INSTANCE
.
set
(
metadata
);
return
whatToCopy
;
},
...
...
@@ -199,9 +225,11 @@ export class TextAreaHandler extends ViewPart {
}));
this
.
_register
(
this
.
_textAreaInput
.
onPaste
((
e
:
IPasteData
)
=>
{
const
metadata
=
LocalClipboardMetadataManager
.
INSTANCE
.
get
(
e
.
text
);
let
pasteOnNewLine
=
false
;
if
(
this
.
_emptySelectionClipboard
)
{
pasteOnNewLine
=
(
e
.
text
===
this
.
_lastCopiedValue
&&
this
.
_lastCopiedValueI
sFromEmptySelection
);
if
(
metadata
)
{
pasteOnNewLine
=
(
this
.
_emptySelectionClipboard
&&
metadata
.
i
sFromEmptySelection
);
}
this
.
_viewController
.
paste
(
'
keyboard
'
,
e
.
text
,
pasteOnNewLine
);
}));
...
...
src/vs/editor/contrib/hover/modesContentHover.ts
浏览文件 @
d1f9e098
...
...
@@ -154,7 +154,7 @@ class ModesContentComputer implements IHoverComputer<HoverPart[]> {
export
class
ModesContentHoverWidget
extends
ContentHoverWidget
{
static
ID
=
'
editor.contrib.modesContentHoverWidget
'
;
static
readonly
ID
=
'
editor.contrib.modesContentHoverWidget
'
;
private
_messages
:
HoverPart
[];
private
_lastRange
:
Range
;
...
...
src/vs/editor/contrib/quickFix/quickFixCommands.ts
浏览文件 @
d1f9e098
...
...
@@ -125,7 +125,7 @@ export class QuickFixController implements IEditorContribution {
export
class
QuickFixAction
extends
EditorAction
{
static
Id
=
'
editor.action.quickFix
'
;
static
readonly
Id
=
'
editor.action.quickFix
'
;
constructor
()
{
super
({
...
...
src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts
浏览文件 @
d1f9e098
...
...
@@ -398,7 +398,7 @@ export class MainThreadDocumentsAndEditors {
private
_toModelAddData
(
model
:
IModel
):
IModelAddedData
{
return
{
ur
l
:
model
.
uri
,
ur
i
:
model
.
uri
,
versionId
:
model
.
getVersionId
(),
lines
:
model
.
getLinesContent
(),
EOL
:
model
.
getEOL
(),
...
...
@@ -410,7 +410,7 @@ export class MainThreadDocumentsAndEditors {
private
_toTextEditorAddData
(
textEditor
:
MainThreadTextEditor
):
ITextEditorAddData
{
return
{
id
:
textEditor
.
getId
(),
document
:
textEditor
.
getModel
().
uri
,
document
Uri
:
textEditor
.
getModel
().
uri
,
options
:
textEditor
.
getConfiguration
(),
selections
:
textEditor
.
getSelections
(),
editorPosition
:
this
.
_findEditorPosition
(
textEditor
)
...
...
src/vs/workbench/api/electron-browser/mainThreadFileSystem.ts
浏览文件 @
d1f9e098
...
...
@@ -123,7 +123,9 @@ class RemoteFileSystemProvider implements IFileSystemProvider, ISearchResultProv
return
this
.
_proxy
.
$mkdir
(
this
.
_handle
,
resource
);
}
readdir
(
resource
:
URI
):
TPromise
<
[
URI
,
IStat
][],
any
>
{
return
this
.
_proxy
.
$readdir
(
this
.
_handle
,
resource
);
return
this
.
_proxy
.
$readdir
(
this
.
_handle
,
resource
).
then
(
data
=>
{
return
data
.
map
(
tuple
=>
<
[
URI
,
IStat
]
>
[
URI
.
revive
(
tuple
[
0
]),
tuple
[
1
]]);
});
}
rmdir
(
resource
:
URI
):
TPromise
<
void
,
any
>
{
return
this
.
_proxy
.
$rmdir
(
this
.
_handle
,
resource
);
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
d1f9e098
...
...
@@ -48,7 +48,6 @@ import { ITreeItem } from 'vs/workbench/common/views';
import
{
ThemeColor
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
SerializedError
}
from
'
vs/base/common/errors
'
;
import
{
IWorkspaceFolderData
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IStat
,
IFileChange
}
from
'
vs/platform/files/common/files
'
;
import
{
ConfigurationScope
}
from
'
vs/platform/configuration/common/configurationRegistry
'
;
import
{
ParsedArgs
}
from
'
vs/platform/environment/common/environment
'
;
...
...
@@ -68,7 +67,7 @@ export interface IEnvironment {
export
interface
IWorkspaceData
{
id
:
string
;
name
:
string
;
folders
:
IWorkspaceFolderData
[];
folders
:
{
uri
:
UriComponents
,
name
:
string
,
index
:
number
}
[];
}
export
interface
IInitData
{
...
...
@@ -437,7 +436,7 @@ export interface ExtHostDocumentContentProvidersShape {
}
export
interface
IModelAddedData
{
ur
l
:
URI
;
ur
i
:
UriComponents
;
versionId
:
number
;
lines
:
string
[];
EOL
:
string
;
...
...
@@ -457,7 +456,7 @@ export interface ExtHostDocumentSaveParticipantShape {
export
interface
ITextEditorAddData
{
id
:
string
;
document
:
URI
;
document
Uri
:
UriComponents
;
options
:
IResolvedTextEditorConfiguration
;
selections
:
ISelection
[];
editorPosition
:
EditorPosition
;
...
...
@@ -493,15 +492,15 @@ export interface ExtHostWorkspaceShape {
}
export
interface
ExtHostFileSystemShape
{
$utimes
(
handle
:
number
,
resource
:
U
RI
,
mtime
:
number
,
atime
:
number
):
TPromise
<
IStat
>
;
$stat
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
IStat
>
;
$read
(
handle
:
number
,
offset
:
number
,
count
:
number
,
resource
:
U
RI
):
TPromise
<
number
>
;
$write
(
handle
:
number
,
resource
:
U
RI
,
content
:
number
[]):
TPromise
<
void
>
;
$unlink
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
void
>
;
$move
(
handle
:
number
,
resource
:
U
RI
,
target
:
URI
):
TPromise
<
IStat
>
;
$mkdir
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
IStat
>
;
$readdir
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
[
URI
,
IStat
][]
>
;
$rmdir
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
void
>
;
$utimes
(
handle
:
number
,
resource
:
U
riComponents
,
mtime
:
number
,
atime
:
number
):
TPromise
<
IStat
>
;
$stat
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
IStat
>
;
$read
(
handle
:
number
,
offset
:
number
,
count
:
number
,
resource
:
U
riComponents
):
TPromise
<
number
>
;
$write
(
handle
:
number
,
resource
:
U
riComponents
,
content
:
number
[]):
TPromise
<
void
>
;
$unlink
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
void
>
;
$move
(
handle
:
number
,
resource
:
U
riComponents
,
target
:
UriComponents
):
TPromise
<
IStat
>
;
$mkdir
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
IStat
>
;
$readdir
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
[
UriComponents
,
IStat
][]
>
;
$rmdir
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
void
>
;
$fileFiles
(
handle
:
number
,
session
:
number
,
query
:
string
):
TPromise
<
void
>
;
}
...
...
@@ -568,31 +567,31 @@ export type IWorkspaceSymbol = IdObject & modes.SymbolInformation;
export
interface
IWorkspaceSymbols
extends
IdObject
{
symbols
:
IWorkspaceSymbol
[];
}
export
interface
ExtHostLanguageFeaturesShape
{
$provideDocumentSymbols
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
modes
.
SymbolInformation
[]
>
;
$provideCodeLenses
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
modes
.
ICodeLensSymbol
[]
>
;
$resolveCodeLens
(
handle
:
number
,
resource
:
U
RI
,
symbol
:
modes
.
ICodeLensSymbol
):
TPromise
<
modes
.
ICodeLensSymbol
>
;
$provideDefinition
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
):
TPromise
<
modes
.
Definition
>
;
$provideImplementation
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
):
TPromise
<
modes
.
Definition
>
;
$provideTypeDefinition
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
):
TPromise
<
modes
.
Definition
>
;
$provideHover
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
):
TPromise
<
modes
.
Hover
>
;
$provideDocumentHighlights
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
):
TPromise
<
modes
.
DocumentHighlight
[]
>
;
$provideReferences
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
,
context
:
modes
.
ReferenceContext
):
TPromise
<
modes
.
Location
[]
>
;
$provideCodeActions
(
handle
:
number
,
resource
:
U
RI
,
range
:
IRange
):
TPromise
<
modes
.
CodeAction
[]
>
;
$provideDocumentFormattingEdits
(
handle
:
number
,
resource
:
U
RI
,
options
:
modes
.
FormattingOptions
):
TPromise
<
editorCommon
.
ISingleEditOperation
[]
>
;
$provideDocumentRangeFormattingEdits
(
handle
:
number
,
resource
:
U
RI
,
range
:
IRange
,
options
:
modes
.
FormattingOptions
):
TPromise
<
editorCommon
.
ISingleEditOperation
[]
>
;
$provideOnTypeFormattingEdits
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
,
ch
:
string
,
options
:
modes
.
FormattingOptions
):
TPromise
<
editorCommon
.
ISingleEditOperation
[]
>
;
$provideDocumentSymbols
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
modes
.
SymbolInformation
[]
>
;
$provideCodeLenses
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
modes
.
ICodeLensSymbol
[]
>
;
$resolveCodeLens
(
handle
:
number
,
resource
:
U
riComponents
,
symbol
:
modes
.
ICodeLensSymbol
):
TPromise
<
modes
.
ICodeLensSymbol
>
;
$provideDefinition
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
):
TPromise
<
modes
.
Definition
>
;
$provideImplementation
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
):
TPromise
<
modes
.
Definition
>
;
$provideTypeDefinition
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
):
TPromise
<
modes
.
Definition
>
;
$provideHover
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
):
TPromise
<
modes
.
Hover
>
;
$provideDocumentHighlights
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
):
TPromise
<
modes
.
DocumentHighlight
[]
>
;
$provideReferences
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
,
context
:
modes
.
ReferenceContext
):
TPromise
<
modes
.
Location
[]
>
;
$provideCodeActions
(
handle
:
number
,
resource
:
U
riComponents
,
range
:
IRange
):
TPromise
<
modes
.
CodeAction
[]
>
;
$provideDocumentFormattingEdits
(
handle
:
number
,
resource
:
U
riComponents
,
options
:
modes
.
FormattingOptions
):
TPromise
<
editorCommon
.
ISingleEditOperation
[]
>
;
$provideDocumentRangeFormattingEdits
(
handle
:
number
,
resource
:
U
riComponents
,
range
:
IRange
,
options
:
modes
.
FormattingOptions
):
TPromise
<
editorCommon
.
ISingleEditOperation
[]
>
;
$provideOnTypeFormattingEdits
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
,
ch
:
string
,
options
:
modes
.
FormattingOptions
):
TPromise
<
editorCommon
.
ISingleEditOperation
[]
>
;
$provideWorkspaceSymbols
(
handle
:
number
,
search
:
string
):
TPromise
<
IWorkspaceSymbols
>
;
$resolveWorkspaceSymbol
(
handle
:
number
,
symbol
:
modes
.
SymbolInformation
):
TPromise
<
IWorkspaceSymbol
>
;
$releaseWorkspaceSymbols
(
handle
:
number
,
id
:
number
):
void
;
$provideRenameEdits
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
,
newName
:
string
):
TPromise
<
modes
.
WorkspaceEdit
>
;
$provideCompletionItems
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
,
context
:
modes
.
SuggestContext
):
TPromise
<
IExtHostSuggestResult
>
;
$resolveCompletionItem
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
,
suggestion
:
modes
.
ISuggestion
):
TPromise
<
modes
.
ISuggestion
>
;
$provideRenameEdits
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
,
newName
:
string
):
TPromise
<
modes
.
WorkspaceEdit
>
;
$provideCompletionItems
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
,
context
:
modes
.
SuggestContext
):
TPromise
<
IExtHostSuggestResult
>
;
$resolveCompletionItem
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
,
suggestion
:
modes
.
ISuggestion
):
TPromise
<
modes
.
ISuggestion
>
;
$releaseCompletionItems
(
handle
:
number
,
id
:
number
):
void
;
$provideSignatureHelp
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
):
TPromise
<
modes
.
SignatureHelp
>
;
$provideDocumentLinks
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
modes
.
ILink
[]
>
;
$provideSignatureHelp
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
):
TPromise
<
modes
.
SignatureHelp
>
;
$provideDocumentLinks
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
modes
.
ILink
[]
>
;
$resolveDocumentLink
(
handle
:
number
,
link
:
modes
.
ILink
):
TPromise
<
modes
.
ILink
>
;
$provideDocumentColors
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
IRawColorInfo
[]
>
;
$provideColorPresentations
(
handle
:
number
,
resource
:
U
RI
,
colorInfo
:
IRawColorInfo
):
TPromise
<
modes
.
IColorPresentation
[]
>
;
$provideDocumentColors
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
IRawColorInfo
[]
>
;
$provideColorPresentations
(
handle
:
number
,
resource
:
U
riComponents
,
colorInfo
:
IRawColorInfo
):
TPromise
<
modes
.
IColorPresentation
[]
>
;
}
export
interface
ExtHostQuickOpenShape
{
...
...
@@ -686,7 +685,7 @@ export const MainContext = {
MainThreadStorage
:
createMainId
<
MainThreadStorageShape
>
(
'
MainThreadStorage
'
),
MainThreadTelemetry
:
createMainId
<
MainThreadTelemetryShape
>
(
'
MainThreadTelemetry
'
),
MainThreadTerminalService
:
createMainId
<
MainThreadTerminalServiceShape
>
(
'
MainThreadTerminalService
'
),
MainThreadWorkspace
:
createMainId
<
MainThreadWorkspaceShape
>
(
'
MainThreadWorkspace
'
,
ProxyType
.
CustomMarshaller
),
MainThreadWorkspace
:
createMainId
<
MainThreadWorkspaceShape
>
(
'
MainThreadWorkspace
'
),
MainThreadFileSystem
:
createMainId
<
MainThreadFileSystemShape
>
(
'
MainThreadFileSystem
'
),
MainThreadExtensionService
:
createMainId
<
MainThreadExtensionServiceShape
>
(
'
MainThreadExtensionService
'
),
MainThreadSCM
:
createMainId
<
MainThreadSCMShape
>
(
'
MainThreadSCM
'
,
ProxyType
.
CustomMarshaller
),
...
...
@@ -700,13 +699,13 @@ export const ExtHostContext = {
ExtHostDiagnostics
:
createExtId
<
ExtHostDiagnosticsShape
>
(
'
ExtHostDiagnostics
'
),
ExtHostDebugService
:
createExtId
<
ExtHostDebugServiceShape
>
(
'
ExtHostDebugService
'
,
ProxyType
.
CustomMarshaller
),
ExtHostDecorations
:
createExtId
<
ExtHostDecorationsShape
>
(
'
ExtHostDecorations
'
),
ExtHostDocumentsAndEditors
:
createExtId
<
ExtHostDocumentsAndEditorsShape
>
(
'
ExtHostDocumentsAndEditors
'
,
ProxyType
.
CustomMarshaller
),
ExtHostDocumentsAndEditors
:
createExtId
<
ExtHostDocumentsAndEditorsShape
>
(
'
ExtHostDocumentsAndEditors
'
),
ExtHostDocuments
:
createExtId
<
ExtHostDocumentsShape
>
(
'
ExtHostDocuments
'
),
ExtHostDocumentContentProviders
:
createExtId
<
ExtHostDocumentContentProvidersShape
>
(
'
ExtHostDocumentContentProviders
'
),
ExtHostDocumentSaveParticipant
:
createExtId
<
ExtHostDocumentSaveParticipantShape
>
(
'
ExtHostDocumentSaveParticipant
'
),
ExtHostEditors
:
createExtId
<
ExtHostEditorsShape
>
(
'
ExtHostEditors
'
,
ProxyType
.
CustomMarshaller
),
ExtHostEditors
:
createExtId
<
ExtHostEditorsShape
>
(
'
ExtHostEditors
'
),
ExtHostTreeViews
:
createExtId
<
ExtHostTreeViewsShape
>
(
'
ExtHostTreeViews
'
),
ExtHostFileSystem
:
createExtId
<
ExtHostFileSystemShape
>
(
'
ExtHostFileSystem
'
,
ProxyType
.
CustomMarshaller
),
ExtHostFileSystem
:
createExtId
<
ExtHostFileSystemShape
>
(
'
ExtHostFileSystem
'
),
ExtHostFileSystemEventService
:
createExtId
<
ExtHostFileSystemEventServiceShape
>
(
'
ExtHostFileSystemEventService
'
),
ExtHostHeapService
:
createExtId
<
ExtHostHeapServiceShape
>
(
'
ExtHostHeapMonitor
'
),
ExtHostLanguageFeatures
:
createExtId
<
ExtHostLanguageFeaturesShape
>
(
'
ExtHostLanguageFeatures
'
,
ProxyType
.
CustomMarshaller
),
...
...
@@ -715,6 +714,6 @@ export const ExtHostContext = {
ExtHostTerminalService
:
createExtId
<
ExtHostTerminalServiceShape
>
(
'
ExtHostTerminalService
'
),
ExtHostSCM
:
createExtId
<
ExtHostSCMShape
>
(
'
ExtHostSCM
'
,
ProxyType
.
CustomMarshaller
),
ExtHostTask
:
createExtId
<
ExtHostTaskShape
>
(
'
ExtHostTask
'
,
ProxyType
.
CustomMarshaller
),
ExtHostWorkspace
:
createExtId
<
ExtHostWorkspaceShape
>
(
'
ExtHostWorkspace
'
,
ProxyType
.
CustomMarshaller
),
ExtHostWorkspace
:
createExtId
<
ExtHostWorkspaceShape
>
(
'
ExtHostWorkspace
'
),
ExtHostWindow
:
createExtId
<
ExtHostWindowShape
>
(
'
ExtHostWindow
'
),
};
src/vs/workbench/api/node/extHostDocumentsAndEditors.ts
浏览文件 @
d1f9e098
...
...
@@ -11,6 +11,7 @@ import { ExtHostDocumentData } from './extHostDocumentData';
import
{
ExtHostTextEditor
}
from
'
./extHostTextEditor
'
;
import
*
as
assert
from
'
assert
'
;
import
*
as
typeConverters
from
'
./extHostTypeConverters
'
;
import
URI
from
'
vs/base/common/uri
'
;
export
class
ExtHostDocumentsAndEditors
implements
ExtHostDocumentsAndEditorsShape
{
...
...
@@ -49,18 +50,19 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha
if
(
delta
.
addedDocuments
)
{
for
(
const
data
of
delta
.
addedDocuments
)
{
assert
.
ok
(
!
this
.
_documents
.
has
(
data
.
url
.
toString
()),
`document '
${
data
.
url
}
already exists!'`
);
const
resource
=
URI
.
revive
(
data
.
uri
);
assert
.
ok
(
!
this
.
_documents
.
has
(
resource
.
toString
()),
`document '
${
resource
}
already exists!'`
);
const
documentData
=
new
ExtHostDocumentData
(
this
.
_mainContext
.
getProxy
(
MainContext
.
MainThreadDocuments
),
data
.
url
,
resource
,
data
.
lines
,
data
.
EOL
,
data
.
modeId
,
data
.
versionId
,
data
.
isDirty
);
this
.
_documents
.
set
(
data
.
url
.
toString
(),
documentData
);
this
.
_documents
.
set
(
resource
.
toString
(),
documentData
);
addedDocuments
.
push
(
documentData
);
}
}
...
...
@@ -75,10 +77,11 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha
if
(
delta
.
addedEditors
)
{
for
(
const
data
of
delta
.
addedEditors
)
{
assert
.
ok
(
this
.
_documents
.
has
(
data
.
document
.
toString
()),
`document '
${
data
.
document
}
' does not exist`
);
const
resource
=
URI
.
revive
(
data
.
documentUri
);
assert
.
ok
(
this
.
_documents
.
has
(
resource
.
toString
()),
`document '
${
resource
}
' does not exist`
);
assert
.
ok
(
!
this
.
_editors
.
has
(
data
.
id
),
`editor '
${
data
.
id
}
' already exists!`
);
const
documentData
=
this
.
_documents
.
get
(
data
.
document
.
toString
());
const
documentData
=
this
.
_documents
.
get
(
resource
.
toString
());
const
editor
=
new
ExtHostTextEditor
(
this
.
_mainContext
.
getProxy
(
MainContext
.
MainThreadEditors
),
data
.
id
,
...
...
src/vs/workbench/api/node/extHostFileSystem.ts
浏览文件 @
d1f9e098
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
URI
,
{
UriComponents
}
from
'
vs/base/common/uri
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
MainContext
,
IMainContext
,
ExtHostFileSystemShape
,
MainThreadFileSystemShape
}
from
'
./extHost.protocol
'
;
import
*
as
vscode
from
'
vscode
'
;
...
...
@@ -42,37 +42,37 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape {
};
}
$utimes
(
handle
:
number
,
resource
:
U
RI
,
mtime
:
number
,
atime
:
number
):
TPromise
<
IStat
,
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
utimes
(
resource
,
mtime
,
atime
));
$utimes
(
handle
:
number
,
resource
:
U
riComponents
,
mtime
:
number
,
atime
:
number
):
TPromise
<
IStat
,
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
utimes
(
URI
.
revive
(
resource
)
,
mtime
,
atime
));
}
$stat
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
IStat
,
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
stat
(
resource
));
$stat
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
IStat
,
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
stat
(
URI
.
revive
(
resource
)
));
}
$read
(
handle
:
number
,
offset
:
number
,
count
:
number
,
resource
:
U
RI
):
TPromise
<
number
>
{
$read
(
handle
:
number
,
offset
:
number
,
count
:
number
,
resource
:
U
riComponents
):
TPromise
<
number
>
{
const
progress
=
{
report
:
chunk
=>
{
this
.
_proxy
.
$reportFileChunk
(
handle
,
resource
,
[].
slice
.
call
(
chunk
));
}
};
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
read
(
resource
,
offset
,
count
,
progress
));
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
read
(
URI
.
revive
(
resource
)
,
offset
,
count
,
progress
));
}
$write
(
handle
:
number
,
resource
:
U
RI
,
content
:
number
[]):
TPromise
<
void
,
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
write
(
resource
,
Buffer
.
from
(
content
)));
$write
(
handle
:
number
,
resource
:
U
riComponents
,
content
:
number
[]):
TPromise
<
void
,
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
write
(
URI
.
revive
(
resource
)
,
Buffer
.
from
(
content
)));
}
$unlink
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
void
,
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
unlink
(
resource
));
$unlink
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
void
,
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
unlink
(
URI
.
revive
(
resource
)
));
}
$move
(
handle
:
number
,
resource
:
U
RI
,
target
:
URI
):
TPromise
<
IStat
,
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
move
(
resource
,
target
));
$move
(
handle
:
number
,
resource
:
U
riComponents
,
target
:
UriComponents
):
TPromise
<
IStat
,
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
move
(
URI
.
revive
(
resource
),
URI
.
revive
(
target
)
));
}
$mkdir
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
IStat
,
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
mkdir
(
resource
));
$mkdir
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
IStat
,
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
mkdir
(
URI
.
revive
(
resource
)
));
}
$readdir
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
[
URI
,
IStat
][],
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
readdir
(
resource
));
$readdir
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
[
UriComponents
,
IStat
][],
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
readdir
(
URI
.
revive
(
resource
)
));
}
$rmdir
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
void
,
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
rmdir
(
resource
));
$rmdir
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
void
,
any
>
{
return
asWinJsPromise
(
token
=>
this
.
_provider
.
get
(
handle
).
rmdir
(
URI
.
revive
(
resource
)
));
}
$fileFiles
(
handle
:
number
,
session
:
number
,
query
:
string
):
TPromise
<
void
>
{
const
provider
=
this
.
_provider
.
get
(
handle
);
...
...
src/vs/workbench/api/node/extHostLanguageFeatures.ts
浏览文件 @
d1f9e098
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
URI
,
{
UriComponents
}
from
'
vs/base/common/uri
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
mixin
}
from
'
vs/base/common/objects
'
;
import
*
as
vscode
from
'
vscode
'
;
...
...
@@ -835,8 +835,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideDocumentSymbols
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
modes
.
SymbolInformation
[]
>
{
return
this
.
_withAdapter
(
handle
,
OutlineAdapter
,
adapter
=>
adapter
.
provideDocumentSymbols
(
resource
));
$provideDocumentSymbols
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
modes
.
SymbolInformation
[]
>
{
return
this
.
_withAdapter
(
handle
,
OutlineAdapter
,
adapter
=>
adapter
.
provideDocumentSymbols
(
URI
.
revive
(
resource
)
));
}
// --- code lens
...
...
@@ -857,12 +857,12 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
result
;
}
$provideCodeLenses
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
modes
.
ICodeLensSymbol
[]
>
{
return
this
.
_withAdapter
(
handle
,
CodeLensAdapter
,
adapter
=>
adapter
.
provideCodeLenses
(
resource
));
$provideCodeLenses
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
modes
.
ICodeLensSymbol
[]
>
{
return
this
.
_withAdapter
(
handle
,
CodeLensAdapter
,
adapter
=>
adapter
.
provideCodeLenses
(
URI
.
revive
(
resource
)
));
}
$resolveCodeLens
(
handle
:
number
,
resource
:
U
RI
,
symbol
:
modes
.
ICodeLensSymbol
):
TPromise
<
modes
.
ICodeLensSymbol
>
{
return
this
.
_withAdapter
(
handle
,
CodeLensAdapter
,
adapter
=>
adapter
.
resolveCodeLens
(
resource
,
symbol
));
$resolveCodeLens
(
handle
:
number
,
resource
:
U
riComponents
,
symbol
:
modes
.
ICodeLensSymbol
):
TPromise
<
modes
.
ICodeLensSymbol
>
{
return
this
.
_withAdapter
(
handle
,
CodeLensAdapter
,
adapter
=>
adapter
.
resolveCodeLens
(
URI
.
revive
(
resource
)
,
symbol
));
}
// --- declaration
...
...
@@ -874,8 +874,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideDefinition
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
):
TPromise
<
modes
.
Definition
>
{
return
this
.
_withAdapter
(
handle
,
DefinitionAdapter
,
adapter
=>
adapter
.
provideDefinition
(
resource
,
position
));
$provideDefinition
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
):
TPromise
<
modes
.
Definition
>
{
return
this
.
_withAdapter
(
handle
,
DefinitionAdapter
,
adapter
=>
adapter
.
provideDefinition
(
URI
.
revive
(
resource
)
,
position
));
}
registerImplementationProvider
(
selector
:
vscode
.
DocumentSelector
,
provider
:
vscode
.
ImplementationProvider
):
vscode
.
Disposable
{
...
...
@@ -885,8 +885,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideImplementation
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
):
TPromise
<
modes
.
Definition
>
{
return
this
.
_withAdapter
(
handle
,
ImplementationAdapter
,
adapter
=>
adapter
.
provideImplementation
(
resource
,
position
));
$provideImplementation
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
):
TPromise
<
modes
.
Definition
>
{
return
this
.
_withAdapter
(
handle
,
ImplementationAdapter
,
adapter
=>
adapter
.
provideImplementation
(
URI
.
revive
(
resource
)
,
position
));
}
registerTypeDefinitionProvider
(
selector
:
vscode
.
DocumentSelector
,
provider
:
vscode
.
TypeDefinitionProvider
):
vscode
.
Disposable
{
...
...
@@ -896,8 +896,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideTypeDefinition
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
):
TPromise
<
modes
.
Definition
>
{
return
this
.
_withAdapter
(
handle
,
TypeDefinitionAdapter
,
adapter
=>
adapter
.
provideTypeDefinition
(
resource
,
position
));
$provideTypeDefinition
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
):
TPromise
<
modes
.
Definition
>
{
return
this
.
_withAdapter
(
handle
,
TypeDefinitionAdapter
,
adapter
=>
adapter
.
provideTypeDefinition
(
URI
.
revive
(
resource
)
,
position
));
}
// --- extra info
...
...
@@ -909,8 +909,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideHover
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
):
TPromise
<
modes
.
Hover
>
{
return
this
.
_withAdapter
(
handle
,
HoverAdapter
,
adpater
=>
adpater
.
provideHover
(
resource
,
position
));
$provideHover
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
):
TPromise
<
modes
.
Hover
>
{
return
this
.
_withAdapter
(
handle
,
HoverAdapter
,
adpater
=>
adpater
.
provideHover
(
URI
.
revive
(
resource
)
,
position
));
}
// --- occurrences
...
...
@@ -922,8 +922,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideDocumentHighlights
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
):
TPromise
<
modes
.
DocumentHighlight
[]
>
{
return
this
.
_withAdapter
(
handle
,
DocumentHighlightAdapter
,
adapter
=>
adapter
.
provideDocumentHighlights
(
resource
,
position
));
$provideDocumentHighlights
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
):
TPromise
<
modes
.
DocumentHighlight
[]
>
{
return
this
.
_withAdapter
(
handle
,
DocumentHighlightAdapter
,
adapter
=>
adapter
.
provideDocumentHighlights
(
URI
.
revive
(
resource
)
,
position
));
}
// --- references
...
...
@@ -935,8 +935,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideReferences
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
,
context
:
modes
.
ReferenceContext
):
TPromise
<
modes
.
Location
[]
>
{
return
this
.
_withAdapter
(
handle
,
ReferenceAdapter
,
adapter
=>
adapter
.
provideReferences
(
resource
,
position
,
context
));
$provideReferences
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
,
context
:
modes
.
ReferenceContext
):
TPromise
<
modes
.
Location
[]
>
{
return
this
.
_withAdapter
(
handle
,
ReferenceAdapter
,
adapter
=>
adapter
.
provideReferences
(
URI
.
revive
(
resource
)
,
position
,
context
));
}
// --- quick fix
...
...
@@ -948,8 +948,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideCodeActions
(
handle
:
number
,
resource
:
U
RI
,
range
:
IRange
):
TPromise
<
modes
.
CodeAction
[]
>
{
return
this
.
_withAdapter
(
handle
,
CodeActionAdapter
,
adapter
=>
adapter
.
provideCodeActions
(
resource
,
range
));
$provideCodeActions
(
handle
:
number
,
resource
:
U
riComponents
,
range
:
IRange
):
TPromise
<
modes
.
CodeAction
[]
>
{
return
this
.
_withAdapter
(
handle
,
CodeActionAdapter
,
adapter
=>
adapter
.
provideCodeActions
(
URI
.
revive
(
resource
)
,
range
));
}
// --- formatting
...
...
@@ -961,8 +961,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideDocumentFormattingEdits
(
handle
:
number
,
resource
:
U
RI
,
options
:
modes
.
FormattingOptions
):
TPromise
<
ISingleEditOperation
[]
>
{
return
this
.
_withAdapter
(
handle
,
DocumentFormattingAdapter
,
adapter
=>
adapter
.
provideDocumentFormattingEdits
(
resource
,
options
));
$provideDocumentFormattingEdits
(
handle
:
number
,
resource
:
U
riComponents
,
options
:
modes
.
FormattingOptions
):
TPromise
<
ISingleEditOperation
[]
>
{
return
this
.
_withAdapter
(
handle
,
DocumentFormattingAdapter
,
adapter
=>
adapter
.
provideDocumentFormattingEdits
(
URI
.
revive
(
resource
)
,
options
));
}
registerDocumentRangeFormattingEditProvider
(
selector
:
vscode
.
DocumentSelector
,
provider
:
vscode
.
DocumentRangeFormattingEditProvider
):
vscode
.
Disposable
{
...
...
@@ -972,8 +972,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideDocumentRangeFormattingEdits
(
handle
:
number
,
resource
:
U
RI
,
range
:
IRange
,
options
:
modes
.
FormattingOptions
):
TPromise
<
ISingleEditOperation
[]
>
{
return
this
.
_withAdapter
(
handle
,
RangeFormattingAdapter
,
adapter
=>
adapter
.
provideDocumentRangeFormattingEdits
(
resource
,
range
,
options
));
$provideDocumentRangeFormattingEdits
(
handle
:
number
,
resource
:
U
riComponents
,
range
:
IRange
,
options
:
modes
.
FormattingOptions
):
TPromise
<
ISingleEditOperation
[]
>
{
return
this
.
_withAdapter
(
handle
,
RangeFormattingAdapter
,
adapter
=>
adapter
.
provideDocumentRangeFormattingEdits
(
URI
.
revive
(
resource
)
,
range
,
options
));
}
registerOnTypeFormattingEditProvider
(
selector
:
vscode
.
DocumentSelector
,
provider
:
vscode
.
OnTypeFormattingEditProvider
,
triggerCharacters
:
string
[]):
vscode
.
Disposable
{
...
...
@@ -983,8 +983,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideOnTypeFormattingEdits
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
,
ch
:
string
,
options
:
modes
.
FormattingOptions
):
TPromise
<
ISingleEditOperation
[]
>
{
return
this
.
_withAdapter
(
handle
,
OnTypeFormattingAdapter
,
adapter
=>
adapter
.
provideOnTypeFormattingEdits
(
resource
,
position
,
ch
,
options
));
$provideOnTypeFormattingEdits
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
,
ch
:
string
,
options
:
modes
.
FormattingOptions
):
TPromise
<
ISingleEditOperation
[]
>
{
return
this
.
_withAdapter
(
handle
,
OnTypeFormattingAdapter
,
adapter
=>
adapter
.
provideOnTypeFormattingEdits
(
URI
.
revive
(
resource
)
,
position
,
ch
,
options
));
}
// --- navigate types
...
...
@@ -1017,8 +1017,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideRenameEdits
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
,
newName
:
string
):
TPromise
<
modes
.
WorkspaceEdit
>
{
return
this
.
_withAdapter
(
handle
,
RenameAdapter
,
adapter
=>
adapter
.
provideRenameEdits
(
resource
,
position
,
newName
));
$provideRenameEdits
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
,
newName
:
string
):
TPromise
<
modes
.
WorkspaceEdit
>
{
return
this
.
_withAdapter
(
handle
,
RenameAdapter
,
adapter
=>
adapter
.
provideRenameEdits
(
URI
.
revive
(
resource
)
,
position
,
newName
));
}
// --- suggestion
...
...
@@ -1030,12 +1030,12 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideCompletionItems
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
,
context
:
modes
.
SuggestContext
):
TPromise
<
IExtHostSuggestResult
>
{
return
this
.
_withAdapter
(
handle
,
SuggestAdapter
,
adapter
=>
adapter
.
provideCompletionItems
(
resource
,
position
,
context
));
$provideCompletionItems
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
,
context
:
modes
.
SuggestContext
):
TPromise
<
IExtHostSuggestResult
>
{
return
this
.
_withAdapter
(
handle
,
SuggestAdapter
,
adapter
=>
adapter
.
provideCompletionItems
(
URI
.
revive
(
resource
)
,
position
,
context
));
}
$resolveCompletionItem
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
,
suggestion
:
modes
.
ISuggestion
):
TPromise
<
modes
.
ISuggestion
>
{
return
this
.
_withAdapter
(
handle
,
SuggestAdapter
,
adapter
=>
adapter
.
resolveCompletionItem
(
resource
,
position
,
suggestion
));
$resolveCompletionItem
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
,
suggestion
:
modes
.
ISuggestion
):
TPromise
<
modes
.
ISuggestion
>
{
return
this
.
_withAdapter
(
handle
,
SuggestAdapter
,
adapter
=>
adapter
.
resolveCompletionItem
(
URI
.
revive
(
resource
)
,
position
,
suggestion
));
}
$releaseCompletionItems
(
handle
:
number
,
id
:
number
):
void
{
...
...
@@ -1051,8 +1051,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideSignatureHelp
(
handle
:
number
,
resource
:
U
RI
,
position
:
IPosition
):
TPromise
<
modes
.
SignatureHelp
>
{
return
this
.
_withAdapter
(
handle
,
SignatureHelpAdapter
,
adapter
=>
adapter
.
provideSignatureHelp
(
resource
,
position
));
$provideSignatureHelp
(
handle
:
number
,
resource
:
U
riComponents
,
position
:
IPosition
):
TPromise
<
modes
.
SignatureHelp
>
{
return
this
.
_withAdapter
(
handle
,
SignatureHelpAdapter
,
adapter
=>
adapter
.
provideSignatureHelp
(
URI
.
revive
(
resource
)
,
position
));
}
// --- links
...
...
@@ -1064,8 +1064,8 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideDocumentLinks
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
modes
.
ILink
[]
>
{
return
this
.
_withAdapter
(
handle
,
LinkProviderAdapter
,
adapter
=>
adapter
.
provideLinks
(
resource
));
$provideDocumentLinks
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
modes
.
ILink
[]
>
{
return
this
.
_withAdapter
(
handle
,
LinkProviderAdapter
,
adapter
=>
adapter
.
provideLinks
(
URI
.
revive
(
resource
)
));
}
$resolveDocumentLink
(
handle
:
number
,
link
:
modes
.
ILink
):
TPromise
<
modes
.
ILink
>
{
...
...
@@ -1079,12 +1079,12 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
this
.
_createDisposable
(
handle
);
}
$provideDocumentColors
(
handle
:
number
,
resource
:
U
RI
):
TPromise
<
IRawColorInfo
[]
>
{
return
this
.
_withAdapter
(
handle
,
ColorProviderAdapter
,
adapter
=>
adapter
.
provideColors
(
resource
));
$provideDocumentColors
(
handle
:
number
,
resource
:
U
riComponents
):
TPromise
<
IRawColorInfo
[]
>
{
return
this
.
_withAdapter
(
handle
,
ColorProviderAdapter
,
adapter
=>
adapter
.
provideColors
(
URI
.
revive
(
resource
)
));
}
$provideColorPresentations
(
handle
:
number
,
resource
:
U
RI
,
colorInfo
:
IRawColorInfo
):
TPromise
<
modes
.
IColorPresentation
[]
>
{
return
this
.
_withAdapter
(
handle
,
ColorProviderAdapter
,
adapter
=>
adapter
.
provideColorPresentations
(
resource
,
colorInfo
));
$provideColorPresentations
(
handle
:
number
,
resource
:
U
riComponents
,
colorInfo
:
IRawColorInfo
):
TPromise
<
modes
.
IColorPresentation
[]
>
{
return
this
.
_withAdapter
(
handle
,
ColorProviderAdapter
,
adapter
=>
adapter
.
provideColorPresentations
(
URI
.
revive
(
resource
)
,
colorInfo
));
}
// --- configuration
...
...
src/vs/workbench/api/node/extHostWorkspace.ts
浏览文件 @
d1f9e098
...
...
@@ -18,14 +18,23 @@ import { TernarySearchTree } from 'vs/base/common/map';
class
Workspace2
extends
Workspace
{
static
fromData
(
data
:
IWorkspaceData
)
{
return
data
?
new
Workspace2
(
data
)
:
null
;
if
(
!
data
)
{
return
null
;
}
else
{
const
{
id
,
name
,
folders
}
=
data
;
return
new
Workspace2
(
id
,
name
,
folders
.
map
(({
uri
,
name
,
index
})
=>
new
WorkspaceFolder
({
name
,
index
,
uri
:
URI
.
revive
(
uri
)
}))
);
}
}
private
readonly
_workspaceFolders
:
vscode
.
WorkspaceFolder
[]
=
[];
private
readonly
_structure
=
TernarySearchTree
.
forPaths
<
vscode
.
WorkspaceFolder
>
();
private
constructor
(
data
:
IWorkspaceData
)
{
super
(
data
.
id
,
data
.
name
,
data
.
folders
.
map
(
folder
=>
new
WorkspaceFolder
(
folder
))
);
private
constructor
(
id
:
string
,
name
:
string
,
folders
:
WorkspaceFolder
[]
)
{
super
(
id
,
name
,
folders
);
// setup the workspace folder data structure
this
.
folders
.
forEach
(({
name
,
uri
,
index
})
=>
{
...
...
src/vs/workbench/browser/actions/workspaceActions.ts
浏览文件 @
d1f9e098
...
...
@@ -30,7 +30,7 @@ import { IHistoryService } from 'vs/workbench/services/history/common/history';
export
class
OpenFileAction
extends
Action
{
static
ID
=
'
workbench.action.files.openFile
'
;
static
readonly
ID
=
'
workbench.action.files.openFile
'
;
static
LABEL
=
nls
.
localize
(
'
openFile
'
,
"
Open File...
"
);
constructor
(
...
...
@@ -50,7 +50,7 @@ export class OpenFileAction extends Action {
export
class
OpenFolderAction
extends
Action
{
static
ID
=
'
workbench.action.files.openFolder
'
;
static
readonly
ID
=
'
workbench.action.files.openFolder
'
;
static
LABEL
=
nls
.
localize
(
'
openFolder
'
,
"
Open Folder...
"
);
constructor
(
...
...
@@ -70,7 +70,7 @@ export class OpenFolderAction extends Action {
export
class
OpenFileFolderAction
extends
Action
{
static
ID
=
'
workbench.action.files.openFileFolder
'
;
static
readonly
ID
=
'
workbench.action.files.openFileFolder
'
;
static
LABEL
=
nls
.
localize
(
'
openFileFolder
'
,
"
Open...
"
);
constructor
(
...
...
@@ -195,7 +195,7 @@ function isUntitledWorkspace(path: string, environmentService: IEnvironmentServi
export
class
AddRootFolderAction
extends
BaseWorkspacesAction
{
static
ID
=
'
workbench.action.addRootFolder
'
;
static
readonly
ID
=
'
workbench.action.addRootFolder
'
;
static
LABEL
=
nls
.
localize
(
'
addFolderToWorkspace
'
,
"
Add Folder to Workspace...
"
);
constructor
(
...
...
@@ -225,7 +225,7 @@ export class AddRootFolderAction extends BaseWorkspacesAction {
export
class
GlobalRemoveRootFolderAction
extends
BaseWorkspacesAction
{
static
ID
=
'
workbench.action.removeRootFolder
'
;
static
readonly
ID
=
'
workbench.action.removeRootFolder
'
;
static
LABEL
=
nls
.
localize
(
'
globalRemoveFolderFromWorkspace
'
,
"
Remove Folder from Workspace...
"
);
constructor
(
...
...
@@ -261,7 +261,7 @@ export class GlobalRemoveRootFolderAction extends BaseWorkspacesAction {
export
class
RemoveRootFolderAction
extends
Action
{
static
ID
=
'
workbench.action.removeRootFolder
'
;
static
readonly
ID
=
'
workbench.action.removeRootFolder
'
;
static
LABEL
=
nls
.
localize
(
'
removeFolderFromWorkspace
'
,
"
Remove Folder from Workspace
"
);
constructor
(
...
...
@@ -280,7 +280,7 @@ export class RemoveRootFolderAction extends Action {
export
class
OpenFolderSettingsAction
extends
Action
{
static
ID
=
'
workbench.action.openFolderSettings
'
;
static
readonly
ID
=
'
workbench.action.openFolderSettings
'
;
static
LABEL
=
nls
.
localize
(
'
openFolderSettings
'
,
"
Open Folder Settings
"
);
constructor
(
...
...
@@ -302,7 +302,7 @@ export class OpenFolderSettingsAction extends Action {
export
class
SaveWorkspaceAsAction
extends
BaseWorkspacesAction
{
static
ID
=
'
workbench.action.saveWorkspaceAs
'
;
static
readonly
ID
=
'
workbench.action.saveWorkspaceAs
'
;
static
LABEL
=
nls
.
localize
(
'
saveWorkspaceAsAction
'
,
"
Save Workspace As...
"
);
constructor
(
...
...
@@ -347,7 +347,7 @@ export class SaveWorkspaceAsAction extends BaseWorkspacesAction {
export
class
OpenWorkspaceAction
extends
Action
{
static
ID
=
'
workbench.action.openWorkspace
'
;
static
readonly
ID
=
'
workbench.action.openWorkspace
'
;
static
LABEL
=
nls
.
localize
(
'
openWorkspaceAction
'
,
"
Open Workspace...
"
);
constructor
(
...
...
src/vs/workbench/browser/parts/editor/editorStatus.ts
浏览文件 @
d1f9e098
...
...
@@ -765,7 +765,7 @@ function isWritableBaseEditor(e: IBaseEditor): boolean {
export
class
ShowLanguageExtensionsAction
extends
Action
{
static
ID
=
'
workbench.action.showLanguageExtensions
'
;
static
readonly
ID
=
'
workbench.action.showLanguageExtensions
'
;
constructor
(
private
fileExtension
:
string
,
...
...
@@ -885,7 +885,7 @@ export class ChangeModeAction extends Action {
picks
.
unshift
(
autoDetectMode
);
}
return
this
.
quickOpenService
.
pick
(
picks
,
{
placeHolder
:
nls
.
localize
(
'
pickLanguage
'
,
"
Select Language Mode
"
)
}).
then
(
pick
=>
{
return
this
.
quickOpenService
.
pick
(
picks
,
{
placeHolder
:
nls
.
localize
(
'
pickLanguage
'
,
"
Select Language Mode
"
)
,
matchOnDescription
:
true
}).
then
(
pick
=>
{
if
(
!
pick
)
{
return
;
}
...
...
src/vs/workbench/browser/parts/panel/panelActions.ts
浏览文件 @
d1f9e098
...
...
@@ -18,7 +18,7 @@ import { ActivityAction } from 'vs/workbench/browser/parts/compositebar/composit
import
{
IActivity
}
from
'
vs/workbench/common/activity
'
;
export
class
ClosePanelAction
extends
Action
{
static
ID
=
'
workbench.action.closePanel
'
;
static
readonly
ID
=
'
workbench.action.closePanel
'
;
static
LABEL
=
nls
.
localize
(
'
closePanel
'
,
"
Close Panel
"
);
constructor
(
...
...
@@ -35,7 +35,7 @@ export class ClosePanelAction extends Action {
}
export
class
TogglePanelAction
extends
Action
{
static
ID
=
'
workbench.action.togglePanel
'
;
static
readonly
ID
=
'
workbench.action.togglePanel
'
;
static
LABEL
=
nls
.
localize
(
'
togglePanel
'
,
"
Toggle Panel
"
);
constructor
(
...
...
src/vs/workbench/electron-browser/actions.ts
浏览文件 @
d1f9e098
...
...
@@ -90,7 +90,7 @@ export class CloseCurrentWindowAction extends Action {
export
class
CloseWorkspaceAction
extends
Action
{
static
ID
=
'
workbench.action.closeFolder
'
;
static
readonly
ID
=
'
workbench.action.closeFolder
'
;
static
LABEL
=
nls
.
localize
(
'
closeWorkspace
'
,
"
Close Workspace
"
);
constructor
(
...
...
@@ -116,7 +116,7 @@ export class CloseWorkspaceAction extends Action {
export
class
NewWindowAction
extends
Action
{
static
ID
=
'
workbench.action.newWindow
'
;
static
readonly
ID
=
'
workbench.action.newWindow
'
;
static
LABEL
=
nls
.
localize
(
'
newWindow
'
,
"
New Window
"
);
constructor
(
...
...
@@ -134,7 +134,7 @@ export class NewWindowAction extends Action {
export
class
ToggleFullScreenAction
extends
Action
{
static
ID
=
'
workbench.action.toggleFullScreen
'
;
static
readonly
ID
=
'
workbench.action.toggleFullScreen
'
;
static
LABEL
=
nls
.
localize
(
'
toggleFullScreen
'
,
"
Toggle Full Screen
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IWindowService
private
windowService
:
IWindowService
)
{
...
...
@@ -148,7 +148,7 @@ export class ToggleFullScreenAction extends Action {
export
class
ToggleMenuBarAction
extends
Action
{
static
ID
=
'
workbench.action.toggleMenuBar
'
;
static
readonly
ID
=
'
workbench.action.toggleMenuBar
'
;
static
LABEL
=
nls
.
localize
(
'
toggleMenuBar
'
,
"
Toggle Menu Bar
"
);
private
static
readonly
menuBarVisibilityKey
=
'
window.menuBarVisibility
'
;
...
...
@@ -182,7 +182,7 @@ export class ToggleMenuBarAction extends Action {
export
class
ToggleDevToolsAction
extends
Action
{
static
ID
=
'
workbench.action.toggleDevTools
'
;
static
readonly
ID
=
'
workbench.action.toggleDevTools
'
;
static
LABEL
=
nls
.
localize
(
'
toggleDevTools
'
,
"
Toggle Developer Tools
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IWindowService
private
windowsService
:
IWindowService
)
{
...
...
@@ -557,7 +557,7 @@ export class ShowStartupPerformance extends Action {
export
class
ReloadWindowAction
extends
Action
{
static
ID
=
'
workbench.action.reloadWindow
'
;
static
readonly
ID
=
'
workbench.action.reloadWindow
'
;
static
LABEL
=
nls
.
localize
(
'
reloadWindow
'
,
"
Reload Window
"
);
constructor
(
...
...
@@ -653,7 +653,7 @@ class CloseWindowAction extends Action implements IPickOpenAction {
export
class
SwitchWindow
extends
BaseSwitchWindow
{
static
ID
=
'
workbench.action.switchWindow
'
;
static
readonly
ID
=
'
workbench.action.switchWindow
'
;
static
LABEL
=
nls
.
localize
(
'
switchWindow
'
,
"
Switch Window...
"
);
constructor
(
...
...
@@ -675,7 +675,7 @@ export class SwitchWindow extends BaseSwitchWindow {
export
class
QuickSwitchWindow
extends
BaseSwitchWindow
{
static
ID
=
'
workbench.action.quickSwitchWindow
'
;
static
readonly
ID
=
'
workbench.action.quickSwitchWindow
'
;
static
LABEL
=
nls
.
localize
(
'
quickSwitchWindow
'
,
"
Quick Switch Window...
"
);
constructor
(
...
...
@@ -1188,7 +1188,7 @@ export class OpenTipsAndTricksUrlAction extends Action {
export
class
ToggleSharedProcessAction
extends
Action
{
static
ID
=
'
workbench.action.toggleSharedProcess
'
;
static
readonly
ID
=
'
workbench.action.toggleSharedProcess
'
;
static
LABEL
=
nls
.
localize
(
'
toggleSharedProcess
'
,
"
Toggle Shared Process
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IWindowsService
private
windowsService
:
IWindowsService
)
{
...
...
src/vs/workbench/node/extensionHostMain.ts
浏览文件 @
d1f9e098
...
...
@@ -26,6 +26,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import
{
ILogService
}
from
'
vs/platform/log/common/log
'
;
import
{
IMessagePassingProtocol
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
RPCProtocol
}
from
'
vs/workbench/services/extensions/node/rpcProtocol
'
;
import
URI
from
'
vs/base/common/uri
'
;
// const nativeExit = process.exit.bind(process);
function
patchProcess
(
allowExit
:
boolean
)
{
...
...
@@ -234,7 +235,7 @@ export class ExtensionHostMain {
// find exact path
for
(
const
{
uri
}
of
this
.
_workspace
.
folders
)
{
if
(
await
pfs
.
exists
(
join
(
uri
.
fsPath
,
fileName
)))
{
if
(
await
pfs
.
exists
(
join
(
URI
.
revive
(
uri
)
.
fsPath
,
fileName
)))
{
// the file was found
return
(
this
.
_extensionService
.
activateById
(
extensionId
,
new
ExtensionActivatedByEvent
(
true
,
`workspaceContains:
${
fileName
}
`
))
...
...
@@ -261,7 +262,7 @@ export class ExtensionHostMain {
includes
[
globPattern
]
=
true
;
});
const
folderQueries
=
this
.
_workspace
.
folders
.
map
(
folder
=>
({
folder
:
folder
.
uri
}));
const
folderQueries
=
this
.
_workspace
.
folders
.
map
(
folder
=>
({
folder
:
URI
.
revive
(
folder
.
uri
)
}));
const
config
=
this
.
_extHostConfiguration
.
getConfiguration
(
'
search
'
);
const
useRipgrep
=
config
.
get
(
'
useRipgrep
'
,
true
);
const
followSymlinks
=
config
.
get
(
'
followSymlinks
'
,
true
);
...
...
src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts
浏览文件 @
d1f9e098
...
...
@@ -30,7 +30,7 @@ function isAvailable(): TPromise<boolean> {
class
InstallAction
extends
Action
{
static
ID
=
'
workbench.action.installCommandLine
'
;
static
readonly
ID
=
'
workbench.action.installCommandLine
'
;
static
LABEL
=
nls
.
localize
(
'
install
'
,
"
Install '{0}' command in PATH
"
,
product
.
applicationName
);
constructor
(
...
...
@@ -111,7 +111,7 @@ class InstallAction extends Action {
class
UninstallAction
extends
Action
{
static
ID
=
'
workbench.action.uninstallCommandLine
'
;
static
readonly
ID
=
'
workbench.action.uninstallCommandLine
'
;
static
LABEL
=
nls
.
localize
(
'
uninstall
'
,
"
Uninstall '{0}' command from PATH
"
,
product
.
applicationName
);
constructor
(
...
...
src/vs/workbench/parts/debug/browser/debugActions.ts
浏览文件 @
d1f9e098
...
...
@@ -71,7 +71,7 @@ export abstract class AbstractDebugAction extends Action {
}
export
class
ConfigureAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.configure
'
;
static
readonly
ID
=
'
workbench.action.debug.configure
'
;
static
LABEL
=
nls
.
localize
(
'
openLaunchJson
'
,
"
Open {0}
"
,
'
launch.json
'
);
constructor
(
id
:
string
,
label
:
string
,
...
...
@@ -160,7 +160,7 @@ export class StartAction extends AbstractDebugAction {
}
export
class
RunAction
extends
StartAction
{
static
ID
=
'
workbench.action.debug.run
'
;
static
readonly
ID
=
'
workbench.action.debug.run
'
;
static
LABEL
=
nls
.
localize
(
'
startWithoutDebugging
'
,
"
Start Without Debugging
"
);
protected
isNoDebug
():
boolean
{
...
...
@@ -169,7 +169,7 @@ export class RunAction extends StartAction {
}
export
class
SelectAndStartAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.selectandstart
'
;
static
readonly
ID
=
'
workbench.action.debug.selectandstart
'
;
static
LABEL
=
nls
.
localize
(
'
selectAndStartDebugging
'
,
"
Select and Start Debugging
"
);
constructor
(
id
:
string
,
label
:
string
,
...
...
@@ -190,7 +190,7 @@ export class SelectAndStartAction extends AbstractDebugAction {
}
export
class
RestartAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.restart
'
;
static
readonly
ID
=
'
workbench.action.debug.restart
'
;
static
LABEL
=
nls
.
localize
(
'
restartDebug
'
,
"
Restart
"
);
static
RECONNECT_LABEL
=
nls
.
localize
(
'
reconnectDebug
'
,
"
Reconnect
"
);
...
...
@@ -224,7 +224,7 @@ export class RestartAction extends AbstractDebugAction {
}
export
class
StepOverAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.stepOver
'
;
static
readonly
ID
=
'
workbench.action.debug.stepOver
'
;
static
LABEL
=
nls
.
localize
(
'
stepOverDebug
'
,
"
Step Over
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -245,7 +245,7 @@ export class StepOverAction extends AbstractDebugAction {
}
export
class
StepIntoAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.stepInto
'
;
static
readonly
ID
=
'
workbench.action.debug.stepInto
'
;
static
LABEL
=
nls
.
localize
(
'
stepIntoDebug
'
,
"
Step Into
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -266,7 +266,7 @@ export class StepIntoAction extends AbstractDebugAction {
}
export
class
StepOutAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.stepOut
'
;
static
readonly
ID
=
'
workbench.action.debug.stepOut
'
;
static
LABEL
=
nls
.
localize
(
'
stepOutDebug
'
,
"
Step Out
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -287,7 +287,7 @@ export class StepOutAction extends AbstractDebugAction {
}
export
class
StopAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.stop
'
;
static
readonly
ID
=
'
workbench.action.debug.stop
'
;
static
LABEL
=
nls
.
localize
(
'
stopDebug
'
,
"
Stop
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -308,7 +308,7 @@ export class StopAction extends AbstractDebugAction {
}
export
class
DisconnectAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.disconnect
'
;
static
readonly
ID
=
'
workbench.action.debug.disconnect
'
;
static
LABEL
=
nls
.
localize
(
'
disconnectDebug
'
,
"
Disconnect
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -326,7 +326,7 @@ export class DisconnectAction extends AbstractDebugAction {
}
export
class
ContinueAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.continue
'
;
static
readonly
ID
=
'
workbench.action.debug.continue
'
;
static
LABEL
=
nls
.
localize
(
'
continueDebug
'
,
"
Continue
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -347,7 +347,7 @@ export class ContinueAction extends AbstractDebugAction {
}
export
class
PauseAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.pause
'
;
static
readonly
ID
=
'
workbench.action.debug.pause
'
;
static
LABEL
=
nls
.
localize
(
'
pauseDebug
'
,
"
Pause
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -368,7 +368,7 @@ export class PauseAction extends AbstractDebugAction {
}
export
class
RestartFrameAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.restartFrame
'
;
static
readonly
ID
=
'
workbench.action.debug.restartFrame
'
;
static
LABEL
=
nls
.
localize
(
'
restartFrame
'
,
"
Restart Frame
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -385,7 +385,7 @@ export class RestartFrameAction extends AbstractDebugAction {
}
export
class
RemoveBreakpointAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.removeBreakpoint
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.removeBreakpoint
'
;
static
LABEL
=
nls
.
localize
(
'
removeBreakpoint
'
,
"
Remove Breakpoint
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -399,7 +399,7 @@ export class RemoveBreakpointAction extends AbstractDebugAction {
}
export
class
RemoveAllBreakpointsAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.removeAllBreakpoints
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.removeAllBreakpoints
'
;
static
LABEL
=
nls
.
localize
(
'
removeAllBreakpoints
'
,
"
Remove All Breakpoints
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -418,7 +418,7 @@ export class RemoveAllBreakpointsAction extends AbstractDebugAction {
}
export
class
EnableBreakpointAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.enableBreakpoint
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.enableBreakpoint
'
;
static
LABEL
=
nls
.
localize
(
'
enableBreakpoint
'
,
"
Enable Breakpoint
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -431,7 +431,7 @@ export class EnableBreakpointAction extends AbstractDebugAction {
}
export
class
DisableBreakpointAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.disableBreakpoint
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.disableBreakpoint
'
;
static
LABEL
=
nls
.
localize
(
'
disableBreakpoint
'
,
"
Disable Breakpoint
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -444,7 +444,7 @@ export class DisableBreakpointAction extends AbstractDebugAction {
}
export
class
EnableAllBreakpointsAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.enableAllBreakpoints
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.enableAllBreakpoints
'
;
static
LABEL
=
nls
.
localize
(
'
enableAllBreakpoints
'
,
"
Enable All Breakpoints
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -463,7 +463,7 @@ export class EnableAllBreakpointsAction extends AbstractDebugAction {
}
export
class
DisableAllBreakpointsAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.disableAllBreakpoints
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.disableAllBreakpoints
'
;
static
LABEL
=
nls
.
localize
(
'
disableAllBreakpoints
'
,
"
Disable All Breakpoints
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -482,7 +482,7 @@ export class DisableAllBreakpointsAction extends AbstractDebugAction {
}
export
class
ToggleBreakpointsActivatedAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.toggleBreakpointsActivatedAction
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.toggleBreakpointsActivatedAction
'
;
static
ACTIVATE_LABEL
=
nls
.
localize
(
'
activateBreakpoints
'
,
"
Activate Breakpoints
"
);
static
DEACTIVATE_LABEL
=
nls
.
localize
(
'
deactivateBreakpoints
'
,
"
Deactivate Breakpoints
"
);
...
...
@@ -506,7 +506,7 @@ export class ToggleBreakpointsActivatedAction extends AbstractDebugAction {
}
export
class
ReapplyBreakpointsAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.reapplyBreakpointsAction
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.reapplyBreakpointsAction
'
;
static
LABEL
=
nls
.
localize
(
'
reapplyAllBreakpoints
'
,
"
Reapply All Breakpoints
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -526,7 +526,7 @@ export class ReapplyBreakpointsAction extends AbstractDebugAction {
}
export
class
AddFunctionBreakpointAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.addFunctionBreakpointAction
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.addFunctionBreakpointAction
'
;
static
LABEL
=
nls
.
localize
(
'
addFunctionBreakpoint
'
,
"
Add Function Breakpoint
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -546,7 +546,7 @@ export class AddFunctionBreakpointAction extends AbstractDebugAction {
}
export
class
AddConditionalBreakpointAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.addConditionalBreakpointAction
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.addConditionalBreakpointAction
'
;
static
LABEL
=
nls
.
localize
(
'
addConditionalBreakpoint
'
,
"
Add Conditional Breakpoint...
"
);
constructor
(
id
:
string
,
label
:
string
,
...
...
@@ -565,7 +565,7 @@ export class AddConditionalBreakpointAction extends AbstractDebugAction {
}
export
class
EditConditionalBreakpointAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.editConditionalBreakpointAction
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.editConditionalBreakpointAction
'
;
static
LABEL
=
nls
.
localize
(
'
editConditionalBreakpoint
'
,
"
Edit Breakpoint...
"
);
constructor
(
id
:
string
,
label
:
string
,
...
...
@@ -584,7 +584,7 @@ export class EditConditionalBreakpointAction extends AbstractDebugAction {
export
class
SetValueAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.setValue
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.setValue
'
;
static
LABEL
=
nls
.
localize
(
'
setValue
'
,
"
Set Value
"
);
constructor
(
id
:
string
,
label
:
string
,
private
variable
:
Variable
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -607,7 +607,7 @@ export class SetValueAction extends AbstractDebugAction {
export
class
AddWatchExpressionAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.addWatchExpression
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.addWatchExpression
'
;
static
LABEL
=
nls
.
localize
(
'
addWatchExpression
'
,
"
Add Expression
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -626,7 +626,7 @@ export class AddWatchExpressionAction extends AbstractDebugAction {
}
export
class
EditWatchExpressionAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.editWatchExpression
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.editWatchExpression
'
;
static
LABEL
=
nls
.
localize
(
'
editWatchExpression
'
,
"
Edit Expression
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -640,7 +640,7 @@ export class EditWatchExpressionAction extends AbstractDebugAction {
}
export
class
AddToWatchExpressionsAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.addToWatchExpressions
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.addToWatchExpressions
'
;
static
LABEL
=
nls
.
localize
(
'
addToWatchExpressions
'
,
"
Add to Watch
"
);
constructor
(
id
:
string
,
label
:
string
,
private
expression
:
IExpression
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -656,7 +656,7 @@ export class AddToWatchExpressionsAction extends AbstractDebugAction {
}
export
class
RemoveWatchExpressionAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.removeWatchExpression
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.removeWatchExpression
'
;
static
LABEL
=
nls
.
localize
(
'
removeWatchExpression
'
,
"
Remove Expression
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -670,7 +670,7 @@ export class RemoveWatchExpressionAction extends AbstractDebugAction {
}
export
class
RemoveAllWatchExpressionsAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.viewlet.action.removeAllWatchExpressions
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.removeAllWatchExpressions
'
;
static
LABEL
=
nls
.
localize
(
'
removeAllWatchExpressions
'
,
"
Remove All Expressions
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -689,7 +689,7 @@ export class RemoveAllWatchExpressionsAction extends AbstractDebugAction {
}
export
class
ClearReplAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.debug.panel.action.clearReplAction
'
;
static
readonly
ID
=
'
workbench.debug.panel.action.clearReplAction
'
;
static
LABEL
=
nls
.
localize
(
'
clearRepl
'
,
"
Clear Console
"
);
constructor
(
id
:
string
,
label
:
string
,
...
...
@@ -709,7 +709,7 @@ export class ClearReplAction extends AbstractDebugAction {
}
export
class
ToggleReplAction
extends
TogglePanelAction
{
static
ID
=
'
workbench.debug.action.toggleRepl
'
;
static
readonly
ID
=
'
workbench.debug.action.toggleRepl
'
;
static
LABEL
=
nls
.
localize
({
comment
:
[
'
Debug is a noun in this context, not a verb.
'
],
key
:
'
debugConsoleAction
'
},
'
Debug Console
'
);
private
toDispose
:
lifecycle
.
IDisposable
[];
...
...
@@ -751,7 +751,7 @@ export class ToggleReplAction extends TogglePanelAction {
export
class
FocusReplAction
extends
Action
{
static
ID
=
'
workbench.debug.action.focusRepl
'
;
static
readonly
ID
=
'
workbench.debug.action.focusRepl
'
;
static
LABEL
=
nls
.
localize
({
comment
:
[
'
Debug is a noun in this context, not a verb.
'
],
key
:
'
debugFocusConsole
'
},
'
Focus Debug Console
'
);
...
...
@@ -767,7 +767,7 @@ export class FocusReplAction extends Action {
}
export
class
FocusProcessAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.focusProcess
'
;
static
readonly
ID
=
'
workbench.action.debug.focusProcess
'
;
static
LABEL
=
nls
.
localize
(
'
focusProcess
'
,
"
Focus Process
"
);
constructor
(
id
:
string
,
label
:
string
,
...
...
@@ -793,7 +793,7 @@ export class FocusProcessAction extends AbstractDebugAction {
// Actions used by the chakra debugger
export
class
StepBackAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.stepBack
'
;
static
readonly
ID
=
'
workbench.action.debug.stepBack
'
;
static
LABEL
=
nls
.
localize
(
'
stepBackDebug
'
,
"
Step Back
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
@@ -816,7 +816,7 @@ export class StepBackAction extends AbstractDebugAction {
}
export
class
ReverseContinueAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.reverseContinue
'
;
static
readonly
ID
=
'
workbench.action.debug.reverseContinue
'
;
static
LABEL
=
nls
.
localize
(
'
reverseContinue
'
,
"
Reverse
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
...
...
src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts
浏览文件 @
d1f9e098
...
...
@@ -32,7 +32,7 @@ interface IDebugEditorModelData {
const
stickiness
=
TrackedRangeStickiness
.
NeverGrowsWhenTypingAtEdges
;
export
class
DebugEditorModelManager
implements
IWorkbenchContribution
{
static
ID
=
'
breakpointManager
'
;
static
readonly
ID
=
'
breakpointManager
'
;
private
modelDataMap
:
Map
<
string
,
IDebugEditorModelData
>
;
private
toDispose
:
lifecycle
.
IDisposable
[];
...
...
src/vs/workbench/parts/debug/browser/debugViewlet.ts
浏览文件 @
d1f9e098
...
...
@@ -138,7 +138,7 @@ export class DebugViewlet extends PersistentViewsViewlet {
export
class
FocusVariablesViewAction
extends
Action
{
static
ID
=
'
workbench.debug.action.focusVariablesView
'
;
static
readonly
ID
=
'
workbench.debug.action.focusVariablesView
'
;
static
LABEL
=
nls
.
localize
(
'
debugFocusVariablesView
'
,
'
Focus Variables
'
);
constructor
(
id
:
string
,
label
:
string
,
...
...
@@ -156,7 +156,7 @@ export class FocusVariablesViewAction extends Action {
export
class
FocusWatchViewAction
extends
Action
{
static
ID
=
'
workbench.debug.action.focusWatchView
'
;
static
readonly
ID
=
'
workbench.debug.action.focusWatchView
'
;
static
LABEL
=
nls
.
localize
({
comment
:
[
'
Debug is a noun in this context, not a verb.
'
],
key
:
'
debugFocusWatchView
'
},
'
Focus Watch
'
);
constructor
(
id
:
string
,
label
:
string
,
...
...
@@ -174,7 +174,7 @@ export class FocusWatchViewAction extends Action {
export
class
FocusCallStackViewAction
extends
Action
{
static
ID
=
'
workbench.debug.action.focusCallStackView
'
;
static
readonly
ID
=
'
workbench.debug.action.focusCallStackView
'
;
static
LABEL
=
nls
.
localize
({
comment
:
[
'
Debug is a noun in this context, not a verb.
'
],
key
:
'
debugFocusCallStackView
'
},
'
Focus CallStack
'
);
constructor
(
id
:
string
,
label
:
string
,
...
...
@@ -192,7 +192,7 @@ export class FocusCallStackViewAction extends Action {
export
class
FocusBreakpointsViewAction
extends
Action
{
static
ID
=
'
workbench.debug.action.focusBreakpointsView
'
;
static
readonly
ID
=
'
workbench.debug.action.focusBreakpointsView
'
;
static
LABEL
=
nls
.
localize
({
comment
:
[
'
Debug is a noun in this context, not a verb.
'
],
key
:
'
debugFocusBreakpointsView
'
},
'
Focus Breakpoints
'
);
constructor
(
id
:
string
,
label
:
string
,
...
...
src/vs/workbench/parts/debug/electron-browser/breakpointsView.ts
浏览文件 @
d1f9e098
...
...
@@ -267,7 +267,7 @@ class BreakpointsRenderer implements IRenderer<IBreakpoint, IBreakpointTemplateD
// noop
}
static
ID
=
'
breakpoints
'
;
static
readonly
ID
=
'
breakpoints
'
;
get
templateId
()
{
return
BreakpointsRenderer
.
ID
;
...
...
@@ -331,7 +331,7 @@ class ExceptionBreakpointsRenderer implements IRenderer<IExceptionBreakpoint, IB
// noop
}
static
ID
=
'
exceptionbreakpoints
'
;
static
readonly
ID
=
'
exceptionbreakpoints
'
;
get
templateId
()
{
return
ExceptionBreakpointsRenderer
.
ID
;
...
...
@@ -376,7 +376,7 @@ class FunctionBreakpointsRenderer implements IRenderer<IFunctionBreakpoint, IBas
// noop
}
static
ID
=
'
functionbreakpoints
'
;
static
readonly
ID
=
'
functionbreakpoints
'
;
get
templateId
()
{
return
FunctionBreakpointsRenderer
.
ID
;
...
...
@@ -429,7 +429,7 @@ class FunctionBreakpointInputRenderer implements IRenderer<IFunctionBreakpoint,
// noop
}
static
ID
=
'
functionbreakpointinput
'
;
static
readonly
ID
=
'
functionbreakpointinput
'
;
get
templateId
()
{
return
FunctionBreakpointInputRenderer
.
ID
;
...
...
src/vs/workbench/parts/debug/electron-browser/electronDebugActions.ts
浏览文件 @
d1f9e098
...
...
@@ -13,7 +13,7 @@ import { IDebugService, IStackFrame } from 'vs/workbench/parts/debug/common/debu
import
{
clipboard
}
from
'
electron
'
;
export
class
CopyValueAction
extends
Action
{
static
ID
=
'
workbench.debug.viewlet.action.copyValue
'
;
static
readonly
ID
=
'
workbench.debug.viewlet.action.copyValue
'
;
static
LABEL
=
nls
.
localize
(
'
copyValue
'
,
"
Copy Value
"
);
constructor
(
id
:
string
,
label
:
string
,
private
value
:
any
,
@
IDebugService
private
debugService
:
IDebugService
)
{
...
...
@@ -35,7 +35,7 @@ export class CopyValueAction extends Action {
}
export
class
CopyAction
extends
Action
{
static
ID
=
'
workbench.debug.action.copy
'
;
static
readonly
ID
=
'
workbench.debug.action.copy
'
;
static
LABEL
=
nls
.
localize
(
'
copy
'
,
"
Copy
"
);
public
run
():
TPromise
<
any
>
{
...
...
@@ -45,7 +45,7 @@ export class CopyAction extends Action {
}
export
class
CopyAllAction
extends
Action
{
static
ID
=
'
workbench.debug.action.copyAll
'
;
static
readonly
ID
=
'
workbench.debug.action.copyAll
'
;
static
LABEL
=
nls
.
localize
(
'
copyAll
'
,
"
Copy All
"
);
constructor
(
id
:
string
,
label
:
string
,
private
tree
:
ITree
)
{
...
...
@@ -69,7 +69,7 @@ export class CopyAllAction extends Action {
}
export
class
CopyStackTraceAction
extends
Action
{
static
ID
=
'
workbench.action.debug.copyStackTrace
'
;
static
readonly
ID
=
'
workbench.action.debug.copyStackTrace
'
;
static
LABEL
=
nls
.
localize
(
'
copyStackTrace
'
,
"
Copy Call Stack
"
);
public
run
(
frame
:
IStackFrame
):
TPromise
<
any
>
{
...
...
src/vs/workbench/parts/extensions/browser/extensionsActions.ts
浏览文件 @
d1f9e098
...
...
@@ -350,7 +350,7 @@ export class DropDownMenuActionItem extends ActionItem {
export
class
ManageExtensionAction
extends
Action
{
static
ID
=
'
extensions.manage
'
;
static
readonly
ID
=
'
extensions.manage
'
;
private
static
readonly
Class
=
'
extension-action manage
'
;
private
static
readonly
HideManageExtensionClass
=
`
${
ManageExtensionAction
.
Class
}
hide`
;
...
...
@@ -413,7 +413,7 @@ export class ManageExtensionAction extends Action {
export
class
EnableForWorkspaceAction
extends
Action
implements
IExtensionAction
{
static
ID
=
'
extensions.enableForWorkspace
'
;
static
readonly
ID
=
'
extensions.enableForWorkspace
'
;
static
LABEL
=
localize
(
'
enableForWorkspaceAction
'
,
"
Enable (Workspace)
"
);
private
disposables
:
IDisposable
[]
=
[];
...
...
@@ -453,7 +453,7 @@ export class EnableForWorkspaceAction extends Action implements IExtensionAction
export
class
EnableGloballyAction
extends
Action
implements
IExtensionAction
{
static
ID
=
'
extensions.enableGlobally
'
;
static
readonly
ID
=
'
extensions.enableGlobally
'
;
static
LABEL
=
localize
(
'
enableGloballyAction
'
,
"
Enable
"
);
private
disposables
:
IDisposable
[]
=
[];
...
...
@@ -491,7 +491,7 @@ export class EnableGloballyAction extends Action implements IExtensionAction {
export
class
EnableAction
extends
Action
{
static
ID
=
'
extensions.enable
'
;
static
readonly
ID
=
'
extensions.enable
'
;
private
static
readonly
EnabledClass
=
'
extension-action prominent enable
'
;
private
static
readonly
DisabledClass
=
`
${
EnableAction
.
EnabledClass
}
disabled`
;
...
...
@@ -549,7 +549,7 @@ export class EnableAction extends Action {
export
class
DisableForWorkspaceAction
extends
Action
implements
IExtensionAction
{
static
ID
=
'
extensions.disableForWorkspace
'
;
static
readonly
ID
=
'
extensions.disableForWorkspace
'
;
static
LABEL
=
localize
(
'
disableForWorkspaceAction
'
,
"
Disable (Workspace)
"
);
private
disposables
:
IDisposable
[]
=
[];
...
...
@@ -588,7 +588,7 @@ export class DisableForWorkspaceAction extends Action implements IExtensionActio
export
class
DisableGloballyAction
extends
Action
implements
IExtensionAction
{
static
ID
=
'
extensions.disableGlobally
'
;
static
readonly
ID
=
'
extensions.disableGlobally
'
;
static
LABEL
=
localize
(
'
disableGloballyAction
'
,
"
Disable
"
);
private
disposables
:
IDisposable
[]
=
[];
...
...
@@ -625,7 +625,7 @@ export class DisableGloballyAction extends Action implements IExtensionAction {
export
class
DisableAction
extends
Action
{
static
ID
=
'
extensions.disable
'
;
static
readonly
ID
=
'
extensions.disable
'
;
private
static
readonly
EnabledClass
=
'
extension-action disable
'
;
private
static
readonly
DisabledClass
=
`
${
DisableAction
.
EnabledClass
}
disabled`
;
...
...
@@ -680,7 +680,7 @@ export class DisableAction extends Action {
export
class
CheckForUpdatesAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.checkForUpdates
'
;
static
readonly
ID
=
'
workbench.extensions.action.checkForUpdates
'
;
static
LABEL
=
localize
(
'
checkForUpdates
'
,
"
Check for Updates
"
);
constructor
(
...
...
@@ -720,7 +720,7 @@ export class ToggleAutoUpdateAction extends Action {
export
class
EnableAutoUpdateAction
extends
ToggleAutoUpdateAction
{
static
ID
=
'
workbench.extensions.action.enableAutoUpdate
'
;
static
readonly
ID
=
'
workbench.extensions.action.enableAutoUpdate
'
;
static
LABEL
=
localize
(
'
enableAutoUpdate
'
,
"
Enable Auto Updating Extensions
"
);
constructor
(
...
...
@@ -734,7 +734,7 @@ export class EnableAutoUpdateAction extends ToggleAutoUpdateAction {
export
class
DisableAutoUpdateAction
extends
ToggleAutoUpdateAction
{
static
ID
=
'
workbench.extensions.action.disableAutoUpdate
'
;
static
readonly
ID
=
'
workbench.extensions.action.disableAutoUpdate
'
;
static
LABEL
=
localize
(
'
disableAutoUpdate
'
,
"
Disable Auto Updating Extensions
"
);
constructor
(
...
...
@@ -748,7 +748,7 @@ export class DisableAutoUpdateAction extends ToggleAutoUpdateAction {
export
class
UpdateAllAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.updateAllExtensions
'
;
static
readonly
ID
=
'
workbench.extensions.action.updateAllExtensions
'
;
static
LABEL
=
localize
(
'
updateAll
'
,
"
Update All Extensions
"
);
private
disposables
:
IDisposable
[]
=
[];
...
...
@@ -899,7 +899,7 @@ export class InstallExtensionsAction extends OpenExtensionsViewletAction {
export
class
ShowEnabledExtensionsAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.showEnabledExtensions
'
;
static
readonly
ID
=
'
workbench.extensions.action.showEnabledExtensions
'
;
static
LABEL
=
localize
(
'
showEnabledExtensions
'
,
'
Show Enabled Extensions
'
);
constructor
(
...
...
@@ -922,7 +922,7 @@ export class ShowEnabledExtensionsAction extends Action {
export
class
ShowInstalledExtensionsAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.showInstalledExtensions
'
;
static
readonly
ID
=
'
workbench.extensions.action.showInstalledExtensions
'
;
static
LABEL
=
localize
(
'
showInstalledExtensions
'
,
"
Show Installed Extensions
"
);
constructor
(
...
...
@@ -945,7 +945,7 @@ export class ShowInstalledExtensionsAction extends Action {
export
class
ShowDisabledExtensionsAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.showDisabledExtensions
'
;
static
readonly
ID
=
'
workbench.extensions.action.showDisabledExtensions
'
;
static
LABEL
=
localize
(
'
showDisabledExtensions
'
,
"
Show Disabled Extensions
"
);
constructor
(
...
...
@@ -968,7 +968,7 @@ export class ShowDisabledExtensionsAction extends Action {
export
class
ClearExtensionsInputAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.clearExtensionsInput
'
;
static
readonly
ID
=
'
workbench.extensions.action.clearExtensionsInput
'
;
static
LABEL
=
localize
(
'
clearExtensionsInput
'
,
"
Clear Extensions Input
"
);
private
disposables
:
IDisposable
[]
=
[];
...
...
@@ -1004,7 +1004,7 @@ export class ClearExtensionsInputAction extends Action {
export
class
ShowOutdatedExtensionsAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.listOutdatedExtensions
'
;
static
readonly
ID
=
'
workbench.extensions.action.listOutdatedExtensions
'
;
static
LABEL
=
localize
(
'
showOutdatedExtensions
'
,
"
Show Outdated Extensions
"
);
constructor
(
...
...
@@ -1027,7 +1027,7 @@ export class ShowOutdatedExtensionsAction extends Action {
export
class
ShowPopularExtensionsAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.showPopularExtensions
'
;
static
readonly
ID
=
'
workbench.extensions.action.showPopularExtensions
'
;
static
LABEL
=
localize
(
'
showPopularExtensions
'
,
"
Show Popular Extensions
"
);
constructor
(
...
...
@@ -1050,7 +1050,7 @@ export class ShowPopularExtensionsAction extends Action {
export
class
ShowRecommendedExtensionsAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.showRecommendedExtensions
'
;
static
readonly
ID
=
'
workbench.extensions.action.showRecommendedExtensions
'
;
static
LABEL
=
localize
(
'
showRecommendedExtensions
'
,
"
Show Recommended Extensions
"
);
constructor
(
...
...
@@ -1073,7 +1073,7 @@ export class ShowRecommendedExtensionsAction extends Action {
export
class
InstallWorkspaceRecommendedExtensionsAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.installWorkspaceRecommendedExtensions
'
;
static
readonly
ID
=
'
workbench.extensions.action.installWorkspaceRecommendedExtensions
'
;
static
LABEL
=
localize
(
'
installWorkspaceRecommendedExtensions
'
,
"
Install All Workspace Recommended Extensions
"
);
private
disposables
:
IDisposable
[]
=
[];
...
...
@@ -1150,7 +1150,7 @@ export class InstallWorkspaceRecommendedExtensionsAction extends Action {
export
class
InstallRecommendedExtensionAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.installRecommendedExtension
'
;
static
readonly
ID
=
'
workbench.extensions.action.installRecommendedExtension
'
;
static
LABEL
=
localize
(
'
installRecommendedExtension
'
,
"
Install Recommended Extension
"
);
private
extensionId
:
string
;
...
...
@@ -1200,7 +1200,7 @@ export class InstallRecommendedExtensionAction extends Action {
export
class
ShowRecommendedKeymapExtensionsAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.showRecommendedKeymapExtensions
'
;
static
readonly
ID
=
'
workbench.extensions.action.showRecommendedKeymapExtensions
'
;
static
SHORT_LABEL
=
localize
(
'
showRecommendedKeymapExtensionsShort
'
,
"
Keymaps
"
);
constructor
(
...
...
@@ -1223,7 +1223,7 @@ export class ShowRecommendedKeymapExtensionsAction extends Action {
export
class
ShowLanguageExtensionsAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.showLanguageExtensions
'
;
static
readonly
ID
=
'
workbench.extensions.action.showLanguageExtensions
'
;
static
SHORT_LABEL
=
localize
(
'
showLanguageExtensionsShort
'
,
"
Language Extensions
"
);
constructor
(
...
...
@@ -1246,7 +1246,7 @@ export class ShowLanguageExtensionsAction extends Action {
export
class
ShowAzureExtensionsAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.showAzureExtensions
'
;
static
readonly
ID
=
'
workbench.extensions.action.showAzureExtensions
'
;
static
SHORT_LABEL
=
localize
(
'
showAzureExtensionsShort
'
,
"
Azure Extensions
"
);
constructor
(
...
...
@@ -1445,7 +1445,7 @@ export abstract class AbstractConfigureRecommendedExtensionsAction extends Actio
export
class
ConfigureWorkspaceRecommendedExtensionsAction
extends
AbstractConfigureRecommendedExtensionsAction
{
static
ID
=
'
workbench.extensions.action.configureWorkspaceRecommendedExtensions
'
;
static
readonly
ID
=
'
workbench.extensions.action.configureWorkspaceRecommendedExtensions
'
;
static
LABEL
=
localize
(
'
configureWorkspaceRecommendedExtensions
'
,
"
Configure Recommended Extensions (Workspace)
"
);
private
disposables
:
IDisposable
[]
=
[];
...
...
@@ -1486,7 +1486,7 @@ export class ConfigureWorkspaceRecommendedExtensionsAction extends AbstractConfi
export
class
ConfigureWorkspaceFolderRecommendedExtensionsAction
extends
AbstractConfigureRecommendedExtensionsAction
{
static
ID
=
'
workbench.extensions.action.configureWorkspaceFolderRecommendedExtensions
'
;
static
readonly
ID
=
'
workbench.extensions.action.configureWorkspaceFolderRecommendedExtensions
'
;
static
LABEL
=
localize
(
'
configureWorkspaceFolderRecommendedExtensions
'
,
"
Configure Recommended Extensions (Workspace Folder)
"
);
private
disposables
:
IDisposable
[]
=
[];
...
...
@@ -1555,7 +1555,7 @@ export class BuiltinStatusLabelAction extends Action {
export
class
DisableAllAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.disableAll
'
;
static
readonly
ID
=
'
workbench.extensions.action.disableAll
'
;
static
LABEL
=
localize
(
'
disableAll
'
,
"
Disable All Installed Extensions
"
);
private
disposables
:
IDisposable
[]
=
[];
...
...
@@ -1585,7 +1585,7 @@ export class DisableAllAction extends Action {
export
class
DisableAllWorkpsaceAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.disableAllWorkspace
'
;
static
readonly
ID
=
'
workbench.extensions.action.disableAllWorkspace
'
;
static
LABEL
=
localize
(
'
disableAllWorkspace
'
,
"
Disable All Installed Extensions for this Workspace
"
);
private
disposables
:
IDisposable
[]
=
[];
...
...
@@ -1617,7 +1617,7 @@ export class DisableAllWorkpsaceAction extends Action {
export
class
EnableAllAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.enableAll
'
;
static
readonly
ID
=
'
workbench.extensions.action.enableAll
'
;
static
LABEL
=
localize
(
'
enableAll
'
,
"
Enable All Installed Extensions
"
);
private
disposables
:
IDisposable
[]
=
[];
...
...
@@ -1648,7 +1648,7 @@ export class EnableAllAction extends Action {
export
class
EnableAllWorkpsaceAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.enableAllWorkspace
'
;
static
readonly
ID
=
'
workbench.extensions.action.enableAllWorkspace
'
;
static
LABEL
=
localize
(
'
enableAllWorkspace
'
,
"
Enable All Installed Extensions for this Workspace
"
);
private
disposables
:
IDisposable
[]
=
[];
...
...
src/vs/workbench/parts/extensions/common/extensionsInput.ts
浏览文件 @
d1f9e098
...
...
@@ -13,7 +13,7 @@ import URI from 'vs/base/common/uri';
export
class
ExtensionsInput
extends
EditorInput
{
static
get
ID
()
{
return
'
workbench.extensions.input2
'
;
}
static
readonly
ID
=
'
workbench.extensions.input2
'
;
get
extension
():
IExtension
{
return
this
.
_extension
;
}
constructor
(
private
_extension
:
IExtension
)
{
...
...
src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts
浏览文件 @
d1f9e098
...
...
@@ -44,9 +44,6 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
private
_fileBasedRecommendations
:
{
[
id
:
string
]:
number
;
}
=
Object
.
create
(
null
);
private
_exeBasedRecommendations
:
{
[
id
:
string
]:
string
;
}
=
Object
.
create
(
null
);
private
_availableRecommendations
:
{
[
pattern
:
string
]:
string
[]
}
=
Object
.
create
(
null
);
private
importantRecommendations
:
{
[
id
:
string
]:
{
name
:
string
;
pattern
:
string
;
}
}
=
Object
.
create
(
null
);
private
importantRecommendationsIgnoreList
:
string
[];
private
_allRecommendations
:
string
[]
=
[];
private
_disposables
:
IDisposable
[]
=
[];
private
_allWorkspaceRecommendedExtensions
:
string
[]
=
[];
...
...
@@ -71,8 +68,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
return
;
}
this
.
_suggestTips
();
this
.
_suggestFileBasedRecommendations
();
this
.
_suggestWorkspaceRecommendations
();
// Executable based recommendations carry out a lot of file stats, so run them after 10 secs
...
...
@@ -138,7 +134,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
const
fileBased
=
Object
.
keys
(
this
.
_fileBasedRecommendations
)
.
sort
((
a
,
b
)
=>
{
if
(
this
.
_fileBasedRecommendations
[
a
]
===
this
.
_fileBasedRecommendations
[
b
])
{
if
(
product
.
extensionImportantTips
[
a
])
{
if
(
!
product
.
extensionImportantTips
||
product
.
extensionImportantTips
[
a
])
{
return
-
1
;
}
if
(
product
.
extensionImportantTips
[
b
])
{
...
...
@@ -154,19 +150,15 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
return
Object
.
keys
(
this
.
_exeBasedRecommendations
);
}
getKeymapRecommendations
():
string
[]
{
return
product
.
keymapExtensionTips
||
[];
}
private
_suggest
Tip
s
()
{
private
_suggest
FileBasedRecommendation
s
()
{
const
extensionTips
=
product
.
extensionTips
;
if
(
!
extensionTips
)
{
return
;
}
this
.
importantRecommendations
=
product
.
extensionImportantTips
||
Object
.
create
(
null
);
this
.
importantRecommendationsIgnoreList
=
<
string
[]
>
JSON
.
parse
(
this
.
storageService
.
get
(
'
extensionsAssistant/importantRecommendationsIgnore
'
,
StorageScope
.
GLOBAL
,
'
[]
'
));
// group ids by pattern, like {**/*.md} -> [ext.foo1, ext.bar2]
this
.
_availableRecommendations
=
Object
.
create
(
null
);
...
...
@@ -191,8 +183,9 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
}
});
const
allRecommendations
=
[];
forEach
(
this
.
_availableRecommendations
,
({
value
:
ids
})
=>
{
this
.
_
allRecommendations
.
push
(...
ids
);
allRecommendations
.
push
(...
ids
);
});
// retrieve ids of previous recommendations
...
...
@@ -200,7 +193,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
if
(
Array
.
isArray
<
string
>
(
storedRecommendationsJson
))
{
for
(
let
id
of
<
string
[]
>
storedRecommendationsJson
)
{
if
(
this
.
_
allRecommendations
.
indexOf
(
id
)
>
-
1
)
{
if
(
allRecommendations
.
indexOf
(
id
)
>
-
1
)
{
this
.
_fileBasedRecommendations
[
id
]
=
Date
.
now
();
}
}
...
...
@@ -209,7 +202,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
forEach
(
storedRecommendationsJson
,
entry
=>
{
if
(
typeof
entry
.
value
===
'
number
'
)
{
const
diff
=
(
now
-
entry
.
value
)
/
milliSecondsInADay
;
if
(
diff
<=
7
&&
this
.
_
allRecommendations
.
indexOf
(
entry
.
key
)
>
-
1
)
{
if
(
diff
<=
7
&&
allRecommendations
.
indexOf
(
entry
.
key
)
>
-
1
)
{
this
.
_fileBasedRecommendations
[
entry
.
key
]
=
entry
.
value
;
}
}
...
...
@@ -248,17 +241,18 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
);
const
config
=
this
.
configurationService
.
getValue
<
IExtensionsConfiguration
>
(
ConfigurationKey
);
const
importantRecommendationsIgnoreList
=
<
string
[]
>
JSON
.
parse
(
this
.
storageService
.
get
(
'
extensionsAssistant/importantRecommendationsIgnore
'
,
StorageScope
.
GLOBAL
,
'
[]
'
));
if
(
config
.
ignoreRecommendations
)
{
if
(
config
.
ignoreRecommendations
||
!
product
.
extensionImportantTips
)
{
return
;
}
this
.
extensionsService
.
getInstalled
(
LocalExtensionType
.
User
).
done
(
local
=>
{
Object
.
keys
(
this
.
importantRecommendation
s
)
.
filter
(
id
=>
this
.
importantRecommendationsIgnoreList
.
indexOf
(
id
)
===
-
1
)
Object
.
keys
(
product
.
extensionImportantTip
s
)
.
filter
(
id
=>
importantRecommendationsIgnoreList
.
indexOf
(
id
)
===
-
1
)
.
filter
(
id
=>
local
.
every
(
local
=>
`
${
local
.
manifest
.
publisher
}
.
${
local
.
manifest
.
name
}
`
!==
id
))
.
forEach
(
id
=>
{
const
{
pattern
,
name
}
=
this
.
importantRecommendation
s
[
id
];
const
{
pattern
,
name
}
=
product
.
extensionImportantTip
s
[
id
];
if
(
!
match
(
pattern
,
uri
.
fsPath
))
{
return
;
...
...
@@ -299,10 +293,10 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
*/
this
.
telemetryService
.
publicLog
(
'
extensionRecommendations:popup
'
,
{
userReaction
:
'
show
'
,
extensionId
:
name
});
return
recommendationsAction
.
run
();
case
2
:
this
.
importantRecommendationsIgnoreList
.
push
(
id
);
case
2
:
importantRecommendationsIgnoreList
.
push
(
id
);
this
.
storageService
.
store
(
'
extensionsAssistant/importantRecommendationsIgnore
'
,
JSON
.
stringify
(
this
.
importantRecommendationsIgnoreList
),
JSON
.
stringify
(
importantRecommendationsIgnoreList
),
StorageScope
.
GLOBAL
);
/* __GDPR__
...
...
src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts
浏览文件 @
d1f9e098
...
...
@@ -20,7 +20,7 @@ import { mnemonicButtonLabel } from 'vs/base/common/labels';
export
class
OpenExtensionsFolderAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.openExtensionsFolder
'
;
static
readonly
ID
=
'
workbench.extensions.action.openExtensionsFolder
'
;
static
LABEL
=
localize
(
'
openExtensionsFolder
'
,
"
Open Extensions Folder
"
);
constructor
(
...
...
@@ -51,7 +51,7 @@ export class OpenExtensionsFolderAction extends Action {
export
class
InstallVSIXAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.installVSIX
'
;
static
readonly
ID
=
'
workbench.extensions.action.installVSIX
'
;
static
LABEL
=
localize
(
'
installVSIX
'
,
"
Install from VSIX...
"
);
constructor
(
...
...
src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts
浏览文件 @
d1f9e098
...
...
@@ -413,7 +413,7 @@ export class RuntimeExtensionsEditor extends BaseEditor {
export
class
RuntimeExtensionsInput
extends
EditorInput
{
static
ID
=
'
workbench.runtimeExtensions.input
'
;
static
readonly
ID
=
'
workbench.runtimeExtensions.input
'
;
constructor
()
{
super
();
...
...
@@ -451,7 +451,7 @@ export class RuntimeExtensionsInput extends EditorInput {
}
export
class
ShowRuntimeExtensionsAction
extends
Action
{
static
ID
=
'
workbench.action.showRuntimeExtensions
'
;
static
readonly
ID
=
'
workbench.action.showRuntimeExtensions
'
;
static
LABEL
=
nls
.
localize
(
'
showRuntimeExtensions
'
,
"
Show Running Extensions
"
);
constructor
(
...
...
@@ -468,7 +468,7 @@ export class ShowRuntimeExtensionsAction extends Action {
}
class
ReportExtensionIssueAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.reportExtensionIssue
'
;
static
readonly
ID
=
'
workbench.extensions.action.reportExtensionIssue
'
;
static
LABEL
=
nls
.
localize
(
'
reportExtensionIssue
'
,
"
Report Issue
"
);
constructor
(
...
...
@@ -506,7 +506,7 @@ class ReportExtensionIssueAction extends Action {
}
class
ExtensionHostProfileAction
extends
Action
{
static
ID
=
'
workbench.extensions.action.extensionHostProfile
'
;
static
readonly
ID
=
'
workbench.extensions.action.extensionHostProfile
'
;
static
LABEL_START
=
nls
.
localize
(
'
extensionHostProfileStart
'
,
"
Start Extension Host Profile
"
);
static
LABEL_STOP
=
nls
.
localize
(
'
extensionHostProfileStop
'
,
"
Stop Extension Host Profile
"
);
static
STOP_CSS_CLASS
=
'
extension-host-profile-stop
'
;
...
...
@@ -549,7 +549,7 @@ class ExtensionHostProfileAction extends Action {
class
SaveExtensionHostProfileAction
extends
Action
{
static
LABEL
=
nls
.
localize
(
'
saveExtensionHostProfile
'
,
"
Save Extension Host Profile
"
);
static
ID
=
'
workbench.extensions.action.saveExtensionHostProfile
'
;
static
readonly
ID
=
'
workbench.extensions.action.saveExtensionHostProfile
'
;
constructor
(
id
:
string
=
SaveExtensionHostProfileAction
.
ID
,
label
:
string
=
SaveExtensionHostProfileAction
.
LABEL
,
...
...
src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts
浏览文件 @
d1f9e098
...
...
@@ -47,7 +47,7 @@ export class OpenEditorsView extends ViewsViewletPanel {
private
static
readonly
DEFAULT_VISIBLE_OPEN_EDITORS
=
9
;
private
static
readonly
DEFAULT_DYNAMIC_HEIGHT
=
true
;
static
ID
=
'
workbench.explorer.openEditorsView
'
;
static
readonly
ID
=
'
workbench.explorer.openEditorsView
'
;
static
NAME
=
nls
.
localize
({
key
:
'
openEditors
'
,
comment
:
[
'
Open is an adjective
'
]
},
"
Open Editors
"
);
private
model
:
IEditorStacksModel
;
...
...
@@ -413,7 +413,7 @@ class OpenEditorsDelegate implements IDelegate<OpenEditor | IEditorGroup> {
}
class
EditorGroupRenderer
implements
IRenderer
<
IEditorGroup
,
IEditorGroupTemplateData
>
{
static
ID
=
'
editorgroup
'
;
static
readonly
ID
=
'
editorgroup
'
;
constructor
(
private
keybindingService
:
IKeybindingService
,
...
...
@@ -478,7 +478,7 @@ class EditorGroupRenderer implements IRenderer<IEditorGroup, IEditorGroupTemplat
}
class
OpenEditorRenderer
implements
IRenderer
<
OpenEditor
,
IOpenEditorTemplateData
>
{
static
ID
=
'
openeditor
'
;
static
readonly
ID
=
'
openeditor
'
;
public
static
DRAGGED_OPEN_EDITOR
:
OpenEditor
;
constructor
(
...
...
src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts
浏览文件 @
d1f9e098
...
...
@@ -356,7 +356,7 @@ export class KeybindingEditorDecorationsRenderer extends Disposable {
class
DefineKeybindingCommand
extends
EditorCommand
{
static
ID
=
'
editor.action.defineKeybinding
'
;
static
readonly
ID
=
'
editor.action.defineKeybinding
'
;
constructor
()
{
super
({
...
...
src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts
浏览文件 @
d1f9e098
...
...
@@ -23,7 +23,7 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'v
class
OpenSCMViewletAction
extends
ToggleViewletAction
{
static
ID
=
VIEWLET_ID
;
static
readonly
ID
=
VIEWLET_ID
;
static
LABEL
=
localize
(
'
toggleGitViewlet
'
,
"
Show Git
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IViewletService
viewletService
:
IViewletService
,
@
IWorkbenchEditorService
editorService
:
IWorkbenchEditorService
)
{
...
...
src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts
浏览文件 @
d1f9e098
...
...
@@ -28,7 +28,7 @@ import { LIGHT, DARK, HIGH_CONTRAST } from 'vs/platform/theme/common/themeServic
export
class
SelectColorThemeAction
extends
Action
{
static
ID
=
'
workbench.action.selectTheme
'
;
static
readonly
ID
=
'
workbench.action.selectTheme
'
;
static
LABEL
=
localize
(
'
selectTheme.label
'
,
"
Color Theme
"
);
constructor
(
...
...
@@ -87,7 +87,7 @@ export class SelectColorThemeAction extends Action {
class
SelectIconThemeAction
extends
Action
{
static
ID
=
'
workbench.action.selectIconTheme
'
;
static
readonly
ID
=
'
workbench.action.selectIconTheme
'
;
static
LABEL
=
localize
(
'
selectIconTheme.label
'
,
"
File Icon Theme
"
);
constructor
(
...
...
@@ -171,7 +171,7 @@ function toEntries(themes: (IColorTheme | IFileIconTheme)[], label?: string, bor
class
GenerateColorThemeAction
extends
Action
{
static
ID
=
'
workbench.action.generateColorTheme
'
;
static
readonly
ID
=
'
workbench.action.generateColorTheme
'
;
static
LABEL
=
localize
(
'
generateColorTheme.label
'
,
"
Generate Color Theme From Current Settings
"
);
constructor
(
...
...
src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts
浏览文件 @
d1f9e098
...
...
@@ -12,7 +12,7 @@ import URI from 'vs/base/common/uri';
export
class
ReleaseNotesInput
extends
EditorInput
{
static
get
ID
()
{
return
'
workbench.releaseNotes.input
'
;
}
static
readonly
ID
=
'
workbench.releaseNotes.input
'
;
get
version
():
string
{
return
this
.
_version
;
}
get
text
():
string
{
return
this
.
_text
;
}
...
...
src/vs/workbench/parts/update/electron-browser/update.ts
浏览文件 @
d1f9e098
...
...
@@ -165,7 +165,7 @@ export class ShowReleaseNotesAction extends AbstractShowReleaseNotesAction {
export
class
ShowCurrentReleaseNotesAction
extends
AbstractShowReleaseNotesAction
{
static
ID
=
'
update.showCurrentReleaseNotes
'
;
static
readonly
ID
=
'
update.showCurrentReleaseNotes
'
;
static
LABEL
=
nls
.
localize
(
'
showReleaseNotes
'
,
"
Show Release Notes
"
);
constructor
(
...
...
src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts
浏览文件 @
d1f9e098
...
...
@@ -585,7 +585,7 @@ function stripVersion(id: string): string {
export
class
WelcomeInputFactory
implements
IEditorInputFactory
{
static
ID
=
welcomeInputTypeId
;
static
readonly
ID
=
welcomeInputTypeId
;
public
serialize
(
editorInput
:
EditorInput
):
string
{
return
'
{}
'
;
...
...
src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.ts
浏览文件 @
d1f9e098
...
...
@@ -47,7 +47,7 @@ export class EditorWalkThroughAction extends Action {
export
class
EditorWalkThroughInputFactory
implements
IEditorInputFactory
{
static
ID
=
typeId
;
static
readonly
ID
=
typeId
;
public
serialize
(
editorInput
:
EditorInput
):
string
{
return
'
{}
'
;
...
...
src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts
浏览文件 @
d1f9e098
...
...
@@ -104,7 +104,7 @@ suite('ExtHostLanguageFeatureCommands', function () {
isDirty
:
false
,
versionId
:
model
.
getVersionId
(),
modeId
:
model
.
getLanguageIdentifier
().
language
,
ur
l
:
model
.
uri
,
ur
i
:
model
.
uri
,
lines
:
model
.
getValue
().
split
(
model
.
getEOL
()),
EOL
:
model
.
getEOL
(),
}]
...
...
src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts
浏览文件 @
d1f9e098
...
...
@@ -42,7 +42,7 @@ suite('ExtHostDocumentSaveParticipant', () => {
addedDocuments
:
[{
isDirty
:
false
,
modeId
:
'
foo
'
,
ur
l
:
resource
,
ur
i
:
resource
,
versionId
:
1
,
lines
:
[
'
foo
'
],
EOL
:
'
\n
'
,
...
...
src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts
浏览文件 @
d1f9e098
...
...
@@ -28,7 +28,7 @@ suite('ExtHostDocumentsAndEditors', () => {
EOL
:
'
\n
'
,
isDirty
:
true
,
modeId
:
'
fooLang
'
,
ur
l
:
URI
.
parse
(
'
foo:bar
'
),
ur
i
:
URI
.
parse
(
'
foo:bar
'
),
versionId
:
1
,
lines
:
[
'
first
'
,
...
...
src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts
浏览文件 @
d1f9e098
...
...
@@ -93,7 +93,7 @@ suite('ExtHostLanguageFeatures', function () {
isDirty
:
false
,
versionId
:
model
.
getVersionId
(),
modeId
:
model
.
getLanguageIdentifier
().
language
,
ur
l
:
model
.
uri
,
ur
i
:
model
.
uri
,
lines
:
model
.
getValue
().
split
(
model
.
getEOL
()),
EOL
:
model
.
getEOL
(),
}]
...
...
src/vs/workbench/test/electron-browser/api/extHostTextEditors.test.ts
浏览文件 @
d1f9e098
...
...
@@ -35,7 +35,7 @@ suite('ExtHostTextEditors.applyWorkspaceEdit', () => {
addedDocuments
:
[{
isDirty
:
false
,
modeId
:
'
foo
'
,
ur
l
:
resource
,
ur
i
:
resource
,
versionId
:
1337
,
lines
:
[
'
foo
'
],
EOL
:
'
\n
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录