Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
9f597f95
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,发现更多精彩内容 >>
提交
9f597f95
编写于
11月 15, 2017
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unused code (#38414)
上级
728c95f5
变更
41
隐藏空白更改
内联
并排
Showing
41 changed file
with
22 addition
and
284 deletion
+22
-284
src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts
src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts
+0
-4
src/vs/base/browser/ui/scrollbar/scrollableElement.ts
src/vs/base/browser/ui/scrollbar/scrollableElement.ts
+1
-9
src/vs/base/common/worker/simpleWorker.ts
src/vs/base/common/worker/simpleWorker.ts
+1
-1
src/vs/editor/browser/services/abstractCodeEditorService.ts
src/vs/editor/browser/services/abstractCodeEditorService.ts
+0
-4
src/vs/editor/browser/services/bulkEdit.ts
src/vs/editor/browser/services/bulkEdit.ts
+0
-10
src/vs/editor/browser/services/codeEditorService.ts
src/vs/editor/browser/services/codeEditorService.ts
+0
-1
src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts
...itor/browser/viewParts/editorScrollbar/editorScrollbar.ts
+0
-5
src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts
src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts
+1
-5
src/vs/editor/browser/viewParts/viewZones/viewZones.ts
src/vs/editor/browser/viewParts/viewZones/viewZones.ts
+0
-4
src/vs/editor/common/config/commonEditorConfig.ts
src/vs/editor/common/config/commonEditorConfig.ts
+1
-1
src/vs/editor/common/config/editorZoom.ts
src/vs/editor/common/config/editorZoom.ts
+1
-1
src/vs/editor/common/controller/cursorCommon.ts
src/vs/editor/common/controller/cursorCommon.ts
+0
-5
src/vs/editor/common/core/range.ts
src/vs/editor/common/core/range.ts
+0
-8
src/vs/editor/common/core/rgba.ts
src/vs/editor/common/core/rgba.ts
+5
-14
src/vs/editor/common/diff/nullDiffComputer.ts
src/vs/editor/common/diff/nullDiffComputer.ts
+0
-17
src/vs/editor/common/model/textModel.ts
src/vs/editor/common/model/textModel.ts
+0
-11
src/vs/editor/common/model/textModelWithDecorations.ts
src/vs/editor/common/model/textModelWithDecorations.ts
+1
-32
src/vs/editor/common/modes.ts
src/vs/editor/common/modes.ts
+1
-1
src/vs/editor/common/modes/supports.ts
src/vs/editor/common/modes/supports.ts
+0
-4
src/vs/editor/common/modes/supports/indentRules.ts
src/vs/editor/common/modes/supports/indentRules.ts
+1
-27
src/vs/editor/common/modes/supports/tokenization.ts
src/vs/editor/common/modes/supports/tokenization.ts
+0
-8
src/vs/editor/common/modes/tokenizationRegistry.ts
src/vs/editor/common/modes/tokenizationRegistry.ts
+0
-4
src/vs/editor/common/services/editorSimpleWorker.ts
src/vs/editor/common/services/editorSimpleWorker.ts
+1
-1
src/vs/editor/common/services/modeService.ts
src/vs/editor/common/services/modeService.ts
+0
-6
src/vs/editor/common/services/modeServiceImpl.ts
src/vs/editor/common/services/modeServiceImpl.ts
+1
-17
src/vs/editor/common/services/modelServiceImpl.ts
src/vs/editor/common/services/modelServiceImpl.ts
+0
-4
src/vs/editor/common/view/overviewZoneManager.ts
src/vs/editor/common/view/overviewZoneManager.ts
+0
-12
src/vs/editor/common/view/renderingContext.ts
src/vs/editor/common/view/renderingContext.ts
+0
-7
src/vs/editor/common/viewLayout/viewLayout.ts
src/vs/editor/common/viewLayout/viewLayout.ts
+0
-4
src/vs/editor/common/viewModel/prefixSumComputer.ts
src/vs/editor/common/viewModel/prefixSumComputer.ts
+0
-4
src/vs/editor/contrib/folding/folding.ts
src/vs/editor/contrib/folding/folding.ts
+2
-2
src/vs/editor/contrib/hover/hoverOperation.ts
src/vs/editor/contrib/hover/hoverOperation.ts
+0
-5
src/vs/editor/contrib/links/links.ts
src/vs/editor/contrib/links/links.ts
+0
-4
src/vs/editor/contrib/message/messageController.ts
src/vs/editor/contrib/message/messageController.ts
+1
-1
src/vs/editor/contrib/snippet/snippetController2.ts
src/vs/editor/contrib/snippet/snippetController2.ts
+2
-1
src/vs/editor/standalone/browser/simpleServices.ts
src/vs/editor/standalone/browser/simpleServices.ts
+0
-6
src/vs/editor/standalone/browser/standaloneEditor.ts
src/vs/editor/standalone/browser/standaloneEditor.ts
+0
-7
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+0
-4
src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts
.../workbench/parts/preferences/browser/keybindingWidgets.ts
+1
-6
src/vs/workbench/services/extensions/node/lazyPromise.ts
src/vs/workbench/services/extensions/node/lazyPromise.ts
+1
-1
src/vs/workbench/services/keybinding/common/macLinuxFallbackKeyboardMapper.ts
...vices/keybinding/common/macLinuxFallbackKeyboardMapper.ts
+0
-16
未找到文件。
src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts
浏览文件 @
9f597f95
...
...
@@ -187,10 +187,6 @@ export abstract class AbstractScrollbar extends Widget {
}
}
public
delegateSliderMouseDown
(
e
:
ISimplifiedMouseEvent
,
onDragFinished
:
()
=>
void
):
void
{
this
.
_sliderMouseDown
(
e
,
onDragFinished
);
}
private
_onMouseDown
(
e
:
IMouseEvent
):
void
{
let
offsetX
:
number
;
let
offsetY
:
number
;
...
...
src/vs/base/browser/ui/scrollbar/scrollableElement.ts
浏览文件 @
9f597f95
...
...
@@ -17,7 +17,7 @@ import { Scrollable, ScrollEvent, ScrollbarVisibility, INewScrollDimensions, ISc
import
{
Widget
}
from
'
vs/base/browser/ui/widget
'
;
import
{
TimeoutTimer
}
from
'
vs/base/common/async
'
;
import
{
FastDomNode
,
createFastDomNode
}
from
'
vs/base/browser/fastDomNode
'
;
import
{
ScrollbarHost
,
ISimplifiedMouseEvent
}
from
'
vs/base/browser/ui/scrollbar/abstractScrollbar
'
;
import
{
ScrollbarHost
}
from
'
vs/base/browser/ui/scrollbar/abstractScrollbar
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
const
HIDE_TIMEOUT
=
500
;
...
...
@@ -250,14 +250,6 @@ export abstract class AbstractScrollableElement extends Widget {
this
.
_verticalScrollbar
.
delegateMouseDown
(
browserEvent
);
}
/**
* Delegate a mouse down event to the vertical scrollbar (directly to the slider!).
* This is to help with clicking somewhere else and having the scrollbar react.
*/
public
delegateSliderMouseDown
(
e
:
ISimplifiedMouseEvent
,
onDragFinished
:
()
=>
void
):
void
{
this
.
_verticalScrollbar
.
delegateSliderMouseDown
(
e
,
onDragFinished
);
}
public
getScrollDimensions
():
IScrollDimensions
{
return
this
.
_scrollable
.
getScrollDimensions
();
}
...
...
src/vs/base/common/worker/simpleWorker.ts
浏览文件 @
9f597f95
...
...
@@ -292,7 +292,7 @@ export class SimpleWorkerClient<T> extends Disposable {
}
export
interface
IRequestHandler
{
_requestHandler
Trait
:
any
;
_requestHandler
Brand
:
any
;
}
/**
...
...
src/vs/editor/browser/services/abstractCodeEditorService.ts
浏览文件 @
9f597f95
...
...
@@ -76,10 +76,6 @@ export abstract class AbstractCodeEditorService implements ICodeEditorService {
return
this
.
_onDiffEditorRemove
.
event
;
}
getDiffEditor
(
editorId
:
string
):
IDiffEditor
{
return
this
.
_diffEditors
[
editorId
]
||
null
;
}
listDiffEditors
():
IDiffEditor
[]
{
return
Object
.
keys
(
this
.
_diffEditors
).
map
(
id
=>
this
.
_diffEditors
[
id
]);
}
...
...
src/vs/editor/browser/services/bulkEdit.ts
浏览文件 @
9f597f95
...
...
@@ -190,7 +190,6 @@ class BulkEditModel implements IDisposable {
private
_textModelResolverService
:
ITextModelService
;
private
_numberOfResourcesToModify
:
number
=
0
;
private
_numberOfChanges
:
number
=
0
;
private
_edits
:
IStringDictionary
<
IResourceEdit
[]
>
=
Object
.
create
(
null
);
private
_tasks
:
EditTask
[];
private
_sourceModel
:
URI
;
...
...
@@ -208,21 +207,12 @@ class BulkEditModel implements IDisposable {
}
}
public
resourcesCount
():
number
{
return
this
.
_numberOfResourcesToModify
;
}
public
changeCount
():
number
{
return
this
.
_numberOfChanges
;
}
private
_addEdit
(
edit
:
IResourceEdit
):
void
{
let
array
=
this
.
_edits
[
edit
.
resource
.
toString
()];
if
(
!
array
)
{
this
.
_edits
[
edit
.
resource
.
toString
()]
=
array
=
[];
this
.
_numberOfResourcesToModify
+=
1
;
}
this
.
_numberOfChanges
+=
1
;
array
.
push
(
edit
);
}
...
...
src/vs/editor/browser/services/codeEditorService.ts
浏览文件 @
9f597f95
...
...
@@ -28,7 +28,6 @@ export interface ICodeEditorService {
addDiffEditor
(
editor
:
IDiffEditor
):
void
;
removeDiffEditor
(
editor
:
IDiffEditor
):
void
;
getDiffEditor
(
editorId
:
string
):
IDiffEditor
;
listDiffEditors
():
IDiffEditor
[];
/**
...
...
src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts
浏览文件 @
9f597f95
...
...
@@ -15,7 +15,6 @@ import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/v
import
{
FastDomNode
,
createFastDomNode
}
from
'
vs/base/browser/fastDomNode
'
;
import
{
getThemeTypeSelector
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
IMouseEvent
}
from
'
vs/base/browser/mouseEvent
'
;
import
{
ISimplifiedMouseEvent
}
from
'
vs/base/browser/ui/scrollbar/abstractScrollbar
'
;
export
class
EditorScrollbar
extends
ViewPart
{
...
...
@@ -115,10 +114,6 @@ export class EditorScrollbar extends ViewPart {
this
.
scrollbar
.
delegateVerticalScrollbarMouseDown
(
browserEvent
);
}
public
delegateSliderMouseDown
(
e
:
ISimplifiedMouseEvent
,
onDragFinished
:
()
=>
void
):
void
{
this
.
scrollbar
.
delegateSliderMouseDown
(
e
,
onDragFinished
);
}
// --- begin event handlers
public
onConfigurationChanged
(
e
:
viewEvents
.
ViewConfigurationChangedEvent
):
boolean
{
...
...
src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts
浏览文件 @
9f597f95
...
...
@@ -192,10 +192,6 @@ export class ViewCursors extends ViewPart {
// --- end event handlers
public
getPosition
():
Position
{
return
this
.
_primaryCursor
.
getPosition
();
}
// ---- blinking logic
private
_getCursorBlinking
():
TextEditorCursorBlinkingStyle
{
...
...
@@ -365,4 +361,4 @@ registerThemingParticipant((theme, collector) => {
}
}
});
\ No newline at end of file
});
src/vs/editor/browser/viewParts/viewZones/viewZones.ts
浏览文件 @
9f597f95
...
...
@@ -22,10 +22,6 @@ export interface IMyViewZone {
marginDomNode
:
FastDomNode
<
HTMLElement
>
;
}
export
interface
IMyRenderData
{
data
:
IViewWhitespaceViewportData
[];
}
interface
IComputedViewZoneProps
{
afterViewLineNumber
:
number
;
heightInPx
:
number
;
...
...
src/vs/editor/common/config/commonEditorConfig.ts
浏览文件 @
9f597f95
...
...
@@ -31,7 +31,7 @@ export interface ITabFocus {
setTabFocusMode
(
tabFocusMode
:
boolean
):
void
;
}
export
const
TabFocus
:
ITabFocus
=
new
class
{
export
const
TabFocus
:
ITabFocus
=
new
class
implements
ITabFocus
{
private
_tabFocus
:
boolean
=
false
;
private
_onDidChangeTabFocus
:
Emitter
<
boolean
>
=
new
Emitter
<
boolean
>
();
...
...
src/vs/editor/common/config/editorZoom.ts
浏览文件 @
9f597f95
...
...
@@ -12,7 +12,7 @@ export interface IEditorZoom {
setZoomLevel
(
zoomLevel
:
number
):
void
;
}
export
const
EditorZoom
:
IEditorZoom
=
new
class
{
export
const
EditorZoom
:
IEditorZoom
=
new
class
implements
IEditorZoom
{
private
_zoomLevel
:
number
=
0
;
...
...
src/vs/editor/common/controller/cursorCommon.ts
浏览文件 @
9f597f95
...
...
@@ -335,11 +335,6 @@ export class CursorContext {
return
this
.
viewModel
.
getCompletelyVisibleViewRangeAtScrollTop
(
scrollTop
);
}
public
getCompletelyVisibleModelRangeAtScrollTop
(
scrollTop
:
number
):
Range
{
const
viewRange
=
this
.
viewModel
.
getCompletelyVisibleViewRangeAtScrollTop
(
scrollTop
);
return
this
.
viewModel
.
coordinatesConverter
.
convertViewRangeToModelRange
(
viewRange
);
}
public
getVerticalOffsetForViewLine
(
viewLineNumber
:
number
):
number
{
return
this
.
viewModel
.
viewLayout
.
getVerticalOffsetForLineNumber
(
viewLineNumber
);
}
...
...
src/vs/editor/common/core/range.ts
浏览文件 @
9f597f95
...
...
@@ -246,13 +246,6 @@ export class Range {
return
new
Position
(
this
.
startLineNumber
,
this
.
startColumn
);
}
/**
* Clone this range.
*/
public
cloneRange
():
Range
{
return
new
Range
(
this
.
startLineNumber
,
this
.
startColumn
,
this
.
endLineNumber
,
this
.
endColumn
);
}
/**
* Transform to a user presentable string representation.
*/
...
...
@@ -387,4 +380,3 @@ export class Range {
return
range
.
endLineNumber
>
range
.
startLineNumber
;
}
}
src/vs/editor/common/core/rgba.ts
浏览文件 @
9f597f95
...
...
@@ -30,22 +30,13 @@ export class RGBA8 {
public
readonly
a
:
number
;
constructor
(
r
:
number
,
g
:
number
,
b
:
number
,
a
:
number
)
{
this
.
r
=
RGBA8
.
_clamp
Int_0_255
(
r
);
this
.
g
=
RGBA8
.
_clamp
Int_0_255
(
g
);
this
.
b
=
RGBA8
.
_clamp
Int_0_255
(
b
);
this
.
a
=
RGBA8
.
_clamp
Int_0_255
(
a
);
this
.
r
=
RGBA8
.
_clamp
(
r
);
this
.
g
=
RGBA8
.
_clamp
(
g
);
this
.
b
=
RGBA8
.
_clamp
(
b
);
this
.
a
=
RGBA8
.
_clamp
(
a
);
}
public
static
equals
(
a
:
RGBA8
,
b
:
RGBA8
):
boolean
{
return
(
a
.
r
===
b
.
r
&&
a
.
g
===
b
.
g
&&
a
.
b
===
b
.
b
&&
a
.
a
===
b
.
a
);
}
private
static
_clampInt_0_255
(
c
:
number
):
number
{
private
static
_clamp
(
c
:
number
):
number
{
if
(
c
<
0
)
{
return
0
;
}
...
...
src/vs/editor/common/diff/nullDiffComputer.ts
已删除
100644 → 0
浏览文件 @
728c95f5
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
ILineChange
}
from
'
vs/editor/common/editorCommon
'
;
export
class
DiffComputer
{
constructor
(
originalLines
:
string
[],
modifiedLines
:
string
[],
shouldPostProcessCharChanges
:
boolean
,
shouldIgnoreTrimWhitespace
:
boolean
)
{
}
public
computeDiff
():
ILineChange
[]
{
return
[];
}
}
\ No newline at end of file
src/vs/editor/common/model/textModel.ts
浏览文件 @
9f597f95
...
...
@@ -573,17 +573,6 @@ export class TextModel implements editorCommon.ITextModel {
return
result
+
2
;
}
public
validateLineNumber
(
lineNumber
:
number
):
number
{
this
.
_assertNotDisposed
();
if
(
lineNumber
<
1
)
{
lineNumber
=
1
;
}
if
(
lineNumber
>
this
.
_lines
.
length
)
{
lineNumber
=
this
.
_lines
.
length
;
}
return
lineNumber
;
}
/**
* Validates `range` is within buffer bounds, but allows it to sit in between surrogate pairs, etc.
* Will try to not allocate if possible.
...
...
src/vs/editor/common/model/textModelWithDecorations.ts
浏览文件 @
9f597f95
...
...
@@ -5,7 +5,7 @@
'
use strict
'
;
import
{
onUnexpectedError
}
from
'
vs/base/common/errors
'
;
import
{
IMarkdownString
,
markedStringsEquals
}
from
'
vs/base/common/htmlContent
'
;
import
{
IMarkdownString
}
from
'
vs/base/common/htmlContent
'
;
import
*
as
strings
from
'
vs/base/common/strings
'
;
import
{
CharCode
}
from
'
vs/base/common/charCode
'
;
import
{
Range
,
IRange
}
from
'
vs/editor/common/core/range
'
;
...
...
@@ -559,15 +559,6 @@ export class ModelDecorationOverviewRulerOptions implements editorCommon.IModelD
this
.
position
=
options
.
position
;
}
}
public
equals
(
other
:
ModelDecorationOverviewRulerOptions
):
boolean
{
return
(
this
.
color
===
other
.
color
&&
this
.
darkColor
===
other
.
darkColor
&&
this
.
hcColor
===
other
.
hcColor
&&
this
.
position
===
other
.
position
);
}
}
let
lastStaticId
=
0
;
...
...
@@ -615,28 +606,6 @@ export class ModelDecorationOptions implements editorCommon.IModelDecorationOpti
this
.
beforeContentClassName
=
options
.
beforeContentClassName
?
cleanClassName
(
options
.
beforeContentClassName
)
:
strings
.
empty
;
this
.
afterContentClassName
=
options
.
afterContentClassName
?
cleanClassName
(
options
.
afterContentClassName
)
:
strings
.
empty
;
}
public
equals
(
other
:
ModelDecorationOptions
):
boolean
{
if
(
this
.
staticId
>
0
||
other
.
staticId
>
0
)
{
return
this
.
staticId
===
other
.
staticId
;
}
return
(
this
.
stickiness
===
other
.
stickiness
&&
this
.
className
===
other
.
className
&&
this
.
isWholeLine
===
other
.
isWholeLine
&&
this
.
showIfCollapsed
===
other
.
showIfCollapsed
&&
this
.
glyphMarginClassName
===
other
.
glyphMarginClassName
&&
this
.
linesDecorationsClassName
===
other
.
linesDecorationsClassName
&&
this
.
marginClassName
===
other
.
marginClassName
&&
this
.
inlineClassName
===
other
.
inlineClassName
&&
this
.
beforeContentClassName
===
other
.
beforeContentClassName
&&
this
.
afterContentClassName
===
other
.
afterContentClassName
&&
markedStringsEquals
(
this
.
hoverMessage
,
other
.
hoverMessage
)
&&
markedStringsEquals
(
this
.
glyphMarginHoverMessage
,
other
.
glyphMarginHoverMessage
)
&&
this
.
overviewRuler
.
equals
(
other
.
overviewRuler
)
);
}
}
ModelDecorationOptions
.
EMPTY
=
ModelDecorationOptions
.
register
({});
...
...
src/vs/editor/common/modes.ts
浏览文件 @
9f597f95
...
...
@@ -916,7 +916,7 @@ export interface ITokenizationRegistry {
setColorMap
(
colorMap
:
Color
[]):
void
;
getColorMap
():
Color
[];
getDefaultForeground
():
Color
;
getDefaultBackground
():
Color
;
}
...
...
src/vs/editor/common/modes/supports.ts
浏览文件 @
9f597f95
...
...
@@ -71,10 +71,6 @@ export class ScopedLineTokens {
return
this
.
_actual
.
findTokenIndexAtOffset
(
offset
+
this
.
firstCharOffset
)
-
this
.
_firstTokenIndex
;
}
public
getTokenStartOffset
(
tokenIndex
:
number
):
number
{
return
this
.
_actual
.
getTokenStartOffset
(
tokenIndex
+
this
.
_firstTokenIndex
)
-
this
.
firstCharOffset
;
}
public
getStandardTokenType
(
tokenIndex
:
number
):
modes
.
StandardTokenType
{
return
this
.
_actual
.
getStandardTokenType
(
tokenIndex
+
this
.
_firstTokenIndex
);
}
...
...
src/vs/editor/common/modes/supports/indentRules.ts
浏览文件 @
9f597f95
...
...
@@ -4,8 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
*
as
strings
from
'
vs/base/common/strings
'
;
import
{
IndentationRule
,
IndentAction
}
from
'
vs/editor/common/modes/languageConfiguration
'
;
import
{
IndentationRule
}
from
'
vs/editor/common/modes/languageConfiguration
'
;
export
const
enum
IndentConsts
{
INCREASE_MASK
=
0b00000001
,
...
...
@@ -22,30 +21,6 @@ export class IndentRulesSupport {
this
.
_indentationRules
=
indentationRules
;
}
public
onType
(
text
:
string
):
IndentAction
{
if
(
this
.
_indentationRules
)
{
if
(
this
.
_indentationRules
.
unIndentedLinePattern
&&
this
.
_indentationRules
.
unIndentedLinePattern
.
test
(
text
))
{
return
null
;
}
if
(
this
.
_indentationRules
.
decreaseIndentPattern
&&
this
.
_indentationRules
.
decreaseIndentPattern
.
test
(
text
))
{
return
IndentAction
.
Outdent
;
}
}
return
null
;
}
public
containNonWhitespace
(
text
:
string
):
boolean
{
// the text doesn't contain any non-whitespace character.
let
nonWhitespaceIdx
=
strings
.
lastNonWhitespaceIndex
(
text
);
if
(
nonWhitespaceIdx
>=
0
)
{
return
true
;
}
return
false
;
}
public
shouldIncrease
(
text
:
string
):
boolean
{
if
(
this
.
_indentationRules
)
{
if
(
this
.
_indentationRules
.
increaseIndentPattern
&&
this
.
_indentationRules
.
increaseIndentPattern
.
test
(
text
))
{
...
...
@@ -99,4 +74,3 @@ export class IndentRulesSupport {
return
ret
;
}
}
src/vs/editor/common/modes/supports/tokenization.ts
浏览文件 @
9f597f95
...
...
@@ -280,14 +280,6 @@ export class ThemeTrieElementRule {
return
new
ThemeTrieElementRule
(
this
.
_fontStyle
,
this
.
_foreground
,
this
.
_background
);
}
public
static
cloneArr
(
arr
:
ThemeTrieElementRule
[]):
ThemeTrieElementRule
[]
{
let
r
:
ThemeTrieElementRule
[]
=
[];
for
(
let
i
=
0
,
len
=
arr
.
length
;
i
<
len
;
i
++
)
{
r
[
i
]
=
arr
[
i
].
clone
();
}
return
r
;
}
public
acceptOverwrite
(
fontStyle
:
FontStyle
,
foreground
:
ColorId
,
background
:
ColorId
):
void
{
if
(
fontStyle
!==
FontStyle
.
NotSet
)
{
this
.
_fontStyle
=
fontStyle
;
...
...
src/vs/editor/common/modes/tokenizationRegistry.ts
浏览文件 @
9f597f95
...
...
@@ -60,10 +60,6 @@ export class TokenizationRegistryImpl implements ITokenizationRegistry {
return
this
.
_colorMap
;
}
public
getDefaultForeground
():
Color
{
return
this
.
_colorMap
[
ColorId
.
DefaultForeground
];
}
public
getDefaultBackground
():
Color
{
return
this
.
_colorMap
[
ColorId
.
DefaultBackground
];
}
...
...
src/vs/editor/common/services/editorSimpleWorker.ts
浏览文件 @
9f597f95
...
...
@@ -517,7 +517,7 @@ export abstract class BaseEditorSimpleWorker {
* @internal
*/
export
class
EditorSimpleWorkerImpl
extends
BaseEditorSimpleWorker
implements
IRequestHandler
,
IDisposable
{
_requestHandler
Trait
:
any
;
_requestHandler
Brand
:
any
;
private
_models
:
{
[
uri
:
string
]:
MirrorModel
;
};
...
...
src/vs/editor/common/services/modeService.ts
浏览文件 @
9f597f95
...
...
@@ -11,11 +11,6 @@ import { IMode, LanguageId, LanguageIdentifier } from 'vs/editor/common/modes';
export
var
IModeService
=
createDecorator
<
IModeService
>
(
'
modeService
'
);
export
interface
IModeLookupResult
{
modeId
:
string
;
isInstantiated
:
boolean
;
}
export
interface
ILanguageExtensionPoint
{
id
:
string
;
extensions
?:
string
[];
...
...
@@ -58,7 +53,6 @@ export interface IModeService {
getConfigurationFiles
(
modeId
:
string
):
string
[];
// --- instantiation
lookup
(
commaSeparatedMimetypesOrCommaSeparatedIds
:
string
):
IModeLookupResult
[];
getMode
(
commaSeparatedMimetypesOrCommaSeparatedIds
:
string
):
IMode
;
getOrCreateMode
(
commaSeparatedMimetypesOrCommaSeparatedIds
:
string
):
TPromise
<
IMode
>
;
getOrCreateModeByLanguageName
(
languageName
:
string
):
TPromise
<
IMode
>
;
...
...
src/vs/editor/common/services/modeServiceImpl.ts
浏览文件 @
9f597f95
...
...
@@ -10,7 +10,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
import
{
IMode
,
LanguageId
,
LanguageIdentifier
}
from
'
vs/editor/common/modes
'
;
import
{
FrankensteinMode
}
from
'
vs/editor/common/modes/abstractMode
'
;
import
{
LanguagesRegistry
}
from
'
vs/editor/common/services/languagesRegistry
'
;
import
{
IMode
LookupResult
,
IMode
Service
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
export
class
ModeServiceImpl
implements
IModeService
{
public
_serviceBrand
:
any
;
...
...
@@ -93,22 +93,6 @@ export class ModeServiceImpl implements IModeService {
// --- instantiation
public
lookup
(
commaSeparatedMimetypesOrCommaSeparatedIds
:
string
):
IModeLookupResult
[]
{
var
r
:
IModeLookupResult
[]
=
[];
var
modeIds
=
this
.
_registry
.
extractModeIds
(
commaSeparatedMimetypesOrCommaSeparatedIds
);
for
(
var
i
=
0
;
i
<
modeIds
.
length
;
i
++
)
{
var
modeId
=
modeIds
[
i
];
r
.
push
({
modeId
:
modeId
,
isInstantiated
:
this
.
_instantiatedModes
.
hasOwnProperty
(
modeId
)
});
}
return
r
;
}
public
getMode
(
commaSeparatedMimetypesOrCommaSeparatedIds
:
string
):
IMode
{
var
modeIds
=
this
.
_registry
.
extractModeIds
(
commaSeparatedMimetypesOrCommaSeparatedIds
);
...
...
src/vs/editor/common/services/modelServiceImpl.ts
浏览文件 @
9f597f95
...
...
@@ -56,10 +56,6 @@ class ModelData implements IDisposable {
this
.
model
=
null
;
}
public
getModelId
():
string
{
return
MODEL_ID
(
this
.
model
.
uri
);
}
public
acceptMarkerDecorations
(
newDecorations
:
editorCommon
.
IModelDeltaDecoration
[]):
void
{
this
.
_markerDecorations
=
this
.
model
.
deltaDecorations
(
this
.
_markerDecorations
,
newDecorations
);
}
...
...
src/vs/editor/common/view/overviewZoneManager.ts
浏览文件 @
9f597f95
...
...
@@ -66,18 +66,6 @@ export class OverviewRulerZone {
return
this
.
_color
;
}
public
equals
(
other
:
OverviewRulerZone
):
boolean
{
return
(
this
.
startLineNumber
===
other
.
startLineNumber
&&
this
.
endLineNumber
===
other
.
endLineNumber
&&
this
.
position
===
other
.
position
&&
this
.
forceHeight
===
other
.
forceHeight
&&
this
.
_color
===
other
.
_color
&&
this
.
_darkColor
===
other
.
_darkColor
&&
this
.
_hcColor
===
other
.
_hcColor
);
}
public
compareTo
(
other
:
OverviewRulerZone
):
number
{
if
(
this
.
startLineNumber
===
other
.
startLineNumber
)
{
if
(
this
.
endLineNumber
===
other
.
endLineNumber
)
{
...
...
src/vs/editor/common/view/renderingContext.ts
浏览文件 @
9f597f95
...
...
@@ -58,13 +58,6 @@ export abstract class RestrictedRenderingContext {
return
this
.
_viewLayout
.
getVerticalOffsetForLineNumber
(
lineNumber
);
}
public
lineIsVisible
(
lineNumber
:
number
):
boolean
{
return
(
this
.
visibleRange
.
startLineNumber
<=
lineNumber
&&
lineNumber
<=
this
.
visibleRange
.
endLineNumber
);
}
public
getDecorationsInViewport
():
ViewModelDecoration
[]
{
return
this
.
viewportData
.
getDecorationsInViewport
();
}
...
...
src/vs/editor/common/viewLayout/viewLayout.ts
浏览文件 @
9f597f95
...
...
@@ -48,10 +48,6 @@ export class ViewLayout extends Disposable implements IViewLayout {
super
.
dispose
();
}
public
getScrollable
():
Scrollable
{
return
this
.
scrollable
;
}
public
onHeightMaybeChanged
():
void
{
this
.
_updateHeight
();
}
...
...
src/vs/editor/common/viewModel/prefixSumComputer.ts
浏览文件 @
9f597f95
...
...
@@ -205,10 +205,6 @@ export class PrefixSumComputerWithCache {
this
.
_cache
=
null
;
}
public
getCount
():
number
{
return
this
.
_actual
.
getCount
();
}
public
insertValues
(
insertIndex
:
number
,
insertValues
:
Uint32Array
):
void
{
if
(
this
.
_actual
.
insertValues
(
insertIndex
,
insertValues
))
{
this
.
_bustCache
();
...
...
src/vs/editor/contrib/folding/folding.ts
浏览文件 @
9f597f95
...
...
@@ -12,7 +12,7 @@ import { RunOnceScheduler, Delayer } from 'vs/base/common/async';
import
{
KeyCode
,
KeyMod
,
KeyChord
}
from
'
vs/base/common/keyCodes
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
ScrollType
,
IModel
}
from
'
vs/editor/common/editorCommon
'
;
import
{
ScrollType
,
IModel
,
IEditorContribution
}
from
'
vs/editor/common/editorCommon
'
;
import
{
registerEditorAction
,
registerEditorContribution
,
ServicesAccessor
,
EditorAction
,
registerInstantiatedEditorAction
}
from
'
vs/editor/browser/editorExtensions
'
;
import
{
ICodeEditor
,
IEditorMouseEvent
,
MouseTargetType
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
FoldingModel
,
setCollapseStateAtLevel
,
CollapseMemento
,
setCollapseStateLevelsDown
,
setCollapseStateLevelsUp
}
from
'
vs/editor/contrib/folding/foldingModel
'
;
...
...
@@ -27,7 +27,7 @@ import { computeRanges as computeIndentRanges } from 'vs/editor/contrib/folding/
export
const
ID
=
'
editor.contrib.folding
'
;
export
class
FoldingController
{
export
class
FoldingController
implements
IEditorContribution
{
static
MAX_FOLDING_REGIONS
=
5000
;
...
...
src/vs/editor/contrib/hover/hoverOperation.ts
浏览文件 @
9f597f95
...
...
@@ -79,10 +79,6 @@ export class HoverOperation<Result> {
this
.
_progressCallback
=
progress
;
}
public
getComputer
():
IHoverComputer
<
Result
>
{
return
this
.
_computer
;
}
private
_getHoverTimeMillis
():
number
{
if
(
this
.
_computer
.
getHoverTimeMillis
)
{
return
this
.
_computer
.
getHoverTimeMillis
();
...
...
@@ -186,4 +182,3 @@ export class HoverOperation<Result> {
}
}
src/vs/editor/contrib/links/links.ts
浏览文件 @
9f597f95
...
...
@@ -203,10 +203,6 @@ class LinkDetector implements editorCommon.IEditorContribution {
return
LinkDetector
.
ID
;
}
public
isComputing
():
boolean
{
return
TPromise
.
is
(
this
.
computePromise
);
}
private
onModelChanged
():
void
{
this
.
currentOccurrences
=
{};
this
.
activeLinkDecorationId
=
null
;
...
...
src/vs/editor/contrib/message/messageController.ts
浏览文件 @
9f597f95
...
...
@@ -20,7 +20,7 @@ import { registerThemingParticipant, HIGH_CONTRAST } from 'vs/platform/theme/com
import
{
inputValidationInfoBorder
,
inputValidationInfoBackground
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
KeybindingsRegistry
}
from
'
vs/platform/keybinding/common/keybindingsRegistry
'
;
export
class
MessageController
{
export
class
MessageController
implements
editorCommon
.
IEditorContribution
{
private
static
_id
=
'
editor.contrib.messageController
'
;
...
...
src/vs/editor/contrib/snippet/snippetController2.ts
浏览文件 @
9f597f95
...
...
@@ -18,8 +18,9 @@ import { Choice } from 'vs/editor/contrib/snippet/snippetParser';
import
{
repeat
}
from
'
vs/base/common/strings
'
;
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
KeybindingsRegistry
}
from
'
vs/platform/keybinding/common/keybindingsRegistry
'
;
import
{
IEditorContribution
}
from
'
vs/editor/common/editorCommon
'
;
export
class
SnippetController2
{
export
class
SnippetController2
implements
IEditorContribution
{
static
get
(
editor
:
ICodeEditor
):
SnippetController2
{
return
editor
.
getContribution
<
SnippetController2
>
(
'
snippetController2
'
);
...
...
src/vs/editor/standalone/browser/simpleServices.ts
浏览文件 @
9f597f95
...
...
@@ -21,7 +21,6 @@ import { IConfirmation, IMessageService, IConfirmationResult } from 'vs/platform
import
{
IWorkspaceContextService
,
IWorkspace
,
WorkbenchState
,
IWorkspaceFolder
,
IWorkspaceFoldersChangeEvent
,
WorkspaceFolder
}
from
'
vs/platform/workspace/common/workspace
'
;
import
*
as
editorCommon
from
'
vs/editor/common/editorCommon
'
;
import
{
ICodeEditor
,
IDiffEditor
,
isCodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
Selection
}
from
'
vs/editor/common/core/selection
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
Configuration
,
DefaultConfigurationModel
,
ConfigurationModel
}
from
'
vs/platform/configuration/common/configurationModels
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
...
...
@@ -54,7 +53,6 @@ export class SimpleEditor implements IEditor {
public
getId
():
string
{
return
'
editor
'
;
}
public
getControl
():
editorCommon
.
IEditor
{
return
this
.
_widget
;
}
public
getSelection
():
Selection
{
return
this
.
_widget
.
getSelection
();
}
public
focus
():
void
{
this
.
_widget
.
focus
();
}
public
isVisible
():
boolean
{
return
true
;
}
...
...
@@ -587,10 +585,6 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService {
return
resource
&&
resource
.
scheme
===
SimpleWorkspaceContextService
.
SCHEME
;
}
public
toResource
(
workspaceRelativePath
:
string
,
workspaceFolder
:
IWorkspaceFolder
):
URI
{
return
URI
.
file
(
workspaceRelativePath
);
}
public
isCurrentWorkspace
(
workspaceIdentifier
:
ISingleFolderWorkspaceIdentifier
|
IWorkspaceIdentifier
):
boolean
{
return
true
;
}
...
...
src/vs/editor/standalone/browser/standaloneEditor.ts
浏览文件 @
9f597f95
...
...
@@ -38,13 +38,6 @@ import * as editorOptions from 'vs/editor/common/config/editorOptions';
import
{
CursorChangeReason
}
from
'
vs/editor/common/controller/cursorEvents
'
;
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
/**
* @internal
*/
export
function
setupServices
(
overrides
:
IEditorOverrideServices
):
any
{
return
StaticServices
.
init
(
overrides
);
}
function
withAllStandaloneServices
<
T
extends
editorCommon
.
IEditor
>
(
domElement
:
HTMLElement
,
override
:
IEditorOverrideServices
,
callback
:
(
services
:
DynamicStandaloneServices
)
=>
T
):
T
{
let
services
=
new
DynamicStandaloneServices
(
domElement
,
override
);
...
...
src/vs/monaco.d.ts
浏览文件 @
9f597f95
...
...
@@ -586,10 +586,6 @@ declare module monaco {
* Return the start position (which will be before or equal to the end position)
*/
getStartPosition
():
Position
;
/**
* Clone this range.
*/
cloneRange
():
Range
;
/**
* Transform to a user presentable string representation.
*/
...
...
src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts
浏览文件 @
9f597f95
...
...
@@ -82,11 +82,6 @@ class KeybindingInputWidget extends Widget {
this
.
_chordPart
=
null
;
}
public
setAcceptChords
(
acceptChords
:
boolean
)
{
this
.
_acceptChords
=
acceptChords
;
this
.
_chordPart
=
null
;
}
private
_onKeyDown
(
keyboardEvent
:
IKeyboardEvent
):
void
{
keyboardEvent
.
preventDefault
();
keyboardEvent
.
stopPropagation
();
...
...
@@ -294,4 +289,4 @@ export class DefineKeybindingOverlayWidget extends Disposable implements IOverla
this
.
_widget
.
layout
(
new
Dimension
(
layoutInfo
.
width
,
layoutInfo
.
height
));
return
this
.
_widget
.
define
();
}
}
\ No newline at end of file
}
src/vs/workbench/services/extensions/node/lazyPromise.ts
浏览文件 @
9f597f95
...
...
@@ -7,7 +7,7 @@
import
{
TPromise
,
ValueCallback
,
ErrorCallback
}
from
'
vs/base/common/winjs.base
'
;
import
{
onUnexpectedError
}
from
'
vs/base/common/errors
'
;
export
class
LazyPromise
{
export
class
LazyPromise
implements
TPromise
<
any
>
{
private
_onCancel
:
()
=>
void
;
...
...
src/vs/workbench/services/keybinding/common/macLinuxFallbackKeyboardMapper.ts
浏览文件 @
9f597f95
...
...
@@ -12,22 +12,6 @@ import { IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding';
import
{
USLayoutResolvedKeybinding
}
from
'
vs/platform/keybinding/common/usLayoutResolvedKeybinding
'
;
import
{
ScanCodeBinding
,
ScanCode
,
IMMUTABLE_CODE_TO_KEY_CODE
}
from
'
vs/workbench/services/keybinding/common/scanCode
'
;
export
interface
IMacLinuxKeyMapping
{
value
:
string
;
withShift
:
string
;
withAltGr
:
string
;
withShiftAltGr
:
string
;
valueIsDeadKey
?:
boolean
;
withShiftIsDeadKey
?:
boolean
;
withAltGrIsDeadKey
?:
boolean
;
withShiftAltGrIsDeadKey
?:
boolean
;
}
export
interface
IMacLinuxKeyboardMapping
{
[
scanCode
:
string
]:
IMacLinuxKeyMapping
;
}
/**
* A keyboard mapper to be used when reading the keymap from the OS fails.
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录