Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MrYangLu
vscode
提交
c1906c79
V
vscode
项目概览
MrYangLu
/
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,发现更多精彩内容 >>
提交
c1906c79
编写于
6月 20, 2017
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update coffee grammar tests
上级
0d0d32f3
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
73 addition
and
48 deletion
+73
-48
extensions/coffeescript/test/colorize-results/test-regex_coffee.json
...coffeescript/test/colorize-results/test-regex_coffee.json
+15
-15
extensions/coffeescript/test/colorize-results/test_coffee.json
...sions/coffeescript/test/colorize-results/test_coffee.json
+24
-24
src/vs/workbench/parts/html/browser/html.contribution.ts
src/vs/workbench/parts/html/browser/html.contribution.ts
+8
-5
src/vs/workbench/parts/html/browser/htmlPreviewPart.ts
src/vs/workbench/parts/html/browser/htmlPreviewPart.ts
+4
-1
src/vs/workbench/parts/html/browser/webview.ts
src/vs/workbench/parts/html/browser/webview.ts
+6
-2
src/vs/workbench/parts/html/common/htmlInput.ts
src/vs/workbench/parts/html/common/htmlInput.ts
+16
-1
未找到文件。
extensions/coffeescript/test/colorize-results/test-regex_coffee.json
浏览文件 @
c1906c79
...
...
@@ -399,33 +399,33 @@
"c"
:
"#{"
,
"t"
:
"source.coffee string.regexp.coffee source.coffee.embedded.source punctuation.section.embedded.coffee"
,
"r"
:
{
"dark_plus"
:
"
string.regexp: #D16969
"
,
"light_plus"
:
"
string.regexp: #811F3
F"
,
"dark_vs"
:
"
string.regexp: #D16969
"
,
"light_vs"
:
"
string.regexp: #811F3
F"
,
"hc_black"
:
"
string.regexp: #D16969
"
"dark_plus"
:
"
punctuation.section.embedded.coffee: #569CD6
"
,
"light_plus"
:
"
punctuation.section.embedded.coffee: #0000F
F"
,
"dark_vs"
:
"
punctuation.section.embedded.coffee: #569CD6
"
,
"light_vs"
:
"
punctuation.section.embedded.coffee: #0000F
F"
,
"hc_black"
:
"
punctuation.section.embedded.coffee: #569CD6
"
}
},
{
"c"
:
"name"
,
"t"
:
"source.coffee string.regexp.coffee source.coffee.embedded.source"
,
"r"
:
{
"dark_plus"
:
"s
tring.regexp: #D16969
"
,
"light_plus"
:
"s
tring.regexp: #811F3F
"
,
"dark_vs"
:
"s
tring.regexp: #D16969
"
,
"light_vs"
:
"s
tring.regexp: #811F3F
"
,
"hc_black"
:
"s
tring.regexp: #D16969
"
"dark_plus"
:
"s
ource.coffee.embedded: #9CDCFE
"
,
"light_plus"
:
"s
ource.coffee.embedded: #FF0000
"
,
"dark_vs"
:
"s
ource.coffee.embedded: #9CDCFE
"
,
"light_vs"
:
"s
ource.coffee.embedded: #FF0000
"
,
"hc_black"
:
"s
ource.coffee.embedded: #D4D4D4
"
}
},
{
"c"
:
"}"
,
"t"
:
"source.coffee string.regexp.coffee source.coffee.embedded.source punctuation.section.embedded.coffee"
,
"r"
:
{
"dark_plus"
:
"
string.regexp: #D16969
"
,
"light_plus"
:
"
string.regexp: #811F3
F"
,
"dark_vs"
:
"
string.regexp: #D16969
"
,
"light_vs"
:
"
string.regexp: #811F3
F"
,
"hc_black"
:
"
string.regexp: #D16969
"
"dark_plus"
:
"
punctuation.section.embedded.coffee: #569CD6
"
,
"light_plus"
:
"
punctuation.section.embedded.coffee: #0000F
F"
,
"dark_vs"
:
"
punctuation.section.embedded.coffee: #569CD6
"
,
"light_vs"
:
"
punctuation.section.embedded.coffee: #0000F
F"
,
"hc_black"
:
"
punctuation.section.embedded.coffee: #569CD6
"
}
},
{
...
...
extensions/coffeescript/test/colorize-results/test_coffee.json
浏览文件 @
c1906c79
...
...
@@ -278,11 +278,11 @@
"c"
:
"#{"
,
"t"
:
"source.coffee string.quoted.double.coffee source.coffee.embedded.source punctuation.section.embedded.coffee"
,
"r"
:
{
"dark_plus"
:
"
string: #CE9178
"
,
"light_plus"
:
"
string: #A31515
"
,
"dark_vs"
:
"
string: #CE9178
"
,
"light_vs"
:
"
string: #A31515
"
,
"hc_black"
:
"
string: #CE9178
"
"dark_plus"
:
"
punctuation.section.embedded.coffee: #569CD6
"
,
"light_plus"
:
"
punctuation.section.embedded.coffee: #0000FF
"
,
"dark_vs"
:
"
punctuation.section.embedded.coffee: #569CD6
"
,
"light_vs"
:
"
punctuation.section.embedded.coffee: #0000FF
"
,
"hc_black"
:
"
punctuation.section.embedded.coffee: #569CD6
"
}
},
{
...
...
@@ -291,8 +291,8 @@
"r"
:
{
"dark_plus"
:
"variable: #9CDCFE"
,
"light_plus"
:
"variable: #001080"
,
"dark_vs"
:
"s
tring: #CE9178
"
,
"light_vs"
:
"s
tring: #A31515
"
,
"dark_vs"
:
"s
ource.coffee.embedded: #9CDCFE
"
,
"light_vs"
:
"s
ource.coffee.embedded: #FF0000
"
,
"hc_black"
:
"variable: #9CDCFE"
}
},
...
...
@@ -300,11 +300,11 @@
"c"
:
"}"
,
"t"
:
"source.coffee string.quoted.double.coffee source.coffee.embedded.source punctuation.section.embedded.coffee"
,
"r"
:
{
"dark_plus"
:
"
string: #CE9178
"
,
"light_plus"
:
"
string: #A31515
"
,
"dark_vs"
:
"
string: #CE9178
"
,
"light_vs"
:
"
string: #A31515
"
,
"hc_black"
:
"
string: #CE9178
"
"dark_plus"
:
"
punctuation.section.embedded.coffee: #569CD6
"
,
"light_plus"
:
"
punctuation.section.embedded.coffee: #0000FF
"
,
"dark_vs"
:
"
punctuation.section.embedded.coffee: #569CD6
"
,
"light_vs"
:
"
punctuation.section.embedded.coffee: #0000FF
"
,
"hc_black"
:
"
punctuation.section.embedded.coffee: #569CD6
"
}
},
{
...
...
@@ -531,11 +531,11 @@
"c"
:
"#{"
,
"t"
:
"source.coffee string.quoted.double.coffee source.coffee.embedded.source punctuation.section.embedded.coffee"
,
"r"
:
{
"dark_plus"
:
"
string: #CE9178
"
,
"light_plus"
:
"
string: #A31515
"
,
"dark_vs"
:
"
string: #CE9178
"
,
"light_vs"
:
"
string: #A31515
"
,
"hc_black"
:
"
string: #CE9178
"
"dark_plus"
:
"
punctuation.section.embedded.coffee: #569CD6
"
,
"light_plus"
:
"
punctuation.section.embedded.coffee: #0000FF
"
,
"dark_vs"
:
"
punctuation.section.embedded.coffee: #569CD6
"
,
"light_vs"
:
"
punctuation.section.embedded.coffee: #0000FF
"
,
"hc_black"
:
"
punctuation.section.embedded.coffee: #569CD6
"
}
},
{
...
...
@@ -544,8 +544,8 @@
"r"
:
{
"dark_plus"
:
"variable: #9CDCFE"
,
"light_plus"
:
"variable: #001080"
,
"dark_vs"
:
"s
tring: #CE9178
"
,
"light_vs"
:
"s
tring: #A31515
"
,
"dark_vs"
:
"s
ource.coffee.embedded: #9CDCFE
"
,
"light_vs"
:
"s
ource.coffee.embedded: #FF0000
"
,
"hc_black"
:
"variable: #9CDCFE"
}
},
...
...
@@ -553,11 +553,11 @@
"c"
:
"}"
,
"t"
:
"source.coffee string.quoted.double.coffee source.coffee.embedded.source punctuation.section.embedded.coffee"
,
"r"
:
{
"dark_plus"
:
"
string: #CE9178
"
,
"light_plus"
:
"
string: #A31515
"
,
"dark_vs"
:
"
string: #CE9178
"
,
"light_vs"
:
"
string: #A31515
"
,
"hc_black"
:
"
string: #CE9178
"
"dark_plus"
:
"
punctuation.section.embedded.coffee: #569CD6
"
,
"light_plus"
:
"
punctuation.section.embedded.coffee: #0000FF
"
,
"dark_vs"
:
"
punctuation.section.embedded.coffee: #569CD6
"
,
"light_vs"
:
"
punctuation.section.embedded.coffee: #0000FF
"
,
"hc_black"
:
"
punctuation.section.embedded.coffee: #569CD6
"
}
},
{
...
...
src/vs/workbench/parts/html/browser/html.contribution.ts
浏览文件 @
c1906c79
...
...
@@ -10,7 +10,7 @@ import { CommandsRegistry } from 'vs/platform/commands/common/commands';
import
{
IInstantiationService
,
ServicesAccessor
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
Position
as
EditorPosition
}
from
'
vs/platform/editor/common/editor
'
;
import
{
HtmlInput
}
from
'
../common/htmlInput
'
;
import
{
HtmlInput
,
HtmlInputOptions
}
from
'
../common/htmlInput
'
;
import
{
HtmlPreviewPart
}
from
'
vs/workbench/parts/html/browser/htmlPreviewPart
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
EditorDescriptor
}
from
'
vs/workbench/browser/parts/editor/baseEditor
'
;
...
...
@@ -38,7 +38,7 @@ interface HtmlZoneParams {
let
warn
=
true
;
CommandsRegistry
.
registerCommand
(
'
_workbench.htmlZone
'
,
function
(
accessor
:
ServicesAccessor
,
params
:
HtmlZoneParams
)
{
CommandsRegistry
.
registerCommand
(
'
_workbench.htmlZone
'
,
(
accessor
:
ServicesAccessor
,
params
:
HtmlZoneParams
)
=>
{
if
(
warn
)
{
console
.
warn
(
`'_workbench.htmlZone' is an EXPERIMENTAL feature and therefore subject to CHANGE and REMOVAL without notice.`
);
...
...
@@ -69,10 +69,13 @@ CommandsRegistry.registerCommand('_workbench.htmlZone', function (accessor: Serv
HtmlZoneController
.
getInstance
(
codeEditor
).
addZone
(
params
.
lineNumber
,
contents
);
});
});
CommandsRegistry
.
registerCommand
(
'
_workbench.previewHtml
'
,
function
(
accessor
:
ServicesAccessor
,
resource
:
URI
|
string
,
position
?:
EditorPosition
,
label
?:
string
)
{
const
defaultOptions
:
HtmlInputOptions
=
{
enableJavaScript
:
true
};
CommandsRegistry
.
registerCommand
(
'
_workbench.previewHtml
'
,
(
accessor
:
ServicesAccessor
,
resource
:
URI
|
string
,
position
?:
EditorPosition
,
label
?:
string
,
options
:
HtmlInputOptions
=
defaultOptions
)
=>
{
const
uri
=
resource
instanceof
URI
?
resource
:
URI
.
parse
(
resource
);
label
=
label
||
uri
.
fsPath
;
...
...
@@ -91,7 +94,7 @@ CommandsRegistry.registerCommand('_workbench.previewHtml', function (accessor: S
// Otherwise, create new input and open it
if
(
!
input
)
{
input
=
accessor
.
get
(
IInstantiationService
).
createInstance
(
HtmlInput
,
label
,
''
,
uri
);
input
=
accessor
.
get
(
IInstantiationService
).
createInstance
(
HtmlInput
,
label
,
''
,
uri
,
options
);
}
else
{
input
.
setName
(
label
);
// make sure to use passed in label
}
...
...
src/vs/workbench/parts/html/browser/htmlPreviewPart.ts
浏览文件 @
c1906c79
...
...
@@ -208,8 +208,11 @@ export class HtmlPreviewPart extends WebviewEditor {
}
this
.
_modelChangeSubscription
=
this
.
model
.
onDidChangeContent
(()
=>
{
if
(
this
.
model
)
{
if
(
this
.
model
&&
input
instanceof
HtmlInput
)
{
this
.
scrollYPercentage
=
0
;
this
.
webview
.
options
=
{
enableJavascript
:
input
.
options
.
enableJavaScript
};
this
.
webview
.
contents
=
this
.
model
.
getLinesContent
();
}
});
...
...
src/vs/workbench/parts/html/browser/webview.ts
浏览文件 @
c1906c79
...
...
@@ -60,7 +60,7 @@ export default class Webview {
constructor
(
private
parent
:
HTMLElement
,
private
_styleElement
:
Element
,
private
options
:
WebviewOptions
=
{}
private
_
options
:
WebviewOptions
=
{}
)
{
this
.
_webview
=
<
any
>
document
.
createElement
(
'
webview
'
);
...
...
@@ -162,10 +162,14 @@ export default class Webview {
this
.
_send
(
'
initial-scroll-position
'
,
value
);
}
set
options
(
options
:
WebviewOptions
)
{
this
.
_options
=
options
;
}
set
contents
(
value
:
string
[])
{
this
.
_send
(
'
content
'
,
{
contents
:
value
,
options
:
this
.
options
options
:
this
.
_
options
});
}
...
...
src/vs/workbench/parts/html/common/htmlInput.ts
浏览文件 @
c1906c79
...
...
@@ -5,7 +5,22 @@
'
use strict
'
;
import
{
ResourceEditorInput
}
from
'
vs/workbench/common/editor/resourceEditorInput
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
ITextModelService
}
from
'
vs/editor/common/services/resolverService
'
;
export
interface
HtmlInputOptions
{
enableJavaScript
?:
boolean
;
}
export
class
HtmlInput
extends
ResourceEditorInput
{
// marker class
constructor
(
name
:
string
,
description
:
string
,
resource
:
URI
,
public
readonly
options
:
HtmlInputOptions
,
@
ITextModelService
textModelResolverService
:
ITextModelService
)
{
super
(
name
,
description
,
resource
,
textModelResolverService
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录