mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-08 01:28:26 -05:00
Merge from vscode 79a1f5a5ca0c6c53db617aa1fa5a2396d2caebe2
This commit is contained in:
@@ -14,6 +14,8 @@ import { IWorkbenchConstructionOptions } from 'vs/workbench/workbench.web.api';
|
||||
import product from 'vs/platform/product/common/product';
|
||||
import { memoize } from 'vs/base/common/decorators';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { LIGHT } from 'vs/platform/theme/common/themeService';
|
||||
import { parseLineAndColumnAware } from 'vs/base/common/extpath';
|
||||
|
||||
export class BrowserEnvironmentConfiguration implements IEnvironmentConfiguration {
|
||||
|
||||
@@ -37,7 +39,20 @@ export class BrowserEnvironmentConfiguration implements IEnvironmentConfiguratio
|
||||
if (this.payload) {
|
||||
const fileToOpen = this.payload.get('openFile');
|
||||
if (fileToOpen) {
|
||||
return [{ fileUri: URI.parse(fileToOpen) }];
|
||||
const fileUri = URI.parse(fileToOpen);
|
||||
|
||||
// Support: --goto parameter to open on line/col
|
||||
if (this.payload.has('gotoLineMode')) {
|
||||
const pathColumnAware = parseLineAndColumnAware(fileUri.path);
|
||||
|
||||
return [{
|
||||
fileUri: fileUri.with({ path: pathColumnAware.path }),
|
||||
lineNumber: pathColumnAware.line,
|
||||
columnNumber: pathColumnAware.column
|
||||
}];
|
||||
}
|
||||
|
||||
return [{ fileUri }];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +78,10 @@ export class BrowserEnvironmentConfiguration implements IEnvironmentConfiguratio
|
||||
get highContrast() {
|
||||
return false; // could investigate to detect high contrast theme automatically
|
||||
}
|
||||
|
||||
get defaultThemeType() {
|
||||
return LIGHT;
|
||||
}
|
||||
}
|
||||
|
||||
interface IBrowserWorkbenchEnvironmentConstructionOptions extends IWorkbenchConstructionOptions {
|
||||
|
||||
Reference in New Issue
Block a user