Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
98b3482a
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
98b3482a
编写于
2月 12, 2016
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tslint
💄
上级
be4a1ef0
变更
29
隐藏空白更改
内联
并排
Showing
29 changed file
with
69 addition
and
126 deletion
+69
-126
extensions/json/server/src/utils/httpRequest.ts
extensions/json/server/src/utils/httpRequest.ts
+1
-1
extensions/typescript/src/utils/async.ts
extensions/typescript/src/utils/async.ts
+1
-1
src/vs/base/browser/ui/list/listView.ts
src/vs/base/browser/ui/list/listView.ts
+3
-3
src/vs/base/browser/ui/list/listWidget.ts
src/vs/base/browser/ui/list/listWidget.ts
+5
-7
src/vs/base/common/service.ts
src/vs/base/common/service.ts
+1
-1
src/vs/base/node/service.cp.ts
src/vs/base/node/service.cp.ts
+0
-3
src/vs/base/node/service.net.ts
src/vs/base/node/service.net.ts
+1
-1
src/vs/editor/contrib/suggest/browser/suggestWidget.ts
src/vs/editor/contrib/suggest/browser/suggestWidget.ts
+2
-2
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
...vs/workbench/browser/parts/activitybar/activitybarPart.ts
+33
-33
src/vs/workbench/parts/extensions/node/extensionsService.ts
src/vs/workbench/parts/extensions/node/extensionsService.ts
+4
-9
src/vs/workbench/parts/extensions/node/vsoGalleryService.ts
src/vs/workbench/parts/extensions/node/vsoGalleryService.ts
+0
-6
src/vs/workbench/parts/git/browser/gitActionItems.ts
src/vs/workbench/parts/git/browser/gitActionItems.ts
+1
-3
src/vs/workbench/parts/git/browser/gitActions.contribution.ts
...vs/workbench/parts/git/browser/gitActions.contribution.ts
+1
-5
src/vs/workbench/parts/git/browser/gitActions.ts
src/vs/workbench/parts/git/browser/gitActions.ts
+1
-1
src/vs/workbench/parts/git/browser/gitQuickOpen.ts
src/vs/workbench/parts/git/browser/gitQuickOpen.ts
+0
-3
src/vs/workbench/parts/git/browser/gitServices.ts
src/vs/workbench/parts/git/browser/gitServices.ts
+1
-1
src/vs/workbench/parts/git/browser/gitWidgets.ts
src/vs/workbench/parts/git/browser/gitWidgets.ts
+1
-2
src/vs/workbench/parts/git/browser/gitWorkbenchContributions.ts
.../workbench/parts/git/browser/gitWorkbenchContributions.ts
+0
-3
src/vs/workbench/parts/git/browser/views/changes/changesViewer.ts
...orkbench/parts/git/browser/views/changes/changesViewer.ts
+3
-4
src/vs/workbench/parts/git/browser/views/disabled/disabledView.ts
...orkbench/parts/git/browser/views/disabled/disabledView.ts
+0
-3
src/vs/workbench/parts/git/browser/views/empty/emptyView.ts
src/vs/workbench/parts/git/browser/views/empty/emptyView.ts
+0
-7
src/vs/workbench/parts/git/browser/views/gitless/gitlessView.ts
.../workbench/parts/git/browser/views/gitless/gitlessView.ts
+0
-1
src/vs/workbench/parts/git/common/git.ts
src/vs/workbench/parts/git/common/git.ts
+2
-3
src/vs/workbench/parts/git/electron-browser/electronGitService.ts
...orkbench/parts/git/electron-browser/electronGitService.ts
+1
-1
src/vs/workbench/parts/git/electron-browser/git.contribution.ts
.../workbench/parts/git/electron-browser/git.contribution.ts
+1
-2
src/vs/workbench/parts/git/electron-browser/gitApp.ts
src/vs/workbench/parts/git/electron-browser/gitApp.ts
+1
-1
src/vs/workbench/parts/git/electron-main/askpass.ts
src/vs/workbench/parts/git/electron-main/askpass.ts
+0
-5
src/vs/workbench/parts/git/node/git.lib.ts
src/vs/workbench/parts/git/node/git.lib.ts
+5
-5
src/vs/workbench/parts/git/node/rawGitService.ts
src/vs/workbench/parts/git/node/rawGitService.ts
+0
-9
未找到文件。
extensions/json/server/src/utils/httpRequest.ts
浏览文件 @
98b3482a
...
...
@@ -5,7 +5,7 @@
'
use strict
'
;
import
{
Url
,
parse
as
parseUrl
}
from
'
url
'
;
import
{
parse
as
parseUrl
}
from
'
url
'
;
import
{
getProxyAgent
}
from
'
./proxy
'
;
import
https
=
require
(
'
https
'
);
import
http
=
require
(
'
http
'
);
...
...
extensions/typescript/src/utils/async.ts
浏览文件 @
98b3482a
...
...
@@ -33,7 +33,7 @@ export class Delayer<T> {
if
(
!
this
.
completionPromise
)
{
this
.
completionPromise
=
new
Promise
<
T
>
((
resolve
)
=>
{
this
.
onSuccess
=
resolve
this
.
onSuccess
=
resolve
;
}).
then
(()
=>
{
this
.
completionPromise
=
null
;
this
.
onSuccess
=
null
;
...
...
src/vs/base/browser/ui/list/listView.ts
浏览文件 @
98b3482a
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import
{
IScrollable
}
from
'
vs/base/common/scrollable
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
toObject
,
assign
}
from
'
vs/base/common/objects
'
;
import
{
IDisposable
,
disposeAll
}
from
'
vs/base/common/lifecycle
'
;
import
{
Gesture
}
from
'
vs/base/browser/touch
'
;
...
...
@@ -12,7 +12,7 @@ import * as DOM from 'vs/base/browser/dom';
import
{
IScrollableElement
}
from
'
vs/base/browser/ui/scrollbar/scrollableElement
'
;
import
{
ScrollableElement
}
from
'
vs/base/browser/ui/scrollbar/scrollableElementImpl
'
;
import
{
RangeMap
,
IRange
}
from
'
./rangeMap
'
;
import
{
IDelegate
,
IRenderer
,
IListElementEvent
}
from
'
./list
'
;
import
{
IDelegate
,
IRenderer
}
from
'
./list
'
;
import
{
RowCache
,
IRow
}
from
'
./rowCache
'
;
import
{
LcsDiff
,
ISequence
}
from
'
vs/base/common/diff/diff
'
;
...
...
@@ -68,7 +68,7 @@ export class ListView<T> implements IScrollable, IDisposable {
private
rowsContainer
:
HTMLElement
;
private
scrollableElement
:
IScrollableElement
;
private
_onScroll
=
new
Emitter
<
IScrollEvent
>
()
private
_onScroll
=
new
Emitter
<
IScrollEvent
>
()
;
private
toDispose
:
IDisposable
[];
...
...
src/vs/base/browser/ui/list/listWidget.ts
浏览文件 @
98b3482a
...
...
@@ -22,8 +22,6 @@ interface ITraitChangeEvent {
class
TraitRenderer
<
T
,
D
>
implements
IRenderer
<
T
,
ITraitTemplateData
<
D
>>
{
private
elements
:
{
[
id
:
string
]:
T
};
constructor
(
private
controller
:
Trait
,
private
renderer
:
IRenderer
<
T
,
D
>
...
...
@@ -215,14 +213,14 @@ export class List<T> implements IDisposable {
}
selectNext
(
n
=
1
,
loop
=
false
):
void
{
if
(
this
.
length
===
0
)
return
;
if
(
this
.
length
===
0
)
{
return
;
}
const
selection
=
this
.
selection
.
get
();
let
index
=
selection
.
length
>
0
?
selection
[
0
]
+
n
:
0
;
this
.
setSelection
(
loop
?
index
%
this
.
length
:
Math
.
min
(
index
,
this
.
length
-
1
));
}
selectPrevious
(
n
=
1
,
loop
=
false
):
void
{
if
(
this
.
length
===
0
)
return
;
if
(
this
.
length
===
0
)
{
return
;
}
const
selection
=
this
.
selection
.
get
();
let
index
=
selection
.
length
>
0
?
selection
[
0
]
-
n
:
0
;
if
(
loop
&&
index
<
0
)
index
=
this
.
length
+
(
index
%
this
.
length
);
...
...
@@ -235,17 +233,17 @@ export class List<T> implements IDisposable {
}
focusNext
(
n
=
1
,
loop
=
false
):
void
{
if
(
this
.
length
===
0
)
return
;
if
(
this
.
length
===
0
)
{
return
;
}
const
focus
=
this
.
focus
.
get
();
let
index
=
focus
.
length
>
0
?
focus
[
0
]
+
n
:
0
;
this
.
setFocus
(
loop
?
index
%
this
.
length
:
Math
.
min
(
index
,
this
.
length
-
1
));
}
focusPrevious
(
n
=
1
,
loop
=
false
):
void
{
if
(
this
.
length
===
0
)
return
;
if
(
this
.
length
===
0
)
{
return
;
}
const
focus
=
this
.
focus
.
get
();
let
index
=
focus
.
length
>
0
?
focus
[
0
]
-
n
:
0
;
if
(
loop
&&
index
<
0
)
index
=
(
this
.
length
+
(
index
%
this
.
length
))
%
this
.
length
;
if
(
loop
&&
index
<
0
)
{
index
=
(
this
.
length
+
(
index
%
this
.
length
))
%
this
.
length
;
}
this
.
setFocus
(
Math
.
max
(
index
,
0
));
}
...
...
src/vs/base/common/service.ts
浏览文件 @
98b3482a
...
...
@@ -8,7 +8,7 @@
import
{
Promise
,
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
assign
}
from
'
vs/base/common/objects
'
;
import
{
IDisposable
,
fnToDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
Emitter
}
from
'
vs/base/common/event
'
;
enum
RequestType
{
Common
,
...
...
src/vs/base/node/service.cp.ts
浏览文件 @
98b3482a
...
...
@@ -10,9 +10,6 @@ import { Delayer } from 'vs/base/common/async';
import
{
clone
,
assign
}
from
'
vs/base/common/objects
'
;
import
{
IServiceCtor
,
Server
as
IPCServer
,
Client
as
IPCClient
,
IServiceMap
}
from
'
vs/base/common/service
'
;
// The amd loader has the global scope assigned to this.
const
globalRequire
=
this
.
require
;
export
class
Server
extends
IPCServer
{
constructor
()
{
super
({
...
...
src/vs/base/node/service.net.ts
浏览文件 @
98b3482a
...
...
@@ -96,7 +96,7 @@ export class Client implements IDisposable, IClient {
private
ipcClient
:
IPCClient
;
private
_onClose
=
new
Emitter
<
void
>
();
get
onClose
()
{
return
this
.
_onClose
.
event
;
}
get
onClose
()
:
Event
<
void
>
{
return
this
.
_onClose
.
event
;
}
constructor
(
private
socket
:
net
.
Socket
)
{
this
.
ipcClient
=
new
IPCClient
(
new
Protocol
(
socket
));
...
...
src/vs/editor/contrib/suggest/browser/suggestWidget.ts
浏览文件 @
98b3482a
...
...
@@ -10,7 +10,7 @@ import * as nls from 'vs/nls';
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IDisposable
,
disposeAll
}
from
'
vs/base/common/lifecycle
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
append
,
addClass
,
removeClass
,
toggleClass
,
emmet
as
$
,
hide
,
show
,
addDisposableListener
}
from
'
vs/base/browser/dom
'
;
import
{
append
,
addClass
,
removeClass
,
toggleClass
,
emmet
as
$
,
hide
,
show
}
from
'
vs/base/browser/dom
'
;
import
{
IRenderer
,
IDelegate
,
IFocusChangeEvent
,
ISelectionChangeEvent
}
from
'
vs/base/browser/ui/list/list
'
;
import
{
List
}
from
'
vs/base/browser/ui/list/listWidget
'
;
import
*
as
HighlightedLabel
from
'
vs/base/browser/ui/highlightedlabel/highlightedLabel
'
;
...
...
@@ -21,7 +21,7 @@ import * as Timer from 'vs/base/common/timer';
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
SuggestRegistry
,
CONTEXT_SUGGESTION_SUPPORTS_ACCEPT_ON_KEY
}
from
'
../common/suggest
'
;
import
{
IKeybindingService
,
IKeybindingContextKey
}
from
'
vs/platform/keybinding/common/keybindingService
'
;
import
{
onUnexpectedError
,
isPromiseCanceledError
,
illegalArgument
}
from
'
vs/base/common/errors
'
;
import
{
onUnexpectedError
,
isPromiseCanceledError
}
from
'
vs/base/common/errors
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ScrollableElement
}
from
'
vs/base/browser/ui/scrollbar/scrollableElementImpl
'
;
import
{
CompletionModel
,
CompletionItem
}
from
'
./completionModel
'
;
...
...
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
浏览文件 @
98b3482a
...
...
@@ -154,39 +154,39 @@ export class ActivitybarPart extends Part implements IActivityService {
this
.
viewletSwitcherBar
.
push
(
viewletActions
,
{
label
:
true
,
icon
:
true
});
}
private
createGlobalToolBarArea
(
div
:
Builder
):
void
{
// Global action bar is on the bottom
this
.
globalToolBar
=
new
ToolBar
(
div
.
getHTMLElement
(),
this
.
contextMenuService
,
{
actionItemProvider
:
(
action
:
Action
)
=>
this
.
activityActionItems
[
action
.
id
],
orientation
:
ActionsOrientation
.
VERTICAL
});
this
.
globalToolBar
.
getContainer
().
addClass
(
'
global
'
);
this
.
globalToolBar
.
actionRunner
.
addListener
(
events
.
EventType
.
RUN
,
(
e
:
any
)
=>
{
// Check for Error
if
(
e
.
error
&&
!
errors
.
isPromiseCanceledError
(
e
.
error
))
{
this
.
messageService
.
show
(
Severity
.
Error
,
e
.
error
);
}
// Log in telemetry
if
(
this
.
telemetryService
)
{
this
.
telemetryService
.
publicLog
(
'
workbenchActionExecuted
'
,
{
id
:
e
.
action
.
id
,
from
:
'
activityBar
'
});
}
});
// Build Global Actions in correct order
let
primaryActions
=
this
.
getGlobalActions
(
true
);
let
secondaryActions
=
this
.
getGlobalActions
(
false
);
if
(
primaryActions
.
length
+
secondaryActions
.
length
>
0
)
{
this
.
globalToolBar
.
getContainer
().
addClass
(
'
position-bottom
'
);
}
// Add to global action bar
this
.
globalToolBar
.
setActions
(
prepareActions
(
primaryActions
),
prepareActions
(
secondaryActions
))();
}
//
private createGlobalToolBarArea(div: Builder): void {
//
// Global action bar is on the bottom
//
this.globalToolBar = new ToolBar(div.getHTMLElement(), this.contextMenuService, {
//
actionItemProvider: (action: Action) => this.activityActionItems[action.id],
//
orientation: ActionsOrientation.VERTICAL
//
});
//
this.globalToolBar.getContainer().addClass('global');
//
this.globalToolBar.actionRunner.addListener(events.EventType.RUN, (e: any) => {
//
// Check for Error
//
if (e.error && !errors.isPromiseCanceledError(e.error)) {
//
this.messageService.show(Severity.Error, e.error);
//
}
//
// Log in telemetry
//
if (this.telemetryService) {
//
this.telemetryService.publicLog('workbenchActionExecuted', { id: e.action.id, from: 'activityBar' });
//
}
//
});
//
// Build Global Actions in correct order
//
let primaryActions = this.getGlobalActions(true);
//
let secondaryActions = this.getGlobalActions(false);
//
if (primaryActions.length + secondaryActions.length > 0) {
//
this.globalToolBar.getContainer().addClass('position-bottom');
//
}
//
// Add to global action bar
//
this.globalToolBar.setActions(prepareActions(primaryActions), prepareActions(secondaryActions))();
//
}
private
getGlobalActions
(
primary
:
boolean
):
IAction
[]
{
let
actionBarRegistry
=
<
IActionBarRegistry
>
Registry
.
as
(
ActionBarExtensions
.
Actionbar
);
...
...
src/vs/workbench/parts/extensions/node/extensionsService.ts
浏览文件 @
98b3482a
...
...
@@ -10,7 +10,6 @@ import { tmpdir } from 'os';
import
*
as
path
from
'
path
'
;
import
types
=
require
(
'
vs/base/common/types
'
);
import
{
ServiceEvent
}
from
'
vs/base/common/service
'
;
import
errors
=
require
(
'
vs/base/common/errors
'
);
import
*
as
pfs
from
'
vs/base/node/pfs
'
;
import
{
assign
}
from
'
vs/base/common/objects
'
;
import
{
flatten
}
from
'
vs/base/common/arrays
'
;
...
...
@@ -91,16 +90,16 @@ export class ExtensionsService implements IExtensionsService {
private
obsoleteFileLimiter
:
Limiter
<
void
>
;
private
_onInstallExtension
=
new
Emitter
<
IExtensionManifest
>
();
@
ServiceEvent
onInstallExtension
=
this
.
_onInstallExtension
.
event
;
@
ServiceEvent
onInstallExtension
:
Event
<
IExtension
>
=
this
.
_onInstallExtension
.
event
;
private
_onDidInstallExtension
=
new
Emitter
<
IExtension
>
();
@
ServiceEvent
onDidInstallExtension
=
this
.
_onDidInstallExtension
.
event
;
@
ServiceEvent
onDidInstallExtension
:
Event
<
IExtension
>
=
this
.
_onDidInstallExtension
.
event
;
private
_onUninstallExtension
=
new
Emitter
<
IExtension
>
();
@
ServiceEvent
onUninstallExtension
=
this
.
_onUninstallExtension
.
event
;
@
ServiceEvent
onUninstallExtension
:
Event
<
IExtension
>
=
this
.
_onUninstallExtension
.
event
;
private
_onDidUninstallExtension
=
new
Emitter
<
IExtension
>
();
@
ServiceEvent
onDidUninstallExtension
=
this
.
_onDidUninstallExtension
.
event
;
@
ServiceEvent
onDidUninstallExtension
:
Event
<
IExtension
>
=
this
.
_onDidUninstallExtension
.
event
;
constructor
(
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
...
...
@@ -212,10 +211,6 @@ export class ExtensionsService implements IExtensionsService {
});
}
private
getExtensionId
(
extension
:
IExtension
):
string
{
return
`
${
extension
.
publisher
}
.
${
extension
.
name
}
-
${
extension
.
version
}
`
;
}
public
removeDeprecatedExtensions
():
TPromise
<
void
>
{
const
outdated
=
this
.
getAllInstalled
()
.
then
(
plugins
=>
{
...
...
src/vs/workbench/parts/extensions/node/vsoGalleryService.ts
浏览文件 @
98b3482a
...
...
@@ -3,18 +3,12 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
assign
}
from
'
vs/base/common/objects
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IGalleryService
,
IExtension
}
from
'
vs/workbench/parts/extensions/common/extensions
'
;
import
{
IXHRResponse
}
from
'
vs/base/common/http
'
;
import
{
IRequestService
}
from
'
vs/platform/request/common/request
'
;
import
{
IWorkspaceContextService
}
from
'
vs/workbench/services/workspace/common/contextService
'
;
import
{
nfcall
}
from
'
vs/base/common/async
'
;
import
*
as
fs
from
'
fs
'
;
export
interface
IGalleryExtensionFile
{
assetType
:
string
;
}
...
...
src/vs/workbench/parts/git/browser/gitActionItems.ts
浏览文件 @
98b3482a
...
...
@@ -11,12 +11,10 @@ import Strings = require('vs/base/common/strings');
import
Actions
=
require
(
'
vs/base/common/actions
'
);
import
InputBox
=
require
(
'
vs/base/browser/ui/inputbox/inputBox
'
);
import
ActionBar
=
require
(
'
vs/base/browser/ui/actionbar/actionbar
'
);
import
git
=
require
(
'
vs/workbench/parts/git/common/git
'
)
;
import
{
IGitService
}
from
'
vs/workbench/parts/git/common/git
'
;
import
{
IContextViewService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
CommonKeybindings
}
from
'
vs/base/common/keyCodes
'
;
import
IGitService
=
git
.
IGitService
;
var
$
=
Builder
.
$
;
export
class
CreateBranchActionItem
extends
ActionBar
.
BaseActionItem
{
...
...
src/vs/workbench/parts/git/browser/gitActions.contribution.ts
浏览文件 @
98b3482a
...
...
@@ -9,15 +9,12 @@ import lifecycle = require('vs/base/common/lifecycle');
import
platform
=
require
(
'
vs/platform/platform
'
);
import
abr
=
require
(
'
vs/workbench/browser/actionBarRegistry
'
);
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
basename
}
from
'
vs/base/common/paths
'
;
import
editorbrowser
=
require
(
'
vs/editor/browser/editorBrowser
'
);
import
editorcommon
=
require
(
'
vs/editor/common/editorCommon
'
);
import
{
TextModel
}
from
'
vs/editor/common/model/textModel
'
;
import
baseeditor
=
require
(
'
vs/workbench/browser/parts/editor/baseEditor
'
);
import
WorkbenchEditorCommon
=
require
(
'
vs/workbench/common/editor
'
);
import
tdeditor
=
require
(
'
vs/workbench/browser/parts/editor/textDiffEditor
'
);
import
teditor
=
require
(
'
vs/workbench/browser/parts/editor/textEditor
'
);
import
files
=
require
(
'
vs/workbench/parts/files/browser/files
'
);
import
filesCommon
=
require
(
'
vs/workbench/parts/files/common/files
'
);
import
gitcontrib
=
require
(
'
vs/workbench/parts/git/browser/gitWorkbenchContributions
'
);
import
{
IGitService
,
Status
,
IFileStatus
,
StatusType
}
from
'
vs/workbench/parts/git/common/git
'
;
...
...
@@ -27,12 +24,11 @@ import {IWorkbenchEditorService} from 'vs/workbench/services/editor/common/edito
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/common/viewletService
'
;
import
{
IPartService
,
Parts
}
from
'
vs/workbench/services/part/common/partService
'
;
import
{
IWorkspaceContextService
}
from
'
vs/workbench/services/workspace/common/contextService
'
;
import
{
IFileService
,
IFileStat
}
from
'
vs/platform/files/common/files
'
;
import
{
IFileService
}
from
'
vs/platform/files/common/files
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
wbar
=
require
(
'
vs/workbench/common/actionRegistry
'
);
import
{
SyncActionDescriptor
}
from
'
vs/platform/actions/common/actions
'
;
import
{
OpenChangeAction
,
SyncAction
,
PullAction
,
PushAction
,
PublishAction
,
StartGitBranchAction
,
StartGitCheckoutAction
}
from
'
./gitActions
'
;
import
Severity
from
'
vs/base/common/severity
'
;
import
paths
=
require
(
'
vs/base/common/paths
'
);
import
URI
from
'
vs/base/common/uri
'
;
...
...
src/vs/workbench/parts/git/browser/gitActions.ts
浏览文件 @
98b3482a
...
...
@@ -28,7 +28,7 @@ import Severity from 'vs/base/common/severity';
import
{
IGitService
,
IFileStatus
,
Status
,
StatusType
,
ServiceState
,
IModel
,
IBranch
,
GitErrorCodes
,
ServiceOperations
}
from
'
vs/workbench/parts/git/common/git
'
;
import
{
IQuickOpenService
,
IPickOpenEntry
}
from
'
vs/workbench/services/quickopen/common/quickOpenService
'
;
import
{
IQuickOpenService
}
from
'
vs/workbench/services/quickopen/common/quickOpenService
'
;
import
paths
=
require
(
'
vs/base/common/paths
'
);
import
URI
from
'
vs/base/common/uri
'
;
...
...
src/vs/workbench/parts/git/browser/gitQuickOpen.ts
浏览文件 @
98b3482a
...
...
@@ -5,8 +5,6 @@
'
use strict
'
;
import
nls
=
require
(
'
vs/nls
'
);
import
objects
=
require
(
'
vs/base/common/objects
'
);
import
arrays
=
require
(
'
vs/base/common/arrays
'
);
import
filters
=
require
(
'
vs/base/common/filters
'
);
import
winjs
=
require
(
'
vs/base/common/winjs.base
'
);
import
severity
from
'
vs/base/common/severity
'
;
...
...
@@ -14,7 +12,6 @@ import git = require('vs/workbench/parts/git/common/git');
import
quickopenwb
=
require
(
'
vs/workbench/browser/quickopen
'
);
import
quickopen
=
require
(
'
vs/base/parts/quickopen/common/quickOpen
'
);
import
model
=
require
(
'
vs/base/parts/quickopen/browser/quickOpenModel
'
);
import
widget
=
require
(
'
vs/base/parts/quickopen/browser/quickOpenWidget
'
);
import
{
IQuickOpenService
}
from
'
vs/workbench/services/quickopen/common/quickOpenService
'
;
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
...
...
src/vs/workbench/parts/git/browser/gitServices.ts
浏览文件 @
98b3482a
...
...
@@ -26,7 +26,7 @@ import async = require('vs/base/common/async');
import
severity
from
'
vs/base/common/severity
'
;
import
{
IOutputService
}
from
'
vs/workbench/parts/output/common/output
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IConfigurationService
,
IConfigurationServiceEvent
,
ConfigurationServiceEventTypes
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IConfigurationService
,
ConfigurationServiceEventTypes
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IEventService
}
from
'
vs/platform/event/common/event
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
...
...
src/vs/workbench/parts/git/browser/gitWidgets.ts
浏览文件 @
98b3482a
...
...
@@ -5,9 +5,8 @@
import
nls
=
require
(
'
vs/nls
'
);
import
strings
=
require
(
'
vs/base/common/strings
'
);
import
{
assign
}
from
'
vs/base/common/objects
'
;
import
{
Delayer
}
from
'
vs/base/common/async
'
;
import
{
emmet
as
$
,
append
,
show
,
hide
,
addClass
,
toggleClass
}
from
'
vs/base/browser/dom
'
;
import
{
emmet
as
$
,
append
,
show
,
hide
,
toggleClass
}
from
'
vs/base/browser/dom
'
;
import
{
IDisposable
,
combinedDispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
IGitService
,
ServiceState
,
IBranch
,
ServiceOperations
,
IRemote
}
from
'
vs/workbench/parts/git/common/git
'
;
import
{
IStatusbarItem
}
from
'
vs/workbench/browser/parts/statusbar/statusbar
'
;
...
...
src/vs/workbench/parts/git/browser/gitWorkbenchContributions.ts
浏览文件 @
98b3482a
...
...
@@ -10,9 +10,7 @@ import nls = require('vs/nls');
import
async
=
require
(
'
vs/base/common/async
'
);
import
errors
=
require
(
'
vs/base/common/errors
'
);
import
paths
=
require
(
'
vs/base/common/paths
'
);
import
actions
=
require
(
'
vs/base/common/actions
'
);
import
lifecycle
=
require
(
'
vs/base/common/lifecycle
'
);
import
Severity
from
'
vs/base/common/severity
'
;
import
winjs
=
require
(
'
vs/base/common/winjs.base
'
);
import
ext
=
require
(
'
vs/workbench/common/contributions
'
);
import
git
=
require
(
'
vs/workbench/parts/git/common/git
'
);
...
...
@@ -30,7 +28,6 @@ import {SyncActionDescriptor} from 'vs/platform/actions/common/actions';
import
{
EditorBrowserRegistry
}
from
'
vs/editor/browser/editorBrowserExtensions
'
;
import
confregistry
=
require
(
'
vs/platform/configuration/common/configurationRegistry
'
);
import
quickopen
=
require
(
'
vs/workbench/browser/quickopen
'
);
import
{
IQuickOpenService
}
from
'
vs/workbench/services/quickopen/common/quickOpenService
'
;
import
editorcontrib
=
require
(
'
vs/workbench/parts/git/browser/gitEditorContributions
'
);
import
{
IActivityService
,
ProgressBadge
,
NumberBadge
}
from
'
vs/workbench/services/activity/common/activityService
'
;
import
{
IEventService
}
from
'
vs/platform/event/common/event
'
;
...
...
src/vs/workbench/parts/git/browser/views/changes/changesViewer.ts
浏览文件 @
98b3482a
...
...
@@ -7,7 +7,6 @@
import
winjs
=
require
(
'
vs/base/common/winjs.base
'
);
import
nls
=
require
(
'
vs/nls
'
);
import
platform
=
require
(
'
vs/base/common/platform
'
);
import
errors
=
require
(
'
vs/base/common/errors
'
);
import
paths
=
require
(
'
vs/base/common/paths
'
);
import
severity
from
'
vs/base/common/severity
'
;
import
lifecycle
=
require
(
'
vs/base/common/lifecycle
'
);
...
...
@@ -22,7 +21,7 @@ import tree = require('vs/base/parts/tree/browser/tree');
import
treednd
=
require
(
'
vs/base/parts/tree/browser/treeDnd
'
);
import
treedefaults
=
require
(
'
vs/base/parts/tree/browser/treeDefaults
'
);
import
actionsrenderer
=
require
(
'
vs/base/parts/tree/browser/actionsRenderer
'
);
import
git
=
require
(
'
vs/workbench/parts/git/common/git
'
)
;
import
*
as
git
from
'
vs/workbench/parts/git/common/git
'
;
import
gitmodel
=
require
(
'
vs/workbench/parts/git/common/gitModel
'
);
import
gitactions
=
require
(
'
vs/workbench/parts/git/browser/gitActions
'
);
import
{
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
...
...
@@ -32,7 +31,7 @@ import { CommonKeybindings } from 'vs/base/common/keyCodes';
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
IGitService
=
git
.
IGitService
import
IGitService
=
git
.
IGitService
;
function
toReadablePath
(
path
:
string
):
string
{
if
(
!
platform
.
isWindows
)
{
...
...
@@ -354,7 +353,7 @@ export class Renderer implements tree.IRenderer {
data
.
renameFolder
.
textContent
=
folder
;
const
resource
=
URI
.
file
(
paths
.
normalize
(
paths
.
join
(
repositoryRoot
,
renamePath
)));
isInWorkspace
=
paths
.
isEqualOrParent
(
resource
.
fsPath
,
workspaceRoot
)
isInWorkspace
=
paths
.
isEqualOrParent
(
resource
.
fsPath
,
workspaceRoot
)
;
}
if
(
isInWorkspace
)
{
...
...
src/vs/workbench/parts/git/browser/views/disabled/disabledView.ts
浏览文件 @
98b3482a
...
...
@@ -7,14 +7,11 @@
import
'
vs/css!./disabledView
'
;
import
nls
=
require
(
'
vs/nls
'
);
import
git
=
require
(
'
vs/workbench/parts/git/common/git
'
);
import
platform
=
require
(
'
vs/base/common/platform
'
);
import
winjs
=
require
(
'
vs/base/common/winjs.base
'
);
import
ee
=
require
(
'
vs/base/common/eventEmitter
'
);
import
view
=
require
(
'
vs/workbench/parts/git/browser/views/view
'
);
import
builder
=
require
(
'
vs/base/browser/builder
'
);
import
actions
=
require
(
'
vs/base/common/actions
'
);
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
ISelection
,
Selection
}
from
'
vs/platform/selection/common/selection
'
;
var
$
=
builder
.
$
;
...
...
src/vs/workbench/parts/git/browser/views/empty/emptyView.ts
浏览文件 @
98b3482a
...
...
@@ -10,8 +10,6 @@ import nls = require('vs/nls');
import
Lifecycle
=
require
(
'
vs/base/common/lifecycle
'
);
import
EventEmitter
=
require
(
'
vs/base/common/eventEmitter
'
);
import
DOM
=
require
(
'
vs/base/browser/dom
'
);
import
Errors
=
require
(
'
vs/base/common/errors
'
);
import
Keyboard
=
require
(
'
vs/base/browser/keyboardEvent
'
);
import
{
Button
}
from
'
vs/base/browser/ui/button/button
'
;
import
WinJS
=
require
(
'
vs/base/common/winjs.base
'
);
import
Builder
=
require
(
'
vs/base/browser/builder
'
);
...
...
@@ -20,7 +18,6 @@ import InputBox = require('vs/base/browser/ui/inputbox/inputBox');
import
git
=
require
(
'
vs/workbench/parts/git/common/git
'
);
import
GitView
=
require
(
'
vs/workbench/parts/git/browser/views/view
'
);
import
GitActions
=
require
(
'
vs/workbench/parts/git/browser/gitActions
'
);
import
Severity
from
'
vs/base/common/severity
'
;
import
{
IFileService
}
from
'
vs/platform/files/common/files
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
...
...
@@ -140,10 +137,6 @@ export class EmptyView extends EventEmitter.EventEmitter implements GitView.IVie
this
.
initButton
.
enabled
=
true
;
}
private
onError
(
e
:
Error
):
void
{
this
.
messageService
.
show
(
Severity
.
Error
,
e
);
}
public
focus
():
void
{
// no-op
}
...
...
src/vs/workbench/parts/git/browser/views/gitless/gitlessView.ts
浏览文件 @
98b3482a
...
...
@@ -7,7 +7,6 @@
import
'
vs/css!./gitlessView
'
;
import
nls
=
require
(
'
vs/nls
'
);
import
git
=
require
(
'
vs/workbench/parts/git/common/git
'
);
import
platform
=
require
(
'
vs/base/common/platform
'
);
import
winjs
=
require
(
'
vs/base/common/winjs.base
'
);
import
ee
=
require
(
'
vs/base/common/eventEmitter
'
);
...
...
src/vs/workbench/parts/git/common/git.ts
浏览文件 @
98b3482a
...
...
@@ -8,8 +8,7 @@ import WinJS = require('vs/base/common/winjs.base');
import
WorkbenchEditorCommon
=
require
(
'
vs/workbench/common/editor
'
);
import
EventEmitter
=
require
(
'
vs/base/common/eventEmitter
'
);
import
Lifecycle
=
require
(
'
vs/base/common/lifecycle
'
);
import
output
=
require
(
'
vs/workbench/parts/output/common/output
'
);
import
{
createDecorator
,
ServiceIdentifier
}
from
'
vs/platform/instantiation/common/instantiation
'
import
{
createDecorator
,
ServiceIdentifier
}
from
'
vs/platform/instantiation/common/instantiation
'
;
// Model raw interfaces
...
...
@@ -109,7 +108,7 @@ export interface IStatusGroup extends EventEmitter.IEventEmitter {
getType
():
StatusType
;
update
(
statusList
:
IFileStatus
[]):
void
;
all
():
IFileStatus
[];
find
(
path
:
string
):
IFileStatus
find
(
path
:
string
):
IFileStatus
;
}
export
interface
IStatusSummary
{
...
...
src/vs/workbench/parts/git/electron-browser/electronGitService.ts
浏览文件 @
98b3482a
...
...
@@ -157,7 +157,7 @@ export class ElectronGitService extends GitService {
let
workspace
=
contextService
.
getWorkspace
();
let
raw
=
!
workspace
?
new
NoOpGitService
()
:
instantiationService
.
createInstance
(
ElectronRawGitService
,
workspace
.
resource
.
fsPath
)
:
instantiationService
.
createInstance
(
ElectronRawGitService
,
workspace
.
resource
.
fsPath
)
;
super
(
raw
,
instantiationService
,
eventService
,
messageService
,
editorService
,
outputService
,
contextService
,
lifecycleService
);
}
...
...
src/vs/workbench/parts/git/electron-browser/git.contribution.ts
浏览文件 @
98b3482a
...
...
@@ -3,10 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
registerContributions
}
from
'
vs/workbench/parts/git/browser/gitWorkbenchContributions
'
;
import
{
Registry
}
from
'
vs/platform/platform
'
;
import
{
ElectronGitService
}
from
'
vs/workbench/parts/git/electron-browser/electronGitService
'
;
import
{
IGitService
}
from
'
vs/workbench/parts/git/common/git
'
;
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
registerContributions
();
...
...
src/vs/workbench/parts/git/electron-browser/gitApp.ts
浏览文件 @
98b3482a
...
...
@@ -11,7 +11,7 @@ import uri from 'vs/base/common/uri';
import
{
GitErrorCodes
}
from
'
vs/workbench/parts/git/common/git
'
;
import
gitlib
=
require
(
'
vs/workbench/parts/git/node/git.lib
'
);
import
{
RawGitService
,
DelayedRawGitService
}
from
'
vs/workbench/parts/git/node/rawGitService
'
;
import
{
join
,
dirname
,
normalize
}
from
'
path
'
;
import
{
join
,
normalize
}
from
'
path
'
;
import
{
tmpdir
}
from
'
os
'
;
import
{
realpath
}
from
'
vs/base/node/pfs
'
;
...
...
src/vs/workbench/parts/git/electron-main/askpass.ts
浏览文件 @
98b3482a
...
...
@@ -5,7 +5,6 @@
'
use strict
'
;
import
events
=
require
(
'
vs/base/common/eventEmitter
'
);
import
{
connect
}
from
'
vs/base/node/service.net
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
*
as
fs
from
'
fs
'
;
...
...
@@ -21,10 +20,6 @@ export class GitAskpassServiceStub {
}
}
function
generateId
():
string
{
return
Math
.
floor
(
Math
.
random
()
*
Math
.
pow
(
10
,
10
)).
toString
(
16
);
}
function
fatal
(
err
:
any
):
void
{
console
.
error
(
err
);
process
.
exit
(
1
);
...
...
src/vs/workbench/parts/git/node/git.lib.ts
浏览文件 @
98b3482a
...
...
@@ -12,7 +12,7 @@ import uuid = require('vs/base/common/uuid');
import
nls
=
require
(
'
vs/nls
'
);
import
strings
=
require
(
'
vs/base/common/strings
'
);
import
{
IRawFileStatus
,
IHead
,
ITag
,
IBranch
,
IRemote
,
GitErrorCodes
,
IPushOptions
}
from
'
vs/workbench/parts/git/common/git
'
;
import
{
detectMimesFromStream
}
from
'
vs/base/node/mime
'
import
{
detectMimesFromStream
}
from
'
vs/base/node/mime
'
;
import
files
=
require
(
'
vs/platform/files/common/files
'
);
import
{
spawn
,
ChildProcess
}
from
'
child_process
'
;
import
iconv
=
require
(
'
iconv-lite
'
);
...
...
@@ -508,7 +508,7 @@ export class Repository {
public
pull
(
rebase
?:
boolean
):
Promise
{
const
args
=
[
'
pull
'
];
if
(
rebase
)
args
.
push
(
'
-r
'
);
if
(
rebase
)
{
args
.
push
(
'
-r
'
);
}
return
this
.
run
(
args
).
then
(
null
,
(
err
:
GitError
)
=>
{
if
(
/^CONFLICT
\([^
)
]
+
\)
:
\b
/m
.
test
(
err
.
stdout
))
{
...
...
@@ -527,9 +527,9 @@ export class Repository {
public
push
(
remote
?:
string
,
name
?:
string
,
options
?:
IPushOptions
):
Promise
{
const
args
=
[
'
push
'
];
if
(
options
&&
options
.
setUpstream
)
args
.
push
(
'
-u
'
);
if
(
remote
)
args
.
push
(
remote
);
if
(
name
)
args
.
push
(
name
);
if
(
options
&&
options
.
setUpstream
)
{
args
.
push
(
'
-u
'
);
}
if
(
remote
)
{
args
.
push
(
remote
);
}
if
(
name
)
{
args
.
push
(
name
);
}
return
this
.
run
(
args
).
then
(
null
,
(
err
:
GitError
)
=>
{
if
(
/^error: failed to push some refs to
\b
/m
.
test
(
err
.
stderr
))
{
...
...
src/vs/workbench/parts/git/node/rawGitService.ts
浏览文件 @
98b3482a
...
...
@@ -11,15 +11,6 @@ import pfs = require('vs/base/node/pfs');
import
{
Repository
,
GitError
}
from
'
vs/workbench/parts/git/node/git.lib
'
;
import
{
IRawGitService
,
RawServiceState
,
IRawStatus
,
IHead
,
GitErrorCodes
,
IPushOptions
}
from
'
vs/workbench/parts/git/common/git
'
;
function
pathsAreEqual
(
p1
:
string
,
p2
:
string
):
boolean
{
if
(
/^
(
win32|darwin
)
$/
.
test
(
process
.
platform
))
{
p1
=
p1
.
toLowerCase
();
p2
=
p2
.
toLowerCase
();
}
return
p1
===
p2
;
}
export
class
RawGitService
implements
IRawGitService
{
private
repo
:
Repository
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录