mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Hide Open in Editor for notebook search (#14356)
* Hide Open in Editor for notebook search * Add type to new parameter
This commit is contained in:
@@ -384,7 +384,7 @@ export class NotebookSearchView extends SearchView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected async refreshAndUpdateCount(event?: IChangeEvent): Promise<void> {
|
protected async refreshAndUpdateCount(event?: IChangeEvent): Promise<void> {
|
||||||
this.updateSearchResultCount(this.viewModel.searchResult.query!.userDisabledExcludesAndIgnoreFiles);
|
this.updateSearchResultCount(this.viewModel.searchResult.query!.userDisabledExcludesAndIgnoreFiles, false);
|
||||||
return this.refreshTree(event);
|
return this.refreshTree(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1641,7 +1641,7 @@ export class SearchView extends ViewPane {
|
|||||||
this.openerService.open(URI.parse('https://go.microsoft.com/fwlink/?linkid=853977'));
|
this.openerService.open(URI.parse('https://go.microsoft.com/fwlink/?linkid=853977'));
|
||||||
};
|
};
|
||||||
|
|
||||||
protected updateSearchResultCount(disregardExcludesAndIgnores?: boolean): void { // {{SQL CARBON EDIT}}
|
protected updateSearchResultCount(disregardExcludesAndIgnores?: boolean, showOpenInEditor: boolean = true): void { // {{SQL CARBON EDIT}} - Hide Open in Editor in Notebooks viewlet
|
||||||
const fileCount = this.viewModel.searchResult.fileCount();
|
const fileCount = this.viewModel.searchResult.fileCount();
|
||||||
this.hasSearchResultsKey.set(fileCount > 0);
|
this.hasSearchResultsKey.set(fileCount > 0);
|
||||||
|
|
||||||
@@ -1656,8 +1656,14 @@ export class SearchView extends ViewPane {
|
|||||||
resultMsg += nls.localize('useIgnoresAndExcludesDisabled', " - exclude settings and ignore files are disabled");
|
resultMsg += nls.localize('useIgnoresAndExcludesDisabled', " - exclude settings and ignore files are disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (showOpenInEditor) { // {{SQL CARBON EDIT}} - Hide Open in Editor in Notebooks viewlet
|
||||||
dom.append(messageEl, $('span', undefined, resultMsg + ' - '));
|
dom.append(messageEl, $('span', undefined, resultMsg + ' - '));
|
||||||
|
} else {
|
||||||
|
dom.append(messageEl, $('span', undefined, resultMsg));
|
||||||
|
}
|
||||||
const span = dom.append(messageEl, $('span'));
|
const span = dom.append(messageEl, $('span'));
|
||||||
|
|
||||||
|
if (showOpenInEditor) { // {{SQL CARBON EDIT}} - Hide Open in Editor in Notebooks viewlet
|
||||||
const openInEditorLink = dom.append(span, $('a.pointer.prominent', undefined, nls.localize('openInEditor.message', "Open in editor")));
|
const openInEditorLink = dom.append(span, $('a.pointer.prominent', undefined, nls.localize('openInEditor.message', "Open in editor")));
|
||||||
|
|
||||||
openInEditorLink.title = appendKeyBindingLabel(
|
openInEditorLink.title = appendKeyBindingLabel(
|
||||||
@@ -1668,6 +1674,7 @@ export class SearchView extends ViewPane {
|
|||||||
dom.EventHelper.stop(e, false);
|
dom.EventHelper.stop(e, false);
|
||||||
this.instantiationService.invokeFunction(createEditorFromSearchResult, this.searchResult, this.searchIncludePattern?.getValue(), this.searchExcludePattern?.getValue()); // {{SQL CARBON EDIT}}
|
this.instantiationService.invokeFunction(createEditorFromSearchResult, this.searchResult, this.searchIncludePattern?.getValue(), this.searchExcludePattern?.getValue()); // {{SQL CARBON EDIT}}
|
||||||
}));
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
this.reLayout();
|
this.reLayout();
|
||||||
} else if (!msgWasHidden) {
|
} else if (!msgWasHidden) {
|
||||||
|
|||||||
Reference in New Issue
Block a user