55'use strict' ;
66
77import URI from 'vs/base/common/uri' ;
8- import Event , { Emitter } from 'vs/base/common/event' ;
9- import Severity from 'vs/base/common/severity' ;
108import { DefaultFilter } from 'vs/editor/common/modes/modesFilters' ;
119import { TPromise } from 'vs/base/common/winjs.base' ;
12- import { onUnexpectedError } from 'vs/base/common/errors' ;
13- import { sequence } from 'vs/base/common/async' ;
14- import { Range as EditorRange } from 'vs/editor/common/core/range' ;
1510import { IDisposable } from 'vs/base/common/lifecycle' ;
16- import { IKeybindingService } from 'vs/platform/keybinding/common/keybindingService' ;
1711import { Remotable , IThreadService } from 'vs/platform/thread/common/thread' ;
12+ import { Range as EditorRange } from 'vs/editor/common/core/range' ;
1813import * as vscode from 'vscode' ;
1914import * as TypeConverters from 'vs/workbench/api/common/pluginHostTypeConverters' ;
20- import { Position , Range , SymbolKind , DocumentHighlightKind , Disposable , Diagnostic , DiagnosticSeverity , Location , SignatureHelp , CompletionItemKind } from 'vs/workbench/api/common/pluginHostTypes' ;
15+ import { Range , DocumentHighlightKind , Disposable , Diagnostic , SignatureHelp } from 'vs/workbench/api/common/pluginHostTypes' ;
2116import { IPosition , IRange , ISingleEditOperation } from 'vs/editor/common/editorCommon' ;
2217import * as modes from 'vs/editor/common/modes' ;
2318import { CancellationTokenSource } from 'vs/base/common/cancellation' ;
2419import { PluginHostModelService } from 'vs/workbench/api/common/pluginHostDocuments' ;
2520import { IMarkerService , IMarker } from 'vs/platform/markers/common/markers' ;
26- import { PluginHostCommands , MainThreadCommands } from 'vs/workbench/api/common/pluginHostCommands' ;
21+ import { PluginHostCommands } from 'vs/workbench/api/common/pluginHostCommands' ;
2722import { DeclarationRegistry } from 'vs/editor/contrib/goToDeclaration/common/goToDeclaration' ;
2823import { ExtraInfoRegistry } from 'vs/editor/contrib/hover/common/hover' ;
2924import { OccurrencesRegistry } from 'vs/editor/contrib/wordHighlighter/common/wordHighlighter' ;
3025import { ReferenceRegistry } from 'vs/editor/contrib/referenceSearch/common/referenceSearch' ;
3126import { QuickFixRegistry } from 'vs/editor/contrib/quickFix/common/quickFix' ;
3227import { OutlineRegistry , IOutlineEntry , IOutlineSupport } from 'vs/editor/contrib/quickOpen/common/quickOpen' ;
33- import LanguageFeatureRegistry from 'vs/editor/common/modes/languageFeatureRegistry' ;
3428import { NavigateTypesSupportRegistry , INavigateTypesSupport , ITypeBearing } from 'vs/workbench/parts/search/common/search'
3529import { RenameRegistry } from 'vs/editor/contrib/rename/common/rename' ;
3630import { FormatRegistry , FormatOnTypeRegistry } from 'vs/editor/contrib/format/common/format' ;
@@ -256,7 +250,7 @@ class ReferenceAdapter implements modes.IReferenceSupport {
256250 this . _provider = provider ;
257251 }
258252
259- canFindReferences ( ) :boolean {
253+ canFindReferences ( ) : boolean {
260254 return true
261255 }
262256
@@ -376,7 +370,7 @@ class OnTypeFormattingAdapter implements modes.IFormattingSupport {
376370 this . _provider = provider ;
377371 }
378372
379- autoFormatTriggerCharacters = [ ] ; // not here
373+ autoFormatTriggerCharacters : string [ ] = [ ] ; // not here
380374
381375 formatAfterKeystroke ( resource : URI , position : IPosition , ch : string , options : modes . IFormattingOptions ) : TPromise < ISingleEditOperation [ ] > {
382376
@@ -548,7 +542,7 @@ class SuggestAdapter implements modes.ISuggestSupport {
548542 } ) ;
549543 }
550544
551- getFilter ( ) : any {
545+ getFilter ( ) : any {
552546 throw new Error ( 'illegal state' ) ;
553547 }
554548 getTriggerCharacters ( ) : string [ ] {
@@ -601,7 +595,7 @@ type Adapter = OutlineAdapter | CodeLensAdapter | DeclarationAdapter | ExtraInfo
601595@Remotable . PluginHostContext ( 'ExtHostLanguageFeatures' )
602596export class ExtHostLanguageFeatures {
603597
604- private static _handlePool = 0 ;
598+ private static _handlePool : number = 0 ;
605599
606600 private _proxy : MainThreadLanguageFeatures ;
607601 private _documents : PluginHostModelService ;
@@ -642,7 +636,7 @@ export class ExtHostLanguageFeatures {
642636 return this . _createDisposable ( handle ) ;
643637 }
644638
645- $getOutline ( handle : number , resource : URI ) : TPromise < IOutlineEntry [ ] > {
639+ $getOutline ( handle : number , resource : URI ) : TPromise < IOutlineEntry [ ] > {
646640 return this . _withAdapter ( handle , OutlineAdapter , adapter => adapter . getOutline ( resource ) ) ;
647641 }
648642
@@ -659,7 +653,7 @@ export class ExtHostLanguageFeatures {
659653 return this . _withAdapter ( handle , CodeLensAdapter , adapter => adapter . findCodeLensSymbols ( resource ) ) ;
660654 }
661655
662- $resolveCodeLensSymbol ( handle :number , resource : URI , symbol : modes . ICodeLensSymbol ) : TPromise < modes . ICodeLensSymbol > {
656+ $resolveCodeLensSymbol ( handle : number , resource : URI , symbol : modes . ICodeLensSymbol ) : TPromise < modes . ICodeLensSymbol > {
663657 return this . _withAdapter ( handle , CodeLensAdapter , adapter => adapter . resolveCodeLensSymbol ( resource , symbol ) ) ;
664658 }
665659
@@ -685,7 +679,7 @@ export class ExtHostLanguageFeatures {
685679 return this . _createDisposable ( handle ) ;
686680 }
687681
688- $computeInfo ( handle :number , resource : URI , position : IPosition ) : TPromise < modes . IComputeExtraInfoResult > {
682+ $computeInfo ( handle : number , resource : URI , position : IPosition ) : TPromise < modes . IComputeExtraInfoResult > {
689683 return this . _withAdapter ( handle , ExtraInfoAdapter , adpater => adpater . computeInfo ( resource , position ) ) ;
690684 }
691685
@@ -698,7 +692,7 @@ export class ExtHostLanguageFeatures {
698692 return this . _createDisposable ( handle ) ;
699693 }
700694
701- $findOccurrences ( handle :number , resource : URI , position : IPosition ) : TPromise < modes . IOccurence [ ] > {
695+ $findOccurrences ( handle : number , resource : URI , position : IPosition ) : TPromise < modes . IOccurence [ ] > {
702696 return this . _withAdapter ( handle , OccurrencesAdapter , adapter => adapter . findOccurrences ( resource , position ) ) ;
703697 }
704698
@@ -724,7 +718,7 @@ export class ExtHostLanguageFeatures {
724718 return this . _createDisposable ( handle ) ;
725719 }
726720
727- $getQuickFixes ( handle :number , resource : URI , range : IRange , marker : IMarker [ ] ) : TPromise < modes . IQuickFix [ ] > {
721+ $getQuickFixes ( handle : number , resource : URI , range : IRange , marker : IMarker [ ] ) : TPromise < modes . IQuickFix [ ] > {
728722 return this . _withAdapter ( handle , QuickFixAdapter , adapter => adapter . getQuickFixes ( resource , range , marker ) ) ;
729723 }
730724
@@ -741,7 +735,7 @@ export class ExtHostLanguageFeatures {
741735 return this . _createDisposable ( handle ) ;
742736 }
743737
744- $formatDocument ( handle : number , resource : URI , options : modes . IFormattingOptions ) : TPromise < ISingleEditOperation [ ] > {
738+ $formatDocument ( handle : number , resource : URI , options : modes . IFormattingOptions ) : TPromise < ISingleEditOperation [ ] > {
745739 return this . _withAdapter ( handle , DocumentFormattingAdapter , adapter => adapter . formatDocument ( resource , options ) ) ;
746740 }
747741
@@ -752,7 +746,7 @@ export class ExtHostLanguageFeatures {
752746 return this . _createDisposable ( handle ) ;
753747 }
754748
755- $formatRange ( handle : number , resource : URI , range : IRange , options : modes . IFormattingOptions ) : TPromise < ISingleEditOperation [ ] > {
749+ $formatRange ( handle : number , resource : URI , range : IRange , options : modes . IFormattingOptions ) : TPromise < ISingleEditOperation [ ] > {
756750 return this . _withAdapter ( handle , RangeFormattingAdapter , adapter => adapter . formatRange ( resource , range , options ) ) ;
757751 }
758752
@@ -763,7 +757,7 @@ export class ExtHostLanguageFeatures {
763757 return this . _createDisposable ( handle ) ;
764758 }
765759
766- $formatAfterKeystroke ( handle : number , resource : URI , position : IPosition , ch : string , options : modes . IFormattingOptions ) : TPromise < ISingleEditOperation [ ] > {
760+ $formatAfterKeystroke ( handle : number , resource : URI , position : IPosition , ch : string , options : modes . IFormattingOptions ) : TPromise < ISingleEditOperation [ ] > {
767761 return this . _withAdapter ( handle , OnTypeFormattingAdapter , adapter => adapter . formatAfterKeystroke ( resource , position , ch , options ) ) ;
768762 }
769763
@@ -1036,4 +1030,4 @@ export class MainThreadLanguageFeatures {
10361030 } ) ;
10371031 return undefined ;
10381032 }
1039- }
1033+ }
0 commit comments