mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Update exclude/include message in SchemaCompare (#8350)
* Update exclude/include message in SchemaCompare * Segregated the messages as discussed * Updated message with a comma and merged two If statements in one
This commit is contained in:
@@ -428,8 +428,15 @@ export class SchemaCompareMainWindow {
|
|||||||
// show the first dependent that caused this to fail in the warning message
|
// show the first dependent that caused this to fail in the warning message
|
||||||
const diffEntryName = this.createName(diff.sourceValue ? diff.sourceValue : diff.targetValue);
|
const diffEntryName = this.createName(diff.sourceValue ? diff.sourceValue : diff.targetValue);
|
||||||
const firstDependentName = this.createName(result.blockingDependencies[0].sourceValue ? result.blockingDependencies[0].sourceValue : result.blockingDependencies[0].targetValue);
|
const firstDependentName = this.createName(result.blockingDependencies[0].sourceValue ? result.blockingDependencies[0].sourceValue : result.blockingDependencies[0].targetValue);
|
||||||
const cannotExcludeMessage = localize('schemaCompare.cannotExcludeMessage', "Cannot exclude {0}. Included dependents exist such as {1}", diffEntryName, firstDependentName);
|
let cannotExcludeMessage;
|
||||||
const cannotIncludeMessage = localize('schemaCompare.cannotIncludeMessage', "Cannot include {0}. Excluded dependents exist such as {1}", diffEntryName, firstDependentName);
|
let cannotIncludeMessage;
|
||||||
|
if (firstDependentName) {
|
||||||
|
cannotExcludeMessage = localize('schemaCompare.cannotExcludeMessageWithDependent', "Cannot exclude {0}. Included dependents exist, such as {1}", diffEntryName, firstDependentName);
|
||||||
|
cannotIncludeMessage = localize('schemaCompare.cannotIncludeMessageWithDependent', "Cannot include {0}. Excluded dependents exist, such as {1}", diffEntryName, firstDependentName);
|
||||||
|
} else {
|
||||||
|
cannotExcludeMessage = localize('schemaCompare.cannotExcludeMessage', "Cannot exclude {0}. Included dependents exist", diffEntryName);
|
||||||
|
cannotIncludeMessage = localize('schemaCompare.cannotIncludeMessage', "Cannot include {0}. Excluded dependents exist", diffEntryName);
|
||||||
|
}
|
||||||
vscode.window.showWarningMessage(checkboxState.checked ? cannotIncludeMessage : cannotExcludeMessage);
|
vscode.window.showWarningMessage(checkboxState.checked ? cannotIncludeMessage : cannotExcludeMessage);
|
||||||
} else {
|
} else {
|
||||||
vscode.window.showWarningMessage(result.errorMessage);
|
vscode.window.showWarningMessage(result.errorMessage);
|
||||||
|
|||||||
Reference in New Issue
Block a user