mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 17:22:45 -05:00
More layering and strictness (#9004)
* move handling generated files to the serilization classes * remove unneeded methods * add more folders to strictire compile, add more strict compile options * update ci * wip * add more layering and fix issues * add more strictness * remove unnecessary assertion * add missing checks * fix indentation * wip * remove jsdoc * fix layering * fix compile * fix compile errors * wip * wip * finish layering * fix css * more layering * remove no longer good parts * fix issues with startup * another try * fix startup
This commit is contained in:
@@ -9,13 +9,8 @@ import {
|
||||
IConnectionCompletionOptions, ConnectionType,
|
||||
RunQueryOnConnectionMode, IConnectionResult
|
||||
} from 'sql/platform/connection/common/connectionManagement';
|
||||
import { EditDataInput } from 'sql/workbench/contrib/editData/browser/editDataInput';
|
||||
import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/browser/objectExplorerService';
|
||||
import { DashboardInput } from 'sql/workbench/contrib/dashboard/browser/dashboardInput';
|
||||
import { ProfilerInput } from 'sql/workbench/contrib/profiler/browser/profilerInput';
|
||||
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { QueryEditorInput } from 'sql/workbench/contrib/query/common/queryEditorInput';
|
||||
|
||||
export function replaceConnection(oldUri: string, newUri: string, connectionService: IConnectionManagementService): Promise<IConnectionResult> {
|
||||
return new Promise<IConnectionResult>((resolve, reject) => {
|
||||
@@ -81,12 +76,7 @@ export function getCurrentGlobalConnection(objectExplorerService: IObjectExplore
|
||||
|
||||
let activeInput = workbenchEditorService.activeEditor;
|
||||
if (activeInput) {
|
||||
if (activeInput instanceof QueryEditorInput || activeInput instanceof EditDataInput || activeInput instanceof DashboardInput) {
|
||||
connection = connectionManagementService.getConnectionProfile(activeInput.uri);
|
||||
}
|
||||
else if (activeInput instanceof ProfilerInput) {
|
||||
connection = activeInput.connection;
|
||||
}
|
||||
connection = connectionManagementService.getConnectionProfile(activeInput.getResource().toString());
|
||||
}
|
||||
|
||||
return connection;
|
||||
|
||||
Reference in New Issue
Block a user