api - introduce env.uiKind (web, desktop)

This commit is contained in:
Benjamin Pasero
2019-09-13 17:58:30 +02:00
parent 3fd9684eb5
commit f8effd5fad
7 changed files with 55 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ import { OverviewRulerLane } from 'vs/editor/common/model';
import * as languageConfiguration from 'vs/editor/common/modes/languageConfiguration';
import { score } from 'vs/editor/common/modes/languageSelector';
import * as files from 'vs/platform/files/common/files';
import { ExtHostContext, MainContext, ExtHostLogServiceShape } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostContext, MainContext, ExtHostLogServiceShape, UIKind } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostApiCommands } from 'vs/workbench/api/common/extHostApiCommands';
import { ExtHostClipboard } from 'vs/workbench/api/common/extHostClipboard';
import { IExtHostCommands } from 'vs/workbench/api/common/extHostCommands';
@@ -250,6 +250,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
},
get remoteName() {
return getRemoteName(initData.remote.authority);
},
get uiKind() {
checkProposedApiEnabled(extension);
return initData.uiKind;
}
};
if (!initData.environment.extensionTestsLocationURI) {
@@ -898,6 +902,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
CallHierarchyItem: extHostTypes.CallHierarchyItem,
Decoration: extHostTypes.Decoration,
WebviewEditorState: extHostTypes.WebviewEditorState,
UIKind: UIKind
};
};
}