mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 17:22:55 -05:00
This reverts commit 5d44b6a6a7.
This commit is contained in:
@@ -397,7 +397,7 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
|
||||
let isUntitled: boolean = uri.scheme === Schemas.untitled;
|
||||
|
||||
const fileInput = isUntitled ? this._untitledEditorService.createOrGet(uri, notebookModeId, options.initialContent) :
|
||||
this._editorService.createInput({ resource: uri, mode: notebookModeId });
|
||||
this._editorService.createInput({ resource: uri, language: notebookModeId });
|
||||
let input = this._instantiationService.createInstance(NotebookInput, path.basename(uri.fsPath), uri, fileInput);
|
||||
input.defaultKernel = options.defaultKernel;
|
||||
input.connectionProfile = new ConnectionProfile(this._capabilitiesService, options.connectionProfile);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
.modal {
|
||||
.monaco-shell .modal {
|
||||
background-color: rgba(204, 204, 204, 0.6);
|
||||
right: 0;
|
||||
left: 0;
|
||||
@@ -13,7 +13,7 @@
|
||||
z-index: 500;
|
||||
}
|
||||
|
||||
.modal:not(.flyout-dialog) .modal-dialog {
|
||||
.monaco-shell .modal:not(.flyout-dialog) .modal-dialog {
|
||||
margin: auto;
|
||||
width: 640px;
|
||||
height: 480px;
|
||||
@@ -32,7 +32,7 @@
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.modal.flyout-dialog .modal-dialog {
|
||||
.monaco-shell .modal.flyout-dialog .modal-dialog {
|
||||
margin: auto auto auto auto;
|
||||
height: 100%;
|
||||
width: 500px;
|
||||
@@ -40,13 +40,14 @@
|
||||
position: absolute;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.modal.flyout-dialog.wide .modal-dialog {
|
||||
|
||||
.monaco-shell .modal.flyout-dialog.wide .modal-dialog {
|
||||
width: 1200px;
|
||||
max-width: 95%;
|
||||
min-width: 400px;
|
||||
}
|
||||
|
||||
.modal.flyout-dialog .modal-content {
|
||||
.monaco-shell .modal.flyout-dialog .modal-content {
|
||||
height: 100%;
|
||||
font-size: 11px;
|
||||
display: flex;
|
||||
@@ -65,10 +66,10 @@
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.modal.flyout-dialog .modal-body,
|
||||
.modal.flyout-dialog .angular-modal-body,
|
||||
.monaco-shell .modal.flyout-dialog .modal-body,
|
||||
.monaco-shell .modal.flyout-dialog .angular-modal-body,
|
||||
/* Style for body and footer in modal dialog. This should be applied to dialog created with angular component. */
|
||||
.modal.flyout-dialog .modal-body-and-footer {
|
||||
.monaco-shell .modal.flyout-dialog .modal-body-and-footer {
|
||||
flex: 1 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -104,11 +105,11 @@
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.vs-dark .modal.flyout-dialog .input {
|
||||
.vs-dark.monaco-shell .modal.flyout-dialog .input {
|
||||
background-color: #3C3C3C;
|
||||
}
|
||||
|
||||
.vs-dark .modal.flyout-dialog input:disabled {
|
||||
.vs-dark.monaco-shell .modal.flyout-dialog input:disabled {
|
||||
background-color: #E1E1E1;
|
||||
color: #3C3C3C;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import { IAction, ActionRunner, Action } from 'vs/base/common/actions';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IMenuService, MenuId, MenuItemAction } from 'vs/platform/actions/common/actions';
|
||||
import { ContextAwareMenuItemActionItem, fillInActionBarActions, fillInContextMenuActions } from 'vs/platform/actions/browser/menuItemActionItem';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { TreeItemCollapsibleState, ITreeViewDataProvider, TreeViewItemHandleArg, ViewContainer, ITreeItemLabel } from 'vs/workbench/common/views';
|
||||
import { FileIconThemableWorkbenchTree } from 'vs/workbench/browser/parts/views/viewsViewlet';
|
||||
@@ -21,7 +22,7 @@ import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { IDataSource, ITree, IRenderer, ContextMenuEvent } from 'vs/base/parts/tree/browser/tree';
|
||||
import { ResourceLabel } from 'vs/workbench/browser/labels';
|
||||
import { ActionBar, IActionViewItemProvider, ActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { ActionBar, IActionItemProvider, ActionItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { basename } from 'vs/base/common/path';
|
||||
import { LIGHT, FileThemeIcon, FolderThemeIcon, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
|
||||
@@ -45,7 +46,6 @@ import { ITreeItem, ITreeView } from 'sql/workbench/common/views';
|
||||
import { IOEShimService } from 'sql/workbench/parts/objectExplorer/common/objectExplorerViewTreeShim';
|
||||
import { equalsIgnoreCase } from 'vs/base/common/strings';
|
||||
import { NodeContextKey } from 'sql/workbench/parts/dataExplorer/common/nodeContext';
|
||||
import { fillInActionBarActions, fillInContextMenuActions, ContextAwareMenuEntryActionViewItem } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
|
||||
class TitleMenus implements IDisposable {
|
||||
|
||||
@@ -319,7 +319,7 @@ export class CustomTreeView extends Disposable implements ITreeView {
|
||||
}
|
||||
|
||||
private createTree() {
|
||||
const actionItemProvider = (action: IAction) => action instanceof MenuItemAction ? this.instantiationService.createInstance(ContextAwareMenuEntryActionViewItem, action) : undefined;
|
||||
const actionItemProvider = (action: IAction) => action instanceof MenuItemAction ? this.instantiationService.createInstance(ContextAwareMenuItemActionItem, action) : undefined;
|
||||
const menus = this.instantiationService.createInstance(TreeMenus, this.id);
|
||||
const dataSource = this.instantiationService.createInstance(TreeDataSource, this, this.container, this.id);
|
||||
const renderer = this.instantiationService.createInstance(TreeRenderer, this.id, menus, actionItemProvider);
|
||||
@@ -599,7 +599,7 @@ class TreeRenderer implements IRenderer {
|
||||
constructor(
|
||||
private treeViewId: string,
|
||||
private menus: TreeMenus,
|
||||
private actionItemProvider: IActionViewItemProvider,
|
||||
private actionItemProvider: IActionItemProvider,
|
||||
@IInstantiationService private instantiationService: IInstantiationService,
|
||||
@IWorkbenchThemeService private themeService: IWorkbenchThemeService,
|
||||
@IConfigurationService private configurationService: IConfigurationService,
|
||||
@@ -623,7 +623,7 @@ class TreeRenderer implements IRenderer {
|
||||
DOM.addClass(resourceLabel.element.element, 'custom-view-tree-node-item-resourceLabel');
|
||||
const actionsContainer = DOM.append(resourceLabel.element.element, DOM.$('.actions'));
|
||||
const actionBar = new ActionBar(actionsContainer, {
|
||||
actionViewItemProvider: this.actionItemProvider,
|
||||
actionItemProvider: this.actionItemProvider,
|
||||
actionRunner: new MultipleSelectionActionRunner(() => tree.getSelection())
|
||||
});
|
||||
|
||||
@@ -769,10 +769,10 @@ class TreeController extends WorkbenchTreeController {
|
||||
|
||||
getActions: () => actions,
|
||||
|
||||
getActionViewItem: (action) => {
|
||||
getActionItem: (action) => {
|
||||
const keybinding = this._keybindingService.lookupKeybinding(action.id);
|
||||
if (keybinding) {
|
||||
return new ActionViewItem(action, action, { label: true, keybinding: keybinding.getLabel() });
|
||||
return new ActionItem(action, action, { label: true, keybinding: keybinding.getLabel() });
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
@@ -181,7 +181,7 @@ function getNotebookFileExtensions(instantiationService: IInstantiationService):
|
||||
function hasNotebookFileMode(input: EditorInput): boolean {
|
||||
if (input instanceof UntitledEditorInput) {
|
||||
let untitledCast: UntitledEditorInput = <UntitledEditorInput>input;
|
||||
return (untitledCast && untitledCast.getMode() === notebookModeId);
|
||||
return (untitledCast && untitledCast.getModeId() === notebookModeId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -200,7 +200,7 @@ function withService<TService, TResult>(instantiationService: IInstantiationServ
|
||||
function hasSqlFileMode(input: EditorInput): boolean {
|
||||
if (input instanceof UntitledEditorInput) {
|
||||
let untitledCast: UntitledEditorInput = <UntitledEditorInput>input;
|
||||
return untitledCast && (untitledCast.getMode() === undefined || untitledCast.getMode() === sqlModeId);
|
||||
return untitledCast && (untitledCast.getModeId() === undefined || untitledCast.getModeId() === sqlModeId);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -94,7 +94,7 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
||||
private setHtml(): void {
|
||||
if (this._webview && this.html) {
|
||||
this._renderedHtml = this.html;
|
||||
this._webview.html = this._renderedHtml;
|
||||
this._webview.contents = this._renderedHtml;
|
||||
this._webview.layout();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
public setHtml(html: string): void {
|
||||
this._html = html;
|
||||
if (this._webview) {
|
||||
this._webview.html = html;
|
||||
this._webview.contents = html;
|
||||
this._webview.layout();
|
||||
}
|
||||
}
|
||||
@@ -112,7 +112,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
this._onMessage.fire(e);
|
||||
});
|
||||
if (this._html) {
|
||||
this._webview.html = this._html;
|
||||
this._webview.contents = this._html;
|
||||
}
|
||||
this._webview.layout();
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
public setHtml(html: string): void {
|
||||
this._html = html;
|
||||
if (this._webview) {
|
||||
this._webview.html = html;
|
||||
this._webview.contents = html;
|
||||
this._webview.layout();
|
||||
}
|
||||
}
|
||||
@@ -110,7 +110,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
this._onMessage.fire(e);
|
||||
});
|
||||
if (this._html) {
|
||||
this._webview.html = this._html;
|
||||
this._webview.contents = this._html;
|
||||
}
|
||||
this._webview.layout();
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Action, IActionViewItem, IActionRunner } from 'vs/base/common/actions';
|
||||
import { Action, IActionItem, IActionRunner } from 'vs/base/common/actions';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { IQueryModelService } from 'sql/platform/query/common/queryModel';
|
||||
import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
|
||||
@@ -150,7 +150,7 @@ export class ChangeMaxRowsAction extends EditDataAction {
|
||||
* Action item that handles the dropdown (combobox) that lists the avaliable number of row selections
|
||||
* for an edit data session
|
||||
*/
|
||||
export class ChangeMaxRowsActionItem implements IActionViewItem {
|
||||
export class ChangeMaxRowsActionItem implements IActionItem {
|
||||
|
||||
public actionRunner: IActionRunner;
|
||||
public defaultRowCount: number;
|
||||
|
||||
@@ -19,7 +19,7 @@ import { EditDataInput } from 'sql/workbench/parts/editData/common/editDataInput
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import * as queryContext from 'sql/workbench/parts/query/common/queryContext';
|
||||
import { Taskbar, ITaskbarContent } from 'sql/base/browser/ui/taskbar/taskbar';
|
||||
import { IActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { IQueryModelService } from 'sql/platform/query/common/queryModel';
|
||||
import { IEditorDescriptorService } from 'sql/workbench/services/queryEditor/common/editorDescriptorService';
|
||||
@@ -313,7 +313,7 @@ export class EditDataEditor extends BaseEditor {
|
||||
// Create QueryTaskbar
|
||||
this._taskbarContainer = DOM.append(parentElement, DOM.$('div'));
|
||||
this._taskbar = new Taskbar(this._taskbarContainer, {
|
||||
actionViewItemProvider: (action: Action) => this._getChangeMaxRowsAction(action)
|
||||
actionItemProvider: (action: Action) => this._getChangeMaxRowsAction(action)
|
||||
});
|
||||
|
||||
// Create Actions for the toolbar
|
||||
@@ -344,7 +344,7 @@ export class EditDataEditor extends BaseEditor {
|
||||
/**
|
||||
* Gets the IActionItem for the list of row number drop down
|
||||
*/
|
||||
private _getChangeMaxRowsAction(action: Action): IActionViewItem {
|
||||
private _getChangeMaxRowsAction(action: Action): IActionItem {
|
||||
let actionID = ChangeMaxRowsAction.ID;
|
||||
if (action.id === actionID) {
|
||||
if (!this._changeMaxRowsActionItem) {
|
||||
|
||||
@@ -119,8 +119,8 @@ input#accordion:checked ~ .accordion-content {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.vs-dark .all-jobs >.back-button-icon,
|
||||
.hc-black .all-jobs >.back-button-icon {
|
||||
.vs-dark.monaco-shell .all-jobs >.back-button-icon,
|
||||
.hc-black.monaco-shell .all-jobs >.back-button-icon {
|
||||
content: url('back_inverse.svg');
|
||||
}
|
||||
|
||||
|
||||
@@ -14,9 +14,10 @@ import { IContextMenuService, IContextViewService } from 'vs/platform/contextvie
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { attachSelectBoxStyler } from 'vs/platform/theme/common/styler';
|
||||
import { MenuId, IMenuService, MenuItemAction } from 'vs/platform/actions/common/actions';
|
||||
import { IAction, Action, IActionViewItem } from 'vs/base/common/actions';
|
||||
import { IAction, Action, IActionItem } from 'vs/base/common/actions';
|
||||
import { IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { fillInActions, LabeledMenuItemActionItem } from 'vs/platform/actions/browser/menuItemActionItem';
|
||||
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
||||
|
||||
import { AngularDisposable } from 'sql/base/node/lifecycle';
|
||||
@@ -47,7 +48,6 @@ import { createErrorWithActions } from 'vs/base/common/errorsWithActions';
|
||||
import { toErrorMessage } from 'vs/base/common/errorMessage';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import { LabeledMenuItemActionItem, fillInActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
|
||||
|
||||
export const NOTEBOOK_SELECTOR: string = 'notebook-component';
|
||||
@@ -405,7 +405,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
this._trustedAction.enabled = false;
|
||||
|
||||
let taskbar = <HTMLElement>this.toolbar.nativeElement;
|
||||
this._actionBar = new Taskbar(taskbar, { actionViewItemProvider: action => this.actionItemProvider(action as Action) });
|
||||
this._actionBar = new Taskbar(taskbar, { actionItemProvider: action => this.actionItemProvider(action as Action) });
|
||||
this._actionBar.context = this;
|
||||
this._actionBar.setContent([
|
||||
{ action: addCodeCellButton },
|
||||
@@ -419,7 +419,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
|
||||
}
|
||||
|
||||
private actionItemProvider(action: Action): IActionViewItem {
|
||||
private actionItemProvider(action: Action): IActionItem {
|
||||
// Check extensions to create ActionItem; otherwise, return undefined
|
||||
// This is similar behavior that exists in MenuItemActionItem
|
||||
if (action instanceof MenuItemAction) {
|
||||
|
||||
@@ -8,6 +8,7 @@ import { ContributableActionProvider } from 'vs/workbench/browser/actions';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { fillInActions } from 'vs/platform/actions/browser/menuItemActionItem';
|
||||
|
||||
import {
|
||||
DisconnectConnectionAction, AddServerAction,
|
||||
@@ -30,7 +31,6 @@ import { TreeNodeContextKey } from 'sql/workbench/parts/objectExplorer/common/tr
|
||||
import { IQueryManagementService } from 'sql/platform/query/common/queryManagement';
|
||||
import { IScriptingService } from 'sql/platform/scripting/common/scriptingService';
|
||||
import { ServerInfoContextKey } from 'sql/workbench/parts/connection/common/serverInfoContextKey';
|
||||
import { fillInActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
|
||||
/**
|
||||
* Provides actions for the server tree elements
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import 'vs/css!./media/queryActions';
|
||||
import * as nls from 'vs/nls';
|
||||
import { Action, IActionViewItem, IActionRunner } from 'vs/base/common/actions';
|
||||
import { Action, IActionItem, IActionRunner } from 'vs/base/common/actions';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
@@ -427,7 +427,7 @@ export class ListDatabasesAction extends QueryTaskbarAction {
|
||||
* Action item that handles the dropdown (combobox) that lists the available databases.
|
||||
* Based off StartDebugActionItem.
|
||||
*/
|
||||
export class ListDatabasesActionItem implements IActionViewItem {
|
||||
export class ListDatabasesActionItem implements IActionItem {
|
||||
public static ID = 'listDatabaseQueryActionItem';
|
||||
|
||||
public actionRunner: IActionRunner;
|
||||
|
||||
@@ -23,7 +23,7 @@ import { TextResourceEditor } from 'vs/workbench/browser/parts/editor/textResour
|
||||
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { ISelectionData } from 'azdata';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
@@ -463,7 +463,7 @@ export class QueryEditor extends BaseEditor {
|
||||
// Create QueryTaskbar
|
||||
this._taskbarContainer = DOM.append(parentElement, DOM.$('div'));
|
||||
this._taskbar = new Taskbar(this._taskbarContainer, {
|
||||
actionViewItemProvider: (action: Action) => this._getActionItemForAction(action),
|
||||
actionItemProvider: (action: Action) => this._getActionItemForAction(action),
|
||||
});
|
||||
|
||||
// Create Actions for the toolbar
|
||||
@@ -513,7 +513,7 @@ export class QueryEditor extends BaseEditor {
|
||||
* Gets the IActionItem for the List Databases dropdown if provided the associated Action.
|
||||
* Otherwise returns null.
|
||||
*/
|
||||
private _getActionItemForAction(action: Action): IActionViewItem {
|
||||
private _getActionItemForAction(action: Action): IActionItem {
|
||||
if (action.id === ListDatabasesAction.ID) {
|
||||
return this.listDatabasesActionItem;
|
||||
}
|
||||
|
||||
@@ -146,11 +146,8 @@ export class QueryInput extends EditorInput implements IEncodingSupport, IConnec
|
||||
// Description is shown beside the tab name in the combobox of open editors
|
||||
public getDescription(): string { return this._description; }
|
||||
public supportsSplitEditor(): boolean { return false; }
|
||||
public getMode(): string { return QueryInput.SCHEMA; }
|
||||
public getModeId(): string { return QueryInput.SCHEMA; }
|
||||
public revert(): Promise<boolean> { return this._sql.revert(); }
|
||||
public setMode(mode: string) {
|
||||
this._sql.setMode(mode);
|
||||
}
|
||||
|
||||
public matches(otherInput: any): boolean {
|
||||
if (otherInput instanceof QueryInput) {
|
||||
|
||||
@@ -121,7 +121,7 @@ export class WebViewDialog extends Modal {
|
||||
}
|
||||
|
||||
private updateDialogBody(): void {
|
||||
this._webview.html = this.html;
|
||||
this._webview.contents = this.html;
|
||||
}
|
||||
|
||||
/* espace key */
|
||||
|
||||
@@ -303,7 +303,7 @@ export class QueryEditorService implements IQueryEditorService {
|
||||
newEditorInput = queryInput;
|
||||
} else {
|
||||
let uriCopy: URI = URI.from({ scheme: uri.scheme, authority: uri.authority, path: uri.path, query: uri.query, fragment: uri.fragment });
|
||||
newEditorInput = QueryEditorService.instantiationService.createInstance(FileEditorInput, uriCopy, undefined, undefined);
|
||||
newEditorInput = QueryEditorService.instantiationService.createInstance(FileEditorInput, uriCopy, undefined);
|
||||
}
|
||||
|
||||
return newEditorInput;
|
||||
|
||||
Reference in New Issue
Block a user