conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
https?: HttpsOptions,
bodyParserOptions?: BodyParserJSONOptions
=======
https?: HttpsOptions
deduplicator?: boolean
getEndpoint?: string | boolean
>>>>>>>
https?: HttpsOptions
deduplicator?: boolean
getEndpoint?: string | boolean
bodyParserOptions?: BodyParserJSONOptions
<<<<<<<
}
export interface BodyParserJSONOptions {
limit?: number | string,
inflate?: boolean,
reviver?: any,
strict?: boolean,
type?: string,
verify?: any,
=======
deduplicator?: boolean
>>>>>>>
deduplicator?: boolean
}
export interface BodyParserJSONOptions {
limit?: number | string,
inflate?: boolean,
reviver?: any,
strict?: boolean,
type?: string,
verify?: any, |
<<<<<<<
import { IMocks } from 'graphql-tools'
=======
import { IMiddleware as IFieldMiddleware } from 'graphql-middleware'
>>>>>>>
import { IMocks } from 'graphql-tools'
import { IMiddleware as IFieldMiddleware } from 'graphql-middleware'
<<<<<<<
mocks?: IMocks
=======
middlewares?: IFieldMiddleware[]
>>>>>>>
mocks?: IMocks
middlewares?: IFieldMiddleware[] |
<<<<<<<
deduplicator?: boolean
=======
getEndpoint?: string | boolean
>>>>>>>
deduplicator?: boolean
getEndpoint?: string | boolean |
<<<<<<<
context._applyGlobalCompositeOperation(this);
context.translate(this._cache.canvas.x, this._cache.canvas.y);
=======
context.translate(canvasCache.x, canvasCache.y);
>>>>>>>
context._applyGlobalCompositeOperation(this);
context.translate(canvasCache.x, canvasCache.y); |
<<<<<<<
export default Konva;
=======
const Konva: any = KonvaInternals;
Konva.enableTrace = false;
Konva.traceArrMax = 100;
Konva.listenClickTap = false;
Konva.inDblClickWindow = false;
/**
* Global pixel ratio configuration. KonvaJS automatically detect pixel ratio of current device.
* But you may override such property, if you want to use your value.
* @property pixelRatio
* @default undefined
* @name pixelRatio
* @memberof Konva
* @example
* Konva.pixelRatio = 1;
*/
Konva.pixelRatio = undefined;
/**
* Drag distance property. If you start to drag a node you may want to wait until pointer is moved to some distance from start point,
* only then start dragging. Default is 3px.
* @property dragDistance
* @default 0
* @memberof Konva
* @example
* Konva.dragDistance = 10;
*/
Konva.dragDistance = 3;
/**
* Use degree values for angle properties. You may set this property to false if you want to use radiant values.
* @property angleDeg
* @default true
* @memberof Konva
* @example
* node.rotation(45); // 45 degrees
* Konva.angleDeg = false;
* node.rotation(Math.PI / 2); // PI/2 radian
*/
Konva.angleDeg = true;
/**
* Show different warnings about errors or wrong API usage
* @property showWarnings
* @default true
* @memberof Konva
* @example
* Konva.showWarnings = false;
*/
Konva.showWarnings = true;
Konva.glob.Konva = Konva;
export default KonvaInternals;
>>>>>>>
Konva.glob.Konva = Konva;
export default Konva; |
<<<<<<<
if (this.fee) {
this.builder.fee(this.fee.toFixed());
=======
if (this.timestamp) {
this.builder.data.timestamp = this.timestamp;
}
if (this.senderPublicKey) {
this.builder.senderPublicKey(this.senderPublicKey);
>>>>>>>
if (this.fee) {
this.builder.fee(this.fee.toFixed());
}
if (this.timestamp) {
this.builder.data.timestamp = this.timestamp;
}
if (this.senderPublicKey) {
this.builder.senderPublicKey(this.senderPublicKey); |
<<<<<<<
=======
private ipLastError: Record<string, number> = {};
private rateLimiter: RateLimiter;
>>>>>>>
private ipLastError: Record<string, number> = {};
private rateLimiter: RateLimiter;
<<<<<<<
ws.on("message", message => {
try {
if (message === "#2") {
const timeNow: number = new Date().getTime() / 1000;
if (ws._lastPingTime && timeNow - ws._lastPingTime < 1) {
ws.terminate();
}
ws._lastPingTime = timeNow;
} else {
=======
ws.prependListener("message", message => {
if (ws._disconnected) {
this.setErrorForIpAndTerminate(ws, req);
} else if (message === "#2") {
const timeNow: number = new Date().getTime() / 1000;
if (ws._lastPingTime && timeNow - ws._lastPingTime < 1) {
this.setErrorForIpAndTerminate(ws, req);
}
ws._lastPingTime = timeNow;
} else if (message.length < 10) {
// except for #2 message, we should have JSON with some required properties
// (see below) which implies that message length should be longer than 10 chars
this.setErrorForIpAndTerminate(ws, req);
} else {
try {
>>>>>>>
ws.prependListener("message", message => {
if (ws._disconnected) {
this.setErrorForIpAndTerminate(ws, req);
} else if (message === "#2") {
const timeNow: number = new Date().getTime() / 1000;
if (ws._lastPingTime && timeNow - ws._lastPingTime < 1) {
this.setErrorForIpAndTerminate(ws, req);
}
ws._lastPingTime = timeNow;
} else if (message.length < 10) {
// except for #2 message, we should have JSON with some required properties
// (see below) which implies that message length should be longer than 10 chars
this.setErrorForIpAndTerminate(ws, req);
} else {
try {
<<<<<<<
ws.terminate();
=======
this.setErrorForIpAndTerminate(ws, req);
>>>>>>>
this.setErrorForIpAndTerminate(ws, req);
<<<<<<<
const { data }: { data: { blocked: boolean } } = await this.sendToMasterAsync(
"p2p.internal.isBlockedByRateLimit",
{
data: { ip: req.socket.remoteAddress },
},
);
const isBlacklisted: boolean = (this.config.blacklist || []).includes(req.socket.remoteAddress);
if (data.blocked || isBlacklisted) {
req.socket.destroy();
=======
const ip = req.socket.remoteAddress;
if (this.ipLastError[ip] && this.ipLastError[ip] > Date.now() - MINUTE_IN_MILLISECONDS) {
req.socket.destroy();
return;
}
const isBlocked = await this.rateLimiter.isBlocked(ip);
const isBlacklisted = (this.config.blacklist || []).includes(ip);
if (isBlocked || isBlacklisted) {
next(this.createError(SocketErrors.Forbidden, "Blocked due to rate limit or blacklisted."));
>>>>>>>
const ip = req.socket.remoteAddress;
if (this.ipLastError[ip] && this.ipLastError[ip] > Date.now() - MINUTE_IN_MILLISECONDS) {
req.socket.destroy();
return;
}
const isBlocked = await this.rateLimiter.isBlocked(ip);
const isBlacklisted = (this.config.blacklist || []).includes(ip);
if (isBlocked || isBlacklisted) {
req.socket.destroy(); |
<<<<<<<
search(params: SearchParameters): Promise<IBlocksPaginated>;
=======
getBlockRewards(): Promise<any>;
getLastForgedBlocks(): Promise<any>;
getDelegatesForgedBlocks(): Promise<any>;
/* TODO: Remove with V1 */
findAll(params: ISearchParameters): Promise<IBlocksPaginated>;
search(params: ISearchParameters): Promise<IBlocksPaginated>;
>>>>>>>
getBlockRewards(): Promise<any>;
getLastForgedBlocks(): Promise<any>;
getDelegatesForgedBlocks(): Promise<any>;
search(params: ISearchParameters): Promise<IBlocksPaginated>; |
<<<<<<<
function decodeBlock(buffer) {
const block = Blocks.Block.deserialize(buffer.toString("hex"), true);
// @ts-ignore - @TODO: remove ts-ignore
block.totalAmount = block.totalAmount.toFixed();
// @ts-ignore - @TODO: remove ts-ignore
block.totalFee = block.totalFee.toFixed();
// @ts-ignore - @TODO: remove ts-ignore
block.reward = block.reward.toFixed();
=======
function decodeBlock(buffer: Buffer) {
const block = models.Block.deserialize(buffer.toString("hex"), true);
block.totalAmount = (block.totalAmount as Bignum).toFixed();
block.totalFee = (block.totalFee as Bignum).toFixed();
block.reward = (block.reward as Bignum).toFixed();
>>>>>>>
function decodeBlock(buffer: Buffer) {
const block = Blocks.Block.deserialize(buffer.toString("hex"), true);
// @ts-ignore - @TODO: remove ts-ignore
block.totalAmount = block.totalAmount.toFixed();
// @ts-ignore - @TODO: remove ts-ignore
block.totalFee = block.totalFee.toFixed();
// @ts-ignore - @TODO: remove ts-ignore
block.reward = block.reward.toFixed();
<<<<<<<
const transaction: any = Transactions.TransactionFactory.fromBytesUnsafe(serialized, id).data;
=======
const transaction: any = Transaction.fromBytesUnsafe(serialized, id).data;
const { asset } = transaction;
transaction.asset = null;
>>>>>>>
const transaction: any = Transactions.TransactionFactory.fromBytesUnsafe(serialized, id).data;
const { asset } = transaction;
transaction.asset = null; |
<<<<<<<
import { Database, Logger, P2P } from "@arkecosystem/core-interfaces";
=======
import { Database, Logger, Shared } from "@arkecosystem/core-interfaces";
>>>>>>>
import { Database, Logger, P2P, Shared } from "@arkecosystem/core-interfaces";
<<<<<<<
export class PeerVerificationResult implements P2P.IPeerVerificationResult {
=======
interface IDelegateWallets {
[publicKey: string]: Database.IDelegateWallet;
}
enum Severity {
/**
* Printed at every step of the verification, even if leading to a successful verification.
* Multiple such messages are printed even for successfully verified peers. To enable these
* messages define CORE_P2P_PEER_VERIFIER_DEBUG_EXTRA in the environment.
*/
DEBUG_EXTRA,
/** One such message per successful peer verification is printed. */
DEBUG,
/** Failures to verify peer state, either designating malicious peer or communication issues. */
INFO,
}
export class PeerVerificationResult {
>>>>>>>
interface IDelegateWallets {
[publicKey: string]: Database.IDelegateWallet;
}
export class PeerVerificationResult implements P2P.IPeerVerificationResult { |
<<<<<<<
try {
const allPeers: P2P.IPeer[] = await this.blockchain.p2p.getStorage().getPeers();
let result = allPeers.sort((a, b) => a.latency - b.latency);
result = request.query.version
? result.filter(peer => peer.version === (request.query as any).version)
: result;
result = result.slice(0, +request.query.limit || 100);
const orderBy: string = request.query.orderBy as string;
if (orderBy) {
const order = orderBy.split(":");
if (order[0] === "version") {
result =
order[1].toUpperCase() === "ASC"
? result.sort((a, b) => semver.compare(a[order[0]], b[order[0]]))
: result.sort((a, b) => semver.rcompare(a[order[0]], b[order[0]]));
}
=======
const allPeers: P2P.IPeer[] = this.blockchain.p2p.getStorage().getPeers();
let result = allPeers.sort((a, b) => a.latency - b.latency);
result = request.query.version
? result.filter(peer => peer.version === (request.query as any).version)
: result;
result = result.slice(0, +request.query.limit || 100);
const orderBy: string = request.query.orderBy as string;
if (orderBy) {
const order = orderBy.split(":");
if (order[0] === "version") {
result =
order[1].toUpperCase() === "ASC"
? result.sort((a, b) => semver.compare(a[order[0]], b[order[0]]))
: result.sort((a, b) => semver.rcompare(a[order[0]], b[order[0]]));
>>>>>>>
try {
const allPeers: P2P.IPeer[] = this.blockchain.p2p.getStorage().getPeers();
let result = allPeers.sort((a, b) => a.latency - b.latency);
result = request.query.version
? result.filter(peer => peer.version === (request.query as any).version)
: result;
result = result.slice(0, +request.query.limit || 100);
const orderBy: string = request.query.orderBy as string;
if (orderBy) {
const order = orderBy.split(":");
if (order[0] === "version") {
result =
order[1].toUpperCase() === "ASC"
? result.sort((a, b) => semver.compare(a[order[0]], b[order[0]]))
: result.sort((a, b) => semver.rcompare(a[order[0]], b[order[0]]));
}
}
return super.toPagination({ rows: result, count: allPeers.length }, "peer");
} catch (error) {
return Boom.badImplementation(error);
}
}
public async show(request: Hapi.Request, h: Hapi.ResponseToolkit) {
try {
const peers: P2P.IPeer[] = this.blockchain.p2p.getStorage().getPeers();
const peer: P2P.IPeer = peers.find(p => p.ip === request.params.ip);
if (!peer) {
return Boom.notFound("Peer not found");
<<<<<<<
try {
const peers: P2P.IPeer[] = await this.blockchain.p2p.getStorage().getPeers();
const peer: P2P.IPeer = peers.find(p => p.ip === request.params.ip);
=======
const peers: P2P.IPeer[] = this.blockchain.p2p.getStorage().getPeers();
const peer: P2P.IPeer = peers.find(p => p.ip === request.params.ip);
>>>>>>>
try {
const peers: P2P.IPeer[] = this.blockchain.p2p.getStorage().getPeers();
const peer: P2P.IPeer = peers.find(p => p.ip === request.params.ip); |
<<<<<<<
if (showPrompt) {
await confirm(`Would you like to restart the ${processName} process?`, () => {
this.restartProcess(processName);
});
} else {
this.restartProcess(processName);
}
}
}
protected restartProcess(processName: string): void {
try {
cli.action.start(`Restarting ${processName}`);
processManager.restart(processName);
} catch (error) {
this.error(error.message);
} finally {
cli.action.stop();
=======
await confirm(`Would you like to restart the ${processName} process?`, () => {
try {
cli.action.start(`Restarting ${processName}`);
processManager.restart(processName);
} catch (error) {
error.stderr ? this.error(`${error.message}: ${error.stderr}`) : this.error(error.message);
} finally {
cli.action.stop();
}
});
>>>>>>>
if (showPrompt) {
await confirm(`Would you like to restart the ${processName} process?`, () => {
this.restartProcess(processName);
});
} else {
this.restartProcess(processName);
}
}
}
protected restartProcess(processName: string): void {
try {
cli.action.start(`Restarting ${processName}`);
processManager.restart(processName);
} catch (error) {
error.stderr ? this.error(`${error.message}: ${error.stderr}`) : this.error(error.message);
} finally {
cli.action.stop(); |
<<<<<<<
findAllByGenerator(generatorPublicKey: string, paginate: SearchPaginate): Promise<IBlocksPaginated>;
=======
findAll(params: IParameters): Promise<IBlocksPaginated>;
findAllByGenerator(generatorPublicKey: string, paginate: ISearchPaginate): Promise<IBlocksPaginated>;
>>>>>>>
findAllByGenerator(generatorPublicKey: string, paginate: ISearchPaginate): Promise<IBlocksPaginated>; |
<<<<<<<
=======
import CombustionFirestarter from './modules/features/CombustionFirestarter';
import CombustionCharges from './modules/features/CombustionCharges';
import CombustionSpellUsage from './modules/features/CombustionSpellUsage';
import CombustionActiveTime from './modules/features/CombustionActiveTime';
import CombustionPreCastDelay from './modules/features/CombustionPreCastDelay';
>>>>>>>
<<<<<<<
=======
//Talents
import SearingTouch from './modules/talents/SearingTouch';
import Meteor from './modules/talents/Meteor';
import MeteorRune from './modules/talents/MeteorRune';
import MeteorCombustion from './modules/talents/MeteorCombustion';
import Kindling from './modules/talents/Kindling';
//Legendaries
import FeveredIncantation from './modules/items/FeveredIncantation';
import Firestorm from './modules/items/Firestorm';
import DisciplinaryCommand from './modules/items/DisciplinaryCommand';
//Covenants
>>>>>>> |
<<<<<<<
import { Blocks, Constants, Enums, Identities, Interfaces, Managers, Transactions, Utils } from "@arkecosystem/crypto";
import assert from "assert";
import dayjs from "dayjs";
=======
import { Blocks, Constants, Crypto, Enums, Interfaces, Managers, Transactions, Utils } from "@arkecosystem/crypto";
import delay from "delay";
>>>>>>>
import { Blocks, Constants, Crypto, Enums, Identities, Interfaces, Managers, Transactions, Utils } from "@arkecosystem/crypto";
import assert from "assert";
import delay from "delay";
<<<<<<<
transactions[0] = Transactions.TransactionFactory.fromData(cloneDeep(mockData.dummyExp1.data));
transactions[0].data.expiration = expiration;
transactions[1] = mockData.dummy1;
for (const transaction of transactions) {
const address = Identities.Address.fromPublicKey(transaction.data.senderPublicKey);
const wallet = new Wallets.Wallet(address);
wallet.balance = Utils.BigNumber.make(1e12);
wallet.nonce = transaction.data.nonce.minus(1);
connection.walletManager.reindex(wallet);
}
transactions[2] = Transactions.TransactionFactory.fromData(cloneDeep(mockData.dummyExp2.data));
transactions[2].data.expiration = expiration;
transactions[3] = mockData.dummy2;
=======
for (const [i, exp] of [0, expiration, expiration + 5].entries()) {
transactions.push(
TransactionFactory.transfer(mockData.dummy1.data.recipientId)
.withNetwork("unitnet")
.withPassphrase(delegatesSecrets[0])
.withFee(SATOSHI + i)
.withVersion(transactionVersion)
.withExpiration(exp)
.build(1)[0],
);
}
>>>>>>>
let nonce: Utils.BigNumber = (connection as any).databaseService.walletManager.findByPublicKey(
mockData.dummy1.data.senderPublicKey,
).nonce;
for (const [i, exp] of [0, expiration, expiration + 5].entries()) {
transactions.push(
TransactionFactory.transfer(mockData.dummy1.data.recipientId)
.withNetwork("unitnet")
.withPassphrase(delegatesSecrets[0])
.withFee(SATOSHI + i)
.withNonce(nonce)
.withVersion(transactionVersion)
.withExpiration(exp)
.build(1)[0],
);
nonce = nonce.plus(1);
}
<<<<<<<
it("should purge and block sender if throwIfCannotBeApplied() failed for a transaction in the chained block", () => {
=======
it("should forget sender if throwIfApplyingFails() failed for a transaction in the chained block", () => {
>>>>>>>
it("should forget sender if throwIfApplyingFails() failed for a transaction in the chained block", () => {
<<<<<<<
describe("purgeSendersWithInvalidTransactions", () => {
it("should purge transactions from sender when invalid", async () => {
const transfersA = TransactionFactory.transfer(mockData.dummy1.data.recipientId)
.withNetwork("unitnet")
.withPassphrase(delegatesSecrets[0])
.build(5);
const transfersB = TransactionFactory.transfer(mockData.dummy1.data.recipientId)
.withNetwork("unitnet")
.withPassphrase(delegatesSecrets[1])
.build();
const block = {
transactions: [...transfersA, ...transfersB],
} as any;
addTransactions(block.transactions);
expect(connection.getPoolSize()).toBe(6);
// Last tx has a unique sender
block.transactions[5].isVerified = false;
connection.purgeSendersWithInvalidTransactions(block);
expect(connection.getPoolSize()).toBe(5);
// The remaining tx all have the same sender
block.transactions[0].isVerified = false;
connection.purgeSendersWithInvalidTransactions(block);
expect(connection.getPoolSize()).toBe(0);
});
});
describe("purgeByBlock", () => {
it("should purge transactions from block", async () => {
const revertTransactionForSender = jest
.spyOn(connection.walletManager, "revertTransactionForSender")
.mockReturnValue();
const transactions = TransactionFactory.transfer(mockData.dummy1.data.recipientId)
.withNetwork("unitnet")
.withPassphrase(delegatesSecrets[0])
.build(5);
const block = { transactions } as Blocks.Block;
addTransactions(block.transactions);
expect(connection.getPoolSize()).toBe(5);
connection.purgeByBlock(block);
expect(revertTransactionForSender).toHaveBeenCalledTimes(5);
expect(connection.getPoolSize()).toBe(0);
jest.restoreAllMocks();
});
it("should also purge transactions with higher nonces than the transactions from block", async () => {
const revertTransactionForSender = jest
.spyOn(connection.walletManager, "revertTransactionForSender")
.mockReturnValue();
const transactions = TransactionFactory.transfer(mockData.dummy1.data.recipientId)
.withNetwork("unitnet")
.withPassphrase(delegatesSecrets[0])
.build(5);
const block = { transactions: transactions.slice(0, 3) } as Blocks.Block;
addTransactions(transactions);
expect(connection.getPoolSize()).toBe(5);
connection.purgeByBlock(block);
expect(revertTransactionForSender).toHaveBeenCalledTimes(5);
expect(connection.getPoolSize()).toBe(0);
jest.restoreAllMocks();
});
});
=======
>>>>>>> |
<<<<<<<
describe("findAllByBlock", () => {
it("should search by blockId", async () => {
=======
describe("getFeeStatistics", () => {
it("should invoke getFeeStatistics on db repository", async () => {
databaseService.connection.transactionsRepository = {
getFeeStatistics: async (days, minFeeBroadcast) => minFeeBroadcast,
getModel: () => new MockDatabaseModel(),
} as any;
jest.spyOn(databaseService.connection.transactionsRepository, "getFeeStatistics").mockImplementation(
async () => [
{
type: 0,
fee: 1,
timestamp: 123,
},
],
);
jest.spyOn(app, "resolveOptions").mockReturnValue({
dynamicFees: {
minFeeBroadcast: 100,
},
});
await transactionsBusinessRepository.getFeeStatistics(7);
expect(databaseService.connection.transactionsRepository.getFeeStatistics).toHaveBeenCalledWith(7, 100);
});
});
describe("search", () => {
it("should invoke search on db repository", async () => {
databaseService.connection.transactionsRepository = {
search: async parameters => parameters,
getModel: () => new MockDatabaseModel(),
} as any;
jest.spyOn(databaseService.connection.transactionsRepository, "search").mockImplementation(async () => ({
rows: [],
count: 0,
}));
await transactionsBusinessRepository.search({});
expect(databaseService.connection.transactionsRepository.search).toHaveBeenCalled();
});
it("should return no rows if exception thrown", async () => {
databaseService.connection.transactionsRepository = {
search: async parameters => parameters,
getModel: () => new MockDatabaseModel(),
} as any;
jest.spyOn(databaseService.connection.transactionsRepository, "search").mockImplementation(async () => {
throw new Error("bollocks");
});
const result = await transactionsBusinessRepository.search({});
expect(databaseService.connection.transactionsRepository.search).toHaveBeenCalled();
expect(result.rows).toHaveLength(0);
expect(result.count).toEqual(0);
});
it("should return no rows if senderId is an invalid address", async () => {
databaseService.walletManager = {
has: addressOrPublicKey => false,
} as State.IWalletManager;
databaseService.connection.transactionsRepository = {
search: async parameters => parameters,
getModel: () => new MockDatabaseModel(),
} as any;
const result = await transactionsBusinessRepository.search({
senderId: "some invalid address",
});
expect(result.rows).toHaveLength(0);
expect(result.count).toEqual(0);
});
it("should lookup senders address from senderId", async () => {
databaseService.walletManager = {
has: addressOrPublicKey => true,
findByAddress: address => ({ publicKey: "pubKey" }),
} as State.IWalletManager;
>>>>>>>
describe("findAllByBlock", () => {
it("should search by blockId", async () => {
<<<<<<<
await transactionsBusinessRepository.findAllByRecipient("recipientId");
=======
const expectedWallet = {};
databaseService.walletManager = {
findByAddress: address => expectedWallet,
} as State.IWalletManager;
await transactionsBusinessRepository.search({
ownerId: "ownerId",
});
>>>>>>>
await transactionsBusinessRepository.findAllByRecipient("recipientId");
<<<<<<<
await transactionsBusinessRepository.findAllByType(Enums.TransactionTypes.Transfer);
=======
databaseService.walletManager = {
has: addressOrPublicKey => false,
} as State.IWalletManager;
jest.spyOn(databaseService.walletManager, "has").mockReturnValue(false);
await transactionsBusinessRepository.search({
addresses: ["addy1", "addy2"],
recipientId: "someId",
});
>>>>>>>
await transactionsBusinessRepository.findAllByType(Enums.TransactionTypes.Transfer);
<<<<<<<
=======
expect(databaseService.walletManager.has).toHaveBeenNthCalledWith(1, "addy1");
expect(databaseService.walletManager.has).toHaveBeenNthCalledWith(2, "addy2");
>>>>>>> |
<<<<<<<
=======
let destinationReached = claimer.travelByWaypoint(this.waypoints);
if (!destinationReached) return; // early
>>>>>>>
let destinationReached = claimer.travelByWaypoint(this.waypoints);
if (!destinationReached) return; // early |
<<<<<<<
import { Overmind, IConfig, IOperator, IAction, pipe, map, action } from './'
import { IS_PROXY, PATH } from 'proxy-state-tree'
=======
import { Overmind, IConfig, IOperator, pipe, map, mutate } from './'
>>>>>>>
import { Overmind, IConfig, IOperator, pipe, map, mutate } from './'
import { IS_PROXY, PATH } from 'proxy-state-tree' |
<<<<<<<
type Derived = (parent: any, config: any) => any
export type ResolveState<State extends IState | null> = State extends undefined
=======
export type ResolveState<State extends IState> = State extends undefined
>>>>>>>
export type ResolveState<State extends IState | null> = State extends undefined |
<<<<<<<
import { IViewDescriptorService, IViewsService, ViewContainerLocation } from 'vs/workbench/common/views';
import { IRemoteTerminalService, ITerminalExternalLinkProvider, ITerminalInstance, ITerminalService, ITerminalGroup, TerminalConnectionState, ITerminalProfileProvider } from 'vs/workbench/contrib/terminal/browser/terminal';
=======
import { IEditableData, IViewDescriptorService, IViewsService, ViewContainerLocation } from 'vs/workbench/common/views';
import { IRemoteTerminalService, ITerminalExternalLinkProvider, ITerminalInstance, ITerminalService, ITerminalGroup, TerminalConnectionState } from 'vs/workbench/contrib/terminal/browser/terminal';
>>>>>>>
import { IRemoteTerminalService, ITerminalExternalLinkProvider, ITerminalInstance, ITerminalService, ITerminalGroup, TerminalConnectionState, ITerminalProfileProvider } from 'vs/workbench/contrib/terminal/browser/terminal';
import { IEditableData, IViewDescriptorService, IViewsService, ViewContainerLocation } from 'vs/workbench/common/views'; |
<<<<<<<
this.enabled = !this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value }, { id: this.extension.id }));
=======
this.enabled = !this.runningExtensions.some(e => areSameExtensions({ id: e.id }, this.extension.identifier));
>>>>>>>
this.enabled = !this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value }, this.extension.identifier));
<<<<<<<
if (this.extension && this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value }, { id: this.extension.id }) && this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY)) {
=======
if (this.extension && this.runningExtensions.some(e => areSameExtensions({ id: e.id }, this.extension.identifier) && this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY)) {
>>>>>>>
if (this.extension && this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value }, this.extension.identifier) && this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY)) {
<<<<<<<
if (this.extension && this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value }, { id: this.extension.id }))) {
=======
if (this.extension && this.runningExtensions.some(e => areSameExtensions({ id: e.id }, this.extension.identifier))) {
>>>>>>>
if (this.extension && this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value }, this.extension.identifier))) {
<<<<<<<
const runningExtension = runningExtensions.filter(e => areSameExtensions({ id: e.identifier.value }, this.extension))[0];
=======
const runningExtension = runningExtensions.filter(e => areSameExtensions(e, this.extension.identifier))[0];
>>>>>>>
const runningExtension = runningExtensions.filter(e => areSameExtensions({ id: e.identifier.value }, this.extension.identifier))[0];
<<<<<<<
if (this.extension && this.extension.local && !this.extension.isMalicious && !this.runningExtensions.some(e => CanonicalExtensionIdentifier.equals(e.identifier, this.extension.id))) {
=======
if (this.extension && this.extension.local && !this.extension.isMalicious && !this.runningExtensions.some(e => areSameExtensions(e, this.extension.identifier))) {
>>>>>>>
if (this.extension && this.extension.local && !this.extension.isMalicious && !this.runningExtensions.some(e => CanonicalExtensionIdentifier.equals(e.identifier, this.extension.identifier.id))) { |
<<<<<<<
import { IOffProcessTerminalService, IShellLaunchConfig, ITerminalChildProcess, ITerminalDimensions, ITerminalLaunchError, ITerminalTabLayoutInfoById } from 'vs/platform/terminal/common/terminal';
import { IAvailableShellsRequest, ICommandTracker, IDefaultShellAndArgsRequest, INavigationMode, IRemoteTerminalAttachTarget, IStartExtensionTerminalRequest, ITerminalConfigHelper, ITerminalNativeWindowsDelegate, ITerminalProcessExtHostProxy, IWindowsShellHelper, LinuxDistro, TitleEventSource } from 'vs/workbench/contrib/terminal/common/terminal';
=======
import { IShellLaunchConfig, ITerminalChildProcess, ITerminalDimensions, ITerminalLaunchError, ITerminalsLayoutInfo, ITerminalsLayoutInfoById, ITerminalTabLayoutInfoById, TerminalShellType } from 'vs/platform/terminal/common/terminal';
import { IAvailableShellsRequest, ICommandTracker, IDefaultShellAndArgsRequest, INavigationMode, IRemoteTerminalAttachTarget, IStartExtensionTerminalRequest, ITerminalConfigHelper, ITerminalNativeWindowsDelegate, ITerminalProcessExtHostProxy, LinuxDistro, TitleEventSource } from 'vs/workbench/contrib/terminal/common/terminal';
>>>>>>>
import { IOffProcessTerminalService, IShellLaunchConfig, ITerminalChildProcess, ITerminalDimensions, ITerminalLaunchError, ITerminalTabLayoutInfoById, TerminalShellType } from 'vs/platform/terminal/common/terminal';
import { IAvailableShellsRequest, ICommandTracker, IDefaultShellAndArgsRequest, INavigationMode, IRemoteTerminalAttachTarget, IStartExtensionTerminalRequest, ITerminalConfigHelper, ITerminalNativeWindowsDelegate, ITerminalProcessExtHostProxy, LinuxDistro, TitleEventSource } from 'vs/workbench/contrib/terminal/common/terminal'; |
<<<<<<<
kbExpr: EditorContextKeys.textFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.UpArrow,
=======
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.UpArrow,
>>>>>>>
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.UpArrow,
<<<<<<<
kbExpr: EditorContextKeys.textFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.DownArrow,
=======
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.DownArrow,
>>>>>>>
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.DownArrow, |
<<<<<<<
on(event: "qrCodeContent", callback: (args: BarcodeScannedEventData) => void, thisArg?: any);
on(event: "status", callback: (args: MessageEventData) => void, thisArg?: any);
on(event: "error", callback: (args: ErrorEventData) => void, thisArg?: any);
=======
on(event: "barcodeScanned", callback: (args: BarcodeScannedEventData) => void, thisArg?: any);
on(event: "status", callback: (args: StatusEventData) => void, thisArg?: any);
>>>>>>>
on(event: "qrCodeContent", callback: (args: BarcodeScannedEventData) => void, thisArg?: any);
on(event: "status", callback: (args: StatusEventData) => void, thisArg?: any); |
<<<<<<<
import { ResourceTextEdit } from 'vs/editor/common/modes';
=======
import { createTextBufferFactoryFromSnapshot } from 'vs/editor/common/model/textModel';
>>>>>>>
import { ResourceTextEdit } from 'vs/editor/common/modes';
import { createTextBufferFactoryFromSnapshot } from 'vs/editor/common/model/textModel'; |
<<<<<<<
public readonly onProcessData: Event<IProcessDataEvent | string> = this._onProcessData.event;
private readonly _onProcessReplay = this._register(new Emitter<IPtyHostProcessReplayEvent>());
public readonly onProcessReplay: Event<IPtyHostProcessReplayEvent> = this._onProcessReplay.event;
=======
public readonly onProcessData = this._onProcessData.event;
>>>>>>>
public readonly onProcessData = this._onProcessData.event;
private readonly _onProcessReplay = this._register(new Emitter<IPtyHostProcessReplayEvent>());
public readonly onProcessReplay = this._onProcessReplay.event;
<<<<<<<
public get onProcessResolvedShellLaunchConfig(): Event<IShellLaunchConfig> { return this._onProcessResolvedShellLaunchConfig.event; }
private _inReplay = false;
=======
public readonly onProcessResolvedShellLaunchConfig = this._onProcessResolvedShellLaunchConfig.event;
>>>>>>>
public readonly onProcessResolvedShellLaunchConfig = this._onProcessResolvedShellLaunchConfig.event;
private _inReplay = false; |
<<<<<<<
import { IPanel } from 'vs/workbench/common/panel';
import { IViewlet } from 'vs/workbench/common/viewlet';
import { Viewlet } from 'vs/workbench/browser/viewlet';
=======
import { IPartService } from 'vs/workbench/services/part/common/partService';
>>>>>>>
import { IPanel } from 'vs/workbench/common/panel';
import { IViewlet } from 'vs/workbench/common/viewlet';
import { Viewlet } from 'vs/workbench/browser/viewlet';
import { IPartService } from 'vs/workbench/services/part/common/partService';
<<<<<<<
super(VIEW_ID, telemetryService, themeService);
=======
super(Constants.VIEWLET_ID, partService, telemetryService, themeService);
>>>>>>>
super(VIEW_ID, partService, telemetryService, themeService); |
<<<<<<<
const extHostExplorers = col.define(ExtHostContext.ExtHostExplorers).set<ExtHostTreeExplorers>(new ExtHostTreeExplorers(threadService, extHostCommands));
const extHostConfiguration = col.define(ExtHostContext.ExtHostConfiguration).set<ExtHostConfiguration>(new ExtHostConfiguration(threadService.get(MainContext.MainThreadConfiguration)));
=======
const extHostConfiguration = col.define(ExtHostContext.ExtHostConfiguration).set<ExtHostConfiguration>(new ExtHostConfiguration(threadService.get(MainContext.MainThreadConfiguration), initDataConfiguration));
>>>>>>>
const extHostExplorers = col.define(ExtHostContext.ExtHostExplorers).set<ExtHostTreeExplorers>(new ExtHostTreeExplorers(threadService, extHostCommands));
const extHostConfiguration = col.define(ExtHostContext.ExtHostConfiguration).set<ExtHostConfiguration>(new ExtHostConfiguration(threadService.get(MainContext.MainThreadConfiguration), initDataConfiguration)); |
<<<<<<<
import { ActiveViewletContext } from 'vs/workbench/common/viewlet';
=======
import { ExtensionType } from 'vs/platform/extensions/common/extensions';
>>>>>>>
import { ActiveViewletContext } from 'vs/workbench/common/viewlet';
import { ExtensionType } from 'vs/platform/extensions/common/extensions'; |
<<<<<<<
dom.toggleClass(this.signature, 'has-docs', !!signature.documentation);
if (signature.documentation === undefined) { /** no op */ }
else if (typeof signature.documentation === 'string') {
dom.append(this.docs, $('p', {}, signature.documentation));
=======
if (typeof signature.documentation === 'string') {
dom.append(this.docs, $('p', null, signature.documentation));
>>>>>>>
if (signature.documentation === undefined) { /** no op */ }
else if (typeof signature.documentation === 'string') {
dom.append(this.docs, $('p', {}, signature.documentation));
<<<<<<<
let currentOverload = String(hints.activeSignature + 1);
=======
let hasDocs = false;
if (activeParameter && typeof (activeParameter.documentation) === 'string' && activeParameter.documentation.length > 0) {
hasDocs = true;
}
if (activeParameter && typeof (activeParameter.documentation) === 'object' && activeParameter.documentation.value.length > 0) {
hasDocs = true;
}
if (typeof (signature.documentation) === 'string' && signature.documentation.length > 0) {
hasDocs = true;
}
if (typeof (signature.documentation) === 'object' && signature.documentation.value.length > 0) {
hasDocs = true;
}
dom.toggleClass(this.signature, 'has-docs', hasDocs);
let currentOverload = String(this.currentSignature + 1);
>>>>>>>
let hasDocs = false;
if (activeParameter && typeof (activeParameter.documentation) === 'string' && activeParameter.documentation.length > 0) {
hasDocs = true;
}
if (activeParameter && typeof (activeParameter.documentation) === 'object' && activeParameter.documentation.value.length > 0) {
hasDocs = true;
}
if (typeof (signature.documentation) === 'string' && signature.documentation.length > 0) {
hasDocs = true;
}
if (typeof (signature.documentation) === 'object' && signature.documentation.value.length > 0) {
hasDocs = true;
}
dom.toggleClass(this.signature, 'has-docs', hasDocs);
dom.toggleClass(this.docs, 'empty', !hasDocs);
let currentOverload = String(hints.activeSignature + 1); |
<<<<<<<
transform(dummyAst, classData).then(result => {
printFile(
process.cwd() +
"/generatedClasses/Azure/" +
classData.functions[0].pkgName.split("-")[1] +
".js",
result
);
});
=======
return classData;
}
export async function generateAzureClass(serviceClass) {
let methods: FunctionData[] = [];
Object.keys(serviceClass).map((key, index) => {
methods.push({
pkgName: serviceClass[key].split(" ")[0],
fileName: serviceClass[key].split(" ")[1],
functionName: key,
SDKFunctionName: serviceClass[key].split(" ")[2],
params: [],
returnType: null,
client: null
});
});
const files = Array.from(new Set(methods.map(method => method.fileName)));
const sdkFiles = files.map(file => {
return {
fileName: file,
pkgName: methods[0].pkgName,
ast: null,
client: null,
sdkFunctionNames: methods
.filter(method => method.fileName === file)
.map(method => method.SDKFunctionName)
};
});
await Promise.all(
sdkFiles.map(async file => {
file.ast = await getAST(file);
})
);
const classData = extractSDKData(sdkFiles, methods);
const output = transform(dummyAst, classData);
printFile(
process.cwd() +
"/generatedClasses/Azure/" +
classData.functions[0].pkgName.split("-")[1] +
".js",
output
);
>>>>>>>
return classData;
}
export async function generateAzureClass(serviceClass) {
let methods: FunctionData[] = [];
Object.keys(serviceClass).map((key, index) => {
methods.push({
pkgName: serviceClass[key].split(" ")[0],
fileName: serviceClass[key].split(" ")[1],
functionName: key,
SDKFunctionName: serviceClass[key].split(" ")[2],
params: [],
returnType: null,
client: null
});
});
const files = Array.from(new Set(methods.map(method => method.fileName)));
const sdkFiles = files.map(file => {
return {
fileName: file,
pkgName: methods[0].pkgName,
ast: null,
client: null,
sdkFunctionNames: methods
.filter(method => method.fileName === file)
.map(method => method.SDKFunctionName)
};
});
await Promise.all(
sdkFiles.map(async file => {
file.ast = await getAST(file);
})
);
const classData = extractSDKData(sdkFiles, methods);
const output = await transform(dummyAst, classData);
printFile(
process.cwd() +
"/generatedClasses/Azure/" +
classData.functions[0].pkgName.split("-")[1] +
".js",
output
); |
<<<<<<<
import { IWorkspaceIdentifier, IWorkspaceFolderCreationData, IWorkspacesService, rewriteWorkspaceFileForNewLocation, WORKSPACE_FILTER } from 'vs/platform/workspaces/common/workspaces';
import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration';
=======
import { IWorkspaceIdentifier, IWorkspaceFolderCreationData, isWorkspaceIdentifier, toWorkspaceIdentifier, IWorkspacesService, rewriteWorkspaceFileForNewLocation } from 'vs/platform/workspaces/common/workspaces';
>>>>>>>
import { IWorkspaceIdentifier, IWorkspaceFolderCreationData, IWorkspacesService, rewriteWorkspaceFileForNewLocation, WORKSPACE_FILTER } from 'vs/platform/workspaces/common/workspaces';
<<<<<<<
import { ILifecycleService, ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle';
import { IFileDialogService, IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { mnemonicButtonLabel } from 'vs/base/common/labels';
=======
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
>>>>>>>
import { ILifecycleService, ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle';
import { IFileDialogService, IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { mnemonicButtonLabel } from 'vs/base/common/labels';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
<<<<<<<
private getCurrentWorkspaceIdentifier(): IWorkspaceIdentifier | undefined {
const workspace = this.contextService.getWorkspace();
if (workspace && workspace.configuration) {
return { id: workspace.id, configPath: workspace.configuration };
}
return undefined;
}
}
=======
}
registerSingleton(IWorkspaceEditingService, WorkspaceEditingService, true);
>>>>>>>
private getCurrentWorkspaceIdentifier(): IWorkspaceIdentifier | undefined {
const workspace = this.contextService.getWorkspace();
if (workspace && workspace.configuration) {
return { id: workspace.id, configPath: workspace.configuration };
}
return undefined;
}
}
registerSingleton(IWorkspaceEditingService, WorkspaceEditingService, true); |
<<<<<<<
export function findBestWindowOrFolderForFile<W extends ISimpleWindow>({ windows, newWindow, context, fileUri, workspaceResolver }: IBestWindowOrFolderOptions<W>): W | null {
=======
export function findBestWindowOrFolderForFile<W extends ISimpleWindow>({ windows, newWindow, reuseWindow, context, fileUri, workspaceResolver }: IBestWindowOrFolderOptions<W>): W | undefined {
>>>>>>>
export function findBestWindowOrFolderForFile<W extends ISimpleWindow>({ windows, newWindow, context, fileUri, workspaceResolver }: IBestWindowOrFolderOptions<W>): W | undefined { |
<<<<<<<
import { WorkbenchTree } from 'vs/platform/list/browser/listService';
=======
import { WorkbenchTree, IListService } from 'vs/platform/list/browser/listService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
>>>>>>>
import { WorkbenchTree } from 'vs/platform/list/browser/listService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
<<<<<<<
@IInstantiationService private instantiationService: IInstantiationService
=======
@IContextKeyService private contextKeyService: IContextKeyService,
@IListService private listService: IListService,
@IInstantiationService private instantiationService: IInstantiationService,
@IThemeService private themeService: IThemeService,
@IConfigurationService protected readonly configurationService: IConfigurationService,
>>>>>>>
@IInstantiationService private instantiationService: IInstantiationService,
@IConfigurationService configurationService: IConfigurationService |
<<<<<<<
private _createLeftHandSideEditor(options: IDiffEditorOptions, instantiationService: IInstantiationService, contextKeyService: IContextKeyService): CodeEditorWidget {
=======
private _createLeftHandSideEditor(options: editorBrowser.IDiffEditorConstructionOptions, instantiationService: IInstantiationService): CodeEditorWidget {
>>>>>>>
private _createLeftHandSideEditor(options: editorBrowser.IDiffEditorConstructionOptions, instantiationService: IInstantiationService, contextKeyService: IContextKeyService): CodeEditorWidget {
<<<<<<<
const isInDiffRightEditorKey = contextKeyService.createKey<boolean>('isInDiffRightEditor', undefined);
this._register(Event.any(editor.onDidFocusEditorText, editor.onDidFocusEditorWidget)(() => isInDiffRightEditorKey.set(true)));
this._register(Event.any(editor.onDidBlurEditorText, editor.onDidBlurEditorWidget)(() => isInDiffRightEditorKey.set(false)));
=======
this._register(editor.onDidContentSizeChange(e => {
const width = this.originalEditor.getContentWidth() + this.modifiedEditor.getContentWidth() + DiffEditorWidget.ONE_OVERVIEW_WIDTH;
const height = Math.max(this.modifiedEditor.getContentHeight(), this.originalEditor.getContentHeight());
this._onDidContentSizeChange.fire({
contentHeight: height,
contentWidth: width,
contentHeightChanged: e.contentHeightChanged,
contentWidthChanged: e.contentWidthChanged
});
}));
>>>>>>>
const isInDiffRightEditorKey = contextKeyService.createKey<boolean>('isInDiffRightEditor', undefined);
this._register(Event.any(editor.onDidFocusEditorText, editor.onDidFocusEditorWidget)(() => isInDiffRightEditorKey.set(true)));
this._register(Event.any(editor.onDidBlurEditorText, editor.onDidBlurEditorWidget)(() => isInDiffRightEditorKey.set(false)));
this._register(editor.onDidContentSizeChange(e => {
const width = this.originalEditor.getContentWidth() + this.modifiedEditor.getContentWidth() + DiffEditorWidget.ONE_OVERVIEW_WIDTH;
const height = Math.max(this.modifiedEditor.getContentHeight(), this.originalEditor.getContentHeight());
this._onDidContentSizeChange.fire({
contentHeight: height,
contentWidth: width,
contentHeightChanged: e.contentHeightChanged,
contentWidthChanged: e.contentWidthChanged
});
})); |
<<<<<<<
import { IWebviewService, Webview, WebviewContentOptions, WebviewEditorOverlay, WebviewElement, WebviewOptions, WebviewExtensionDescription } from 'vs/workbench/contrib/webview/browser/webview';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { Dimension } from 'vs/base/browser/dom';
=======
import { IWebviewService, KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE, Webview, WebviewContentOptions, WebviewElement, WebviewExtensionDescription, WebviewOptions, WebviewOverlay } from 'vs/workbench/contrib/webview/browser/webview';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
>>>>>>>
import { IWebviewService, KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE, Webview, WebviewContentOptions, WebviewElement, WebviewExtensionDescription, WebviewOptions, WebviewOverlay } from 'vs/workbench/contrib/webview/browser/webview';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
<<<<<<<
@ILayoutService private readonly _layoutService: ILayoutService,
@IWebviewService private readonly _webviewService: IWebviewService
=======
@IContextKeyService private readonly _contextKeyService: IContextKeyService,
@IWorkbenchLayoutService private readonly _layoutService: IWorkbenchLayoutService,
@IWebviewService private readonly _webviewService: IWebviewService,
>>>>>>>
@ILayoutService private readonly _layoutService: ILayoutService,
@IWebviewService private readonly _webviewService: IWebviewService,
@IContextKeyService private readonly _contextKeyService: IContextKeyService |
<<<<<<<
c?: boolean;
=======
c?: true;
d?: true;
>>>>>>>
c?: true; |
<<<<<<<
private async _stash(repository: Repository, includeUntracked = false): Promise<void> {
if (repository.workingTreeGroup.resourceStates.length === 0) {
=======
@command('git.stash', { repository: true })
async stash(repository: Repository): Promise<void> {
const noUnstagedChanges = repository.workingTreeGroup.resourceStates.length === 0;
const noStagedChanges = repository.indexGroup.resourceStates.length === 0;
if (noUnstagedChanges && noStagedChanges) {
>>>>>>>
private async _stash(repository: Repository, includeUntracked = false): Promise<void> {
const noUnstagedChanges = repository.workingTreeGroup.resourceStates.length === 0;
const noStagedChanges = repository.indexGroup.resourceStates.length === 0;
if (noUnstagedChanges && noStagedChanges) { |
<<<<<<<
/**
* Returns the final scroll state that the instance will have once the smooth scroll animation concludes.
* If no scroll animation is occurring, it will return the actual scroll state instead.
*/
public getSmoothScrollTargetState(): ScrollState {
return this._smoothScrolling ? this._smoothScrollAnimationParams.newState : this._state;
}
public updateState(update: INewScrollState, smoothScrollDuration: number): void {
// If smooth scroll duration is not specified, then assume that the invoker intends to do an immediate update.
if (smoothScrollDuration === 0) {
const newState = this._state.createUpdated(update);
// If smooth scrolling is in progress, terminate it.
if (this._smoothScrolling) {
this._smoothScrolling = false;
this._smoothScrollAnimationParams = null;
}
// Update state immediately if it is different from the previous one.
if (!this._state.equals(newState)) {
this._updateState(newState);
}
}
// Otherwise update scroll state incrementally.
else {
const targetState = this.getSmoothScrollTargetState();
const newTargetState = targetState.createUpdated(update);
// Proceed only if the new target state differs from the current one.
if (!targetState.equals(newTargetState)) {
// Initialize/update smooth scroll parameters.
this._smoothScrollAnimationParams = {
oldState: this._state,
newState: newTargetState,
startTime: Date.now(),
duration: smoothScrollDuration,
};
// Invoke smooth scrolling functionality in the next frame if it is not already in progress.
if (!this._smoothScrolling) {
this._smoothScrolling = true;
requestAnimationFrame(() => { this._performSmoothScroll(); });
}
}
}
}
=======
public validateScrollTop(desiredScrollTop: number): number {
desiredScrollTop = Math.round(desiredScrollTop);
desiredScrollTop = Math.max(desiredScrollTop, 0);
desiredScrollTop = Math.min(desiredScrollTop, this._state.scrollHeight - this._state.height);
return desiredScrollTop;
}
public validateScrollLeft(desiredScrollLeft: number): number {
desiredScrollLeft = Math.round(desiredScrollLeft);
desiredScrollLeft = Math.max(desiredScrollLeft, 0);
desiredScrollLeft = Math.min(desiredScrollLeft, this._state.scrollWidth - this._state.width);
return desiredScrollLeft;
}
public updateState(update: INewScrollState): void {
const oldState = this._state;
const newState = new ScrollState(
(typeof update.width !== 'undefined' ? update.width : oldState.width),
(typeof update.scrollWidth !== 'undefined' ? update.scrollWidth : oldState.scrollWidth),
(typeof update.scrollLeft !== 'undefined' ? update.scrollLeft : oldState.scrollLeft),
(typeof update.height !== 'undefined' ? update.height : oldState.height),
(typeof update.scrollHeight !== 'undefined' ? update.scrollHeight : oldState.scrollHeight),
(typeof update.scrollTop !== 'undefined' ? update.scrollTop : oldState.scrollTop)
);
>>>>>>>
public validateScrollTop(desiredScrollTop: number): number {
desiredScrollTop = Math.round(desiredScrollTop);
desiredScrollTop = Math.max(desiredScrollTop, 0);
desiredScrollTop = Math.min(desiredScrollTop, this._state.scrollHeight - this._state.height);
return desiredScrollTop;
}
public validateScrollLeft(desiredScrollLeft: number): number {
desiredScrollLeft = Math.round(desiredScrollLeft);
desiredScrollLeft = Math.max(desiredScrollLeft, 0);
desiredScrollLeft = Math.min(desiredScrollLeft, this._state.scrollWidth - this._state.width);
return desiredScrollLeft;
}
/**
* Returns the final scroll state that the instance will have once the smooth scroll animation concludes.
* If no scroll animation is occurring, it will return the actual scroll state instead.
*/
public getSmoothScrollTargetState(): ScrollState {
return this._smoothScrolling ? this._smoothScrollAnimationParams.newState : this._state;
}
public updateState(update: INewScrollState, smoothScrollDuration: number): void {
// If smooth scroll duration is not specified, then assume that the invoker intends to do an immediate update.
if (smoothScrollDuration === 0) {
const newState = this._state.createUpdated(update);
// If smooth scrolling is in progress, terminate it.
if (this._smoothScrolling) {
this._smoothScrolling = false;
this._smoothScrollAnimationParams = null;
}
// Update state immediately if it is different from the previous one.
if (!this._state.equals(newState)) {
this._updateState(newState);
}
}
// Otherwise update scroll state incrementally.
else {
const targetState = this.getSmoothScrollTargetState();
const newTargetState = targetState.createUpdated(update);
// Proceed only if the new target state differs from the current one.
if (!targetState.equals(newTargetState)) {
// Initialize/update smooth scroll parameters.
this._smoothScrollAnimationParams = {
oldState: this._state,
newState: newTargetState,
startTime: Date.now(),
duration: smoothScrollDuration,
};
// Invoke smooth scrolling functionality in the next frame if it is not already in progress.
if (!this._smoothScrolling) {
this._smoothScrolling = true;
requestAnimationFrame(() => { this._performSmoothScroll(); });
}
}
}
} |
<<<<<<<
},
'extensions.confirmedUriHandlerExtensionIds': {
type: 'array',
description: localize('handleUriConfirmedExtensions', "When an extension is listed here, a confirmation prompt will not be shown when that extension handles a URI."),
default: []
},
'extensions.extensionKind': {
type: 'object',
description: localize('extensions.extensionKind', "Configure ui or workspace extensions and allow them to enable locally or remotely in a remote window."),
patternProperties: {
'([a-z0-9A-Z][a-z0-9\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\-A-Z]*)$': {
type: 'string',
enum: [
'ui',
'workspace'
],
enumDescriptions: [
localize('ui', "UI extension kind. Such extensions are enabled only when available locally in a remote window."),
localize('workspace', "Workspace extension kind. Such extensions are enabled only when avialable on remote server in a remote window.")
],
default: 'ui'
},
},
default: {
'pub.name': 'ui'
}
=======
>>>>>>>
},
'extensions.confirmedUriHandlerExtensionIds': {
type: 'array',
description: localize('handleUriConfirmedExtensions', "When an extension is listed here, a confirmation prompt will not be shown when that extension handles a URI."),
default: [] |
<<<<<<<
/** Compares filenames by name, then by extension. Mixes uppercase and lowercase names together. */
export function compareFileNamesDefault(one: string | null, other: string | null): number {
return compareNamesThenExtensions(one, other, CaseGrouping.None);
}
=======
/** Compares filenames by name then extension, sorting numbers numerically instead of alphabetically. */
export function compareFileNamesNumeric(one: string | null, other: string | null): number {
const [oneName, oneExtension] = extractNameAndExtension(one, true);
const [otherName, otherExtension] = extractNameAndExtension(other, true);
const collatorNumeric = intlFileNameCollatorNumeric.value.collator;
const collatorNumericCaseInsensitive = intlFileNameCollatorNumericCaseInsenstive.value.collator;
let result;
>>>>>>>
/** Compares filenames by name, then by extension. Mixes uppercase and lowercase names together. */
export function compareFileNamesDefault(one: string | null, other: string | null): number {
return compareNamesThenExtensions(one, other, CaseGrouping.None);
}
<<<<<<<
=======
const collatorNumeric = intlFileNameCollatorNumeric.value.collator;
const collatorNumericCaseInsensitive = intlFileNameCollatorNumericCaseInsenstive.value.collator;
let result;
// Check for extension differences, ignoring differences in case and comparing numbers numerically.
result = compareAndDisambiguateByLength(collatorNumericCaseInsensitive, oneExtension, otherExtension);
if (result !== 0) {
return result;
}
>>>>>>> |
<<<<<<<
const isActivityBarHidden = this.partService.isActivityBarHidden();
const isSidebarHidden = this.partService.isSideBarHidden();
const isPanelHidden = this.partService.isPanelHidden();
=======
const isTitlebarHidden = !this.partService.isVisible(Parts.TITLEBAR_PART);
const isPanelHidden = !this.partService.isVisible(Parts.PANEL_PART);
const isStatusbarHidden = !this.partService.isVisible(Parts.STATUSBAR_PART);
const isSidebarHidden = !this.partService.isVisible(Parts.SIDEBAR_PART);
>>>>>>>
const isActivityBarHidden = this.partService.isActivityBarHidden();
const isTitlebarHidden = !this.partService.isVisible(Parts.TITLEBAR_PART);
const isPanelHidden = !this.partService.isVisible(Parts.PANEL_PART);
const isStatusbarHidden = !this.partService.isVisible(Parts.STATUSBAR_PART);
const isSidebarHidden = !this.partService.isVisible(Parts.SIDEBAR_PART); |
<<<<<<<
export function is(value: ShellExecutionDTO | ProcessExecutionDTO | CustomExecutionDTO): value is ProcessExecutionDTO {
let candidate = value as ProcessExecutionDTO;
=======
export function is(value: ShellExecutionDTO | ProcessExecutionDTO): value is ProcessExecutionDTO {
const candidate = value as ProcessExecutionDTO;
>>>>>>>
export function is(value: ShellExecutionDTO | ProcessExecutionDTO | CustomExecutionDTO): value is ProcessExecutionDTO {
const candidate = value as ProcessExecutionDTO;
<<<<<<<
export function is(value: ShellExecutionDTO | ProcessExecutionDTO | CustomExecutionDTO): value is ShellExecutionDTO {
let candidate = value as ShellExecutionDTO;
=======
export function is(value: ShellExecutionDTO | ProcessExecutionDTO): value is ShellExecutionDTO {
const candidate = value as ShellExecutionDTO;
>>>>>>>
export function is(value: ShellExecutionDTO | ProcessExecutionDTO | CustomExecutionDTO): value is ShellExecutionDTO {
const candidate = value as ShellExecutionDTO; |
<<<<<<<
export abstract class BaseTextEditorModel extends EditorModel implements ITextEditorModel, IModeSupport {
=======
export abstract class BaseTextEditorModel extends EditorModel implements ITextEditorModel {
protected textEditorModelHandle: URI | null;
private createdEditorModel: boolean;
>>>>>>>
export abstract class BaseTextEditorModel extends EditorModel implements ITextEditorModel, IModeSupport {
protected textEditorModelHandle: URI | null;
private createdEditorModel: boolean; |
<<<<<<<
//#region Terminal name change event https://github.com/microsoft/vscode/issues/114898
export interface Pseudoterminal {
/**
* An event that when fired allows changing the name of the terminal.
*
* **Example:** Change the terminal name to "My new terminal".
* ```typescript
* const writeEmitter = new vscode.EventEmitter<string>();
* const changeNameEmitter = new vscode.EventEmitter<string>();
* const pty: vscode.Pseudoterminal = {
* onDidWrite: writeEmitter.event,
* onDidChangeName: changeNameEmitter.event,
* open: () => changeNameEmitter.fire('My new terminal'),
* close: () => {}
* };
* vscode.window.createTerminal({ name: 'My terminal', pty });
* ```
*/
onDidChangeName?: Event<string>;
}
//#endregion
=======
//#region Terminal icon https://github.com/microsoft/vscode/issues/120538
export interface TerminalOptions {
/**
* A codicon ID to associate with this terminal.
*/
readonly icon?: string;
}
//#endregion
>>>>>>>
//#region Terminal name change event https://github.com/microsoft/vscode/issues/114898
export interface Pseudoterminal {
/**
* An event that when fired allows changing the name of the terminal.
*
* **Example:** Change the terminal name to "My new terminal".
* ```typescript
* const writeEmitter = new vscode.EventEmitter<string>();
* const changeNameEmitter = new vscode.EventEmitter<string>();
* const pty: vscode.Pseudoterminal = {
* onDidWrite: writeEmitter.event,
* onDidChangeName: changeNameEmitter.event,
* open: () => changeNameEmitter.fire('My new terminal'),
* close: () => {}
* };
* vscode.window.createTerminal({ name: 'My terminal', pty });
* ```
*/
onDidChangeName?: Event<string>;
}
//#region Terminal icon https://github.com/microsoft/vscode/issues/120538
export interface TerminalOptions {
/**
* A codicon ID to associate with this terminal.
*/
readonly icon?: string;
}
//#endregion |
<<<<<<<
readonly onWillDispose: Event<void> = this._onWillDispose.event;
private _dirty = false;
protected readonly _onDidChangeDirty = this._register(new Emitter<void>());
readonly onDidChangeDirty = this._onDidChangeDirty.event;
private _onDidChangeContent = this._register(new Emitter<NotebookTextModelChangedEvent>());
get onDidChangeContent(): Event<NotebookTextModelChangedEvent> { return this._onDidChangeContent.event; }
=======
private readonly _onDidChangeCells = this._register(new Emitter<{ synchronous: boolean, splices: NotebookCellTextModelSplice[] }>());
private readonly _onDidModelChangeProxy = this._register(new Emitter<NotebookCellsChangedEvent>());
private readonly _onDidChangeContent = this._register(new Emitter<void>());
private readonly _onDidChangeMetadata = this._register(new Emitter<NotebookDocumentMetadata>());
readonly onWillDispose: Event<void> = this._onWillDispose.event;
readonly onDidChangeCells = this._onDidChangeCells.event;
readonly onDidModelChangeProxy = this._onDidModelChangeProxy.event;
readonly onDidChangeContent = this._onDidChangeContent.event;
readonly onDidChangeMetadata = this._onDidChangeMetadata.event;
private _cellhandlePool: number = 0;
>>>>>>>
private readonly _onDidChangeContent = this._register(new Emitter<NotebookTextModelChangedEvent>());
private readonly _onDidChangeMetadata = this._register(new Emitter<NotebookDocumentMetadata>());
readonly onWillDispose: Event<void> = this._onWillDispose.event;
readonly onDidChangeContent = this._onDidChangeContent.event;
readonly onDidChangeMetadata = this._onDidChangeMetadata.event;
private _cellhandlePool: number = 0;
<<<<<<<
private _operationManager: NotebookOperationManager;
private _eventEmitter: DelayedEmitter;
=======
private _selections: number[] = [];
get selections() {
return this._selections;
}
set selections(selections: number[]) {
this._selections = selections;
this._onDidSelectionChangeProxy.fire(this._selections);
}
//#endregion
private _dirty = false;
protected readonly _onDidChangeDirty = this._register(new Emitter<void>());
readonly onDidChangeDirty = this._onDidChangeDirty.event;
private readonly _operationManager: NotebookOperationManager;
>>>>>>>
private _operationManager: NotebookOperationManager;
private _eventEmitter: DelayedEmitter;
private _dirty = false;
protected readonly _onDidChangeDirty = this._register(new Emitter<void>());
readonly onDidChangeDirty = this._onDidChangeDirty.event;
<<<<<<<
=======
const oldViewCells = this._cells.slice(0);
const oldMap = new Map(this._mapping);
>>>>>>>
<<<<<<<
this._assertIndex(edit.index);
const cell = this.cells[edit.index];
// TODO@rebornix, we should do diff first
this._spliceNotebookCellOutputs(cell.handle, [[0, cell.outputs.length, edit.outputs]]);
=======
this._assertCellIndex(edit.index);
const cell = this._cells[edit.index];
this.spliceNotebookCellOutputs(cell.handle, [[0, cell.outputs.length, edit.outputs]]);
>>>>>>>
this._assertIndex(edit.index);
const cell = this._cells[edit.index];
// TODO@rebornix, we should do diff first
this._spliceNotebookCellOutputs(cell.handle, [[0, cell.outputs.length, edit.outputs]]);
<<<<<<<
this._assertIndex(edit.index);
this._changeCellMetadata(this.cells[edit.index].handle, edit.metadata, true);
=======
this._assertCellIndex(edit.index);
this.deltaCellMetadata(this._cells[edit.index].handle, edit.metadata);
>>>>>>>
this._assertIndex(edit.index);
this._changeCellMetadata(this._cells[edit.index].handle, edit.metadata, true);
<<<<<<<
=======
const diffs = diff(oldViewCells, this._cells, cell => {
return oldMap.has(cell.handle);
}).map(diff => {
return [diff.start, diff.deleteCount, diff.toInsert] as [number, number, NotebookCellTextModel[]];
});
this._onDidModelChangeProxy.fire({
kind: NotebookCellsChangeType.ModelChange,
versionId: this._versionId,
changes: diffs.map(diff => [diff[0], diff[1], diff[2].map(cell => ({
handle: cell.handle,
uri: cell.uri,
source: cell.textBuffer.getLinesContent(),
eol: cell.textBuffer.getEOL(),
language: cell.language,
cellKind: cell.cellKind,
outputs: cell.outputs,
metadata: cell.metadata
}))] as [number, number, IMainCellDto[]])
});
const undoDiff = diffs.map(diff => {
const deletedCells = this._cells.slice(diff[0], diff[0] + diff[1]);
return [diff[0], deletedCells, diff[2]] as [number, NotebookCellTextModel[], NotebookCellTextModel[]];
});
this._operationManager.pushEditOperation(new SpliceCellsEdit(this.uri, undoDiff, {
insertCell: this._insertCellDelegate.bind(this),
deleteCell: this._deleteCellDelegate.bind(this),
emitSelections: this._emitSelectionsDelegate.bind(this)
}, undefined, undefined));
this._onDidChangeCells.fire({ synchronous: synchronous, splices: diffs });
>>>>>>>
<<<<<<<
this._isUntitled = false; //TODO@rebornix fishy?
const oldViewCells = this.cells.slice(0);
const oldMap = new Map(this._mapping);
=======
this._isUntitled = false;
>>>>>>>
this._isUntitled = false; //TODO@rebornix fishy?
const oldViewCells = this._cells.slice(0);
const oldMap = new Map(this._mapping);
<<<<<<<
this.cells.splice(index, count, ...cells);
const diffs = diff(oldViewCells, this.cells, cell => {
return oldMap.has(cell.handle);
}).map(diff => {
return [diff.start, diff.deleteCount, diff.toInsert] as [number, number, NotebookCellTextModel[]];
});
const undoDiff = diffs.map(diff => {
const deletedCells = this.cells.slice(diff[0], diff[0] + diff[1]);
return [diff[0], deletedCells, diff[2]] as [number, NotebookCellTextModel[], NotebookCellTextModel[]];
});
this._operationManager.pushEditOperation(new SpliceCellsEdit(this.uri, undoDiff, {
insertCell: (index, cell, endSelections?: number[]) => { this._insertNewCell(index, [cell], true, endSelections); },
deleteCell: (index, endSelections?: number[]) => { this._removeCell(index, 1, true, endSelections); },
}, undefined, undefined));
// should be deferred
this._eventEmitter.emit({
triggerDirty: { value: true },
modelContentChange: {
value: {
kind: NotebookCellsChangeType.ModelChange,
versionId: this._versionId,
changes: diffs,
synchronous
}
}
});
=======
this._cells.splice(index, count, ...cells);
this.setDirty(true);
this._increaseVersionId();
this._onDidChangeContent.fire();
>>>>>>>
this._cells.splice(index, count, ...cells);
const diffs = diff(oldViewCells, this._cells, cell => {
return oldMap.has(cell.handle);
}).map(diff => {
return [diff.start, diff.deleteCount, diff.toInsert] as [number, number, NotebookCellTextModel[]];
});
const undoDiff = diffs.map(diff => {
const deletedCells = this._cells.slice(diff[0], diff[0] + diff[1]);
return [diff[0], deletedCells, diff[2]] as [number, NotebookCellTextModel[], NotebookCellTextModel[]];
});
this._operationManager.pushEditOperation(new SpliceCellsEdit(this.uri, undoDiff, {
insertCell: (index, cell, endSelections?: number[]) => { this._insertNewCell(index, [cell], true, endSelections); },
deleteCell: (index, endSelections?: number[]) => { this._removeCell(index, 1, true, endSelections); },
}, undefined, undefined));
// should be deferred
this._eventEmitter.emit({
triggerDirty: { value: true },
modelContentChange: {
value: {
kind: NotebookCellsChangeType.ModelChange,
versionId: this._versionId,
changes: diffs,
synchronous
}
}
});
<<<<<<<
this.cells.splice(index, 0, ...cells);
this._eventEmitter.emit({
triggerDirty: { value: true },
modelContentChange: {
value: {
kind: NotebookCellsChangeType.ModelChange,
versionId: this._versionId, changes:
[[
index,
0,
cells
]],
synchronous,
endSelections: endSelections
}
}
});
=======
this._cells.splice(index, 0, ...cells);
this.setDirty(true);
this._onDidChangeContent.fire();
this._increaseVersionId();
if (emitToExtHost) {
this._onDidModelChangeProxy.fire({
kind: NotebookCellsChangeType.ModelChange,
versionId: this._versionId, changes:
[[
index,
0,
cells.map(cell => ({
handle: cell.handle,
uri: cell.uri,
source: cell.textBuffer.getLinesContent(),
eol: cell.textBuffer.getEOL(),
language: cell.language,
cellKind: cell.cellKind,
outputs: cell.outputs,
metadata: cell.metadata
}))
]]
});
}
>>>>>>>
this._cells.splice(index, 0, ...cells);
this._eventEmitter.emit({
triggerDirty: { value: true },
modelContentChange: {
value: {
kind: NotebookCellsChangeType.ModelChange,
versionId: this._versionId, changes:
[[
index,
0,
cells
]],
synchronous,
endSelections: endSelections
}
}
});
<<<<<<<
this.cells.splice(index, count);
this._eventEmitter.emit({
triggerDirty: { value: true },
modelContentChange: { value: { kind: NotebookCellsChangeType.ModelChange, versionId: this._versionId, changes: [[index, count, []]], synchronous, endSelections } }
});
=======
this._cells.splice(index, count);
this.setDirty(true);
this._onDidChangeContent.fire();
this._increaseVersionId();
if (emitToExtHost) {
this._onDidModelChangeProxy.fire({ kind: NotebookCellsChangeType.ModelChange, versionId: this._versionId, changes: [[index, count, []]] });
}
}
moveCellToIdx(index: number, length: number, newIdx: number, emitToExtHost: boolean = true) {
this._assertCellIndex(index);
this._assertCellIndex(newIdx);
const cells = this._cells.splice(index, length);
this._cells.splice(newIdx, 0, ...cells);
this.setDirty(true);
this._onDidChangeContent.fire();
this._increaseVersionId();
if (emitToExtHost) {
this._onDidModelChangeProxy.fire({ kind: NotebookCellsChangeType.Move, versionId: this._versionId, index, newIdx });
}
}
private _assertCellIndex(index: number): void {
if (index < 0 || index >= this._cells.length) {
throw new Error(`model index out of range ${index}`);
}
}
// TODO@rebornix should this trigger content change event?
spliceNotebookCellOutputs(cellHandle: number, splices: NotebookCellOutputsSplice[]): void {
const cell = this._mapping.get(cellHandle);
if (cell) {
cell.spliceNotebookCellOutputs(splices);
if (!this.transientOptions.transientOutputs) {
this._increaseVersionId();
this.setDirty(true);
this._onDidChangeContent.fire();
}
this._onDidModelChangeProxy.fire({
kind: NotebookCellsChangeType.Output,
versionId: this.versionId,
index: this._cells.indexOf(cell),
outputs: cell.outputs ?? []
});
}
}
clearCellOutput(handle: number) {
const cell = this._mapping.get(handle);
if (cell) {
cell.spliceNotebookCellOutputs([
[0, cell.outputs.length, []]
]);
this._increaseVersionId();
this._onDidModelChangeProxy.fire({ kind: NotebookCellsChangeType.CellClearOutput, versionId: this._versionId, index: this._cells.indexOf(cell) });
}
}
changeCellLanguage(handle: number, languageId: string) {
const cell = this._mapping.get(handle);
if (cell && cell.language !== languageId) {
cell.language = languageId;
this._increaseVersionId();
this._onDidModelChangeProxy.fire({ kind: NotebookCellsChangeType.ChangeLanguage, versionId: this._versionId, index: this._cells.indexOf(cell), language: languageId });
}
>>>>>>>
this._cells.splice(index, count);
this._eventEmitter.emit({
triggerDirty: { value: true },
modelContentChange: { value: { kind: NotebookCellsChangeType.ModelChange, versionId: this._versionId, changes: [[index, count, []]], synchronous, endSelections } }
});
<<<<<<<
private _changeCellMetadata(handle: number, metadata: NotebookCellMetadata, pushUndoStop: boolean) {
const cell = this.cells.find(cell => cell.handle === handle);
=======
changeCellMetadata(handle: number, metadata: NotebookCellMetadata, pushUndoStop: boolean) {
const cell = this._cells.find(cell => cell.handle === handle);
>>>>>>>
private _changeCellMetadata(handle: number, metadata: NotebookCellMetadata, pushUndoStop: boolean) {
const cell = this._cells.find(cell => cell.handle === handle);
<<<<<<<
this._eventEmitter.emit({
triggerDirty: { value: triggerDirtyChange },
modelContentChange: {
value: { kind: NotebookCellsChangeType.ChangeCellMetadata, versionId: this._versionId, index: this.cells.indexOf(cell), metadata: cell.metadata, synchronous: true }
}
=======
this._increaseVersionId();
this._onDidModelChangeProxy.fire({ kind: NotebookCellsChangeType.ChangeMetadata, versionId: this._versionId, index: this._cells.indexOf(cell), metadata: cell.metadata });
}
deltaCellMetadata(handle: number, newMetadata: NotebookCellMetadata) {
const cell = this._mapping.get(handle);
if (cell) {
this.changeCellMetadata(handle, {
...cell.metadata,
...newMetadata
}, true);
}
}
clearAllCellOutputs() {
this._cells.forEach(cell => {
cell.spliceNotebookCellOutputs([
[0, cell.outputs.length, []]
]);
>>>>>>>
this._eventEmitter.emit({
triggerDirty: { value: triggerDirtyChange },
modelContentChange: {
value: { kind: NotebookCellsChangeType.ChangeCellMetadata, versionId: this._versionId, index: this._cells.indexOf(cell), metadata: cell.metadata, synchronous: true }
}
<<<<<<<
deleteCell(index: number, synchronous: boolean, pushUndoStop: boolean, beforeSelections: number[] | undefined, endSelections: number[] | undefined) {
const cell = this.cells[index];
=======
deleteCell2(index: number, synchronous: boolean, pushUndoStop: boolean, beforeSelections: number[] | undefined, endSelections: number[] | undefined) {
const cell = this._cells[index];
>>>>>>>
deleteCell(index: number, synchronous: boolean, pushUndoStop: boolean, beforeSelections: number[] | undefined, endSelections: number[] | undefined) {
const cell = this._cells[index];
<<<<<<<
moveCellToIdx(index: number, length: number, newIdx: number, synchronous: boolean, pushedToUndoStack: boolean, beforeSelections: number[] | undefined, endSelections: number[] | undefined): boolean {
=======
moveCellToIdx2(index: number, length: number, newIdx: number, synchronous: boolean, pushedToUndoStack: boolean, beforeSelections: number[] | undefined, endSelections: number[] | undefined): boolean {
const cells = this._cells.slice(index, index + length);
>>>>>>>
moveCellToIdx(index: number, length: number, newIdx: number, synchronous: boolean, pushedToUndoStack: boolean, beforeSelections: number[] | undefined, endSelections: number[] | undefined): boolean { |
<<<<<<<
//#region Webview Resource Roots
export interface Webview {
/**
* Convert a uri for the local file system to one that can be used inside webviews.
*
* Webviews cannot directly load resoruces from the workspace or local file system using `file:` uris. The
* `toWebviewResource` function takes a local `file:` uri and converts it into a uri that can be used inside of
* a webview to load the same resource:
*
* ```ts
* webview.html = `<img src="${webview.toWebviewResource(vscode.Uri.file('/Users/codey/workspace/cat.gif'))}">`
* ```
*/
toWebviewResource(localResource: Uri): Uri;
/**
* Content security policy source for webview resources.
*
* This is origin used in a content security policy rule:
*
* ```
* img-src https: ${webview.cspSource} ...;
* ````
*/
readonly cspSource: string;
}
//#endregion
//#region Deprecated support
export interface CompletionItem {
/**
* Indicates if this item is deprecated.
*/
deprecated?: boolean;
}
//#endregion
=======
>>>>>>>
//#region Deprecated support
export interface CompletionItem {
/**
* Indicates if this item is deprecated.
*/
deprecated?: boolean;
}
//#endregion |
<<<<<<<
import { TerminalProcessMainProxy } from 'vs/workbench/contrib/terminal/electron-browser/terminalProcessMainProxy';
=======
import { IShellLaunchConfig, ITerminalChildProcess } from 'vs/platform/terminal/common/terminal';
import { LocalPty } from 'vs/workbench/contrib/terminal/electron-sandbox/localPty';
import { Emitter } from 'vs/base/common/event';
import { Disposable } from 'vs/base/common/lifecycle';
import { INotificationService } from 'vs/platform/notification/common/notification';
>>>>>>>
import { TerminalProcessMainProxy } from 'vs/workbench/contrib/terminal/electron-browser/terminalProcessMainProxy';
import { IShellLaunchConfig, ITerminalChildProcess } from 'vs/platform/terminal/common/terminal';
import { LocalPty } from 'vs/workbench/contrib/terminal/electron-sandbox/localPty';
import { Emitter } from 'vs/base/common/event';
import { Disposable } from 'vs/base/common/lifecycle';
import { INotificationService } from 'vs/platform/notification/common/notification'; |
<<<<<<<
//#region Support `scmResourceState` in `when` clauses #86180 https://github.com/microsoft/vscode/issues/86180
export interface SourceControlResourceState {
/**
* Context value of the resource state. This can be used to contribute resource specific actions.
* For example, if a resource is given a context value as `diffable`. When contributing actions to `scm/resourceState/context`
* using `menus` extension point, you can specify context value for key `scmResourceState` in `when` expressions, like `scmResourceState == diffable`.
* ```
* "contributes": {
* "menus": {
* "scm/resourceState/context": [
* {
* "command": "extension.diff",
* "when": "scmResourceState == diffable"
* }
* ]
* }
* }
* ```
* This will show action `extension.diff` only for resources with `contextValue` is `diffable`.
*/
readonly contextValue?: string;
}
//#endregion
//#region Dialog title: https://github.com/microsoft/vscode/issues/82871
=======
//#region https://github.com/microsoft/vscode/issues/101857
export interface ExtensionContext {
>>>>>>>
//#region Support `scmResourceState` in `when` clauses #86180 https://github.com/microsoft/vscode/issues/86180
export interface SourceControlResourceState {
/**
* Context value of the resource state. This can be used to contribute resource specific actions.
* For example, if a resource is given a context value as `diffable`. When contributing actions to `scm/resourceState/context`
* using `menus` extension point, you can specify context value for key `scmResourceState` in `when` expressions, like `scmResourceState == diffable`.
* ```
* "contributes": {
* "menus": {
* "scm/resourceState/context": [
* {
* "command": "extension.diff",
* "when": "scmResourceState == diffable"
* }
* ]
* }
* }
* ```
* This will show action `extension.diff` only for resources with `contextValue` is `diffable`.
*/
readonly contextValue?: string;
}
//#endregion
//#region https://github.com/microsoft/vscode/issues/101857
export interface ExtensionContext { |
<<<<<<<
import { ExtensionActivatedByEvent } from 'vs/workbench/api/node/extHostExtensionActivator';
=======
import { EnvironmentService } from 'vs/platform/environment/node/environmentService';
import { SpdLogService } from 'vs/platform/log/node/spdlogService';
>>>>>>>
import { ExtensionActivatedByEvent } from 'vs/workbench/api/node/extHostExtensionActivator';
import { EnvironmentService } from 'vs/platform/environment/node/environmentService';
import { SpdLogService } from 'vs/platform/log/node/spdlogService'; |
<<<<<<<
min = 0;
max = 10;
=======
decimalPattern = new RegExp('[0-9]+([\.][0-9]+)?');
pattern = '';
>>>>>>>
min = 0;
max = 10;
decimalPattern = new RegExp('[0-9]+([\.][0-9]+)?');
pattern = ''; |
<<<<<<<
export interface IRulerColorOption {
readonly size: number;
readonly color: string;
}
export type IRulerOption = number | IRulerColorOption;
=======
export enum RenderLineNumbersType {
Off = 0,
On = 1,
Relative = 2,
Interval = 3,
Custom = 4
}
export interface InternalEditorRenderLineNumbersOptions {
readonly renderType: RenderLineNumbersType;
readonly renderFn: ((lineNumber: number) => string) | null;
}
>>>>>>>
export enum RenderLineNumbersType {
Off = 0,
On = 1,
Relative = 2,
Interval = 3,
Custom = 4
}
export interface InternalEditorRenderLineNumbersOptions {
readonly renderType: RenderLineNumbersType;
readonly renderFn: ((lineNumber: number) => string) | null;
}
export interface IRulerColorOption {
readonly size: number;
readonly color: string;
}
export type IRulerOption = number | IRulerColorOption; |
<<<<<<<
import { FindMatch, IReadonlyTextBuffer } from 'vs/editor/common/model';
import { ContextKeyExpr, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
=======
import { IPosition } from 'vs/editor/common/core/position';
import { FindMatch } from 'vs/editor/common/model';
import { RawContextKey, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
>>>>>>>
import { IPosition } from 'vs/editor/common/core/position';
import { ContextKeyExpr, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
import { FindMatch, IReadonlyTextBuffer } from 'vs/editor/common/model'; |
<<<<<<<
requireTrust: true,
=======
restricted: true,
// TODO: Remove when workspace trust is enabled by default
scope: ConfigurationScope.APPLICATION,
>>>>>>>
restricted: true,
<<<<<<<
requireTrust: true,
=======
restricted: true,
// TODO: Remove when workspace trust is enabled by default
scope: ConfigurationScope.APPLICATION,
>>>>>>>
restricted: true,
<<<<<<<
requireTrust: true,
=======
restricted: true,
// TODO: Remove when workspace trust is enabled by default
scope: ConfigurationScope.APPLICATION,
>>>>>>>
restricted: true,
<<<<<<<
requireTrust: true,
=======
restricted: true,
// TODO: Remove when workspace trust is enabled by default
scope: ConfigurationScope.APPLICATION,
>>>>>>>
restricted: true,
<<<<<<<
requireTrust: true,
=======
restricted: true,
// TODO: Remove when workspace trust is enabled by default
scope: ConfigurationScope.APPLICATION,
>>>>>>>
restricted: true,
<<<<<<<
requireTrust: true,
=======
restricted: true,
// TODO: Remove when workspace trust is enabled by default
scope: ConfigurationScope.APPLICATION,
>>>>>>>
restricted: true,
<<<<<<<
requireTrust: true,
=======
restricted: true,
// TODO: Remove when workspace trust is enabled by default
scope: ConfigurationScope.APPLICATION,
>>>>>>>
restricted: true,
<<<<<<<
requireTrust: true,
=======
restricted: true,
// TODO: Remove when workspace trust is enabled by default
scope: ConfigurationScope.APPLICATION,
>>>>>>>
restricted: true,
<<<<<<<
requireTrust: true,
=======
restricted: true,
// TODO: Remove when workspace trust is enabled by default
scope: ConfigurationScope.APPLICATION,
>>>>>>>
restricted: true,
<<<<<<<
requireTrust: true,
=======
restricted: true,
// TODO: Remove when workspace trust is enabled by default
scope: ConfigurationScope.APPLICATION,
>>>>>>>
restricted: true,
<<<<<<<
requireTrust: true,
=======
restricted: true,
// TODO: Remove when workspace trust is enabled by default
scope: ConfigurationScope.APPLICATION,
>>>>>>>
restricted: true,
<<<<<<<
requireTrust: true,
=======
restricted: true,
// TODO: Remove when workspace trust is enabled by default
scope: ConfigurationScope.APPLICATION,
>>>>>>>
restricted: true,
<<<<<<<
requireTrust: true,
=======
restricted: true,
// TODO: Remove when workspace trust is enabled by default
scope: ConfigurationScope.APPLICATION,
>>>>>>>
restricted: true,
<<<<<<<
requireTrust: true,
=======
restricted: true,
// TODO: Remove when workspace trust is enabled by default
scope: ConfigurationScope.APPLICATION,
>>>>>>>
restricted: true,
<<<<<<<
requireTrust: true,
=======
restricted: true,
// TODO: Remove when workspace trust is enabled by default
scope: ConfigurationScope.APPLICATION,
>>>>>>>
restricted: true, |
<<<<<<<
import { Event, Emitter } from 'vs/base/common/event';
import { IUserDataSyncService, IUserDataSyncUtilService, IUserDataAutoSyncService, IUserDataSyncStoreService, IUserDataSyncBackupStoreService } from 'vs/platform/userDataSync/common/userDataSync';
=======
import { Event } from 'vs/base/common/event';
import { IUserDataSyncService, IUserDataSyncUtilService, IUserDataAutoSyncService } from 'vs/platform/userDataSync/common/userDataSync';
>>>>>>>
import { Event } from 'vs/base/common/event';
import { IUserDataSyncService, IUserDataSyncUtilService, IUserDataAutoSyncService } from 'vs/platform/userDataSync/common/userDataSync';
<<<<<<<
}
export class UserDataSyncStoreServiceChannel implements IServerChannel {
constructor(private readonly service: IUserDataSyncStoreService) { }
listen(_: unknown, event: string): Event<any> {
throw new Error(`Event not found: ${event}`);
}
call(context: any, command: string, args?: any): Promise<any> {
switch (command) {
case 'getAllRefs': return this.service.getAllRefs(args[0]);
case 'resolveContent': return this.service.resolveContent(args[0], args[1]);
case 'delete': return this.service.delete(args[0]);
}
throw new Error('Invalid call');
}
}
export class UserDataSyncBackupStoreServiceChannel implements IServerChannel {
constructor(private readonly service: IUserDataSyncBackupStoreService) { }
listen(_: unknown, event: string): Event<any> {
throw new Error(`Event not found: ${event}`);
}
call(context: any, command: string, args?: any): Promise<any> {
switch (command) {
case 'getAllRefs': return this.service.getAllRefs(args[0]);
case 'resolveContent': return this.service.resolveContent(args[0], args[1]);
}
throw new Error('Invalid call');
}
}
export class StorageKeysSyncRegistryChannel implements IServerChannel {
constructor(private readonly service: IStorageKeysSyncRegistryService) { }
listen(_: unknown, event: string): Event<any> {
switch (event) {
case 'onDidChangeStorageKeys': return this.service.onDidChangeStorageKeys;
}
throw new Error(`Event not found: ${event}`);
}
call(context: any, command: string, args?: any): Promise<any> {
switch (command) {
case '_getInitialData': return Promise.resolve(this.service.storageKeys);
case 'registerStorageKey': return Promise.resolve(this.service.registerStorageKey(args[0]));
}
throw new Error('Invalid call');
}
}
export class StorageKeysSyncRegistryChannelClient extends Disposable implements IStorageKeysSyncRegistryService {
_serviceBrand: undefined;
private _storageKeys: ReadonlyArray<IStorageKey> = [];
get storageKeys(): ReadonlyArray<IStorageKey> { return this._storageKeys; }
private readonly _onDidChangeStorageKeys: Emitter<ReadonlyArray<IStorageKey>> = this._register(new Emitter<ReadonlyArray<IStorageKey>>());
readonly onDidChangeStorageKeys = this._onDidChangeStorageKeys.event;
constructor(private readonly channel: IChannel) {
super();
this.channel.call<IStorageKey[]>('_getInitialData').then(storageKeys => {
this.updateStorageKeys(storageKeys);
this._register(this.channel.listen<ReadonlyArray<IStorageKey>>('onDidChangeStorageKeys')(storageKeys => this.updateStorageKeys(storageKeys)));
});
}
private async updateStorageKeys(storageKeys: ReadonlyArray<IStorageKey>): Promise<void> {
this._storageKeys = storageKeys;
this._onDidChangeStorageKeys.fire(this.storageKeys);
}
registerStorageKey(storageKey: IStorageKey): void {
this.channel.call('registerStorageKey', [storageKey]);
}
=======
>>>>>>>
}
export class StorageKeysSyncRegistryChannel implements IServerChannel {
constructor(private readonly service: IStorageKeysSyncRegistryService) { }
listen(_: unknown, event: string): Event<any> {
switch (event) {
case 'onDidChangeStorageKeys': return this.service.onDidChangeStorageKeys;
}
throw new Error(`Event not found: ${event}`);
}
call(context: any, command: string, args?: any): Promise<any> {
switch (command) {
case '_getInitialData': return Promise.resolve(this.service.storageKeys);
case 'registerStorageKey': return Promise.resolve(this.service.registerStorageKey(args[0]));
}
throw new Error('Invalid call');
}
}
export class StorageKeysSyncRegistryChannelClient extends Disposable implements IStorageKeysSyncRegistryService {
_serviceBrand: undefined;
private _storageKeys: ReadonlyArray<IStorageKey> = [];
get storageKeys(): ReadonlyArray<IStorageKey> { return this._storageKeys; }
private readonly _onDidChangeStorageKeys: Emitter<ReadonlyArray<IStorageKey>> = this._register(new Emitter<ReadonlyArray<IStorageKey>>());
readonly onDidChangeStorageKeys = this._onDidChangeStorageKeys.event;
constructor(private readonly channel: IChannel) {
super();
this.channel.call<IStorageKey[]>('_getInitialData').then(storageKeys => {
this.updateStorageKeys(storageKeys);
this._register(this.channel.listen<ReadonlyArray<IStorageKey>>('onDidChangeStorageKeys')(storageKeys => this.updateStorageKeys(storageKeys)));
});
}
private async updateStorageKeys(storageKeys: ReadonlyArray<IStorageKey>): Promise<void> {
this._storageKeys = storageKeys;
this._onDidChangeStorageKeys.fire(this.storageKeys);
}
registerStorageKey(storageKey: IStorageKey): void {
this.channel.call('registerStorageKey', [storageKey]);
} |
<<<<<<<
maximizeWindow(): TPromise<void> {
return TPromise.as(void 0);
}
unmaximizeWindow(): TPromise<void> {
return TPromise.as(void 0);
}
minimizeWindow(): TPromise<void> {
return TPromise.as(void 0);
}
showMessageBoxWithCheckbox(options: Electron.MessageBoxOptions): Promise<IMessageBoxResult> {
=======
showMessageBoxWithCheckbox(options: Electron.MessageBoxOptions): TPromise<IMessageBoxResult> {
>>>>>>>
maximizeWindow(): TPromise<void> {
return TPromise.as(void 0);
}
unmaximizeWindow(): TPromise<void> {
return TPromise.as(void 0);
}
minimizeWindow(): TPromise<void> {
return TPromise.as(void 0);
}
showMessageBoxWithCheckbox(options: Electron.MessageBoxOptions): TPromise<IMessageBoxResult> { |
<<<<<<<
import { contrastBorder, editorBackground, focusBorder, foreground, registerColor, textBlockQuoteBackground, textBlockQuoteBorder, textLinkActiveForeground, textLinkForeground, textPreformatForeground, transparent } from 'vs/platform/theme/common/colorRegistry';
=======
import { contrastBorder, editorBackground, focusBorder, foreground, registerColor, textBlockQuoteBackground, textBlockQuoteBorder, textLinkActiveForeground, textLinkForeground, textPreformatForeground, errorForeground } from 'vs/platform/theme/common/colorRegistry';
>>>>>>>
import { contrastBorder, editorBackground, focusBorder, foreground, registerColor, textBlockQuoteBackground, textBlockQuoteBorder, textLinkActiveForeground, textLinkForeground, textPreformatForeground, errorForeground, transparent } from 'vs/platform/theme/common/colorRegistry';
<<<<<<<
import { PANEL_BORDER } from 'vs/workbench/common/theme';
=======
import { debugIconStartForeground } from 'vs/workbench/contrib/debug/browser/debugToolBar';
>>>>>>>
import { PANEL_BORDER } from 'vs/workbench/common/theme';
import { debugIconStartForeground } from 'vs/workbench/contrib/debug/browser/debugToolBar';
<<<<<<<
const editorBorderColor = theme.getColor(notebookOutputContainerColor);
if (editorBorderColor) {
collector.addRule(`.notebookOverlay .monaco-list-row .cell-editor-part:before { outline: solid 1px ${editorBorderColor}; }`);
}
const headingBorderColor = theme.getColor(notebookCellBorder);
if (headingBorderColor) {
collector.addRule(`.notebookOverlay .cell.markdown h1 { border-color: ${headingBorderColor}; }`);
}
=======
const cellStatusSuccessIcon = theme.getColor(cellStatusIconSuccess);
if (cellStatusSuccessIcon) {
collector.addRule(`.monaco-workbench .notebookOverlay .cell-statusbar-container .cell-run-status .codicon-check { color: ${cellStatusSuccessIcon} }`);
}
const cellStatusErrorIcon = theme.getColor(cellStatusIconError);
if (cellStatusErrorIcon) {
collector.addRule(`.monaco-workbench .notebookOverlay .cell-statusbar-container .cell-run-status .codicon-error { color: ${cellStatusErrorIcon} }`);
}
const cellStatusRunningIcon = theme.getColor(cellStatusIconRunning);
if (cellStatusRunningIcon) {
collector.addRule(`.monaco-workbench .notebookOverlay .cell-statusbar-container .cell-run-status .codicon-sync { color: ${cellStatusRunningIcon} }`);
}
const cellStatusBarHoverBg = theme.getColor(cellStatusBarItemHover);
if (cellStatusBarHoverBg) {
collector.addRule(`.monaco-workbench .notebookOverlay .cell-statusbar-container .cell-language-picker:hover { background-color: ${cellStatusBarHoverBg}; }`);
}
>>>>>>>
const editorBorderColor = theme.getColor(notebookOutputContainerColor);
if (editorBorderColor) {
collector.addRule(`.notebookOverlay .monaco-list-row .cell-editor-part:before { outline: solid 1px ${editorBorderColor}; }`);
}
const headingBorderColor = theme.getColor(notebookCellBorder);
if (headingBorderColor) {
collector.addRule(`.notebookOverlay .cell.markdown h1 { border-color: ${headingBorderColor}; }`);
}
const cellStatusSuccessIcon = theme.getColor(cellStatusIconSuccess);
if (cellStatusSuccessIcon) {
collector.addRule(`.monaco-workbench .notebookOverlay .cell-statusbar-container .cell-run-status .codicon-check { color: ${cellStatusSuccessIcon} }`);
}
const cellStatusErrorIcon = theme.getColor(cellStatusIconError);
if (cellStatusErrorIcon) {
collector.addRule(`.monaco-workbench .notebookOverlay .cell-statusbar-container .cell-run-status .codicon-error { color: ${cellStatusErrorIcon} }`);
}
const cellStatusRunningIcon = theme.getColor(cellStatusIconRunning);
if (cellStatusRunningIcon) {
collector.addRule(`.monaco-workbench .notebookOverlay .cell-statusbar-container .cell-run-status .codicon-sync { color: ${cellStatusRunningIcon} }`);
}
const cellStatusBarHoverBg = theme.getColor(cellStatusBarItemHover);
if (cellStatusBarHoverBg) {
collector.addRule(`.monaco-workbench .notebookOverlay .cell-statusbar-container .cell-language-picker:hover { background-color: ${cellStatusBarHoverBg}; }`);
} |
<<<<<<<
import { containsDragType } from 'vs/workbench/browser/dnd';
=======
import { terminalStrings } from 'vs/workbench/contrib/terminal/common/terminalStrings';
>>>>>>>
import { containsDragType } from 'vs/workbench/browser/dnd';
import { terminalStrings } from 'vs/workbench/contrib/terminal/common/terminalStrings'; |
<<<<<<<
import { hasArgs } from 'vs/code/node/args';
=======
import { RunOnceScheduler } from 'vs/base/common/async';
>>>>>>>
import { hasArgs } from 'vs/code/node/args';
import { RunOnceScheduler } from 'vs/base/common/async'; |
<<<<<<<
let workbenchProperties: { [path: string]: IJSONSchema; } = {
'workbench.editor.showTabs': {
'type': 'boolean',
'description': nls.localize('showEditorTabs', "Controls if opened editors should show in tabs or not."),
'default': true
},
'workbench.editor.labelFormat': {
'type': 'string',
'enum': ['default', 'short', 'medium', 'long'],
'enumDescriptions': [
nls.localize('workbench.editor.labelFormat.default', "Show the name of the file. When tabs are enabled and two files have the same name in one group the distinguinshing sections of each file's path are added. When tabs are disabled, the path relative to the workspace folder is shown if the editor is active."),
nls.localize('workbench.editor.labelFormat.short', "Show the name of the file followed by it's directory name."),
nls.localize('workbench.editor.labelFormat.medium', "Show the name of the file followed by it's path relative to the workspace folder."),
nls.localize('workbench.editor.labelFormat.long', "Show the name of the file followed by it's absolute path.")
],
'default': 'default',
'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by parenthesis are not to be translated.'], key: 'tabDescription' },
"Controls the format of the label for an editor. Changing this setting can for example make it easier to understand the location of a file:\n- short: 'parent'\n- medium: 'workspace/src/parent'\n- long: '/home/user/workspace/src/parent'\n- default: '.../parent', when another tab shares the same title, or the relative workspace path if tabs are disabled"),
},
'workbench.editor.tabCloseButton': {
'type': 'string',
'enum': ['left', 'right', 'off'],
'default': 'right',
'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'editorTabCloseButton' }, "Controls the position of the editor's tabs close buttons or disables them when set to 'off'.")
},
'workbench.editor.tabSizing': {
'type': 'string',
'enum': ['fit', 'shrink'],
'default': 'fit',
'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'tabSizing' }, "Controls the sizing of editor tabs. Set to 'fit' to keep tabs always large enough to show the full editor label. Set to 'shrink' to allow tabs to get smaller when the available space is not enough to show all tabs at once.")
},
'workbench.editor.showIcons': {
'type': 'boolean',
'description': nls.localize('showIcons', "Controls if opened editors should show with an icon or not. This requires an icon theme to be enabled as well."),
'default': true
},
'workbench.editor.enablePreview': {
'type': 'boolean',
'description': nls.localize('enablePreview', "Controls if opened editors show as preview. Preview editors are reused until they are kept (e.g. via double click or editing) and show up with an italic font style."),
'default': true
},
'workbench.editor.enablePreviewFromQuickOpen': {
'type': 'boolean',
'description': nls.localize('enablePreviewFromQuickOpen', "Controls if opened editors from Quick Open show as preview. Preview editors are reused until they are kept (e.g. via double click or editing)."),
'default': true
},
'workbench.editor.openPositioning': {
'type': 'string',
'enum': ['left', 'right', 'first', 'last'],
'default': 'right',
'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'editorOpenPositioning' }, "Controls where editors open. Select 'left' or 'right' to open editors to the left or right of the currently active one. Select 'first' or 'last' to open editors independently from the currently active one.")
},
'workbench.editor.revealIfOpen': {
'type': 'boolean',
'description': nls.localize('revealIfOpen', "Controls if an editor is revealed in any of the visible groups if opened. If disabled, an editor will prefer to open in the currently active editor group. If enabled, an already opened editor will be revealed instead of opened again in the currently active editor group. Note that there are some cases where this setting is ignored, e.g. when forcing an editor to open in a specific group or to the side of the currently active group."),
'default': false
},
'workbench.commandPalette.history': {
'type': 'number',
'description': nls.localize('commandHistory', "Controls the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history."),
'default': 50
},
'workbench.commandPalette.preserveInput': {
'type': 'boolean',
'description': nls.localize('preserveInput', "Controls if the last typed input to the command palette should be restored when opening it the next time."),
'default': false
},
'workbench.quickOpen.closeOnFocusLost': {
'type': 'boolean',
'description': nls.localize('closeOnFocusLost', "Controls if Quick Open should close automatically once it loses focus."),
'default': true
},
'workbench.settings.openDefaultSettings': {
'type': 'boolean',
'description': nls.localize('openDefaultSettings', "Controls if opening settings also opens an editor showing all default settings."),
'default': true
},
'workbench.sideBar.location': {
'type': 'string',
'enum': ['left', 'right'],
'default': 'left',
'description': nls.localize('sideBarLocation', "Controls the location of the sidebar. It can either show on the left or right of the workbench.")
},
'workbench.panel.defaultLocation': {
'type': 'string',
'enum': ['bottom', 'right'],
'default': 'bottom',
'description': nls.localize('panelDefaultLocation', "Controls the default location of the panel. It can either show at the bottom or on the right of the workbench.")
},
'workbench.statusBar.visible': {
'type': 'boolean',
'default': true,
'description': nls.localize('statusBarVisibility', "Controls the visibility of the status bar at the bottom of the workbench.")
},
'workbench.activityBar.visible': {
'type': 'boolean',
'default': true,
'description': nls.localize('activityBarVisibility', "Controls the visibility of the activity bar in the workbench.")
},
'workbench.editor.closeOnFileDelete': {
'type': 'boolean',
'description': nls.localize('closeOnFileDelete', "Controls if editors showing a file should close automatically when the file is deleted or renamed by some other process. Disabling this will keep the editor open as dirty on such an event. Note that deleting from within the application will always close the editor and that dirty files will never close to preserve your data."),
'default': true
}
};
if (product.quality !== 'stable') {
workbenchProperties['workbench.settings.enableNaturalLanguageSearch'] = {
'type': 'boolean',
'description': nls.localize('enableNaturalLanguageSettingsSearch', "Controls whether to enable the natural language search mode for settings."),
'default': true
};
}
if (isMacintosh) {
workbenchProperties['workbench.fontAliasing'] = {
'type': 'string',
'enum': ['default', 'antialiased', 'none'],
'default': 'default',
'description':
nls.localize('fontAliasing', "Controls font aliasing method in the workbench.\n- default: Sub-pixel font smoothing. On most non-retina displays this will give the sharpest text\n- antialiased: Smooth the font on the level of the pixel, as opposed to the subpixel. Can make the font appear lighter overall\n- none: Disables font smoothing. Text will show with jagged sharp edges"),
'enumDescriptions': [
nls.localize('workbench.fontAliasing.default', "Sub-pixel font smoothing. On most non-retina displays this will give the sharpest text."),
nls.localize('workbench.fontAliasing.antialiased', "Smooth the font on the level of the pixel, as opposed to the subpixel. Can make the font appear lighter overall."),
nls.localize('workbench.fontAliasing.none', "Disables font smoothing. Text will show with jagged sharp edges.")
],
};
workbenchProperties['workbench.editor.swipeToNavigate'] = {
'type': 'boolean',
'description': nls.localize('swipeToNavigate', "Navigate between open files using three-finger swipe horizontally."),
'default': false
};
}
=======
>>>>>>> |
<<<<<<<
import { ExtHostNotebookController } from 'vs/workbench/api/common/extHostNotebook';
=======
import { ExtHostTheming } from 'vs/workbench/api/common/extHostTheming';
import { IExtHostTunnelService } from 'vs/workbench/api/common/extHostTunnelService';
>>>>>>>
import { ExtHostNotebookController } from 'vs/workbench/api/common/extHostNotebook';
import { ExtHostTheming } from 'vs/workbench/api/common/extHostTheming';
import { IExtHostTunnelService } from 'vs/workbench/api/common/extHostTunnelService';
<<<<<<<
const extHostLabelService = rpcProtocol.set(ExtHostContext.ExtHosLabelService, new ExtHostLabelService(rpcProtocol));
const extHostNotebook = rpcProtocol.set(ExtHostContext.ExtHostNotebook, new ExtHostNotebookController(rpcProtocol));
=======
const extHostLabelService = rpcProtocol.set(ExtHostContext.ExtHostLabelService, new ExtHostLabelService(rpcProtocol));
const extHostTheming = rpcProtocol.set(ExtHostContext.ExtHostTheming, new ExtHostTheming(rpcProtocol));
>>>>>>>
const extHostLabelService = rpcProtocol.set(ExtHostContext.ExtHosLabelService, new ExtHostLabelService(rpcProtocol));
const extHostNotebook = rpcProtocol.set(ExtHostContext.ExtHostNotebook, new ExtHostNotebookController(rpcProtocol));
const extHostTheming = rpcProtocol.set(ExtHostContext.ExtHostTheming, new ExtHostTheming(rpcProtocol));
<<<<<<<
},
registerNotebookProvider: (viewType: string, provider: vscode.NotebookProvider) => {
return extHostNotebook.registerNotebookProvider(extension, viewType, provider);
=======
},
get activeColorTheme(): vscode.ColorTheme {
checkProposedApiEnabled(extension);
return extHostTheming.activeColorTheme;
},
onDidChangeActiveColorTheme(listener, thisArg?, disposables?) {
checkProposedApiEnabled(extension);
return extHostTheming.onDidChangeActiveColorTheme(listener, thisArg, disposables);
>>>>>>>
},
registerNotebookProvider: (viewType: string, provider: vscode.NotebookProvider) => {
return extHostNotebook.registerNotebookProvider(extension, viewType, provider);
},
get activeColorTheme(): vscode.ColorTheme {
checkProposedApiEnabled(extension);
return extHostTheming.activeColorTheme;
},
onDidChangeActiveColorTheme(listener, thisArg?, disposables?) {
checkProposedApiEnabled(extension);
return extHostTheming.onDidChangeActiveColorTheme(listener, thisArg, disposables); |
<<<<<<<
public resolve(refresh?: boolean): TPromise<IEditorModel> {
=======
public resolve(): TPromise<IEditorModel, any> {
>>>>>>>
public resolve(): TPromise<IEditorModel> { |
<<<<<<<
revive(configuration);
=======
perf.importEntries(configuration.perfEntries);
>>>>>>>
revive(configuration);
perf.importEntries(configuration.perfEntries); |
<<<<<<<
import { DisposableStore, Disposable, IDisposable } from 'vs/base/common/lifecycle';
import { IShellLaunchConfig, ITerminalProcessExtHostProxy, ISpawnExtHostProcessRequest, ITerminalDimensions, IAvailableShellsRequest, IDefaultShellAndArgsRequest, IStartExtensionTerminalRequest, ITerminalConfiguration, TERMINAL_CONFIG_SECTION, TitleEventSource } from 'vs/workbench/contrib/terminal/common/terminal';
import { ExtHostContext, ExtHostTerminalServiceShape, MainThreadTerminalServiceShape, MainContext, IExtHostContext, IShellLaunchConfigDto, TerminalLaunchConfig, ITerminalDimensionsDto, TerminalIdentifier } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { URI } from 'vs/base/common/uri';
=======
import { Disposable, DisposableStore, IDisposable } from 'vs/base/common/lifecycle';
>>>>>>>
import { DisposableStore, Disposable, IDisposable } from 'vs/base/common/lifecycle';
import { ExtHostContext, ExtHostTerminalServiceShape, MainThreadTerminalServiceShape, MainContext, IExtHostContext, TerminalLaunchConfig, ITerminalDimensionsDto, TerminalIdentifier } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { URI } from 'vs/base/common/uri'; |
<<<<<<<
import { IAction, IActionRunner } from 'vs/base/common/actions';
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
=======
import { IAction, IActionRunner, IActionItem } from 'vs/base/common/actions';
>>>>>>>
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { IAction, IActionRunner, IActionItem } from 'vs/base/common/actions';
<<<<<<<
import { attachListStyler } from "vs/platform/theme/common/styler";
import { IThemeService } from "vs/platform/theme/common/themeService";
=======
import { createActionItem } from 'vs/platform/actions/browser/menuItemActionItem';
>>>>>>>
import { attachListStyler } from "vs/platform/theme/common/styler";
import { IThemeService } from "vs/platform/theme/common/themeService";
import { createActionItem } from 'vs/platform/actions/browser/menuItemActionItem';
<<<<<<<
private providerDisposables = IDisposable[];
=======
private menus: TreeExplorerMenus;
>>>>>>>
private providerDisposables: IDisposable[];
private menus: TreeExplorerMenus; |
<<<<<<<
//#region Peng: Notebook
export interface CellStreamOutput {
output_type: 'stream';
text: string;
}
export interface CellErrorOutput {
output_type: 'error';
evalue: string;
traceback: string[];
}
export interface CellDisplayOutput {
output_type: 'display_data';
data: { [key: string]: any };
}
export type CellOutput = CellStreamOutput | CellErrorOutput | CellDisplayOutput;
export interface NotebookCell {
handle: number;
language: string;
cell_type: 'markdown' | 'code';
outputs: CellOutput[];
getContent(): string;
}
export interface NotebookDocument {
readonly uri: Uri;
readonly fileName: string;
readonly isDirty: boolean;
languages: string[];
cells: NotebookCell[];
}
export interface NotebookEditor {
readonly document: NotebookDocument;
viewColumn?: ViewColumn;
/**
* Create a notebook cell. The cell is not inserted into current document when created. Extensions should insert the cell into the document by [TextDocument.cells](#TextDocument.cells)
*/
createCell(content: string, language: string, type: 'markdown' | 'code', outputs: CellOutput[]): NotebookCell;
}
export interface NotebookProvider {
resolveNotebook(editor: NotebookEditor): Promise<void>;
executeCell(document: NotebookDocument, cell: NotebookCell | undefined): Promise<void>;
save(document: NotebookDocument): Promise<boolean>;
}
namespace window {
export function registerNotebookProvider(
notebookType: string,
provider: NotebookProvider
): Disposable;
export let activeNotebookDocument: NotebookDocument | undefined;
}
//#endregion
//#region Language specific settings: https://github.com/microsoft/vscode/issues/26707
=======
//#region color theme access
>>>>>>>
//#region Peng: Notebook
export interface CellStreamOutput {
output_type: 'stream';
text: string;
}
export interface CellErrorOutput {
output_type: 'error';
evalue: string;
traceback: string[];
}
export interface CellDisplayOutput {
output_type: 'display_data';
data: { [key: string]: any };
}
export type CellOutput = CellStreamOutput | CellErrorOutput | CellDisplayOutput;
export interface NotebookCell {
handle: number;
language: string;
cell_type: 'markdown' | 'code';
outputs: CellOutput[];
getContent(): string;
}
export interface NotebookDocument {
readonly uri: Uri;
readonly fileName: string;
readonly isDirty: boolean;
languages: string[];
cells: NotebookCell[];
}
export interface NotebookEditor {
readonly document: NotebookDocument;
viewColumn?: ViewColumn;
/**
* Create a notebook cell. The cell is not inserted into current document when created. Extensions should insert the cell into the document by [TextDocument.cells](#TextDocument.cells)
*/
createCell(content: string, language: string, type: 'markdown' | 'code', outputs: CellOutput[]): NotebookCell;
}
export interface NotebookProvider {
resolveNotebook(editor: NotebookEditor): Promise<void>;
executeCell(document: NotebookDocument, cell: NotebookCell | undefined): Promise<void>;
save(document: NotebookDocument): Promise<boolean>;
}
namespace window {
export function registerNotebookProvider(
notebookType: string,
provider: NotebookProvider
): Disposable;
export let activeNotebookDocument: NotebookDocument | undefined;
}
//#endregion
//#region Language specific settings: https://github.com/microsoft/vscode/issues/26707
//#region color theme access |
<<<<<<<
@debounce(1000)
=======
>>>>>>> |
<<<<<<<
public resolveKeybinding(kb: Keybinding): ResolvedKeybinding {
// TODO@keybindings
let r = this._keyboardMapper.resolveKeybinding(kb);
if (r.length !== 1) {
console.warn('oh noes => I cannot fulfill API!!!');
return null;
}
return r[0];
=======
public resolveKeybinding(kb: Keybinding): ResolvedKeybinding[] {
return [new FancyResolvedKeybinding(kb)];
>>>>>>>
public resolveKeybinding(kb: Keybinding): ResolvedKeybinding[] {
return this._keyboardMapper.resolveKeybinding(kb);
<<<<<<<
return this._keyboardMapper.resolveKeyboardEvent(keyboardEvent);
=======
let keybinding = new SimpleKeybinding(
keyboardEvent.ctrlKey,
keyboardEvent.shiftKey,
keyboardEvent.altKey,
keyboardEvent.metaKey,
keyboardEvent.keyCode
);
return this.resolveKeybinding(keybinding)[0];
>>>>>>>
return this._keyboardMapper.resolveKeyboardEvent(keyboardEvent); |
<<<<<<<
export interface TextEditor {
/**
* Inserts the given snippet template and enters snippet mode.
*
* If the editor is already in snippet mode, insertion fails and the returned promise resolves to false.
*
* @param template The snippet template to insert
* @param posOrRange The position or replacement range representing the location of the insertion.
* @return A promise that resolves with a value indicating if the snippet could be inserted.
*/
insertSnippet(template: string, posOrRange: Position | Range): Thenable<boolean>;
}
=======
export interface SCMResourceThemableDecorations {
readonly iconPath?: string | Uri;
}
export interface SCMResourceDecorations extends SCMResourceThemableDecorations {
readonly strikeThrough?: boolean;
readonly light?: SCMResourceThemableDecorations;
readonly dark?: SCMResourceThemableDecorations;
}
export interface SCMResource {
readonly uri: Uri;
readonly decorations?: SCMResourceDecorations;
}
export interface SCMResourceGroup {
readonly id: string;
readonly label: string;
readonly resources: SCMResource[];
}
export interface SCMProvider {
readonly label: string;
readonly resources: SCMResourceGroup[];
readonly onDidChange: Event<SCMResourceGroup[]>;
getOriginalResource?(uri: Uri, token: CancellationToken): ProviderResult<Uri>;
commit?(message: string, token: CancellationToken): ProviderResult<void>;
open?(resource: SCMResource, token: CancellationToken): ProviderResult<void>;
drag?(resource: SCMResource, resourceGroup: SCMResourceGroup, token: CancellationToken): ProviderResult<void>;
}
export namespace scm {
export const onDidChangeActiveProvider: Event<SCMProvider>;
export let activeProvider: SCMProvider | undefined;
export function getResourceFromURI(uri: Uri): SCMResource | SCMResourceGroup | undefined;
export function registerSCMProvider(id: string, provider: SCMProvider): Disposable;
}
>>>>>>>
export interface TextEditor {
/**
* Inserts the given snippet template and enters snippet mode.
*
* If the editor is already in snippet mode, insertion fails and the returned promise resolves to false.
*
* @param template The snippet template to insert
* @param posOrRange The position or replacement range representing the location of the insertion.
* @return A promise that resolves with a value indicating if the snippet could be inserted.
*/
insertSnippet(template: string, posOrRange: Position | Range): Thenable<boolean>;
}
export interface SCMResourceThemableDecorations {
readonly iconPath?: string | Uri;
}
export interface SCMResourceDecorations extends SCMResourceThemableDecorations {
readonly strikeThrough?: boolean;
readonly light?: SCMResourceThemableDecorations;
readonly dark?: SCMResourceThemableDecorations;
}
export interface SCMResource {
readonly uri: Uri;
readonly decorations?: SCMResourceDecorations;
}
export interface SCMResourceGroup {
readonly id: string;
readonly label: string;
readonly resources: SCMResource[];
}
export interface SCMProvider {
readonly label: string;
readonly resources: SCMResourceGroup[];
readonly onDidChange: Event<SCMResourceGroup[]>;
getOriginalResource?(uri: Uri, token: CancellationToken): ProviderResult<Uri>;
commit?(message: string, token: CancellationToken): ProviderResult<void>;
open?(resource: SCMResource, token: CancellationToken): ProviderResult<void>;
drag?(resource: SCMResource, resourceGroup: SCMResourceGroup, token: CancellationToken): ProviderResult<void>;
}
export namespace scm {
export const onDidChangeActiveProvider: Event<SCMProvider>;
export let activeProvider: SCMProvider | undefined;
export function getResourceFromURI(uri: Uri): SCMResource | SCMResourceGroup | undefined;
export function registerSCMProvider(id: string, provider: SCMProvider): Disposable;
} |
<<<<<<<
import { registerEditorAction, IActionOptions, EditorAction, ServicesAccessor } from 'vs/editor/browser/editorExtensions';
import { BlockCommentCommand } from './blockCommentCommand';
import { LineCommentCommand, Type } from './lineCommentCommand';
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
=======
import { BlockCommentCommand } from 'vs/editor/contrib/comment/blockCommentCommand';
import { LineCommentCommand, Type } from 'vs/editor/contrib/comment/lineCommentCommand';
import { MenuId } from 'vs/platform/actions/common/actions';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
>>>>>>>
import { BlockCommentCommand } from 'vs/editor/contrib/comment/blockCommentCommand';
import { LineCommentCommand, Type } from 'vs/editor/contrib/comment/lineCommentCommand';
import { MenuId } from 'vs/platform/actions/common/actions';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
<<<<<<<
for (var i = 0; i < selections.length; i++) {
commands.push(new LineCommentCommand(selections[i], opts.tabSize, this._type, accessor.get(IConfigurationService)));
=======
for (let i = 0; i < selections.length; i++) {
commands.push(new LineCommentCommand(selections[i], opts.tabSize, this._type));
>>>>>>>
for (let i = 0; i < selections.length; i++) {
commands.push(new LineCommentCommand(selections[i], opts.tabSize, this._type, accessor.get(IConfigurationService))); |
<<<<<<<
=======
// Restore any backups if they exist for this workspace (empty workspaces are not supported yet)
if (workspace) {
options.untitledFilesToRestore = this.backupService.getWorkspaceUntitledFileBackupsSync(workspace.resource).map(untitledFilePath => {
return { resource: Uri.file(untitledFilePath), options: { pinned: true } };
});
}
>>>>>>>
<<<<<<<
(options.filesToDiff && options.filesToDiff.length > 0) ||
(options.filesToRestore && options.filesToRestore.length > 0) ||
(options.untitledToRestore && options.untitledToRestore.length > 0);
=======
(options.filesToDiff && options.filesToDiff.length > 0);
>>>>>>>
(options.filesToDiff && options.filesToDiff.length > 0);
<<<<<<<
const filesToRestore = wbopt.filesToRestore || [];
const untitledToRestore = wbopt.untitledToRestore || [];
=======
>>>>>>>
<<<<<<<
// Files to restore
inputs.push(...untitledToRestore.map(resourceInput => this.untitledEditorService.createOrGet(null, null, resourceInput.resource)));
options.push(...untitledToRestore.map(r => null)); // fill empty options for files to create because we dont have options there
=======
>>>>>>> |
<<<<<<<
outputs: [{ mime: 'text/markdown', data: valueBytesFromString('_Hello_') }]
=======
outputs: [{ mime: Mimes.markdown, valueBytes: valueBytesFromString('_Hello_') }]
>>>>>>>
outputs: [{ mime: Mimes.markdown, data: valueBytesFromString('_Hello_') }]
<<<<<<<
outputs: [{ mime: 'text/markdown', data: valueBytesFromString('_Hello2_') }]
=======
outputs: [{ mime: Mimes.markdown, valueBytes: valueBytesFromString('_Hello2_') }]
>>>>>>>
outputs: [{ mime: Mimes.markdown, data: valueBytesFromString('_Hello2_') }]
<<<<<<<
outputs: [{ mime: 'text/plain', data: valueBytesFromString('Last, replaced output') }]
=======
outputs: [{ mime: Mimes.text, valueBytes: valueBytesFromString('Last, replaced output') }]
>>>>>>>
outputs: [{ mime: Mimes.text, data: valueBytesFromString('Last, replaced output') }]
<<<<<<<
outputs: [{ mime: 'text/markdown', data: valueBytesFromString('append 1') }]
=======
outputs: [{ mime: Mimes.markdown, valueBytes: valueBytesFromString('append 1') }]
>>>>>>>
outputs: [{ mime: Mimes.markdown, data: valueBytesFromString('append 1') }]
<<<<<<<
outputs: [{ mime: 'text/markdown', data: valueBytesFromString('append 2') }]
=======
outputs: [{ mime: Mimes.markdown, valueBytes: valueBytesFromString('append 2') }]
>>>>>>>
outputs: [{ mime: Mimes.markdown, data: valueBytesFromString('append 2') }]
<<<<<<<
outputs: [{ mime: 'text/plain', data: valueBytesFromString('cba') }, { mime: 'application/foo', data: valueBytesFromString('cba') }]
=======
outputs: [{ mime: Mimes.text, valueBytes: valueBytesFromString('cba') }, { mime: 'application/foo', valueBytes: valueBytesFromString('cba') }]
>>>>>>>
outputs: [{ mime: Mimes.text, data: valueBytesFromString('cba') }, { mime: 'application/foo', data: valueBytesFromString('cba') }]
<<<<<<<
outputs: [{ mime: 'text/plain', data: valueBytesFromString('cba') }, { mime: 'application/foo', data: valueBytesFromString('cba') }]
=======
outputs: [{ mime: Mimes.text, valueBytes: valueBytesFromString('cba') }, { mime: 'application/foo', valueBytes: valueBytesFromString('cba') }]
>>>>>>>
outputs: [{ mime: Mimes.text, data: valueBytesFromString('cba') }, { mime: 'application/foo', data: valueBytesFromString('cba') }]
<<<<<<<
outputs: [{ mime: 'text/plain', data: valueBytesFromString('cba') }, { mime: 'application/foo', data: valueBytesFromString('cba') }]
=======
outputs: [{ mime: Mimes.text, valueBytes: valueBytesFromString('cba') }, { mime: 'application/foo', valueBytes: valueBytesFromString('cba') }]
>>>>>>>
outputs: [{ mime: Mimes.text, data: valueBytesFromString('cba') }, { mime: 'application/foo', data: valueBytesFromString('cba') }]
<<<<<<<
outputs: [{ mime: 'text/plain', data: valueBytesFromString('cba') }, { mime: 'application/foo', data: valueBytesFromString('cba') }]
=======
outputs: [{ mime: Mimes.text, valueBytes: valueBytesFromString('cba') }, { mime: 'application/foo', valueBytes: valueBytesFromString('cba') }]
>>>>>>>
outputs: [{ mime: Mimes.text, data: valueBytesFromString('cba') }, { mime: 'application/foo', data: valueBytesFromString('cba') }] |
<<<<<<<
import { realpath } from 'vs/base/node/pfs';
import * as path from 'path';
import { spawn } from 'child_process';
=======
import { CancellationToken } from 'vs/base/common/cancellation';
>>>>>>>
import { CancellationToken } from 'vs/base/common/cancellation';
import { realpath } from 'vs/base/node/pfs';
import * as path from 'path';
import { spawn } from 'child_process';
<<<<<<<
this.setState(State.Idle);
});
}
}
private checkForSnapUpdate() {
// If the application was installed as a snap, updates happen in the
// background automatically, we just need to check to see if an update
// has already happened.
realpath(`/snap/${product.applicationName}/current`).then(resolvedCurrentSnapPath => {
const currentRevision = path.basename(resolvedCurrentSnapPath);
if (process.env.SNAP_REVISION !== currentRevision) {
this.setState(State.Ready(null));
} else {
this.setState(State.Idle);
}
});
=======
this.setState(State.Idle(UpdateType.Archive));
} else {
this.setState(State.AvailableForDownload(update));
}
})
.then(null, err => {
this.logService.error(err);
/* __GDPR__
"update:notAvailable" : {
"explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
}
*/
this.telemetryService.publicLog('update:notAvailable', { explicit: !!context });
this.setState(State.Idle(UpdateType.Archive, err.message || err));
});
>>>>>>>
this.setState(State.Idle(UpdateType.Archive));
} else {
this.setState(State.AvailableForDownload(update));
}
})
.then(null, err => {
this.logService.error(err);
/* __GDPR__
"update:notAvailable" : {
"explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
}
*/
this.telemetryService.publicLog('update:notAvailable', { explicit: !!context });
this.setState(State.Idle(UpdateType.Archive, err.message || err));
});
}
}
private checkForSnapUpdate(): void {
// If the application was installed as a snap, updates happen in the
// background automatically, we just need to check to see if an update
// has already happened.
realpath(`/snap/${product.applicationName}/current`).then(resolvedCurrentSnapPath => {
const currentRevision = path.basename(resolvedCurrentSnapPath);
if (process.env.SNAP_REVISION !== currentRevision) {
this.setState(State.Ready(null));
} else {
this.setState(State.Idle(UpdateType.Archive));
}
}); |
<<<<<<<
import { Codicon } from 'vs/base/common/codicons';
=======
import { CustomEditorsAssociations, customEditorsAssociationsSettingId, CustomEditorAssociation } from 'vs/workbench/services/editor/browser/editorAssociationsSetting';
>>>>>>>
import { Codicon } from 'vs/base/common/codicons';
import { CustomEditorsAssociations, customEditorsAssociationsSettingId, CustomEditorAssociation } from 'vs/workbench/services/editor/browser/editorAssociationsSetting'; |
<<<<<<<
private createSingleFolderWorkspace(singleFolderWorkspaceIdentifier: ISingleFolderWorkspaceIdentifier): TPromise<Workspace> {
const folderPath = URI.file(singleFolderWorkspaceIdentifier);
return stat(folderPath.fsPath)
.then(workspaceStat => {
let ctime: number;
if (isLinux) {
ctime = workspaceStat.ino; // Linux: birthtime is ctime, so we cannot use it! We use the ino instead!
} else if (isMacintosh) {
ctime = workspaceStat.birthtime.getTime(); // macOS: birthtime is fine to use as is
} else if (isWindows) {
if (typeof workspaceStat.birthtimeMs === 'number') {
ctime = Math.floor(workspaceStat.birthtimeMs); // Windows: fix precision issue in node.js 8.x to get 7.x results (see https://github.com/nodejs/node/issues/19897)
} else {
ctime = workspaceStat.birthtime.getTime();
}
}
const id = createHash('md5').update(folderPath.fsPath).update(ctime ? String(ctime) : '').digest('hex');
const folder = URI.file(folderPath.fsPath);
return new Workspace(id, getBaseLabel(folder), toWorkspaceFolders([{ path: folder.fsPath }]), null, ctime);
});
=======
private createSingleFolderWorkspace(folder: URI): TPromise<Workspace> {
if (folder.scheme === Schemas.file) {
return stat(folder.fsPath)
.then(workspaceStat => {
const ctime = isLinux ? workspaceStat.ino : workspaceStat.birthtime.getTime(); // On Linux, birthtime is ctime, so we cannot use it! We use the ino instead!
const id = createHash('md5').update(folder.fsPath).update(ctime ? String(ctime) : '').digest('hex');
return new Workspace(id, getBaseLabel(folder), toWorkspaceFolders([{ path: folder.fsPath }]), null, ctime);
});
} else {
const id = createHash('md5').update(folder.toString()).digest('hex');
return TPromise.as(new Workspace(id, getBaseLabel(folder), toWorkspaceFolders([{ uri: folder.toString() }]), null));
}
>>>>>>>
private createSingleFolderWorkspace(folder: URI): TPromise<Workspace> {
if (folder.scheme === Schemas.file) {
return stat(folder.fsPath)
.then(workspaceStat => {
let ctime: number;
if (isLinux) {
ctime = workspaceStat.ino; // Linux: birthtime is ctime, so we cannot use it! We use the ino instead!
} else if (isMacintosh) {
ctime = workspaceStat.birthtime.getTime(); // macOS: birthtime is fine to use as is
} else if (isWindows) {
if (typeof workspaceStat.birthtimeMs === 'number') {
ctime = Math.floor(workspaceStat.birthtimeMs); // Windows: fix precision issue in node.js 8.x to get 7.x results (see https://github.com/nodejs/node/issues/19897)
} else {
ctime = workspaceStat.birthtime.getTime();
}
}
const id = createHash('md5').update(folder.fsPath).update(ctime ? String(ctime) : '').digest('hex');
return new Workspace(id, getBaseLabel(folder), toWorkspaceFolders([{ path: folder.fsPath }]), null, ctime);
});
} else {
const id = createHash('md5').update(folder.toString()).digest('hex');
return TPromise.as(new Workspace(id, getBaseLabel(folder), toWorkspaceFolders([{ uri: folder.toString() }]), null));
} |
<<<<<<<
import { ModelLine, ILineEdit, LineMarker, MarkersTracker } from 'vs/editor/common/model/modelLine';
import { MetadataConsts, LanguageIdentifier } from 'vs/editor/common/modes';
import { Position } from 'vs/editor/common/core/position';
import { Range } from 'vs/editor/common/core/range';
=======
import { ModelLine, ILineEdit, computeIndentLevel } from 'vs/editor/common/model/modelLine';
import { MetadataConsts } from 'vs/editor/common/modes';
>>>>>>>
import { ModelLine, ILineEdit, computeIndentLevel } from 'vs/editor/common/model/modelLine';
import { MetadataConsts, LanguageIdentifier } from 'vs/editor/common/modes';
import { Range } from 'vs/editor/common/core/range';
<<<<<<<
let tmp = TestToken.toTokens(_expected);
LineTokens.convertToEndOffset(tmp, _actual.getLineLength());
let expected = ViewLineTokenFactory.inflateArr(tmp);
=======
let expected = ViewLineTokenFactory.inflateArr(TestToken.toTokens(_expected), _actual.getLineContent().length);
>>>>>>>
let tmp = TestToken.toTokens(_expected);
LineTokens.convertToEndOffset(tmp, _actual.getLineContent().length);
let expected = ViewLineTokenFactory.inflateArr(tmp);
<<<<<<<
testApplyEdits(
[{
text: initialText,
tokens: initialTokens
}],
[{
range: new Range(1, splitColumn, 1, splitColumn),
text: '\n'
}],
[{
text: expectedText1,
tokens: expectedTokens
}, {
text: expectedText2,
tokens: [new TestToken(0, 1)]
}]
);
=======
let line = new ModelLine(initialText);
line.setTokens(0, TestToken.toTokens(initialTokens));
let other = line.split(splitColumn);
assert.equal(line.text, expectedText1);
assert.equal(other.text, expectedText2);
assertLineTokens(line.getTokens(0), expectedTokens);
>>>>>>>
testApplyEdits(
[{
text: initialText,
tokens: initialTokens
}],
[{
range: new Range(1, splitColumn, 1, splitColumn),
text: '\n'
}],
[{
text: expectedText1,
tokens: expectedTokens
}, {
text: expectedText2,
tokens: [new TestToken(0, 1)]
}]
);
<<<<<<<
testApplyEdits(
[{
text: aText,
tokens: aTokens
}, {
text: bText,
tokens: bTokens
}],
[{
range: new Range(1, aText.length + 1, 2, 1),
text: ''
}],
[{
text: expectedText,
tokens: expectedTokens
}]
);
=======
let a = new ModelLine(aText);
a.setTokens(0, TestToken.toTokens(aTokens));
let b = new ModelLine(bText);
b.setTokens(0, TestToken.toTokens(bTokens));
a.append(b);
assert.equal(a.text, expectedText);
assertLineTokens(a.getTokens(0), expectedTokens);
>>>>>>>
testApplyEdits(
[{
text: aText,
tokens: aTokens
}, {
text: bText,
tokens: bTokens
}],
[{
range: new Range(1, aText.length + 1, 2, 1),
text: ''
}],
[{
text: expectedText,
tokens: expectedTokens
}]
); |
<<<<<<<
import { MetadataGenerator, Type, EnumerateType, ReferenceType, ArrayType, Property } from './metadataGenerator';
import { getDecoratorName } from './../utils/decoratorUtils';
=======
import { MetadataGenerator, Type, ReferenceType, Property } from './metadataGenerator';
import * as _ from 'lodash';
>>>>>>>
import { MetadataGenerator, Type, EnumerateType, ReferenceType, ArrayType, Property } from './metadataGenerator';
import { getDecoratorName } from './../utils/decoratorUtils';
import * as _ from 'lodash';
<<<<<<<
const enumType = getEnumerateType(typeNode);
if (enumType) {
return enumType;
}
const literalType = getLiteralType(typeNode);
if (literalType) {
return literalType;
}
const referenceType = getReferenceType(typeReference.typeName as ts.EntityName);
=======
let referenceType: ReferenceType;
if (typeReference.typeArguments && typeReference.typeArguments.length === 1) {
let typeT: ts.TypeNode[] = typeReference.typeArguments as ts.TypeNode[];
referenceType = generateReferenceType(typeReference.typeName, typeT);
} else {
referenceType = generateReferenceType(typeReference.typeName);
}
>>>>>>>
const enumType = getEnumerateType(typeNode);
if (enumType) {
return enumType;
}
const literalType = getLiteralType(typeNode);
if (literalType) {
return literalType;
}
let referenceType: ReferenceType;
if (typeReference.typeArguments && typeReference.typeArguments.length === 1) {
const typeT: ts.TypeNode[] = typeReference.typeArguments as ts.TypeNode[];
referenceType = getReferenceType(typeReference.typeName as ts.EntityName, typeT);
} else {
referenceType = getReferenceType(typeReference.typeName as ts.EntityName);
}
<<<<<<<
function getPrimitiveType(typeNode: ts.TypeNode): Type | undefined {
const primitiveType = syntaxKindMap[typeNode.kind];
if (!primitiveType) { return; }
if (primitiveType === 'number') {
const parentNode = typeNode.parent as ts.Node;
if (!parentNode) {
return { typeName: 'double' };
}
const decoratorName = getDecoratorName(parentNode, identifier => {
return ['IsInt', 'IsLong', 'IsFloat', 'isDouble'].some(m => m === identifier.text);
});
switch (decoratorName) {
case 'IsInt':
return { typeName: 'integer' };
case 'IsLong':
return { typeName: 'long' };
case 'IsFloat':
return { typeName: 'float' };
case 'IsDouble':
return { typeName: 'double' };
default:
return { typeName: 'double' };
}
}
return { typeName: primitiveType };
}
function getDateType(typeNode: ts.TypeNode): Type {
const parentNode = typeNode.parent as ts.Node;
if (!parentNode) {
return { typeName: 'datetime' };
}
const decoratorName = getDecoratorName(parentNode, identifier => {
return ['IsDate', 'IsDateTime'].some(m => m === identifier.text);
});
switch (decoratorName) {
case 'IsDate':
return { typeName: 'date' };
case 'IsDateTime':
return { typeName: 'datetime' };
default:
return { typeName: 'datetime' };
}
}
function getEnumerateType(typeNode: ts.TypeNode): EnumerateType | undefined {
const enumName = (typeNode as any).typeName.text;
const enumTypes = MetadataGenerator.current.nodes
.filter(node => node.kind === ts.SyntaxKind.EnumDeclaration)
.filter(node => (node as any).name.text === enumName);
if (!enumTypes.length) { return; }
if (enumTypes.length > 1) { throw new Error(`Multiple matching enum found for enum ${enumName}; please make enum names unique.`); }
const enumDeclaration = enumTypes[0] as ts.EnumDeclaration;
function getEnumValue(member: any) {
const initializer = member.initializer;
if (initializer) {
if (initializer.expression) {
return initializer.expression.text;
}
return initializer.text;
}
return;
}
return <EnumerateType>{
enumMembers: enumDeclaration.members.map((member: any, index) => {
return getEnumValue(member) || index;
}),
typeName: 'enum',
};
}
function getLiteralType(typeNode: ts.TypeNode): EnumerateType | undefined {
const literalName = (typeNode as any).typeName.text;
const literalTypes = MetadataGenerator.current.nodes
.filter(node => node.kind === ts.SyntaxKind.TypeAliasDeclaration)
.filter(node => {
const innerType = (node as any).type;
return innerType.kind === ts.SyntaxKind.UnionType && (innerType as any).types;
})
.filter(node => (node as any).name.text === literalName);
if (!literalTypes.length) { return; }
if (literalTypes.length > 1) { throw new Error(`Multiple matching enum found for enum ${literalName}; please make enum names unique.`); }
const unionTypes = (literalTypes[0] as any).type.types;
return <EnumerateType>{
enumMembers: unionTypes.map((unionNode: any) => unionNode.literal.text as string),
typeName: 'enum',
};
}
function getReferenceType(type: ts.EntityName): ReferenceType {
=======
function generateReferenceType(type: ts.EntityName, genericTypes?: ts.TypeNode[]): ReferenceType {
>>>>>>>
function getPrimitiveType(typeNode: ts.TypeNode): Type | undefined {
const primitiveType = syntaxKindMap[typeNode.kind];
if (!primitiveType) { return; }
if (primitiveType === 'number') {
const parentNode = typeNode.parent as ts.Node;
if (!parentNode) {
return { typeName: 'double' };
}
const decoratorName = getDecoratorName(parentNode, identifier => {
return ['IsInt', 'IsLong', 'IsFloat', 'isDouble'].some(m => m === identifier.text);
});
switch (decoratorName) {
case 'IsInt':
return { typeName: 'integer' };
case 'IsLong':
return { typeName: 'long' };
case 'IsFloat':
return { typeName: 'float' };
case 'IsDouble':
return { typeName: 'double' };
default:
return { typeName: 'double' };
}
}
return { typeName: primitiveType };
}
function getDateType(typeNode: ts.TypeNode): Type {
const parentNode = typeNode.parent as ts.Node;
if (!parentNode) {
return { typeName: 'datetime' };
}
const decoratorName = getDecoratorName(parentNode, identifier => {
return ['IsDate', 'IsDateTime'].some(m => m === identifier.text);
});
switch (decoratorName) {
case 'IsDate':
return { typeName: 'date' };
case 'IsDateTime':
return { typeName: 'datetime' };
default:
return { typeName: 'datetime' };
}
}
function getEnumerateType(typeNode: ts.TypeNode): EnumerateType | undefined {
const enumName = (typeNode as any).typeName.text;
const enumTypes = MetadataGenerator.current.nodes
.filter(node => node.kind === ts.SyntaxKind.EnumDeclaration)
.filter(node => (node as any).name.text === enumName);
if (!enumTypes.length) { return; }
if (enumTypes.length > 1) { throw new Error(`Multiple matching enum found for enum ${enumName}; please make enum names unique.`); }
const enumDeclaration = enumTypes[0] as ts.EnumDeclaration;
function getEnumValue(member: any) {
const initializer = member.initializer;
if (initializer) {
if (initializer.expression) {
return initializer.expression.text;
}
return initializer.text;
}
return;
}
return <EnumerateType>{
enumMembers: enumDeclaration.members.map((member: any, index) => {
return getEnumValue(member) || index;
}),
typeName: 'enum',
};
}
function getLiteralType(typeNode: ts.TypeNode): EnumerateType | undefined {
const literalName = (typeNode as any).typeName.text;
const literalTypes = MetadataGenerator.current.nodes
.filter(node => node.kind === ts.SyntaxKind.TypeAliasDeclaration)
.filter(node => {
const innerType = (node as any).type;
return innerType.kind === ts.SyntaxKind.UnionType && (innerType as any).types;
})
.filter(node => (node as any).name.text === literalName);
if (!literalTypes.length) { return; }
if (literalTypes.length > 1) { throw new Error(`Multiple matching enum found for enum ${literalName}; please make enum names unique.`); }
const unionTypes = (literalTypes[0] as any).type.types;
return <EnumerateType>{
enumMembers: unionTypes.map((unionNode: any) => unionNode.literal.text as string),
typeName: 'enum',
};
}
function getReferenceType(type: ts.EntityName, genericTypes?: ts.TypeNode[]): ReferenceType {
<<<<<<<
properties: properties,
typeName: typeName
=======
name: typeNameWithGenerics,
properties: properties
>>>>>>>
properties: properties,
typeName: typeNameWithGenerics,
<<<<<<<
function createCircularDependencyResolver(typeName: string): ReferenceType {
=======
function getTypeName(typeName: string, genericTypes?: ts.TypeNode[]): string {
if (!genericTypes || !genericTypes.length) {
return typeName;
}
let names = genericTypes.map((t) => {
return getAnyTypeName(t);
});
return typeName + names.join('');
}
function getAnyTypeName(typeNode: ts.TypeNode): string {
const primitiveType = syntaxKindMap[typeNode.kind];
if (primitiveType) {
return primitiveType;
}
if (typeNode.kind === ts.SyntaxKind.ArrayType) {
const arrayType = typeNode as ts.ArrayTypeNode;
return getAnyTypeName(arrayType.elementType) + '[]';
}
if (typeNode.kind === ts.SyntaxKind.UnionType) {
return 'object';
}
if (typeNode.kind !== ts.SyntaxKind.TypeReference) {
throw new Error(`Unknown type: ${ts.SyntaxKind[typeNode.kind]}`);
}
const typeReference = typeNode as ts.TypeReferenceNode;
try {
return (typeReference.typeName as ts.Identifier).text;
} catch (e) {
// idk what would hit this? probably needs more testing
console.error(e);
return typeNode.toString();
}
}
function createCircularDependencyResolver(typeName: string) {
>>>>>>>
function getTypeName(typeName: string, genericTypes?: ts.TypeNode[]): string {
if (!genericTypes || !genericTypes.length) { return typeName; }
return typeName + genericTypes.map(t => getAnyTypeName(t)).join('');
}
function getAnyTypeName(typeNode: ts.TypeNode): string {
const primitiveType = syntaxKindMap[typeNode.kind];
if (primitiveType) {
return primitiveType;
}
if (typeNode.kind === ts.SyntaxKind.ArrayType) {
const arrayType = typeNode as ts.ArrayTypeNode;
return getAnyTypeName(arrayType.elementType) + '[]';
}
if (typeNode.kind === ts.SyntaxKind.UnionType) {
return 'object';
}
if (typeNode.kind !== ts.SyntaxKind.TypeReference) {
throw new Error(`Unknown type: ${ts.SyntaxKind[typeNode.kind]}`);
}
const typeReference = typeNode as ts.TypeReferenceNode;
try {
return (typeReference.typeName as ts.Identifier).text;
} catch (e) {
// idk what would hit this? probably needs more testing
console.error(e);
return typeNode.toString();
}
}
function createCircularDependencyResolver(typeName: string) { |
<<<<<<<
import { parseTree, findNodeAtLocation } from 'vs/base/common/json';
import { toResource, SideBySideEditorInput, EditorInput } from 'vs/workbench/common/editor';
=======
import { SideBySideEditorInput, EditorInput } from 'vs/workbench/common/editor';
import { StringEditorInput } from 'vs/workbench/common/editor/stringEditorInput';
>>>>>>>
import { SideBySideEditorInput, EditorInput } from 'vs/workbench/common/editor';
<<<<<<<
return this.openTwoEditors(PreferencesService.DEFAULT_KEY_BINDINGS_URI, URI.file(this.environmentService.appKeybindingsPath), emptyContents).then(() => null);
=======
return this.createDefaultPreferencesEditorModel(this.defaultKeybindingsResource)
.then(editorModel => {
const defaultKeybindingsInput = this.instantiationService.createInstance(StringEditorInput, nls.localize('keybindingsEditorName', "Default Keyboard Shortcuts"), '', editorModel.content, 'json', true);
this.openTwoEditors(defaultKeybindingsInput, URI.file(this.environmentService.appKeybindingsPath), emptyContents);
});
>>>>>>>
return this.openTwoEditors(this.defaultKeybindingsResource, URI.file(this.environmentService.appKeybindingsPath), emptyContents).then(() => null);
<<<<<<<
private getConfigurationTargetForCurrentActiveEditor(): ConfigurationTarget {
const activeEditor = this.editorService.getActiveEditor();
if (activeEditor) {
const file = toResource(activeEditor.input, { supportSideBySide: true, filter: 'file' });
if (file) {
return this.getConfigurationTarget(file);
}
}
return null;
}
private getConfigurationTarget(resource: URI): ConfigurationTarget {
if (this.getEditableSettingsURI(ConfigurationTarget.USER).fsPath === resource.fsPath) {
return ConfigurationTarget.USER;
}
const workspaceSettingsUri = this.getEditableSettingsURI(ConfigurationTarget.WORKSPACE);
if (workspaceSettingsUri && workspaceSettingsUri.fsPath === resource.fsPath) {
return ConfigurationTarget.WORKSPACE;
}
return null;
}
private getSelectionRange(setting: string, model: editorCommon.IModel): editorCommon.IRange {
const tree = parseTree(model.getValue());
const node = findNodeAtLocation(tree, [setting]);
const position = model.getPositionAt(node.offset);
return {
startLineNumber: position.lineNumber,
startColumn: position.column,
endLineNumber: position.lineNumber,
endColumn: position.column + node.length
};
}
=======
>>>>>>> |
<<<<<<<
=======
// TODO: Remove when workspace trust is enabled
getSafeConfigValue(key: string, os: OperatingSystem, useDefaultValue: boolean = true): unknown | undefined {
return this.getSafeConfigValueFullKey(`terminal.integrated.${key}.${this._getOsKey(os)}`, useDefaultValue);
}
getSafeConfigValueFullKey(key: string, useDefaultValue: boolean = true): unknown | undefined {
const isWorkspaceConfigAllowed = this._configurationService.getValue(TerminalSettingId.AllowWorkspaceConfiguration);
const config = this._configurationService.inspect(key);
let value: unknown | undefined;
if (isWorkspaceConfigAllowed) {
value = config.user?.value || config.workspace?.value;
} else {
value = config.user?.value;
}
if (value === undefined && useDefaultValue) {
value = config.default?.value;
}
// Clone if needed to allow extensibility
if (Array.isArray(value)) {
return value.slice();
}
if (value !== null && typeof value === 'object') {
return { ...value };
}
return value;
}
async createProfileFromShellAndShellArgs(shell?: unknown, shellArgs?: unknown): Promise<ITerminalProfile | undefined> {
const detectedProfile = this._terminalService.availableProfiles?.find(p => p.path === shell);
const fallbackProfile = (await this.getDefaultProfile({
remoteAuthority: this._remoteAgentService.getConnection()?.remoteAuthority,
os: this._primaryBackendOs!
}));
const profile = detectedProfile || fallbackProfile;
const args = this._isValidShellArgs(shellArgs, this._primaryBackendOs!) ? shellArgs : profile.args;
const createdProfile = {
profileName: profile.profileName,
path: profile.path,
args,
isDefault: true
};
if (detectedProfile && detectedProfile.profileName === createdProfile.profileName && detectedProfile.path === createdProfile.path && this._argsMatch(detectedProfile.args, createdProfile.args)) {
return undefined;
}
return createdProfile;
}
private _argsMatch(args1: string | string[] | undefined, args2: string | string[] | undefined): boolean {
if (!args1 && !args2) {
return true;
} else if (typeof args1 === 'string' && typeof args2 === 'string') {
return args1 === args2;
} else if (Array.isArray(args1) && Array.isArray(args2)) {
if (args1.length !== args2.length) {
return false;
}
for (let i = 0; i < args1.length; i++) {
if (args1[i] !== args2[i]) {
return false;
}
}
return true;
}
return false;
}
>>>>>>>
async createProfileFromShellAndShellArgs(shell?: unknown, shellArgs?: unknown): Promise<ITerminalProfile | undefined> {
const detectedProfile = this._terminalService.availableProfiles?.find(p => p.path === shell);
const fallbackProfile = (await this.getDefaultProfile({
remoteAuthority: this._remoteAgentService.getConnection()?.remoteAuthority,
os: this._primaryBackendOs!
}));
const profile = detectedProfile || fallbackProfile;
const args = this._isValidShellArgs(shellArgs, this._primaryBackendOs!) ? shellArgs : profile.args;
const createdProfile = {
profileName: profile.profileName,
path: profile.path,
args,
isDefault: true
};
if (detectedProfile && detectedProfile.profileName === createdProfile.profileName && detectedProfile.path === createdProfile.path && this._argsMatch(detectedProfile.args, createdProfile.args)) {
return undefined;
}
return createdProfile;
}
private _argsMatch(args1: string | string[] | undefined, args2: string | string[] | undefined): boolean {
if (!args1 && !args2) {
return true;
} else if (typeof args1 === 'string' && typeof args2 === 'string') {
return args1 === args2;
} else if (Array.isArray(args1) && Array.isArray(args2)) {
if (args1.length !== args2.length) {
return false;
}
for (let i = 0; i < args1.length; i++) {
if (args1[i] !== args2[i]) {
return false;
}
}
return true;
}
return false;
} |
<<<<<<<
* Optional id for the tree item that has to be unique across tree. The id is used to preserve the selection and expansion state of the tree item.
*
* If not provided, an id is generated using the tree item's label. **Note** that when labels change, ids will change and that selection and expansion state cannot be kept stable anymore.
*/
id?: string;
/**
* The icon path for the tree item
=======
* The icon path for the tree item. When `falsy`, it is derived from [resourceUri](#TreeItem.resourceUri).
>>>>>>>
* Optional id for the tree item that has to be unique across tree. The id is used to preserve the selection and expansion state of the tree item.
*
* If not provided, an id is generated using the tree item's label. **Note** that when labels change, ids will change and that selection and expansion state cannot be kept stable anymore.
*/
id?: string;
/**
* The icon path for the tree item. When `falsy`, it is derived from [resourceUri](#TreeItem.resourceUri). |
<<<<<<<
.registerChannel(ExtensionsLabel);
Registry.as<IEditorRegistry>(EditorExtensions.Editors)
.registerEditorInputFactory(ExtensionsInput.ID, ExtensionsInputFactory);
const editorDescriptor = new EditorDescriptor(
ExtensionsPart.ID,
localize('extensions', "Extensions"),
'vs/workbench/parts/extensions/electron-browser/extensionsPart',
'ExtensionsPart'
);
Registry.as<IEditorRegistry>(EditorExtensions.Editors)
.registerEditor(editorDescriptor, [new SyncDescriptor(ExtensionsInput)]);
Registry.as<IActionBarRegistry>(ActionBarExtensions.Actionbar)
.registerActionBarContributor(ActionBarScope.GLOBAL, GlobalExtensionsActionContributor);
=======
.registerChannel(ExtensionsChannelId, ExtensionsLabel);
>>>>>>>
.registerChannel(ExtensionsChannelId, ExtensionsLabel);
Registry.as<IEditorRegistry>(EditorExtensions.Editors)
.registerEditorInputFactory(ExtensionsInput.ID, ExtensionsInputFactory);
const editorDescriptor = new EditorDescriptor(
ExtensionsPart.ID,
localize('extensions', "Extensions"),
'vs/workbench/parts/extensions/electron-browser/extensionsPart',
'ExtensionsPart'
);
Registry.as<IEditorRegistry>(EditorExtensions.Editors)
.registerEditor(editorDescriptor, [new SyncDescriptor(ExtensionsInput)]);
Registry.as<IActionBarRegistry>(ActionBarExtensions.Actionbar)
.registerActionBarContributor(ActionBarScope.GLOBAL, GlobalExtensionsActionContributor); |
<<<<<<<
let schema: IJSONSchema =
{
id: schemaId,
description: 'Locale Definition file',
type: 'object',
default: {
'locale': 'en'
},
required: ['locale'],
properties: {
locale: {
type: 'string',
enum: ['de', 'en', 'en-US', 'es', 'fr', 'it', 'ja', 'ko', 'ru', 'zh-CN', 'zh-tw'],
description: nls.localize('JsonSchema.locale', 'The UI Language to use.')
}
=======
let schema : IJSONSchema =
{
id: schemaId,
description: 'Locale Definition file',
type: 'object',
default: {
'locale': 'en'
},
required: ['locale'],
properties: {
locale: {
type: 'string',
enum: ['de', 'en', 'en-US', 'es', 'fr', 'it', 'ja', 'ko', 'ru', 'zh-CN', 'zh-TW'],
description: nls.localize('JsonSchema.locale', 'The UI Language to use.')
>>>>>>>
let schema: IJSONSchema =
{
id: schemaId,
description: 'Locale Definition file',
type: 'object',
default: {
'locale': 'en'
},
required: ['locale'],
properties: {
locale: {
type: 'string',
enum: ['de', 'en', 'en-US', 'es', 'fr', 'it', 'ja', 'ko', 'ru', 'zh-CN', 'zh-TW'],
description: nls.localize('JsonSchema.locale', 'The UI Language to use.')
} |
<<<<<<<
getViewIndex2(modelIndex: number): number | undefined;
getModelIndex(cell: CellViewModel): number | undefined;
getModelIndex2(viewIndex: number): number | undefined;
=======
getVisibleRangesPlusViewportAboveBelow(): ICellRange[];
>>>>>>>
getViewIndex2(modelIndex: number): number | undefined;
getModelIndex(cell: CellViewModel): number | undefined;
getModelIndex2(viewIndex: number): number | undefined;
getVisibleRangesPlusViewportAboveBelow(): ICellRange[]; |
<<<<<<<
let createTestKeybindingService: (items: ResolvedKeybindingItem[], contextValue?: any) => TestKeybindingService = null;
let currentContextValue: any = null;
=======
let createTestKeybindingService: (items: NormalizedKeybindingItem[], contextValue?: any) => TestKeybindingService = null;
let currentContextValue: IContext = null;
>>>>>>>
let createTestKeybindingService: (items: ResolvedKeybindingItem[], contextValue?: any) => TestKeybindingService = null;
let currentContextValue: IContext = null;
<<<<<<<
currentContextValue = {};
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_X);
=======
currentContextValue = createContext({});
shouldPreventDefault = kbService.dispatch(new SimpleKeybinding(KeyMod.CtrlCmd | KeyCode.KEY_X));
>>>>>>>
currentContextValue = createContext({});
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_X);
<<<<<<<
currentContextValue = {};
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
=======
currentContextValue = createContext({});
let shouldPreventDefault = kbService.dispatch(new SimpleKeybinding(KeyMod.CtrlCmd | KeyCode.KEY_K));
>>>>>>>
currentContextValue = createContext({});
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
<<<<<<<
};
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
=======
});
shouldPreventDefault = kbService.dispatch(new SimpleKeybinding(KeyMod.CtrlCmd | KeyCode.KEY_K));
>>>>>>>
});
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
<<<<<<<
};
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_X);
=======
});
shouldPreventDefault = kbService.dispatch(new SimpleKeybinding(KeyMod.CtrlCmd | KeyCode.KEY_X));
>>>>>>>
});
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_X);
<<<<<<<
currentContextValue = {};
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
=======
currentContextValue = createContext({});
let shouldPreventDefault = kbService.dispatch(new SimpleKeybinding(KeyMod.CtrlCmd | KeyCode.KEY_K));
>>>>>>>
currentContextValue = createContext({});
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K); |
<<<<<<<
private getConflictsOrEmpty(document: vscode.TextDocument): interfaces.IDocumentMergeConflict[] {
=======
private getConflictsOrEmpty(document: vscode.TextDocument, origins: string[]): interfaces.IDocumentMergeConflict[] {
let stepStart = process.hrtime();
>>>>>>>
private getConflictsOrEmpty(document: vscode.TextDocument, origins: string[]): interfaces.IDocumentMergeConflict[] {
<<<<<<<
=======
let stepEnd = process.hrtime(stepStart);
console.info('[%s] %s -> Check document execution time: %dms', origins.join(', '), document.uri.toString(), stepEnd[1] / 1000000);
>>>>>>>
<<<<<<<
=======
stepEnd = process.hrtime(stepStart);
console.info('[%s] %s -> Find conflict regions execution time: %dms', origins.join(', '), document.uri.toString(), stepEnd[1] / 1000000);
>>>>>>> |
<<<<<<<
import { WorkbenchTree } from 'vs/platform/list/browser/listService';
import { OpenMode } from 'vs/base/parts/tree/browser/treeDefaults';
=======
import { WorkbenchTree, IListService } from 'vs/platform/list/browser/listService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
>>>>>>>
import { WorkbenchTree } from 'vs/platform/list/browser/listService';
import { OpenMode } from 'vs/base/parts/tree/browser/treeDefaults';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
<<<<<<<
@IInstantiationService private instantiationService: IInstantiationService
=======
@IInstantiationService private instantiationService: IInstantiationService,
@IListService private listService: IListService,
@IContextKeyService private contextKeyService: IContextKeyService,
@IThemeService private themeService: IThemeService,
@IConfigurationService protected readonly configurationService: IConfigurationService,
>>>>>>>
@IInstantiationService private instantiationService: IInstantiationService,
@IConfigurationService configurationService: IConfigurationService |
<<<<<<<
=======
private static readonly REPL_INPUT_LINE_HEIGHT = 19;
private static readonly URI = uri.parse(`${DEBUG_SCHEME}:replinput`);
>>>>>>>
private static readonly URI = uri.parse(`${DEBUG_SCHEME}:replinput`); |
<<<<<<<
export function is(value: ShellExecutionDTO | ProcessExecutionDTO | CustomExecutionDTO): value is ProcessExecutionDTO {
let candidate = value as ProcessExecutionDTO;
=======
export function is(value: ShellExecutionDTO | ProcessExecutionDTO): value is ProcessExecutionDTO {
const candidate = value as ProcessExecutionDTO;
>>>>>>>
export function is(value: ShellExecutionDTO | ProcessExecutionDTO | CustomExecutionDTO): value is ProcessExecutionDTO {
const candidate = value as ProcessExecutionDTO;
<<<<<<<
export function is(value: ShellExecutionDTO | ProcessExecutionDTO | CustomExecutionDTO): value is ShellExecutionDTO {
let candidate = value as ShellExecutionDTO;
=======
export function is(value: ShellExecutionDTO | ProcessExecutionDTO): value is ShellExecutionDTO {
const candidate = value as ShellExecutionDTO;
>>>>>>>
export function is(value: ShellExecutionDTO | ProcessExecutionDTO | CustomExecutionDTO): value is ShellExecutionDTO {
const candidate = value as ShellExecutionDTO;
<<<<<<<
let definition: TaskDefinitionDTO = TaskDefinitionDTO.from(value.definition);
=======
const definition: TaskDefinitionDTO = TaskDefinitionDTO.from(value.definition);
>>>>>>>
const definition: TaskDefinitionDTO = TaskDefinitionDTO.from(value.definition);
<<<<<<<
// For custom execution tasks, we need to store the execution objects locally
// since we obviously cannot send callback functions through the proxy.
// So, clear out any existing ones.
this._providedCustomExecutions.clear();
// Set up a list of task ID promises that we can wait on
// before returning the provided tasks. The ensures that
// our task IDs are calculated for any custom execution tasks.
// Knowing this ID ahead of time is needed because when a task
// start event is fired this is when the custom execution is called.
// The task start event is also the first time we see the ID from the main
// thread, which is too late for us because we need to save an map
// from an ID to the custom execution function. (Kind of a cart before the horse problem).
let taskIdPromises: Promise<void>[] = [];
let fetchPromise = asPromise(() => handler.provider.provideTasks(CancellationToken.None)).then(value => {
const taskDTOs: TaskDTO[] = [];
=======
return asPromise(() => handler.provider.provideTasks(CancellationToken.None)).then(value => {
const sanitized: vscode.Task[] = [];
>>>>>>>
// For custom execution tasks, we need to store the execution objects locally
// since we obviously cannot send callback functions through the proxy.
// So, clear out any existing ones.
this._providedCustomExecutions.clear();
// Set up a list of task ID promises that we can wait on
// before returning the provided tasks. The ensures that
// our task IDs are calculated for any custom execution tasks.
// Knowing this ID ahead of time is needed because when a task
// start event is fired this is when the custom execution is called.
// The task start event is also the first time we see the ID from the main
// thread, which is too late for us because we need to save an map
// from an ID to the custom execution function. (Kind of a cart before the horse problem).
const taskIdPromises: Promise<void>[] = [];
const fetchPromise = asPromise(() => handler.provider.provideTasks(CancellationToken.None)).then(value => {
const taskDTOs: TaskDTO[] = []; |
<<<<<<<
['x', 'javascript', CellKind.Code, [{ outputId: 'someId', outputs: [{ mime: 'text/plain', data: new Uint8Array([3]) }] }], { custom: { metadata: { collapsed: false } }, executionOrder: 1 }],
=======
['x', 'javascript', CellKind.Code, [{ outputId: 'someId', outputs: [{ mime: Mimes.text, valueBytes: [3] }] }], { custom: { metadata: { collapsed: false } }, executionOrder: 1 }],
>>>>>>>
['x', 'javascript', CellKind.Code, [{ outputId: 'someId', outputs: [{ mime: Mimes.text, data: new Uint8Array([3]) }] }], { custom: { metadata: { collapsed: false } }, executionOrder: 1 }],
<<<<<<<
['x', 'javascript', CellKind.Code, [{ outputId: 'someId', outputs: [{ mime: 'text/plain', data: new Uint8Array([3]) }] }], { custom: { metadata: { collapsed: false } }, executionOrder: 1 }]
=======
['x', 'javascript', CellKind.Code, [{ outputId: 'someId', outputs: [{ mime: Mimes.text, valueBytes: [3] }] }], { custom: { metadata: { collapsed: false } }, executionOrder: 1 }]
>>>>>>>
['x', 'javascript', CellKind.Code, [{ outputId: 'someId', outputs: [{ mime: Mimes.text, data: new Uint8Array([3]) }] }], { custom: { metadata: { collapsed: false } }, executionOrder: 1 }]
<<<<<<<
['x', 'javascript', CellKind.Code, [{ outputId: 'someId', outputs: [{ mime: 'text/plain', data: new Uint8Array([3]) }] }], { custom: { metadata: { collapsed: false } }, executionOrder: 1 }],
=======
['x', 'javascript', CellKind.Code, [{ outputId: 'someId', outputs: [{ mime: Mimes.text, valueBytes: [3] }] }], { custom: { metadata: { collapsed: false } }, executionOrder: 1 }],
>>>>>>>
['x', 'javascript', CellKind.Code, [{ outputId: 'someId', outputs: [{ mime: Mimes.text, data: new Uint8Array([3]) }] }], { custom: { metadata: { collapsed: false } }, executionOrder: 1 }], |
<<<<<<<
private opts2: any;
=======
private optsNew: any;
>>>>>>>
private opts2: any;
private optsNew: any;
<<<<<<<
=======
this.singleRecData = [ {
"ID": 0,
"Name": "Food",
"Products": [
{ "ID": 0, "Name": "Bread", "Price": "2.5" }
]
}];
this.singleRecData2 = [ {
"ID": 1,
"Name": "Test",
"Products": [
{ "ID": 1, "Name": "Milk", "Price": "3.5" },
{ "ID": 2, "Name": "Vint soda", "Price": "20.9" }
]
}];
>>>>>>>
this.singleRecData = [ {
"ID": 0,
"Name": "Food",
"Products": [
{ "ID": 0, "Name": "Bread", "Price": "2.5" }
]
}];
this.singleRecData2 = [ {
"ID": 1,
"Name": "Test",
"Products": [
{ "ID": 1, "Name": "Milk", "Price": "3.5" },
{ "ID": 2, "Name": "Vint soda", "Price": "20.9" }
]
}];
<<<<<<<
this.opts2 = {
dataSource: "myURL/Categories"
};
=======
this.optsNew = {
autoCommit: true,
dataSource: this.singleRecData,
primaryKey: "ID",
width: "100%",
height: "400px",
autoGenerateColumns: false,
autoGenerateColumnLayouts: false,
columns: [
{ headerText: "ID", key: "ID", width: "50px", dataType: "number" },
{ headerText: "Name", key: "Name", width: "130px", dataType: "string" }
],
columnLayouts: [
{
key: "Products",
responseDataKey: "",
childrenDataProperty: "Products",
autoGenerateColumns: false,
primaryKey: "ID",
columns: [
{ key: "ID", headerText: "ID", width: "25px" },
{ key: "Name", headerText: "Product Name", width: "90px" },
{ key: "Price", headerText: "Price", dataType: "number", width: "55px" }
]
}
]
};
>>>>>>>
this.optsNew = {
autoCommit: true,
dataSource: this.singleRecData,
primaryKey: "ID",
width: "100%",
height: "400px",
autoGenerateColumns: false,
autoGenerateColumnLayouts: false,
columns: [
{ headerText: "ID", key: "ID", width: "50px", dataType: "number" },
{ headerText: "Name", key: "Name", width: "130px", dataType: "string" }
],
columnLayouts: [
{
key: "Products",
responseDataKey: "",
childrenDataProperty: "Products",
autoGenerateColumns: false,
primaryKey: "ID",
columns: [
{ key: "ID", headerText: "ID", width: "25px" },
{ key: "Name", headerText: "Product Name", width: "90px" },
{ key: "Price", headerText: "Price", dataType: "number", width: "55px" }
]
}
]
};
this.opts2 = {
dataSource: "myURL/Categories"
}; |
<<<<<<<
async run(event?: any): Promise<any> {
if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY || this.contextService.getWorkspace().folders.length === 0) {
=======
async run(): Promise<any> {
if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY) {
>>>>>>>
async run(): Promise<any> {
if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY || this.contextService.getWorkspace().folders.length === 0) { |
<<<<<<<
MenuRegistry.addCommand({ id: 'workbench.action.tasks.showLog', title: nls.localize('ShowLogAction.label', "Show Task Log"), alias: 'Tasks: Show Task Log', category: tasksCategory });
MenuRegistry.addCommand({ id: 'workbench.action.tasks.runTask', title: nls.localize('RunTaskAction.label', "Run Task"), alias: 'Tasks: Run Task', category: tasksCategory });
MenuRegistry.addCommand({ id: 'workbench.action.tasks.restartTask', title: nls.localize('RestartTaskAction.label', "Restart Task"), alias: 'Tasks: Restart Task', category: tasksCategory });
MenuRegistry.addCommand({ id: 'workbench.action.tasks.terminate', title: nls.localize('TerminateAction.label', "Terminate Running Task"), alias: 'Tasks: Terminate Running Task', category: tasksCategory });
MenuRegistry.addCommand({ id: 'workbench.action.tasks.build', title: nls.localize('BuildAction.label', "Run Build Task"), alias: 'Tasks: Run Build Task', category: tasksCategory });
MenuRegistry.addCommand({ id: 'workbench.action.tasks.test', title: nls.localize('TestAction.label', "Run Test Task"), alias: 'Tasks: Run Test Task', category: tasksCategory });
=======
MenuRegistry.addCommand({ id: 'workbench.action.tasks.showLog', title: { value: nls.localize('ShowLogAction.label', "Show Task Log"), original: 'Show Task Log' }, category: { value: tasksCategory, original: 'Tasks' } });
MenuRegistry.addCommand({ id: 'workbench.action.tasks.runTask', title: { value: nls.localize('RunTaskAction.label', "Run Task"), original: 'Run Task' }, category: { value: tasksCategory, original: 'Tasks' } });
MenuRegistry.addCommand({ id: 'workbench.action.tasks.terminate', title: { value: nls.localize('TerminateAction.label', "Terminate Running Task"), original: 'Terminate Running Task' }, category: { value: tasksCategory, original: 'Tasks' } });
MenuRegistry.addCommand({ id: 'workbench.action.tasks.build', title: { value: nls.localize('BuildAction.label', "Run Build Task"), original: 'Run Build Task' }, category: { value: tasksCategory, original: 'Tasks' } });
MenuRegistry.addCommand({ id: 'workbench.action.tasks.test', title: { value: nls.localize('TestAction.label', "Run Test Task"), original: 'Run Test Task' }, category: { value: tasksCategory, original: 'Tasks' } });
>>>>>>>
MenuRegistry.addCommand({ id: 'workbench.action.tasks.showLog', title: { value: nls.localize('ShowLogAction.label', "Show Task Log"), original: 'Show Task Log' }, category: { value: tasksCategory, original: 'Tasks' } });
MenuRegistry.addCommand({ id: 'workbench.action.tasks.runTask', title: { value: nls.localize('RunTaskAction.label', "Run Task"), original: 'Run Task' }, category: { value: tasksCategory, original: 'Tasks' } });
MenuRegistry.addCommand({ id: 'workbench.action.tasks.restartTask', title: { value: nls.localize('RestartTaskAction.label', "Restart Task"), original: 'Tasks: Restart Task' }, category: { value: tasksCategory, original: 'Tasks' });
MenuRegistry.addCommand({ id: 'workbench.action.tasks.terminate', title: { value: nls.localize('TerminateAction.label', "Terminate Running Task"), original: 'Terminate Running Task' }, category: { value: tasksCategory, original: 'Tasks' } });
MenuRegistry.addCommand({ id: 'workbench.action.tasks.build', title: { value: nls.localize('BuildAction.label', "Run Build Task"), original: 'Run Build Task' }, category: { value: tasksCategory, original: 'Tasks' } });
MenuRegistry.addCommand({ id: 'workbench.action.tasks.test', title: { value: nls.localize('TestAction.label', "Run Test Task"), original: 'Run Test Task' }, category: { value: tasksCategory, original: 'Tasks' } }); |
<<<<<<<
// Sidebar part
=======
// Title bar
this.titlebarPart = this.instantiationService.createInstance(TitlebarPart, Identifiers.TITLEBAR_PART);
this.toDispose.push(this.titlebarPart);
this.toShutdown.push(this.titlebarPart);
serviceCollection.set(ITitleService, this.titlebarPart);
// Viewlet service (sidebar part)
>>>>>>>
// Title bar
this.titlebarPart = this.instantiationService.createInstance(TitlebarPart, Identifiers.TITLEBAR_PART);
this.toDispose.push(this.titlebarPart);
this.toShutdown.push(this.titlebarPart);
serviceCollection.set(ITitleService, this.titlebarPart);
// Sidebar part |
<<<<<<<
import { StatusUpdater, StatusBarController } from './scmActivity';
import { SCMViewlet } from 'vs/workbench/parts/scm/electron-browser/scmViewlet';
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
=======
import { StatusUpdater } from './scmActivity';
import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry';
>>>>>>>
import { StatusUpdater, StatusBarController } from './scmActivity';
import { SCMViewlet } from 'vs/workbench/parts/scm/electron-browser/scmViewlet';
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; |
<<<<<<<
const patternExclusionsHistory = this.viewletSettings['query.folderExclusionsHistory'] || [];
const exclusionsUsePattern = this.viewletSettings['query.exclusionsUsePattern'];
const includesUsePattern = this.viewletSettings['query.includesUsePattern'];
=======
>>>>>>>
const patternExclusionsHistory = this.viewletSettings['query.folderExclusionsHistory'] || [];
const exclusionsUsePattern = this.viewletSettings['query.exclusionsUsePattern'];
const includesUsePattern = this.viewletSettings['query.includesUsePattern'];
<<<<<<<
this.inputPatternExclusions.setIsGlobPattern(exclusionsUsePattern);
this.inputPatternExclusions.setValue(patternExclusions);
this.inputPatternExclusions.setUseIgnoreFiles(useIgnoreFiles);
this.inputPatternExclusions.setUseExcludeSettings(useExcludeSettings);
this.inputPatternExclusions.setHistory(patternExclusionsHistory);
=======
this.inputPatternExcludes.setValue(patternExclusions);
this.inputPatternExcludes.setUseIgnoreFiles(useIgnoreFiles);
this.inputPatternExcludes.setUseExcludeSettings(useExcludeSettings);
>>>>>>>
this.inputPatternExcludes.setValue(patternExclusions);
this.inputPatternExcludes.setUseIgnoreFiles(useIgnoreFiles);
this.inputPatternExcludes.setUseExcludeSettings(useExcludeSettings);
this.inputPatternExcludes.setHistory(patternExclusionsHistory);
<<<<<<<
this.inputPatternExclusions.onSubmit(() => this.onQueryChanged(true, true));
this.trackInputBox(this.inputPatternExclusions.inputFocusTracker, this.inputPatternExclusionsFocussed);
=======
this.inputPatternExcludes.onSubmit(() => this.onQueryChanged(true, true));
this.trackInputBox(this.inputPatternExcludes.inputFocusTracker);
>>>>>>>
this.inputPatternExcludes.onSubmit(() => this.onQueryChanged(true, true));
this.trackInputBox(this.inputPatternExcludes.inputFocusTracker, this.inputPatternExclusionsFocussed);
<<<<<<<
|| this.inputPatternExclusions.inputHasFocus());
if (contextKey) {
contextKey.set(false);
}
=======
|| this.inputPatternExcludes.inputHasFocus());
>>>>>>>
|| this.inputPatternExcludes.inputHasFocus());
if (contextKey) {
contextKey.set(false);
}
<<<<<<<
const searchHistory = this.searchWidget.getHistory();
const patternExcludes = this.inputPatternExclusions.getValue().trim();
const patternExcludesHistory = this.inputPatternExclusions.getHistory();
const exclusionsUsePattern = this.inputPatternExclusions.isGlobPattern();
=======
const patternExcludes = this.inputPatternExcludes.getValue().trim();
>>>>>>>
const patternExcludes = this.inputPatternExcludes.getValue().trim();
<<<<<<<
const patternIncludesHistory = this.inputPatternIncludes.getHistory();
const includesUsePattern = this.inputPatternIncludes.isGlobPattern();
const useIgnoreFiles = this.inputPatternExclusions.useIgnoreFiles();
=======
const useIgnoreFiles = this.inputPatternExcludes.useIgnoreFiles();
>>>>>>>
const useIgnoreFiles = this.inputPatternExcludes.useIgnoreFiles();
const searchHistory = this.searchWidget.getHistory();
const patternExcludesHistory = this.inputPatternExcludes.getHistory();
const patternIncludesHistory = this.inputPatternIncludes.getHistory();
<<<<<<<
this.viewletSettings['query.folderExclusionsHistory'] = patternExcludesHistory;
this.viewletSettings['query.exclusionsUsePattern'] = exclusionsUsePattern;
=======
>>>>>>>
<<<<<<<
this.viewletSettings['query.folderIncludesHistory'] = patternIncludesHistory;
this.viewletSettings['query.includesUsePattern'] = includesUsePattern;
=======
>>>>>>>
this.viewletSettings['query.folderExclusionsHistory'] = patternExcludesHistory;
this.viewletSettings['query.folderIncludesHistory'] = patternIncludesHistory; |
<<<<<<<
const ref = model.getNodeLocation(node);
const parentRef = model.getParentNodeLocation(ref);
if (parentRef) {
set.add(model.getNode(parentRef));
=======
if (node.collapsible && node.children.length > 0 && !node.collapsed) {
set.add(node);
} else if (node.parent) {
set.add(node.parent);
>>>>>>>
const ref = model.getNodeLocation(node);
const parentRef = model.getParentNodeLocation(ref);
if (node.collapsible && node.children.length > 0 && !node.collapsed) {
set.add(node);
} else if (parentRef) {
set.add(model.getNode(parentRef)); |
<<<<<<<
import { Git, CommitOptions } from './git';
import { Repository, Resource, Status, ResourceGroupType } from './repository';
=======
import { Ref, RefType, Git, GitErrorCodes, Branch, Stash } from './git';
import { Repository, Resource, Status, CommitOptions, ResourceGroupType } from './repository';
>>>>>>>
import { Git, CommitOptions, Stash } from './git';
import { Repository, Resource, Status, ResourceGroupType } from './repository'; |
<<<<<<<
import { Win32UpdateService } from 'vs/platform/update/electron-main/updateService.win32';
import { LinuxUpdateService } from 'vs/platform/update/electron-main/updateService.linux';
import { DarwinUpdateService } from 'vs/platform/update/electron-main/updateService.darwin';
=======
import { IIssueService } from 'vs/platform/issue/common/issue';
import { IssueChannel } from 'vs/platform/issue/common/issueIpc';
import { IssueService } from 'vs/platform/issue/electron-main/issueService';
>>>>>>>
import { Win32UpdateService } from 'vs/platform/update/electron-main/updateService.win32';
import { LinuxUpdateService } from 'vs/platform/update/electron-main/updateService.linux';
import { DarwinUpdateService } from 'vs/platform/update/electron-main/updateService.darwin';
import { IIssueService } from 'vs/platform/issue/common/issue';
import { IssueChannel } from 'vs/platform/issue/common/issueIpc';
import { IssueService } from 'vs/platform/issue/electron-main/issueService'; |
<<<<<<<
import { MultiCursorSelectionController } from 'vs/editor/contrib/multicursor/multicursor';
import { Selection } from 'vs/editor/common/core/selection';
=======
import { SIDE_BAR_BACKGROUND, PANEL_BACKGROUND } from 'vs/workbench/common/theme';
import { createEditorFromSearchResult } from 'vs/workbench/contrib/search/browser/searchEditor';
import { ILabelService } from 'vs/platform/label/common/label';
>>>>>>>
import { MultiCursorSelectionController } from 'vs/editor/contrib/multicursor/multicursor';
import { Selection } from 'vs/editor/common/core/selection';
import { SIDE_BAR_BACKGROUND, PANEL_BACKGROUND } from 'vs/workbench/common/theme';
import { createEditorFromSearchResult } from 'vs/workbench/contrib/search/browser/searchEditor';
import { ILabelService } from 'vs/platform/label/common/label'; |
<<<<<<<
=======
import FileResultsNavigation from 'vs/workbench/parts/files/browser/fileResultsNavigation';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
>>>>>>>
import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.