Revert "Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d (#5949)" (#5983)

This reverts commit d15a3fcc98.
This commit is contained in:
Karl Burtram
2019-06-11 12:35:58 -07:00
committed by GitHub
parent 95a50b7892
commit 5a7562a37b
926 changed files with 11394 additions and 19540 deletions

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"scripts": {
"update-grammar": "node ../../build/npm/update-grammar.js mmims/language-batchfile grammars/batchfile.cson ./syntaxes/batchfile.tmLanguage.json"

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "^1.0.0"
},
@@ -109,6 +108,6 @@
]
},
"devDependencies": {
"@types/node": "^10.14.8"
"@types/node": "^10.12.21"
}
}

View File

@@ -5,7 +5,6 @@
"type": "object",
"definitions": {
"devContainerCommon": {
"type": "object",
"properties": {
"name": {
"type": "string",
@@ -19,14 +18,11 @@
}
},
"settings": {
"$ref": "vscode://schemas/settings/machine",
"type": "object",
"description": "Machine specific settings that should be copied into the container."
},
"postCreateCommand": {
"type": [
"string",
"array"
],
"type": ["string", "array"],
"description": "A command to run after creating the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.",
"items": {
"type": "string"
@@ -39,20 +35,12 @@
}
},
"nonComposeBase": {
"type": "object",
"properties": {
"appPort": {
"type": [
"integer",
"string",
"array"
],
"type": ["integer", "string", "array"],
"description": "Application ports that are exposed by the container. This can be a single port or an array of ports. Each port can be a number or a string. A number is mapped to the same port on the host. A string is passed to Docker unchanged and can be used to map ports differently, e.g. \"8000:8010\".",
"items": {
"type": [
"integer",
"string"
]
"type": ["integer", "string"]
}
},
"runArgs": {
@@ -64,10 +52,7 @@
},
"shutdownAction": {
"type": "string",
"enum": [
"none",
"stopContainer"
],
"enum": ["none", "stopContainer"],
"description": "Action to take when VS Code is shutting down. The default is to stop the container."
},
"overrideCommand": {
@@ -85,7 +70,6 @@
}
},
"dockerFileContainer": {
"type": "object",
"properties": {
"dockerFile": {
"type": "string",
@@ -96,30 +80,21 @@
"description": "The location of the context folder for building the Docker image. The path is relative to the folder containing the `devcontainer.json` file."
}
},
"required": [
"dockerFile"
]
"required": ["dockerFile"]
},
"imageContainer": {
"type": "object",
"properties": {
"image": {
"type": "string",
"description": "The docker image that will be used to create the container."
}
},
"required": [
"image"
]
"required": ["image"]
},
"composeContainer": {
"type": "object",
"properties": {
"dockerComposeFile": {
"type": [
"string",
"array"
],
"type": ["string", "array"],
"description": "The name of the docker-compose file(s) used to start the services.",
"items": {
"type": "string"
@@ -135,18 +110,11 @@
},
"shutdownAction": {
"type": "string",
"enum": [
"none",
"stopCompose"
],
"enum": ["none", "stopCompose"],
"description": "Action to take when VS Code is shutting down. The default is to stop the containers."
}
},
"required": [
"dockerComposeFile",
"service",
"workspaceFolder"
]
"required": ["dockerComposeFile", "service", "workspaceFolder"]
}
},
"allOf": [

View File

@@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@^10.14.8":
version "10.14.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9"
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw==
"@types/node@^10.12.21":
version "10.12.21"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.21.tgz#7e8a0c34cf29f4e17a36e9bd0ea72d45ba03908e"
integrity sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==
jsonc-parser@2.0.2:
version "2.0.2"

View File

@@ -1,79 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'mocha';
import * as assert from 'assert';
import Uri from 'vscode-uri';
import { resolve } from 'path';
import { TextDocument, DocumentLink } from 'vscode-languageserver-types';
import { WorkspaceFolder } from 'vscode-languageserver-protocol';
import { getCSSLanguageService } from 'vscode-css-languageservice';
import { getDocumentContext } from '../utils/documentContext';
export interface ItemDescription {
offset: number;
value: string;
target: string;
}
suite('Links', () => {
const cssLanguageService = getCSSLanguageService();
let assertLink = function (links: DocumentLink[], expected: ItemDescription, document: TextDocument) {
let matches = links.filter(link => {
return document.offsetAt(link.range.start) === expected.offset;
});
assert.equal(matches.length, 1, `${expected.offset} should only existing once: Actual: ${links.map(l => document.offsetAt(l.range.start)).join(', ')}`);
let match = matches[0];
assert.equal(document.getText(match.range), expected.value);
assert.equal(match.target, expected.target);
};
function assertLinks(value: string, expected: ItemDescription[], testUri: string, workspaceFolders?: WorkspaceFolder[], lang: string = 'css'): void {
const offset = value.indexOf('|');
value = value.substr(0, offset) + value.substr(offset + 1);
const document = TextDocument.create(testUri, lang, 0, value);
if (!workspaceFolders) {
workspaceFolders = [{ name: 'x', uri: testUri.substr(0, testUri.lastIndexOf('/')) }];
}
const context = getDocumentContext(testUri, workspaceFolders);
const stylesheet = cssLanguageService.parseStylesheet(document);
let links = cssLanguageService.findDocumentLinks(document, stylesheet, context)!;
assert.equal(links.length, expected.length);
for (let item of expected) {
assertLink(links, item, document);
}
}
function getTestResource(path: string) {
return Uri.file(resolve(__dirname, '../../test/linksTestFixtures', path)).toString();
}
test('url links', function () {
let testUri = getTestResource('about.css');
let folders = [{ name: 'x', uri: getTestResource('') }];
assertLinks('html { background-image: url("hello.html|")',
[{ offset: 29, value: '"hello.html"', target: getTestResource('hello.html') }], testUri, folders
);
});
test('node module resolving', function () {
let testUri = getTestResource('about.css');
let folders = [{ name: 'x', uri: getTestResource('') }];
assertLinks('html { background-image: url("~foo/hello.html|")',
[{ offset: 29, value: '"~foo/hello.html"', target: getTestResource('node_modules/foo/hello.html') }], testUri, folders
);
});
});

View File

@@ -1 +0,0 @@
!/node_modules

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"scripts": {
"update-grammar": "node ../../build/npm/update-grammar.js moby/moby contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage ./syntaxes/docker.tmLanguage.json"

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "^1.4.0"
},
@@ -54,6 +53,6 @@
},
"devDependencies": {
"@types/markdown-it": "0.0.2",
"@types/node": "^10.14.8"
"@types/node": "^10.12.21"
}
}

View File

@@ -7,10 +7,10 @@
resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.2.tgz#5d9ad19e6e6508cdd2f2596df86fd0aade598660"
integrity sha1-XZrRnm5lCM3S8llt+G/Qqt5ZhmA=
"@types/node@^10.14.8":
version "10.14.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9"
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw==
"@types/node@^10.12.21":
version "10.12.21"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.21.tgz#7e8a0c34cf29f4e17a36e9bd0ea72d45ba03908e"
integrity sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==
"@types/node@^6.0.46":
version "6.0.78"

View File

@@ -1,8 +0,0 @@
src/**
test/**
out/**
tsconfig.json
build/**
extension.webpack.config.js
cgmanifest.json
yarn.lock

View File

@@ -1,7 +0,0 @@
# Git UI integration for Visual Studio Code
**Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
## Features
See [Git support in VS Code](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support) to learn about the features of this extension.

View File

@@ -1,4 +0,0 @@
{
"registrations": [],
"version": 1
}

View File

@@ -1,17 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
'use strict';
const withDefaults = require('../shared.webpack.config');
module.exports = withDefaults({
context: __dirname,
entry: {
main: './src/main.ts'
}
});

View File

@@ -1,28 +0,0 @@
{
"name": "git-ui",
"displayName": "%displayName%",
"description": "%description%",
"publisher": "vscode",
"version": "1.0.0",
"engines": {
"vscode": "^1.5.0"
},
"extensionKind": "ui",
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
"enableProposedApi": true,
"categories": [
"Other"
],
"activationEvents": [
"onCommand:git.credential"
],
"main": "./out/main",
"icon": "resources/icons/git.png",
"scripts": {
"compile": "gulp compile-extension:git-ui",
"watch": "gulp watch-extension:git-ui"
},
"devDependencies": {
"@types/node": "^10.14.8"
}
}

View File

@@ -1,4 +0,0 @@
{
"displayName": "Git UI",
"description": "Git SCM UI Integration"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,57 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ExtensionContext, commands } from 'vscode';
import * as cp from 'child_process';
export async function deactivate(): Promise<any> {
}
export async function activate(context: ExtensionContext): Promise<void> {
context.subscriptions.push(commands.registerCommand('git.credential', async (data: any) => {
try {
const { stdout, stderr } = await exec(`git credential ${data.command}`, {
stdin: data.stdin,
env: Object.assign(process.env, { GIT_TERMINAL_PROMPT: '0' })
});
return { stdout, stderr, code: 0 };
} catch ({ stdout, stderr, error }) {
const code = error.code || 0;
if (stderr.indexOf('terminal prompts disabled') !== -1) {
stderr = '';
}
return { stdout, stderr, code };
}
}));
}
export interface ExecResult {
error: Error | null;
stdout: string;
stderr: string;
}
export function exec(command: string, options: cp.ExecOptions & { stdin?: string } = {}) {
return new Promise<ExecResult>((resolve, reject) => {
const child = cp.exec(command, options, (error, stdout, stderr) => {
(error ? reject : resolve)({ error, stdout, stderr });
});
if (options.stdin) {
child.stdin.write(options.stdin, (err: any) => {
if (err) {
reject(err);
return;
}
child.stdin.end((err: any) => {
if (err) {
reject(err);
}
});
});
}
});
}

View File

@@ -1,8 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/// <reference path='../../../../src/vs/vscode.d.ts'/>
/// <reference path='../../../../src/vs/vscode.proposed.d.ts'/>
/// <reference types='@types/node'/>

View File

@@ -1,13 +0,0 @@
{
"extends": "../shared.tsconfig.json",
"compilerOptions": {
"outDir": "./out",
"experimentalDecorators": true,
"typeRoots": [
"./node_modules/@types"
]
},
"include": [
"src/**/*"
]
}

View File

@@ -1,8 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@types/node@^10.14.8":
version "10.14.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9"
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw==

View File

@@ -3,7 +3,6 @@
"displayName": "%displayName%",
"description": "%description%",
"publisher": "vscode",
"license": "MIT",
"version": "1.0.0",
"engines": {
"vscode": "^1.5.0"
@@ -21,8 +20,7 @@
"scripts": {
"compile": "gulp compile-extension:git",
"watch": "gulp watch-extension:git",
"update-grammar": "node ./build/update-grammars.js",
"test": "mocha"
"update-grammar": "node ./build/update-grammars.js"
},
"contributes": {
"commands": [
@@ -1460,14 +1458,13 @@
"jschardet": "^1.6.0",
"vscode-extension-telemetry": "0.1.1",
"vscode-nls": "^4.0.0",
"vscode-uri": "^2.0.0",
"which": "^1.3.0"
},
"devDependencies": {
"@types/byline": "4.2.31",
"@types/file-type": "^5.2.1",
"@types/mocha": "2.2.43",
"@types/node": "^10.14.8",
"@types/node": "^10.12.21",
"@types/which": "^1.0.28",
"mocha": "^3.2.0"
}

View File

@@ -235,4 +235,4 @@ export const enum GitErrorCodes {
CantRebaseMultipleBranches = 'CantRebaseMultipleBranches',
PatchDoesNotApply = 'PatchDoesNotApply',
NoPathFound = 'NoPathFound'
}
}

View File

@@ -56,13 +56,7 @@ class CheckoutRemoteHeadItem extends CheckoutItem {
return;
}
const branches = await repository.findTrackingBranches(this.ref.name);
if (branches.length > 0) {
await repository.checkout(branches[0].name!);
} else {
await repository.checkoutTracking(this.ref.name);
}
await repository.checkoutTracking(this.ref.name);
}
}

View File

@@ -12,8 +12,7 @@ import { EventEmitter } from 'events';
import iconv = require('iconv-lite');
import * as filetype from 'file-type';
import { assign, groupBy, denodeify, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent } from './util';
import { CancellationToken } from 'vscode';
import { URI } from 'vscode-uri';
import { CancellationToken, Uri, workspace } from 'vscode';
import { detectEncoding } from './encoding';
import { Ref, RefType, Branch, Remote, GitErrorCodes, LogOptions, Change, Status } from './api/git';
@@ -558,7 +557,7 @@ export function parseGitmodules(raw: string): Submodule[] {
return;
}
const propertyMatch = /^\s*(\w+)\s+=\s+(.*)$/.exec(line);
const propertyMatch = /^\s*(\w+) = (.*)$/.exec(line);
if (!propertyMatch) {
return;
@@ -637,7 +636,6 @@ export interface CommitOptions {
export interface PullOptions {
unshallow?: boolean;
tags?: boolean;
}
export enum ForcePushMode {
@@ -997,7 +995,7 @@ export class Repository {
break;
}
const originalUri = URI.file(path.isAbsolute(resourcePath) ? resourcePath : path.join(this.repositoryRoot, resourcePath));
const originalUri = Uri.file(path.isAbsolute(resourcePath) ? resourcePath : path.join(this.repositoryRoot, resourcePath));
let status: Status = Status.UNTRACKED;
// Copy or Rename status comes with a number, e.g. 'R100'. We don't need the number, so we use only first character of the status.
@@ -1025,7 +1023,7 @@ export class Repository {
break;
}
const uri = URI.file(path.isAbsolute(newPath) ? newPath : path.join(this.repositoryRoot, newPath));
const uri = Uri.file(path.isAbsolute(newPath) ? newPath : path.join(this.repositoryRoot, newPath));
result.push({
uri,
renameUri: uri,
@@ -1365,8 +1363,9 @@ export class Repository {
async pull(rebase?: boolean, remote?: string, branch?: string, options: PullOptions = {}): Promise<void> {
const args = ['pull'];
const config = workspace.getConfiguration('git', Uri.file(this.root));
if (options.tags) {
if (config.get<boolean>('pullTags')) {
args.push('--tags');
}
@@ -1579,14 +1578,6 @@ export class Repository {
}
}
async findTrackingBranches(upstreamBranch: string): Promise<Branch[]> {
const result = await this.run(['for-each-ref', '--format', '%(refname:short)%00%(upstream:short)', 'refs/heads']);
return result.stdout.trim().split('\n')
.map(line => line.trim().split('\0'))
.filter(([_, upstream]) => upstream === upstreamBranch)
.map(([ref]) => ({ name: ref, type: RefType.Head } as Branch));
}
async getRefs(): Promise<Ref[]> {
const result = await this.run(['for-each-ref', '--format', '%(refname) %(objectname)', '--sort', '-committerdate']);

View File

@@ -299,7 +299,6 @@ export const enum Operation {
GetObjectDetails = 'GetObjectDetails',
SubmoduleUpdate = 'SubmoduleUpdate',
RebaseContinue = 'RebaseContinue',
FindTrackingBranches = 'GetTracking',
Apply = 'Apply',
Blame = 'Blame',
Log = 'Log',
@@ -910,10 +909,6 @@ export class Repository implements Disposable {
await this.run(Operation.CheckoutTracking, () => this.repository.checkout(treeish, [], { track: true }));
}
async findTrackingBranches(upstreamRef: string): Promise<Branch[]> {
return await this.run(Operation.FindTrackingBranches, () => this.repository.findTrackingBranches(upstreamRef));
}
async getCommit(ref: string): Promise<Commit> {
return await this.repository.getCommit(ref);
}
@@ -984,12 +979,11 @@ export class Repository implements Disposable {
await this.maybeAutoStash(async () => {
const config = workspace.getConfiguration('git', Uri.file(this.root));
const fetchOnPull = config.get<boolean>('fetchOnPull');
const tags = config.get<boolean>('pullTags');
if (fetchOnPull) {
await this.repository.pull(rebase, undefined, undefined, { unshallow, tags });
await this.repository.pull(rebase, undefined, undefined, { unshallow });
} else {
await this.repository.pull(rebase, remote, branch, { unshallow, tags });
await this.repository.pull(rebase, remote, branch, { unshallow });
}
});
});
@@ -1045,12 +1039,11 @@ export class Repository implements Disposable {
await this.maybeAutoStash(async () => {
const config = workspace.getConfiguration('git', Uri.file(this.root));
const fetchOnPull = config.get<boolean>('fetchOnPull');
const tags = config.get<boolean>('pullTags');
if (fetchOnPull) {
await this.repository.pull(rebase, undefined, undefined, { tags });
await this.repository.pull(rebase);
} else {
await this.repository.pull(rebase, remoteName, pullBranch, { tags });
await this.repository.pull(rebase, remoteName, pullBranch);
}
const remote = this.remotes.find(r => r.name === remoteName);
@@ -1163,7 +1156,7 @@ export class Repository implements Disposable {
}
// https://git-scm.com/docs/git-check-ignore#git-check-ignore--z
const child = this.repository.stream(['check-ignore', '-v', '-z', '--stdin'], { stdio: [null, null, null] });
const child = this.repository.stream(['check-ignore', '-z', '--stdin'], { stdio: [null, null, null] });
child.stdin.end(filePaths.join('\0'), 'utf8');
const onExit = (exitCode: number) => {
@@ -1171,7 +1164,8 @@ export class Repository implements Disposable {
// nothing ignored
resolve(new Set<string>());
} else if (exitCode === 0) {
resolve(new Set<string>(this.parseIgnoreCheck(data)));
// paths are separated by the null-character
resolve(new Set<string>(data.split('\0')));
} else {
if (/ is in submodule /.test(stderr)) {
reject(new GitError({ stdout: data, stderr, exitCode, gitErrorCode: GitErrorCodes.IsInSubmodule }));
@@ -1199,23 +1193,6 @@ export class Repository implements Disposable {
});
}
// Parses output of `git check-ignore -v -z` and returns only those paths
// that are actually ignored by git.
// Matches to a negative pattern (starting with '!') are filtered out.
// See also https://git-scm.com/docs/git-check-ignore#_output.
private parseIgnoreCheck(raw: string): string[] {
const ignored = [];
const elements = raw.split('\0');
for (let i = 0; i < elements.length; i += 4) {
const pattern = elements[i + 2];
const path = elements[i + 3];
if (pattern && !pattern.startsWith('!')) {
ignored.push(path);
}
}
return ignored;
}
private async run<T>(operation: Operation, runOperation: () => Promise<T> = () => Promise.resolve<any>(null)): Promise<T> {
if (this.state !== RepositoryState.Idle) {
throw new Error('Repository not initialized');

View File

@@ -172,17 +172,6 @@ suite('git', () => {
{ name: 'deps/spdlog4', path: 'deps/spdlog4', url: 'https://github.com/gabime/spdlog4.git' }
]);
});
test('whitespace #74844', () => {
const sample = `[submodule "deps/spdlog"]
path = deps/spdlog
url = https://github.com/gabime/spdlog.git
`;
assert.deepEqual(parseGitmodules(sample), [
{ name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' }
]);
});
});
suite('parseGitCommit', () => {

View File

@@ -26,10 +26,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.51.tgz#b31d716fb8d58eeb95c068a039b9b6292817d5fb"
integrity sha512-El3+WJk2D/ppWNd2X05aiP5l2k4EwF7KwheknQZls+I26eSICoWRhRIJ56jGgw2dqNGQ5LtNajmBU2ajS28EvQ==
"@types/node@^10.14.8":
version "10.14.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9"
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw==
"@types/node@^10.12.21":
version "10.12.21"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.21.tgz#7e8a0c34cf29f4e17a36e9bd0ea72d45ba03908e"
integrity sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==
"@types/which@^1.0.28":
version "1.0.28"
@@ -325,11 +325,6 @@ vscode-nls@^4.0.0:
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002"
integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw==
vscode-uri@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.0.0.tgz#2df704222f72b8a71ff266ba0830ed6c51ac1542"
integrity sha512-lWXWofDSYD8r/TIyu64MdwB4FaSirQ608PP/TzUyslyOeHGwQ0eTHUZeJrK1ILOmwUHaJtV693m2JoUYroUDpw==
which@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
"engines": {
"vscode": "0.10.x"
@@ -108,6 +107,6 @@
"request-light": "^0.2.4"
},
"devDependencies": {
"@types/node": "^10.14.8"
"@types/node": "^10.12.21"
}
}

View File

@@ -154,8 +154,7 @@ To connect to the server from NodeJS, see Remy Suen's great write-up on [how to
## Participate
The source code of the JSON language server can be found in the [VSCode repository](https://github.com/Microsoft/vscode) at [extensions/json-language-features/server](https://github.com/Microsoft/vscode/tree/master/extensions/json-language-features/server).
The source code of the JSON language server can be found [VSCode repository](https://github.com/Microsoft/vscode) at [extensions/json-language-features/server](https://github.com/Microsoft/vscode/tree/master/extensions/json-language-features/server).
File issues and pull requests in the [VSCode GitHub Issues](https://github.com/Microsoft/vscode/issues). See the document [How to Contribute](https://github.com/Microsoft/vscode/wiki/How-to-Contribute) on how to build and run from source.
Most of the functionality of the server is located in libraries:
@@ -165,12 +164,10 @@ Most of the functionality of the server is located in libraries:
Help on any of these projects is very welcome.
## Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
Please see also our [Code of Conduct](CODE_OF_CONDUCT.md).
## License
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the [MIT](https://github.com/microsoft/vscode/blob/master/LICENSE.txt) License.
Licensed under the [MIT](LICENSE.txt) License.

View File

@@ -21,7 +21,7 @@
},
"devDependencies": {
"@types/mocha": "2.2.33",
"@types/node": "^10.14.8"
"@types/node": "^10.12.21"
},
"scripts": {
"prepublishOnly": "npm run clean && npm run test",

View File

@@ -7,10 +7,10 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.33.tgz#d79a0061ec270379f4d9e225f4096fb436669def"
integrity sha1-15oAYewnA3n02eIl9AlvtDZmne8=
"@types/node@^10.14.8":
version "10.14.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9"
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw==
"@types/node@^10.12.21":
version "10.12.21"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.21.tgz#7e8a0c34cf29f4e17a36e9bd0ea72d45ba03908e"
integrity sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==
agent-base@4, agent-base@^4.1.0:
version "4.1.2"

View File

@@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@^10.14.8":
version "10.14.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9"
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw==
"@types/node@^10.12.21":
version "10.12.21"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.21.tgz#7e8a0c34cf29f4e17a36e9bd0ea72d45ba03908e"
integrity sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==
agent-base@4, agent-base@^4.1.0:
version "4.2.1"

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "0.10.x"
},

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "^1.20.0"
},

View File

@@ -135,6 +135,7 @@ h3 code,
h4 code,
h5 code,
h6 code {
font-size: inherit;
line-height: auto;
}
@@ -167,8 +168,8 @@ blockquote {
code {
font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback";
font-size: 1em;
line-height: 1.357em;
font-size: 1rem;
line-height: 1.357rem;
}
body.wordWrap pre {

View File

@@ -5,7 +5,6 @@
"version": "1.0.0",
"icon": "icon.png",
"publisher": "vscode",
"license": "MIT",
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
"engines": {
"vscode": "^1.20.0"
@@ -314,7 +313,7 @@
"build-preview": "webpack --mode development"
},
"dependencies": {
"highlight.js": "9.15.8",
"highlight.js": "9.13.1",
"markdown-it": "^8.4.2",
"markdown-it-front-matter": "^0.1.2",
"vscode-extension-telemetry": "0.1.1",
@@ -324,7 +323,7 @@
"@types/highlight.js": "9.12.3",
"@types/lodash.throttle": "^4.1.3",
"@types/markdown-it": "0.0.2",
"@types/node": "^10.14.8",
"@types/node": "^10.12.21",
"lodash.throttle": "^4.1.1",
"mocha-junit-reporter": "^1.17.0",
"mocha-multi-reporters": "^1.1.7",

View File

@@ -5,20 +5,17 @@
import * as path from 'path';
import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
import { OpenDocumentLinkCommand } from '../commands/openDocumentLink';
import { getUriForLinkWithKnownExternalScheme } from '../util/links';
const localize = nls.loadMessageBundle();
function parseLink(
function normalizeLink(
document: vscode.TextDocument,
link: string,
base: string
): { uri: vscode.Uri, tooltip?: string } {
): vscode.Uri {
const externalSchemeUri = getUriForLinkWithKnownExternalScheme(link);
if (externalSchemeUri) {
return { uri: externalSchemeUri };
return externalSchemeUri;
}
// Assume it must be an relative or absolute file path
@@ -37,10 +34,7 @@ function parseLink(
resourcePath = base ? path.join(base, tempUri.path) : tempUri.path;
}
return {
uri: OpenDocumentLinkCommand.createCommandUri(resourcePath, tempUri.fragment),
tooltip: localize('documentLink.tooltip', 'follow link')
};
return OpenDocumentLinkCommand.createCommandUri(resourcePath, tempUri.fragment);
}
function matchAll(
@@ -67,12 +61,9 @@ function extractDocumentLink(
const linkStart = document.positionAt(offset);
const linkEnd = document.positionAt(offset + link.length);
try {
const { uri, tooltip } = parseLink(document, link, base);
const documentLink = new vscode.DocumentLink(
return new vscode.DocumentLink(
new vscode.Range(linkStart, linkEnd),
uri);
documentLink.tooltip = tooltip;
return documentLink;
normalizeLink(document, link, base));
} catch (e) {
return undefined;
}
@@ -153,10 +144,11 @@ export default class LinkProvider implements vscode.DocumentLinkProvider {
}
}
for (const definition of definitions.values()) {
for (const definition of Array.from(definitions.values())) {
try {
const { uri } = parseLink(document, definition.link, base);
results.push(new vscode.DocumentLink(definition.linkRange, uri));
results.push(new vscode.DocumentLink(
definition.linkRange,
normalizeLink(document, definition.link, base)));
} catch (e) {
// noop
}

View File

@@ -29,10 +29,10 @@
resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.2.tgz#5d9ad19e6e6508cdd2f2596df86fd0aade598660"
integrity sha1-XZrRnm5lCM3S8llt+G/Qqt5ZhmA=
"@types/node@^10.14.8":
version "10.14.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9"
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw==
"@types/node@^10.12.21":
version "10.12.21"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.21.tgz#7e8a0c34cf29f4e17a36e9bd0ea72d45ba03908e"
integrity sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==
abbrev@1:
version "1.1.1"
@@ -2933,10 +2933,10 @@ he@1.1.1:
resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0=
highlight.js@9.15.8:
version "9.15.8"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.15.8.tgz#f344fda123f36f1a65490e932cf90569e4999971"
integrity sha512-RrapkKQWwE+wKdF73VsOa2RQdIoO3mxwJ4P8mhbI6KYJUraUHRKM5w5zQQKXNk0xNL4UVRdulV9SBJcmzJNzVA==
highlight.js@9.13.1:
version "9.13.1"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.13.1.tgz#054586d53a6863311168488a0f58d6c505ce641e"
integrity sha512-Sc28JNQNDzaH6PORtRLMvif9RSn1mYuOoX3omVjnb0+HbpPygU2ALBI0R/wsiqCb4/fcp07Gdo8g+fhtFrQl6A==
hmac-drbg@^1.0.0:
version "1.0.1"

View File

@@ -5,7 +5,6 @@
"description": "%description%",
"icon": "resources/icons/merge-conflict.png",
"version": "1.0.0",
"license": "MIT",
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
"engines": {
"vscode": "^1.5.0"
@@ -115,21 +114,6 @@
"type": "boolean",
"description": "%config.autoNavigateNextConflictEnabled%",
"default": false
},
"merge-conflict.diffViewPosition": {
"type": "string",
"enum": [
"Current",
"Beside",
"Below"
],
"description": "%config.diffViewPosition%",
"enumDescriptions": [
"%config.diffViewPosition.current%",
"%config.diffViewPosition.beside%",
"%config.diffViewPosition.below%"
],
"default": "Current"
}
}
}
@@ -138,6 +122,6 @@
"vscode-nls": "^4.0.0"
},
"devDependencies": {
"@types/node": "^10.14.8"
"@types/node": "8.0.33"
}
}

View File

@@ -15,9 +15,5 @@
"config.title": "Merge Conflict",
"config.autoNavigateNextConflictEnabled": "Whether to automatically navigate to the next merge conflict after resolving a merge conflict.",
"config.codeLensEnabled": "Create a Code Lens for merge conflict blocks within editor.",
"config.decoratorsEnabled": "Create decorators for merge conflict blocks within editor.",
"config.diffViewPosition": "Controls where the diff view should be opened when comparing changes in merge conflicts.",
"config.diffViewPosition.current": "Open the diff view in the current editor group.",
"config.diffViewPosition.beside": "Open the diff view next to the current editor group.",
"config.diffViewPosition.below": "Open the diff view below the current editor group."
"config.decoratorsEnabled": "Create decorators for merge conflict blocks within editor."
}

View File

@@ -88,54 +88,18 @@ export default class CommandHandler implements vscode.Disposable {
}
}
const conflicts = await this.tracker.getConflicts(editor.document);
// Still failed to find conflict, warn the user and exit
if (!conflicts) {
vscode.window.showWarningMessage(localize('cursorNotInConflict', 'Editor cursor is not within a merge conflict'));
return;
}
const scheme = editor.document.uri.scheme;
let range = conflict.current.content;
let leftRanges = conflicts.map(conflict => [conflict.current.content, conflict.range]);
let rightRanges = conflicts.map(conflict => [conflict.incoming.content, conflict.range]);
const leftUri = editor.document.uri.with({
scheme: ContentProvider.scheme,
query: JSON.stringify({ scheme, range: range, ranges: leftRanges })
query: JSON.stringify({ scheme, range })
});
range = conflict.incoming.content;
const rightUri = leftUri.with({ query: JSON.stringify({ scheme, ranges: rightRanges }) });
let mergeConflictLineOffsets = 0;
for (let nextconflict of conflicts) {
if (nextconflict.range.isEqual(conflict.range)) {
break;
} else {
mergeConflictLineOffsets += (nextconflict.range.end.line - nextconflict.range.start.line) - (nextconflict.incoming.content.end.line - nextconflict.incoming.content.start.line);
}
}
const selection = new vscode.Range(
conflict.range.start.line - mergeConflictLineOffsets, conflict.range.start.character,
conflict.range.start.line - mergeConflictLineOffsets, conflict.range.start.character
);
const rightUri = leftUri.with({ query: JSON.stringify({ scheme, range }) });
const title = localize('compareChangesTitle', '{0}: Current Changes ⟷ Incoming Changes', fileName);
const mergeConflictConfig = vscode.workspace.getConfiguration('merge-conflict');
const openToTheSide = mergeConflictConfig.get<string>('diffViewPosition');
const opts: vscode.TextDocumentShowOptions = {
viewColumn: openToTheSide === 'Beside' ? vscode.ViewColumn.Beside : vscode.ViewColumn.Active,
selection
};
if (openToTheSide === 'Below') {
await vscode.commands.executeCommand('workbench.action.newGroupBelow');
}
await vscode.commands.executeCommand('vscode.diff', leftUri, rightUri, title, opts);
vscode.commands.executeCommand('vscode.diff', leftUri, rightUri, title);
}
navigateNext(editor: vscode.TextEditor): Promise<void> {

View File

@@ -23,27 +23,11 @@ export default class MergeConflictContentProvider implements vscode.TextDocument
async provideTextDocumentContent(uri: vscode.Uri): Promise<string | null> {
try {
const { scheme, ranges } = JSON.parse(uri.query) as { scheme: string, ranges: [{ line: number, character: number }[], { line: number, character: number }[]][] };
const { scheme, range } = JSON.parse(uri.query) as { scheme: string; range: { line: number, character: number }[] };
const [start, end] = range;
// complete diff
const document = await vscode.workspace.openTextDocument(uri.with({ scheme, query: '' }));
let text = '';
let lastPosition = new vscode.Position(0, 0);
ranges.forEach(rangeObj => {
let [conflictRange, fullRange] = rangeObj;
const [start, end] = conflictRange;
const [fullStart, fullEnd] = fullRange;
text += document.getText(new vscode.Range(lastPosition.line, lastPosition.character, fullStart.line, fullStart.character));
text += document.getText(new vscode.Range(start.line, start.character, end.line, end.character));
lastPosition = new vscode.Position(fullEnd.line, fullEnd.character);
});
let documentEnd = document.lineAt(document.lineCount - 1).range.end;
text += document.getText(new vscode.Range(lastPosition.line, lastPosition.character, documentEnd.line, documentEnd.character));
const text = document.getText(new vscode.Range(start.line, start.character, end.line, end.character));
return text;
}
catch (ex) {

View File

@@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@^10.14.8":
version "10.14.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9"
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw==
"@types/node@8.0.33":
version "8.0.33"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.33.tgz#1126e94374014e54478092830704f6ea89df04cd"
integrity sha512-vmCdO8Bm1ExT+FWfC9sd9r4jwqM7o97gGy2WBshkkXbf/2nLAJQUrZfIhw27yVOtLUev6kSZc4cav/46KbDd8A==
vscode-nls@^4.0.0:
version "4.0.0"

View File

@@ -1,11 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
var updateGrammar = require('../../../build/npm/update-grammar');
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', '/syntaxes/objc.tmLanguage.json', './syntaxes/objective-c.tmLanguage.json');
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', '/syntaxes/objcpp.tmLanguage.json', './syntaxes/objective-c++.tmLanguage.json');

View File

@@ -1,52 +0,0 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
#import "UseQuotes.h"
#import <Use/GTLT.h>
/*
Multi
Line
Comments
*/
@implementation Test
- (void) applicationWillFinishLaunching:(NSNotification *)notification
{
}
- (IBAction)onSelectInput:(id)sender
{
NSString* defaultDir = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, true)[0];
NSOpenPanel* panel = [NSOpenPanel openPanel];
[panel setAllowedFileTypes:[[NSArray alloc] initWithObjects:@"ipa", @"xcarchive", @"app", nil]];
[panel beginWithCompletionHandler:^(NSInteger result)
{
if (result == NSFileHandlingPanelOKButton)
[self.inputTextField setStringValue:[panel.URL path]];
}];
return YES;
int hex = 0xFEF1F0F;
float ing = 3.14;
ing = 3.14e0;
ing = 31.4e-2;
}
-(id) initWithParams:(id<anObject>) aHandler withDeviceStateManager:(id<anotherObject>) deviceStateManager
{
// add a tap gesture recognizer
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
NSMutableArray *gestureRecognizers = [NSMutableArray array];
[gestureRecognizers addObject:tapGesture];
[gestureRecognizers addObjectsFromArray:scnView.gestureRecognizers];
scnView.gestureRecognizers = gestureRecognizers;
return tapGesture;
return nil;
}
@end

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
"version": "0.0.1",
"description": "Dependencies shared by all extensions",
"dependencies": {
"typescript": "3.5.1"
"typescript": "3.5.0-dev.20190522"
},
"scripts": {
"postinstall": "node ./postinstall"

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"contributes": {
"languages": [{

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"activationEvents": ["onLanguage:python"],
"main": "./out/pythonMain",
@@ -13,7 +12,6 @@
"id": "python",
"extensions": [ ".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi", ".snakefile", ".smk", ".pyi", ".ipy"],
"aliases": [ "Python", "py" ],
"filenames": [ "Snakefile" ],
"firstLine": "^#!\\s*/.*\\bpython[0-9.-]*\\b",
"configuration": "./language-configuration.json"
}],

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"scripts": {
"update-grammar": "node ../../build/npm/update-grammar.js Ikuyadeu/vscode-R syntax/r.json ./syntaxes/r.tmLanguage.json"

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"scripts": {
"update-grammar": "node ../../build/npm/update-grammar.js Microsoft/vscode-mssql syntaxes/SQL.plist ./syntaxes/sql.tmLanguage.json"

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"contributes": {
"themes": [

View File

@@ -86,9 +86,7 @@
"name": "Class name",
"scope": [
"entity.name.class",
"entity.name.type",
"entity.name.namespace",
"entity.name.scope-resolution"
"entity.name.type"
],
"settings": {
"fontStyle": "underline",

View File

@@ -5,7 +5,6 @@
"categories": [ "Themes" ],
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"contributes": {
"themes": [

View File

@@ -21,8 +21,6 @@
"support.class",
"support.type",
"entity.name.type",
"entity.name.namespace",
"entity.name.scope-resolution",
"entity.name.class",
"storage.type.numeric.go",
"storage.type.byte.go",
@@ -69,10 +67,10 @@
}
},
{
"name": "Control flow / Special keywords",
"name": "Control flow keywords",
"scope": [
"keyword.control",
"source.cpp keyword.operator.new",
"keyword.operator.new.cpp",
"keyword.operator.delete",
"keyword.other.using",
"keyword.other.operator"

View File

@@ -26,8 +26,6 @@
"support.class",
"support.type",
"entity.name.type",
"entity.name.namespace",
"entity.name.scope-resolution",
"entity.name.class",
"storage.type.cs",
"storage.type.generic.cs",
@@ -67,11 +65,11 @@
}
},
{
"name": "Control flow / Special keywords",
"name": "Control flow keywords",
"scope": [
"keyword.control",
"source.cpp keyword.operator.new",
"source.cpp keyword.operator.delete",
"keyword.operator.new.cpp",
"keyword.operator.delete.cpp",
"keyword.other.using",
"keyword.other.operator"
],

View File

@@ -21,8 +21,6 @@
"support.class",
"support.type",
"entity.name.type",
"entity.name.namespace",
"entity.name.scope-resolution",
"entity.name.class",
"storage.type.numeric.go",
"storage.type.byte.go",
@@ -69,11 +67,11 @@
}
},
{
"name": "Control flow / Special keywords",
"name": "Control flow keywords",
"scope": [
"keyword.control",
"source.cpp keyword.operator.new",
"source.cpp keyword.operator.delete",
"keyword.operator.new.cpp",
"keyword.operator.delete.cpp",
"keyword.other.using",
"keyword.other.operator"
],

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"contributes": {
"themes": [

View File

@@ -147,9 +147,7 @@
"scope": [
"support.class",
"entity.name.class",
"entity.name.type",
"entity.name.namespace",
"entity.name.scope-resolution"
"entity.name.type"
],
"settings": {
"foreground": "#f06431"

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "*"
},

View File

@@ -143,7 +143,7 @@
},
{
"name": "Class name",
"scope": "entity.name.class, entity.name.type, entity.name.namespace, entity.name.scope-resolution",
"scope": "entity.name.class, entity.name.type",
"settings": {
"fontStyle": "",
"foreground": "#9B0000",
@@ -255,7 +255,7 @@
}
},
{
"name": "Keyword Control / Special",
"name": "Keyword Control",
"scope": [
"keyword.control",
"keyword.operator.new.cpp",

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "*"
},

View File

@@ -205,7 +205,7 @@
},
{
"name": "Class name",
"scope": "entity.name.type, entity.name.class, entity.name.namespace, entity.name.scope-resolution",
"scope": "entity.name.type, entity.name.class",
"settings": {
"fontStyle": "underline",
"foreground": "#A6E22E"

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "*"
},

View File

@@ -125,8 +125,6 @@
"name": "Classes",
"scope": [
"entity.name.type",
"entity.name.namespace",
"entity.name.scope-resolution",
"entity.other.inherited-class",
"support.class"
],

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"contributes": {
"themes": [

View File

@@ -5,7 +5,6 @@
"displayName": "%displayName%",
"description": "%description%",
"publisher": "vscode",
"license": "MIT",
"icon": "icons/seti-circular-128x128.png",
"scripts": {
"update": "node ./build/update-icon-theme.js"

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"contributes": {
"themes": [

View File

@@ -72,9 +72,7 @@
"name": "Class name",
"scope": [
"entity.name.class",
"entity.name.type",
"entity.name.namespace",
"entity.name.scope-resolution"
"entity.name.type"
],
"settings": {
"fontStyle": "",

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"contributes": {
"themes": [

View File

@@ -72,9 +72,7 @@
"name": "Class name",
"scope": [
"entity.name.class",
"entity.name.type",
"entity.name.namespace",
"entity.name.scope-resolution"
"entity.name.type"
],
"settings": {
"foreground": "#268BD2"
@@ -221,14 +219,16 @@
"meta.diff.header"
],
"settings": {
"background": "#b58900",
"fontStyle": "italic",
"foreground": "#268bd2"
"foreground": "#E0EDDD"
}
},
{
"name": "diff: deleted",
"scope": "markup.deleted",
"settings": {
"background": "#eee8d5",
"fontStyle": "",
"foreground": "#dc322f"
}
@@ -237,6 +237,7 @@
"name": "diff: changed",
"scope": "markup.changed",
"settings": {
"background": "#eee8d5",
"fontStyle": "",
"foreground": "#cb4b16"
}
@@ -245,6 +246,7 @@
"name": "diff: inserted",
"scope": "markup.inserted",
"settings": {
"background": "#eee8d5",
"foreground": "#219186"
}
},
@@ -415,7 +417,7 @@
"tab.activeBackground": "#FDF6E3",
"tab.inactiveForeground": "#586E75",
"tab.inactiveBackground": "#D3CBB7",
"tab.activeModifiedBorder": "#cb4b16",
"tab.modifiedBorder": "#cb4b16",
// "tab.activeBackground": "",
// "tab.activeForeground": "",
// "tab.inactiveForeground": "",

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"contributes": {
"themes": [

View File

@@ -101,7 +101,7 @@
},
{
"name": "Class, Support",
"scope": "entity.name.class, entity.name.type, entity.name.namespace, entity.name.scope-resolution, support.type, support.class",
"scope": "entity.name.class, entity.name.type, support.type, support.class",
"settings": {
"fontStyle": "",
"foreground": "#FFEEAD"

View File

@@ -3,7 +3,6 @@
"description": "Colorize tests for VS Code",
"version": "0.0.1",
"publisher": "vscode",
"license": "MIT",
"private": true,
"engines": {
"vscode": "*"
@@ -12,7 +11,7 @@
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-colorize-tests ./tsconfig.json"
},
"devDependencies": {
"@types/node": "^10.14.8",
"@types/node": "^10.12.21",
"mocha-junit-reporter": "^1.17.0",
"mocha-multi-reporters": "^1.1.7",
"vscode": "1.1.5"

View File

@@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@^10.14.8":
version "10.14.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9"
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw==
"@types/node@^10.12.21":
version "10.12.21"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.21.tgz#7e8a0c34cf29f4e17a36e9bd0ea72d45ba03908e"
integrity sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==
ajv@^5.1.0:
version "5.3.0"

View File

@@ -21,7 +21,7 @@
],
"main": "./out/extension",
"devDependencies": {
"@types/node": "^10.14.8",
"@types/node": "^10.12.21",
"vscode": "1.1.5"
},
"contributes": {

View File

@@ -26,11 +26,10 @@ export function activate(context: vscode.ExtensionContext) {
progress.report({ message: 'Starting Test Resolver' });
outputChannel = vscode.window.createOutputChannel('TestResolver');
let isResolved = false;
let isStarted = false;
async function processError(message: string) {
outputChannel.appendLine(message);
if (!isResolved) {
isResolved = true;
if (!isStarted) {
outputChannel.show();
const result = await vscode.window.showErrorMessage(message, { modal: true }, ...getActions());
@@ -49,7 +48,7 @@ export function activate(context: vscode.ExtensionContext) {
if (chr === CharCode.LineFeed) {
const match = lastProgressLine.match(/Extension host agent listening on (\d+)/);
if (match) {
isResolved = true;
isStarted = true;
res(new vscode.ResolvedAuthority('localhost', parseInt(match[1], 10))); // success!
}
lastProgressLine = '';
@@ -66,30 +65,47 @@ export function activate(context: vscode.ExtensionContext) {
return;
}
const { updateUrl, commit, quality, serverDataFolderName, dataFolderName } = getProductConfiguration();
const serverCommand = process.platform === 'win32' ? 'server.bat' : 'server.sh';
const commandArgs = ['--port=0', '--disable-telemetry'];
const env = getNewEnv();
const remoteDataDir = process.env['TESTRESOLVER_DATA_FOLDER'] || path.join(os.homedir(), serverDataFolderName || `${dataFolderName}-testresolver`);
env['VSCODE_AGENT_FOLDER'] = remoteDataDir;
outputChannel.appendLine(`Using data folder at ${remoteDataDir}`);
const { updateUrl, commit, quality } = getProductConfiguration();
if (!commit) { // dev mode
const vscodePath = path.resolve(path.join(context.extensionPath, '..', '..'));
const serverCommandPath = path.join(vscodePath, 'resources', 'server', 'bin-dev', serverCommand);
extHostProcess = cp.spawn(serverCommandPath, commandArgs, { env, cwd: vscodePath });
const nodeExec = process.platform === 'win32' ? 'node.exe' : 'node';
const nodePath = path.join(vscodePath, '.build', 'node-remote', nodeExec);
if (!fs.existsSync(nodePath)) {
try {
progress.report({ message: 'Installing node' });
outputChannel.appendLine(`Installing node at ${nodePath}`);
cp.execSync(`node ${path.join(vscodePath, 'node_modules/gulp/bin/gulp.js')} node-remote`);
} catch (e) {
processError(`Problem downloading node: ${e.message}`);
}
}
outputChannel.appendLine(`Using node at ${nodePath}`);
const env = getNewEnv();
env['PATH'] = path.join(vscodePath, 'resources', 'server', 'bin') + path.delimiter + env['PATH']; // allow calling code-dev.sh
outputChannel.appendLine(env['PATH'] || '');
extHostProcess = cp.spawn(nodePath, [path.join('out', 'remoteExtensionHostAgent'), '--port=0'], { cwd: vscodePath, env });
} else {
const serverBin = path.join(remoteDataDir, 'bin');
const serverBin = path.resolve(os.homedir(), '.vscode-remote', 'bin');
progress.report({ message: 'Installing VSCode Server' });
const serverLocation = await downloadAndUnzipVSCodeServer(updateUrl, commit, quality, serverBin);
outputChannel.appendLine(`Using server build at ${serverLocation}`);
extHostProcess = cp.spawn(path.join(serverLocation, serverCommand), commandArgs, { env, cwd: serverLocation });
const commandArgs = ['--port=0', '--disable-telemetry'];
const env = getNewEnv();
env['PATH'] = path.join(serverLocation, 'bin') + path.delimiter + env['PATH']; // code command for the terminal
extHostProcess = cp.spawn(path.join(serverLocation, 'server.sh'), commandArgs, { env, cwd: serverLocation });
}
extHostProcess.stdout.on('data', (data: Buffer) => processOutput(data.toString()));
extHostProcess.stderr.on('data', (data: Buffer) => processOutput(data.toString()));
extHostProcess.on('error', (error: Error) => processError(`server failed with error:\n${error.message}`));
extHostProcess.on('close', (code: number) => processError(`server closed unexpectedly.\nError code: ${code}`));
extHostProcess.on('error', (error: Error) => processError(`remoteExtensionHostAgent failed with error:\n${error.message}`));
extHostProcess.on('close', (code: number) => processError(`remoteExtensionHostAgent closed unexpectedly.\nError code: ${code}`));
});
}
@@ -117,6 +133,7 @@ export function activate(context: vscode.ExtensionContext) {
outputChannel.show();
}
});
}
type ActionItem = (vscode.MessageItem & { execute: () => void; });
@@ -153,8 +170,6 @@ export interface IProductConfiguration {
updateUrl: string;
commit: string;
quality: string;
dataFolderName: string;
serverDataFolderName?: string;
}
function getProductConfiguration(): IProductConfiguration {

View File

@@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@^10.14.8":
version "10.14.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9"
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw==
"@types/node@^10.12.21":
version "10.12.30"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.30.tgz#4c2b4f0015f214f8158a347350481322b3b29b2f"
integrity sha512-nsqTN6zUcm9xtdJiM9OvOJ5EF0kOI8f1Zuug27O/rgtxCRJHGqncSWfCMZUP852dCKPsDsYXGvBhxfRjDBkF5Q==
ajv@^6.5.5:
version "6.10.0"

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"contributes": {
"languages": [{

View File

@@ -4,7 +4,6 @@
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "*"
},

View File

@@ -2,7 +2,7 @@
# yarn lockfile v1
typescript@3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.1.tgz#ba72a6a600b2158139c5dd8850f700e231464202"
integrity sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw==
typescript@3.5.0-dev.20190522:
version "3.5.0-dev.20190522"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.0-dev.20190522.tgz#ade4702c6e599a7e8905d7acaaf416f7e32ba0fc"
integrity sha512-V+QsNMtXl8lGwov4O04D+E6vtiL0TWEpz6iDxI2tAZizEn7y8Hh9SXzz3JRWepr7dfdqqxEv9CT3J18zpaZKJQ==