mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-01 01:25:38 -05:00
Schema compare Icon and other fixes (#6009)
* Changes to 1. Enable Icon for Schema Compare model view editor 2. Set context setting in editable drop down 3. Fix a console error * new icons * Changes as per PR comments * Adding PR comments * Fixing a spelling mistake
This commit is contained in:
@@ -268,6 +268,9 @@ export abstract class ContainerBase<T> extends ComponentBase {
|
||||
|
||||
/// IComponent container-related implementation
|
||||
public addToContainer(componentDescriptor: IComponentDescriptor, config: any, index?: number): void {
|
||||
if (!componentDescriptor) {
|
||||
return;
|
||||
}
|
||||
if (this.items.some(item => item.descriptor.id === componentDescriptor.id && item.descriptor.type === componentDescriptor.type)) {
|
||||
return;
|
||||
}
|
||||
@@ -288,6 +291,9 @@ export abstract class ContainerBase<T> extends ComponentBase {
|
||||
}
|
||||
|
||||
public removeFromContainer(componentDescriptor: IComponentDescriptor): boolean {
|
||||
if (!componentDescriptor) {
|
||||
return false;
|
||||
}
|
||||
let index = this.items.findIndex(item => item.descriptor.id === componentDescriptor.id && item.descriptor.type === componentDescriptor.type);
|
||||
if (index >= 0) {
|
||||
this.items.splice(index, 1);
|
||||
|
||||
@@ -14,6 +14,7 @@ import { DialogPane } from 'sql/platform/dialog/dialogPane';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
|
||||
export type ModeViewSaveHandler = (handle: number) => Thenable<boolean>;
|
||||
|
||||
@@ -50,6 +51,7 @@ export class ModelViewInputModel extends EditorModel {
|
||||
export class ModelViewInput extends EditorInput {
|
||||
|
||||
public static ID: string = 'workbench.editorinputs.ModelViewEditorInput';
|
||||
public static Scheme: string = 'ModelViewEditorScheme';
|
||||
private _container: HTMLElement;
|
||||
private _dialogPaneContainer: HTMLElement;
|
||||
private _dialogPane: DialogPane;
|
||||
@@ -87,6 +89,13 @@ export class ModelViewInput extends EditorInput {
|
||||
return this._title;
|
||||
}
|
||||
|
||||
public getResource(): URI {
|
||||
if (this._options.resourceName) {
|
||||
return URI.from({ scheme: ModelViewInput.Scheme, path: this._options.resourceName });
|
||||
}
|
||||
return super.getResource();
|
||||
}
|
||||
|
||||
public get container(): HTMLElement {
|
||||
return this._container;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user