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:
udeeshagautam
2019-06-14 13:28:46 -07:00
committed by GitHub
parent 363af2a85c
commit f494c7af4e
12 changed files with 109 additions and 24 deletions

View File

@@ -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);

View File

@@ -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;
}