More layering clean-up
This commit is contained in:
parent
be2b6bd127
commit
b3c009ba19
|
@ -38,7 +38,6 @@ var editorResources = [
|
|||
'!out-build/vs/base/browser/ui/splitview/**/*',
|
||||
'!out-build/vs/base/browser/ui/toolbar/**/*',
|
||||
'!out-build/vs/base/browser/ui/octiconLabel/**/*',
|
||||
'!out-build/vs/editor/contrib/defineKeybinding/**/*',
|
||||
'!out-build/vs/workbench/**',
|
||||
'!**/test/**'
|
||||
];
|
||||
|
|
|
@ -538,7 +538,12 @@ export const symbolKindToCssClass = (function () {
|
|||
};
|
||||
})();
|
||||
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface IOutline {
|
||||
entries: SymbolInformation[];
|
||||
}
|
||||
/**
|
||||
* Represents information about programming constructs like variables, classes,
|
||||
* interfaces etc.
|
||||
|
|
|
@ -15,9 +15,9 @@ import { IContext, IHighlight, QuickOpenEntryGroup, QuickOpenModel } from 'vs/ba
|
|||
import { IAutoFocus, Mode } from 'vs/base/parts/quickopen/common/quickOpen';
|
||||
import { ICommonCodeEditor } from 'vs/editor/common/editorCommon';
|
||||
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
|
||||
import { SymbolInformation, DocumentSymbolProviderRegistry, symbolKindToCssClass } from 'vs/editor/common/modes';
|
||||
import { SymbolInformation, DocumentSymbolProviderRegistry, symbolKindToCssClass, IOutline } from 'vs/editor/common/modes';
|
||||
import { BaseEditorQuickOpenAction, IDecorator } from './editorQuickOpen';
|
||||
import { getDocumentSymbols, IOutline } from 'vs/editor/contrib/quickOpen/common/quickOpen';
|
||||
import { getDocumentSymbols } from 'vs/editor/contrib/quickOpen/common/quickOpen';
|
||||
import { editorAction, ServicesAccessor } from 'vs/editor/common/editorCommonExtensions';
|
||||
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
import { Range } from 'vs/editor/common/core/range';
|
||||
|
|
|
@ -11,14 +11,10 @@ import { TPromise } from 'vs/base/common/winjs.base';
|
|||
import { Range } from 'vs/editor/common/core/range';
|
||||
import { IModel } from 'vs/editor/common/editorCommon';
|
||||
import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions';
|
||||
import { SymbolInformation, DocumentSymbolProviderRegistry } from 'vs/editor/common/modes';
|
||||
import { SymbolInformation, DocumentSymbolProviderRegistry, IOutline } from 'vs/editor/common/modes';
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
import { asWinJsPromise } from 'vs/base/common/async';
|
||||
|
||||
export interface IOutline {
|
||||
entries: SymbolInformation[];
|
||||
}
|
||||
|
||||
export function getDocumentSymbols(model: IModel): TPromise<IOutline> {
|
||||
|
||||
let entries: SymbolInformation[] = [];
|
||||
|
|
|
@ -14,7 +14,6 @@ import { ISingleEditOperation } from 'vs/editor/common/editorCommon';
|
|||
import * as modes from 'vs/editor/common/modes';
|
||||
import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands';
|
||||
import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands';
|
||||
import { IOutline } from 'vs/editor/contrib/quickOpen/common/quickOpen';
|
||||
import { IWorkspaceSymbolProvider } from 'vs/workbench/parts/search/common/search';
|
||||
import { IEditorOptions } from 'vs/platform/editor/common/editor';
|
||||
|
||||
|
@ -385,7 +384,7 @@ export class ExtHostApiCommands {
|
|||
const args = {
|
||||
resource
|
||||
};
|
||||
return this._commands.executeCommand<IOutline>('_executeDocumentSymbolProvider', args).then(value => {
|
||||
return this._commands.executeCommand<modes.IOutline>('_executeDocumentSymbolProvider', args).then(value => {
|
||||
if (value && Array.isArray(value.entries)) {
|
||||
return value.entries.map(typeConverters.toSymbolInformation);
|
||||
}
|
||||
|
|
32
tslint.json
32
tslint.json
|
@ -167,6 +167,33 @@
|
|||
"vs/editor/contrib/diffNavigator/common/diffNavigator" // TODO@Alex
|
||||
]
|
||||
},
|
||||
{
|
||||
"target": "**/vs/editor/test/browser/**",
|
||||
"restrictions": [
|
||||
"assert",
|
||||
"vs/nls",
|
||||
"**/vs/base/{common,browser}/**",
|
||||
"**/vs/platform/*/{common,browser}/**",
|
||||
"**/vs/editor/{common,browser}/**",
|
||||
"**/vs/editor/test/{common,browser}/**",
|
||||
"vs/workbench/test/workbenchTestServices" // TODO@Alex
|
||||
]
|
||||
},
|
||||
{
|
||||
"target": "**/vs/editor/contrib/*/test/**",
|
||||
"restrictions": [
|
||||
"assert",
|
||||
"vs/nls",
|
||||
"**/vs/base/{common,browser}/**",
|
||||
"**/vs/base/test/{common,browser}/**",
|
||||
"**/vs/base/parts/*/{common,browser}/**",
|
||||
"**/vs/platform/*/{common,browser}/**",
|
||||
"**/vs/platform/*/test/{common,browser}/**",
|
||||
"**/vs/editor/{common,browser}/**",
|
||||
"**/vs/editor/test/{common,browser}/**",
|
||||
"**/vs/editor/contrib/**"
|
||||
]
|
||||
},
|
||||
{
|
||||
"target": "**/vs/editor/contrib/**",
|
||||
"restrictions": [
|
||||
|
@ -175,9 +202,8 @@
|
|||
"**/vs/base/{common,browser}/**",
|
||||
"**/vs/base/parts/*/{common,browser}/**",
|
||||
"**/vs/platform/*/{common,browser}/**",
|
||||
"**/vs/platform/*/test/{common,browser}/**",
|
||||
"**/vs/editor/**",
|
||||
"assert"
|
||||
"**/vs/editor/{common,browser}/**",
|
||||
"**/vs/editor/contrib/**"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue