Add support for clickable links and other webview options (#2396)

* Add support for clickable links and other webview options
- Added click handling
- Added suport for localResourceRoots to be read in the webview

* Options should not be mandatory

* Ensure the constructor-defined properties are preserved
- This fixes issue where the extensionFolderPath was lost during webview withProperties call in the modelbuilder.

* enableCommandUris should be a getter

* Add position support to webview and to flexContainer

* Fix regressions on editor view caused by merge
This commit is contained in:
Kevin Cunnane
2018-09-05 13:28:22 -07:00
committed by GitHub
parent 05cf06656d
commit ac96919caf
12 changed files with 184 additions and 73 deletions

View File

@@ -326,10 +326,10 @@ export function createApiFactory(
const modelViewDialog: typeof sqlops.window.modelviewdialog = {
createDialog(title: string): sqlops.window.modelviewdialog.Dialog {
return extHostModelViewDialog.createDialog(title);
return extHostModelViewDialog.createDialog(title, extension.extensionLocation);
},
createTab(title: string): sqlops.window.modelviewdialog.DialogTab {
return extHostModelViewDialog.createTab(title);
return extHostModelViewDialog.createTab(title, extension.extensionLocation);
},
createButton(label: string): sqlops.window.modelviewdialog.Button {
return extHostModelViewDialog.createButton(label);
@@ -370,7 +370,7 @@ export function createApiFactory(
onDidOpenDashboard: extHostDashboard.onDidOpenDashboard,
onDidChangeToDashboard: extHostDashboard.onDidChangeToDashboard,
createModelViewEditor(title: string, options?: sqlops.ModelViewEditorOptions): sqlops.workspace.ModelViewEditor {
return extHostModelViewDialog.createModelViewEditor(title, options);
return extHostModelViewDialog.createModelViewEditor(title, extension.extensionLocation, options);
}
};
@@ -382,7 +382,7 @@ export function createApiFactory(
const ui = {
registerModelViewProvider(modelViewId: string, handler: (view: sqlops.ModelView) => void): void {
extHostModelView.$registerProvider(modelViewId, handler);
extHostModelView.$registerProvider(modelViewId, handler, extension.extensionLocation);
}
};