type converters, use namespace for ViewColumn

This commit is contained in:
Johannes Rieken
2018-05-04 18:30:28 +02:00
parent d52bf577dc
commit c47296282a
6 changed files with 38 additions and 37 deletions

View File

@@ -32,7 +32,7 @@ export class PreviewHTMLAPICommand {
public static execute(executor: ICommandsExecutor, uri: URI, position?: vscode.ViewColumn, label?: string, options?: any): Thenable<any> {
return executor.executeCommand('_workbench.previewHtml',
uri,
typeof position === 'number' && typeConverters.fromViewColumn(position),
typeof position === 'number' && typeConverters.ViewColumn.from(position),
label,
options
);
@@ -60,7 +60,7 @@ export class DiffAPICommand {
label,
undefined,
typeConverters.toTextEditorOptions(options),
options ? typeConverters.fromViewColumn(options.viewColumn) : undefined
options ? typeConverters.ViewColumn.from(options.viewColumn) : undefined
]);
}
}
@@ -74,10 +74,10 @@ export class OpenAPICommand {
if (columnOrOptions) {
if (typeof columnOrOptions === 'number') {
column = typeConverters.fromViewColumn(columnOrOptions);
column = typeConverters.ViewColumn.from(columnOrOptions);
} else {
options = typeConverters.toTextEditorOptions(columnOrOptions);
column = typeConverters.fromViewColumn(columnOrOptions.viewColumn);
column = typeConverters.ViewColumn.from(columnOrOptions.viewColumn);
}
}