mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Merge from vscode 4d91d96e5e121b38d33508cdef17868bab255eae
This commit is contained in:
committed by
AzureDataStudio
parent
a971aee5bd
commit
5e7071e466
@@ -0,0 +1,33 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
//@ts-check
|
||||
|
||||
'use strict';
|
||||
|
||||
const withDefaults = require('../shared.webpack.config');
|
||||
const path = require('path');
|
||||
|
||||
const clientConfig = withDefaults({
|
||||
target: 'webworker',
|
||||
context: __dirname,
|
||||
entry: {
|
||||
extension: './src/mergeConflictMain.ts'
|
||||
},
|
||||
output: {
|
||||
filename: 'mergeConflictMain.js'
|
||||
},
|
||||
performance: {
|
||||
hints: false
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'vscode-nls': path.resolve(__dirname, '../../build/polyfills/vscode-nls.js')
|
||||
}
|
||||
}
|
||||
});
|
||||
clientConfig.module.rules[0].use.shift(); // remove nls loader
|
||||
|
||||
module.exports = clientConfig;
|
||||
@@ -12,6 +12,9 @@ const withDefaults = require('../shared.webpack.config');
|
||||
module.exports = withDefaults({
|
||||
context: __dirname,
|
||||
entry: {
|
||||
extension: './src/extension.ts'
|
||||
}
|
||||
extension: './src/mergeConflictMain.ts'
|
||||
},
|
||||
output: {
|
||||
filename: 'mergeConflictMain.js'
|
||||
},
|
||||
});
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
"activationEvents": [
|
||||
"*"
|
||||
],
|
||||
"main": "./out/extension",
|
||||
"main": "./out/mergeConflictMain",
|
||||
"browser": "./dist/mergeConflictMain",
|
||||
"scripts": {
|
||||
"compile": "gulp compile-extension:merge-conflict",
|
||||
"watch": "gulp watch-extension:merge-conflict"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
import * as vscode from 'vscode';
|
||||
import * as interfaces from './interfaces';
|
||||
import ContentProvider from './contentProvider';
|
||||
import * as path from 'path';
|
||||
import { loadMessageBundle } from 'vscode-nls';
|
||||
const localize = loadMessageBundle();
|
||||
|
||||
@@ -86,7 +85,6 @@ export default class CommandHandler implements vscode.Disposable {
|
||||
}
|
||||
|
||||
async compare(editor: vscode.TextEditor, conflict: interfaces.IDocumentMergeConflict | null) {
|
||||
const fileName = path.basename(editor.document.uri.fsPath);
|
||||
|
||||
// No conflict, command executed from command palette
|
||||
if (!conflict) {
|
||||
@@ -134,6 +132,8 @@ export default class CommandHandler implements vscode.Disposable {
|
||||
conflict.range.start.line - mergeConflictLineOffsets, conflict.range.start.character
|
||||
);
|
||||
|
||||
const docPath = editor.document.uri.path;
|
||||
const fileName = docPath.substring(docPath.lastIndexOf('/') + 1); // avoid NodeJS path to keep browser webpack small
|
||||
const title = localize('compareChangesTitle', '{0}: Current Changes ⟷ Incoming Changes', fileName);
|
||||
const mergeConflictConfig = vscode.workspace.getConfiguration('merge-conflict');
|
||||
const openToTheSide = mergeConflictConfig.get<string>('diffViewPosition');
|
||||
@@ -365,4 +365,4 @@ export default class CommandHandler implements vscode.Disposable {
|
||||
conflict: fallback()
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user