table designer editor icon (#17608)

* icon for table designer

* use more specific name

* use sql defined schema
This commit is contained in:
Alan Ren
2021-11-05 16:26:17 -07:00
committed by GitHub
parent b4d72af3d4
commit 5f8e1f384f
4 changed files with 23 additions and 3 deletions

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><style type="text/css">.icon-canvas-transparent{opacity:0;fill:#F6F6F6;} .icon-vs-out{fill:#F6F6F6;} .icon-vs-bg{fill:#424242;} .icon-vs-fg{fill:#F0EFF1;}</style><path class="icon-canvas-transparent" d="M16 16h-16v-16h16v16z" id="canvas"/><path class="icon-vs-out" d="M16 15h-15v-14h15v14z" id="outline"/><path class="icon-vs-bg" d="M2 2v12h13v-12h-13zm4 11h-3v-2h3v2zm0-3h-3v-2h3v2zm0-3h-3v-2h3v2zm4 6h-3v-2h3v2zm0-3h-3v-2h3v2zm0-3h-3v-2h3v2zm4 6h-3v-2h3v2zm0-3h-3v-2h3v2zm0-3h-3v-2h3v2z" id="iconBg"/><path class="icon-vs-fg" d="M14 7h-3v-2h3v2zm0 1h-3v2h3v-2zm-4-3h-3v2h3v-2zm0 3h-3v2h3v-2zm-4-3h-3v2h3v-2zm0 3h-3v2h3v-2zm8 3h-3v2h3v-2zm-4 0h-3v2h3v-2zm-4 0h-3v2h3v-2z" id="iconFg"/></svg>

After

Width:  |  Height:  |  Size: 755 B

View File

@@ -1517,6 +1517,9 @@
}, },
"scmp_dark": { "scmp_dark": {
"iconPath": "./images/scmp_inverse.svg" "iconPath": "./images/scmp_inverse.svg"
},
"table-designer": {
"iconPath": "./images/table.svg"
} }
}, },
"file": "_default", "file": "_default",
@@ -1809,6 +1812,7 @@
"dashboard": "_shell", "dashboard": "_shell",
"profiler": "_csv", "profiler": "_csv",
"Schema Compare": "scmp_dark", "Schema Compare": "scmp_dark",
"table-designer": "table-designer"
}, },
"languageIds": { "languageIds": {
"bat": "_windows", "bat": "_windows",

View File

@@ -0,0 +1,11 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export namespace Schemas {
/**
* A schema that is used for table designer editor
*/
export const tableDesigner = 'ads-table-designer';
}

View File

@@ -4,8 +4,8 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { localize } from 'vs/nls'; import { localize } from 'vs/nls';
import { URI } from 'vs/base/common/uri';
import { EditorInput } from 'vs/workbench/common/editor/editorInput'; import { EditorInput } from 'vs/workbench/common/editor/editorInput';
import { URI } from 'vs/workbench/workbench.web.api';
import { TableDesignerComponentInput } from 'sql/workbench/services/tableDesigner/browser/tableDesignerComponentInput'; import { TableDesignerComponentInput } from 'sql/workbench/services/tableDesigner/browser/tableDesignerComponentInput';
import { TableDesignerProvider } from 'sql/workbench/services/tableDesigner/common/interface'; import { TableDesignerProvider } from 'sql/workbench/services/tableDesigner/common/interface';
import * as azdata from 'azdata'; import * as azdata from 'azdata';
@@ -13,6 +13,7 @@ import { GroupIdentifier, IEditorInput, IRevertOptions, ISaveOptions } from 'vs/
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { onUnexpectedError } from 'vs/base/common/errors'; import { onUnexpectedError } from 'vs/base/common/errors';
import { Schemas } from 'sql/base/common/schemas';
const NewTable: string = localize('tableDesigner.newTable', "New Table"); const NewTable: string = localize('tableDesigner.newTable', "New Table");
@@ -52,8 +53,11 @@ export class TableDesignerInput extends EditorInput {
return TableDesignerInput.ID; return TableDesignerInput.ID;
} }
get resource(): URI { public get resource(): URI {
return undefined; return URI.from({
scheme: Schemas.tableDesigner,
path: 'table-designer'
});
} }
public getComponentInput(): TableDesignerComponentInput { public getComponentInput(): TableDesignerComponentInput {