Merge branch 'master' into electron-2.0.x

This commit is contained in:
Benjamin Pasero 2018-07-17 12:17:10 +02:00
commit eda3157386
115 changed files with 1261 additions and 566 deletions

View file

@ -59,7 +59,7 @@ Please include the following with each issue:
* What you expected to see, versus what you actually saw
* Images, animations, or a link to a video showing the issue occuring
* Images, animations, or a link to a video showing the issue occurring
* A code snippet that demonstrates the issue or a link to a code repository the developers can easily pull down to recreate the issue locally

View file

@ -1,7 +1,7 @@
[
{
"name": "ms-vscode.node-debug",
"version": "1.26.2",
"version": "1.26.4",
"repo": "https://github.com/Microsoft/vscode-node-debug"
},
{

View file

@ -39,4 +39,11 @@ function getConfig(quality: string): Promise<Config> {
}
getConfig(process.argv[2])
.then(c => console.log(c.frozen), e => console.error(e));
.then(config => {
console.log(config.frozen);
process.exit(0);
})
.catch(err => {
console.error(err);
process.exit(1);
});

View file

@ -91,29 +91,24 @@ steps:
# SNAP_PATH="$REPO/.build/linux/snap/$ARCH/$SNAP_FILENAME"
# Publish to MS repo
IS_FROZEN="$(node build/tfs/linux/frozen-check.js $VSCODE_QUALITY)"
IS_FROZEN="$(AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" node build/tfs/linux/frozen-check.js $VSCODE_QUALITY)"
if [ -z "$VSCODE_QUALITY" ]; then
echo "VSCODE_QUALITY is not set, skipping repo package publish"
elif [ "$IS_FROZEN" = "true" ]; then
echo "$VSCODE_QUALITY is frozen, skipping repo package publish"
else
if [ "$BUILD_SOURCEBRANCH" = "master" ] || [ "$BUILD_SOURCEBRANCH" = "refs/heads/master" ]; then
if [ "$BUILD_SOURCEBRANCH" = "master" ] || [ "$BUILD_SOURCEBRANCH" = "refs/heads/master" ] || [ "$VSCODE_PUBLISH_LINUX" = "true" ]; then
if [[ $BUILD_QUEUEDBY = *"Project Collection Service Accounts"* || $BUILD_QUEUEDBY = *"Microsoft.VisualStudio.Services.TFS"* ]]; then
# Write config files needed by API, use eval to force environment variable expansion
pushd build/tfs/linux
# Submit to apt repo
if [ "$DEB_ARCH" = "amd64" ]; then
eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"username\": \"vscode\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > apt-config.json
AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
LINUX_REPO_PASSWORD="$(LINUX_REPO_PASSWORD)" \
echo "{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"username\": \"vscode\", \"password\": \"$(LINUX_REPO_PASSWORD)\" }" > apt-config.json
./repoapi_client.sh -config apt-config.json -addfile $DEB_PATH
fi
# Submit to yum repo (disabled as it's manual until signing is automated)
# eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"username\": \"vscode\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > yum-config.json
# eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"username\": \"vscode\", \"password\": \"$(LINUX_REPO_PASSWORD)\" }' > yum-config.json
# ./repoapi_client.sh -config yum-config.json -addfile $RPM_PATH
popd

File diff suppressed because one or more lines are too long

View file

@ -358,7 +358,6 @@ export class NpmScriptsTreeDataProvider implements TreeDataProvider<TreeItem> {
private buildTaskTree(tasks: Task[]): Folder[] | PackageJSON[] | NoScripts[] {
let folders: Map<String, Folder> = new Map();
let packages: Map<String, PackageJSON> = new Map();
let scripts: Map<String, NpmScript> = new Map();
let folder = null;
let packageJson = null;
@ -380,11 +379,8 @@ export class NpmScriptsTreeDataProvider implements TreeDataProvider<TreeItem> {
packages.set(fullPath, packageJson);
}
let fullScriptPath = path.join(packageJson.path, each.name);
if (!scripts.get(fullScriptPath)) {
let script = new NpmScript(this.extensionContext, packageJson, each);
packageJson.addScript(script);
scripts.set(fullScriptPath, script);
}
let script = new NpmScript(this.extensionContext, packageJson, each);
packageJson.addScript(script);
}
});
if (folders.size === 1) {

View file

@ -100,6 +100,7 @@ async function detectNpmScripts(): Promise<Task[]> {
let emptyTasks: Task[] = [];
let allTasks: Task[] = [];
let visitedPackageJsonFiles: Set<string> = new Set();
let folders = workspace.workspaceFolders;
if (!folders) {
@ -112,8 +113,10 @@ async function detectNpmScripts(): Promise<Task[]> {
let relativePattern = new RelativePattern(folder, '**/package.json');
let paths = await workspace.findFiles(relativePattern, '**/node_modules/**');
for (let j = 0; j < paths.length; j++) {
if (!isExcluded(folder, paths[j])) {
let tasks = await provideNpmScriptsForFolder(paths[j]);
let path = paths[j];
if (!isExcluded(folder, path) && !visitedPackageJsonFiles.has(path.fsPath)) {
let tasks = await provideNpmScriptsForFolder(path);
visitedPackageJsonFiles.add(path.fsPath);
allTasks.push(...tasks);
}
}

View file

@ -1,7 +1,164 @@
[{
"name": "TypeScript-TmLanguage",
"version": "0.1.8",
"license": "MIT",
"repositoryURL": "https://github.com/Microsoft/TypeScript-TmLanguage",
"description": "The files syntaxes/TypeScript.tmLanguage.json and syntaxes/TypeScriptReact.tmLanguage.json were derived from TypeScript.tmLanguage and TypeScriptReact.tmLanguage in https://github.com/Microsoft/TypeScript-TmLanguage."
}]
[
{
"name": "TypeScript-TmLanguage",
"version": "0.1.8",
"license": "MIT",
"repositoryURL": "https://github.com/Microsoft/TypeScript-TmLanguage",
"description": "The files syntaxes/TypeScript.tmLanguage.json and syntaxes/TypeScriptReact.tmLanguage.json were derived from TypeScript.tmLanguage and TypeScriptReact.tmLanguage in https://github.com/Microsoft/TypeScript-TmLanguage."
},
{
"name": "DefinitelyTyped",
"version": "0.0.2",
"license": "MIT",
"repositoryURL": "https://github.com/DefinitelyTyped/DefinitelyTyped",
"description": "Typings files that are downloaded by TypeScript. These typings power IntelliSense for JavaScript and TypeScript.",
"licenseDetail": [
"MIT License",
"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
]
},
{
"name": "Unicode",
"license": "UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE",
"description": "These files are included by TypeScript.Ø",
"licenseDetail": [
"Unicode Data Files include all data files under the directories",
"http://www.unicode.org/Public/, http://www.unicode.org/reports/,",
"http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and",
"http://www.unicode.org/utility/trac/browser/.",
"",
"Unicode Data Files do not include PDF online code charts under the",
"directory http://www.unicode.org/Public/.",
"",
"Software includes any source code published in the Unicode Standard",
"or under the directories",
"http://www.unicode.org/Public/, http://www.unicode.org/reports/,",
"http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and",
"http://www.unicode.org/utility/trac/browser/.",
"",
"NOTICE TO USER: Carefully read the following legal agreement.",
"BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S",
"DATA FILES (\"DATA FILES\"), AND/OR SOFTWARE (\"SOFTWARE\"),",
"YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE",
"TERMS AND CONDITIONS OF THIS AGREEMENT.",
"IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE",
"THE DATA FILES OR SOFTWARE.",
"",
"COPYRIGHT AND PERMISSION NOTICE",
"",
"Copyright (c) 1991-2017 Unicode, Inc. All rights reserved.",
"Distributed under the Terms of Use in http://www.unicode.org/copyright.html.",
"",
"Permission is hereby granted, free of charge, to any person obtaining",
"a copy of the Unicode data files and any associated documentation",
"(the \"Data Files\") or Unicode software and any associated documentation",
"(the \"Software\") to deal in the Data Files or Software",
"without restriction, including without limitation the rights to use,",
"copy, modify, merge, publish, distribute, and/or sell copies of",
"the Data Files or Software, and to permit persons to whom the Data Files",
"or Software are furnished to do so, provided that either",
"(a) this copyright and permission notice appear with all copies",
"of the Data Files or Software, or",
"(b) this copyright and permission notice appear in associated",
"Documentation.",
"",
"THE DATA FILES AND SOFTWARE ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF",
"ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE",
"WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND",
"NONINFRINGEMENT OF THIRD PARTY RIGHTS.",
"IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS",
"NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL",
"DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,",
"DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER",
"TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR",
"PERFORMANCE OF THE DATA FILES OR SOFTWARE.",
"",
"Except as contained in this notice, the name of a copyright holder",
"shall not be used in advertising or otherwise to promote the sale,",
"use or other dealings in these Data Files or Software without prior",
"written authorization of the copyright holder.",
]
},
{
"name": "Document Object Model",
"license": "W3C License",
"description": "These files",
"licenseDetail": [
"W3C License",
"This work is being provided by the copyright holders under the following license.",
"By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.",
"Permission to copy, modify, and distribute this work, with or without modification,<2C>for any purpose and without fee or royalty is hereby granted, provided that you include the following ",
"on ALL copies of the work or portions thereof, including modifications:",
"* The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.",
"* Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included.",
"* Notice of any changes or modifications, through a copyright statement on the new code or document such as \"This software or document includes material copied from or derived ",
"from [title and URI of the W3C document]. Copyright <20> [YEAR] W3C<33> (MIT, ERCIM, Keio, Beihang).\" ",
"Disclaimers",
"THIS WORK IS PROVIDED \"AS IS",
" AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR ",
"FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.",
"COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT.",
"The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. ",
"Title to copyright in this work will at all times remain with copyright holders.",
]
},
{
"name": "Web Background Synchronization",
"license": "W3C Community Final Specification Agreement",
"description": "TypeScript includes files related to this specification",
"licenseDetail": [
"W3C Community Final Specification Agreement ",
"To secure commitments from participants for the full text of a Community or Business Group Report, the group may call for voluntary commitments to the following terms; a \"summary\" is ",
"available. See also the related \"W3C Community Contributor License Agreement\".",
"1. The Purpose of this Agreement.",
"This Agreement sets forth the terms under which I make certain copyright and patent rights available to you for your implementation of the Specification. ",
"Any other capitalized terms not specifically defined herein have the same meaning as those terms have in the \"W3C Patent Policy\", and if not defined there, in the \"W3C Process Document\".",
"2. Copyrights. ",
"2.1. Copyright Grant. I grant to you a perpetual (for the duration of the applicable copyright), worldwide, non-exclusive, no-charge, royalty-free, copyright license, without any obligation for accounting to me, to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, distribute, and implement the Specification to the full extent of my copyright interest in the Specification. ",
"2.2. Attribution. As a condition of the copyright grant, you must include an attribution to the Specification in any derivative work you make based on the Specification. That attribution must include, at minimum, the Specification name and version number.",
"3. Patents. ",
"3.1. Patent Licensing Commitment. I agree to license my Essential Claims under the W3C Community RF Licensing Requirements. This requirement includes Essential Claims that I own and any that I have the right to license without obligation of payment or other consideration to an unrelated third party. W3C Community RF Licensing Requirements obligations made concerning the Specification and described in this policy are binding on me for the life of the patents in question and encumber the patents containing Essential Claims, regardless of changes in participation status or W3C Membership. I also agree to license my Essential Claims under the W3C Community RF Licensing Requirements in derivative works of the Specification so long as all normative portions of the Specification are maintained and that this licensing commitment does not extend to any portion of the derivative work that was not included in the Specification.",
"3.2. Optional, Additional Patent Grant. In addition to the provisions of Section 3.1, I may also, at my option, make certain intellectual property rights infringed by implementations of the Specification, including Essential Claims, available by providing those terms via the W3C Web site.",
"4. No Other Rights. Except as specifically set forth in this Agreement, no other express or implied patent, trademark, copyright, or other property rights are granted under this Agreement, including by implication, waiver, or estoppel.",
"5. Antitrust Compliance. I acknowledge that I may compete with other participants, that I am under no obligation to implement the Specification, that each participant is free to develop competing technologies and standards, and that each party is free to license its patent rights to third parties, including for the purpose of enabling competing technologies and standards.",
"6. Non-Circumvention. I agree that I will not intentionally take or willfully assist any third party to take any action for the purpose of circumventing my obligations under this Agreement.",
"7. Transition to W3C Recommendation Track. The Specification developed by the Project may transition to the W3C Recommendation Track. The W3C Team is responsible for notifying me that a Corresponding Working Group has been chartered. I have no obligation to join the Corresponding Working Group. If the Specification developed by the Project transitions to the W3C Recommendation Track, the following terms apply: ",
"7.1. If I join the Corresponding Working Group. If I join the Corresponding Working Group, I will be subject to all W3C rules, obligations, licensing commitments, and policies that govern that Corresponding Working Group.",
"7.2. If I Do Not Join the Corresponding Working Group. ",
"7.2.1. Licensing Obligations to Resulting Specification. If I do not join the Corresponding Working Group, I agree to offer patent licenses according to the W3C Royalty-Free licensing requirements described in Section 5 of the W3C Patent Policy for the portions of the Specification included in the resulting Recommendation. This licensing commitment does not extend to any portion of an implementation of the Recommendation that was not included in the Specification. This licensing commitment may not be revoked but may be modified through the exclusion process defined in Section 4 of the W3C Patent Policy. I am not required to join the Corresponding Working Group to exclude patents from the W3C Royalty-Free licensing commitment, but must otherwise follow the normal exclusion procedures defined by the W3C Patent Policy. The W3C Team will notify me of any Call for Exclusion in the Corresponding Working Group as set forth in Section 4.5 of the W3C Patent Policy.",
"7.2.2. No Disclosure Obligation. If I do not join the Corresponding Working Group, I have no patent disclosure obligations outside of those set forth in Section 6 of the W3C Patent Policy.",
"8. Conflict of Interest. I will disclose significant relationships when those relationships might reasonably be perceived as creating a conflict of interest with my role. I will notify W3C of any change in my affiliation using W3C-provided mechanisms.",
"9. Representations, Warranties and Disclaimers. I represent and warrant that I am legally entitled to grant the rights and promises set forth in this Agreement. IN ALL OTHER RESPECTS THE SPECIFICATION IS PROVIDED <20>AS IS.<2E> The entire risk as to implementing or otherwise using the Specification is assumed by the implementer and user. Except as stated herein, I expressly disclaim any warranties (express, implied, or otherwise), including implied warranties of merchantability, non-infringement, fitness for a particular purpose, or title, related to the Specification. IN NO EVENT WILL ANY PARTY BE LIABLE TO ANY OTHER PARTY FOR LOST PROFITS OR ANY FORM OF INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER FROM ANY CAUSES OF ACTION OF ANY KIND WITH RESPECT TO THIS AGREEMENT, WHETHER BASED ON BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, AND WHETHER OR NOT THE OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. All of my obligations under Section 3 regarding the transfer, successors in interest, or assignment of Granted Claims will be satisfied if I notify the transferee or assignee of any patent that I know contains Granted Claims of the obligations under Section 3. Nothing in this Agreement requires me to undertake a patent search.",
"10. Definitions. ",
"10.1. Agreement. <20>Agreement<6E> means this W3C Community Final Specification Agreement.",
"10.2. Corresponding Working Group. <20>Corresponding Working Group<75> is a W3C Working Group that is chartered to develop a Recommendation, as defined in the W3C Process Document, that takes the Specification as an input.",
"10.3. Essential Claims. <20>Essential Claims<6D> shall mean all claims in any patent or patent application in any jurisdiction in the world that would necessarily be infringed by implementation of the Specification. A claim is necessarily infringed hereunder only when it is not possible to avoid infringing it because there is no non-infringing alternative for implementing the normative portions of the Specification. Existence of a non-infringing alternative shall be judged based on the state of the art at the time of the publication of the Specification. The following are expressly excluded from and shall not be deemed to constitute Essential Claims: ",
"10.3.1. any claims other than as set forth above even if contained in the same patent as Essential Claims; and",
"10.3.2. claims which would be infringed only by: ",
"portions of an implementation that are not specified in the normative portions of the Specification, or",
"enabling technologies that may be necessary to make or use any product or portion thereof that complies with the Specification and are not themselves expressly set forth in the Specification (e.g., semiconductor manufacturing technology, compiler technology, object-oriented technology, basic operating system technology, and the like); or",
"the implementation of technology developed elsewhere and merely incorporated by reference in the body of the Specification.",
"10.3.3. design patents and design registrations.",
"For purposes of this definition, the normative portions of the Specification shall be deemed to include only architectural and interoperability requirements. Optional features in the RFC 2119 sense are considered normative unless they are specifically identified as informative. Implementation examples or any other material that merely illustrate the requirements of the Specification are informative, rather than normative.",
"10.4. I, Me, or My. <20>I,<2C> <20>me,<2C> or <20>my<6D> refers to the signatory.",
"10.5 Project. <20>Project<63> means the W3C Community Group or Business Group for which I executed this Agreement.",
"10.6. Specification. <20>Specification<6F> means the Specification identified by the Project as the target of this agreement in a call for Final Specification Commitments. W3C shall provide the authoritative mechanisms for the identification of this Specification.",
"10.7. W3C Community RF Licensing Requirements. <20>W3C Community RF Licensing Requirements<74> license shall mean a non-assignable, non-sublicensable license to make, have made, use, sell, have sold, offer to sell, import, and distribute and dispose of implementations of the Specification that: ",
"10.7.1. shall be available to all, worldwide, whether or not they are W3C Members;",
"10.7.2. shall extend to all Essential Claims owned or controlled by me;",
"10.7.3. may be limited to implementations of the Specification, and to what is required by the Specification;",
"10.7.4. may be conditioned on a grant of a reciprocal RF license (as defined in this policy) to all Essential Claims owned or controlled by the licensee. A reciprocal license may be required to be available to all, and a reciprocal license may itself be conditioned on a further reciprocal license from all.",
"10.7.5. may not be conditioned on payment of royalties, fees or other consideration;",
"10.7.6. may be suspended with respect to any licensee when licensor issued by licensee for infringement of claims essential to implement the Specification or any W3C Recommendation;",
"10.7.7. may not impose any further conditions or restrictions on the use of any technology, intellectual property rights, or other restrictions on behavior of the licensee, but may include reasonable, customary terms relating to operation or maintenance of the license relationship such as the following: choice of law and dispute resolution;",
"10.7.8. shall not be considered accepted by an implementer who manifests an intent not to accept the terms of the W3C Community RF Licensing Requirements license as offered by the licensor.",
"10.7.9. The RF license conforming to the requirements in this policy shall be made available by the licensor as long as the Specification is in effect. The term of such license shall be for the life of the patents in question.",
"I am encouraged to provide a contact from which licensing information can be obtained and other relevant licensing information. Any such information will be made publicly available. ",
"10.8. You or Your. <20>You,<2C> <20>you,<2C> or <20>your<75> means any person or entity who exercises copyright or patent rights granted under this Agreement, and any person that person or entity controls.",
]
}
]

View file

@ -21,7 +21,7 @@ const localize = nls.loadMessageBundle();
interface CommitCharactersSettings {
readonly enable: boolean;
readonly enabled: boolean;
readonly enableDotCompletions: boolean;
readonly enableCallCompletions: boolean;
}
@ -84,19 +84,22 @@ class MyCompletionItem extends vscode.CompletionItem {
}
this.label += '?';
}
this.resolveRange(line);
}
public resolve(): void {
if (!this.range) {
// Try getting longer, prefix based range for completions that span words
const wordRange = this.document.getWordRangeAtPosition(this.position);
const text = this.document.getText(new vscode.Range(this.position.line, Math.max(0, this.position.character - this.label.length), this.position.line, this.position.character)).toLowerCase();
const entryName = this.label.toLowerCase();
for (let i = entryName.length; i >= 0; --i) {
if (text.endsWith(entryName.substr(0, i)) && (!wordRange || wordRange.start.character > this.position.character - i)) {
this.range = new vscode.Range(this.position.line, Math.max(0, this.position.character - i), this.position.line, this.position.character);
break;
}
private resolveRange(line: string): void {
if (this.range) {
return;
}
// Try getting longer, prefix based range for completions that span words
const wordRange = this.document.getWordRangeAtPosition(this.position);
const text = line.slice(Math.max(0, this.position.character - this.label.length), this.position.character).toLowerCase();
const entryName = this.label.toLowerCase();
for (let i = entryName.length; i >= 0; --i) {
if (text.endsWith(entryName.substr(0, i)) && (!wordRange || wordRange.start.character > this.position.character - i)) {
this.range = new vscode.Range(this.position.line, Math.max(0, this.position.character - i), this.position.line, this.position.character);
break;
}
}
}
@ -147,6 +150,10 @@ class MyCompletionItem extends vscode.CompletionItem {
@memoize
public get commitCharacters(): string[] | undefined {
if (!this.commitCharactersSettings.enabled) {
return undefined;
}
const commitCharacters: string[] = [];
switch (this.tsEntry.kind) {
case PConst.Kind.memberGetAccessor:
@ -331,7 +338,7 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider
return msg
.filter(entry => !shouldExcludeCompletionEntry(entry, completionConfiguration))
.map(entry => new MyCompletionItem(position, document, line.text, entry, completionConfiguration.useCodeSnippetsOnMethodSuggest, {
enable: enableCommitCharacters,
enabled: enableCommitCharacters,
enableDotCompletions,
enableCallCompletions: !completionConfiguration.useCodeSnippetsOnMethodSuggest
}));
@ -350,8 +357,6 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider
return undefined;
}
item.resolve();
const args: Proto.CompletionDetailsRequestArgs = {
...typeConverters.Position.toFileLocationRequestArgs(filepath, item.position),
entryNames: [

View file

@ -12,6 +12,7 @@ import { Command, CommandManager } from '../utils/commandManager';
import { VersionDependentRegistration } from '../utils/dependentRegistration';
import * as typeconverts from '../utils/typeConverters';
import FileConfigurationManager from './fileConfigurationManager';
import TelemetryReporter from '../utils/telemetry';
const localize = nls.loadMessageBundle();
@ -22,10 +23,20 @@ class OrganizeImportsCommand implements Command {
public readonly id = OrganizeImportsCommand.Id;
constructor(
private readonly client: ITypeScriptServiceClient
private readonly client: ITypeScriptServiceClient,
private readonly telemetryReporter: TelemetryReporter,
) { }
public async execute(file: string): Promise<boolean> {
/* __GDPR__
"organizeImports.execute" : {
"${include}": [
"${TypeScriptCommonProperties}"
]
}
*/
this.telemetryReporter.logTelemetry('organizeImports.execute', {});
const args: Proto.OrganizeImportsRequestArgs = {
scope: {
type: 'file',
@ -49,8 +60,10 @@ export class OrganizeImportsCodeActionProvider implements vscode.CodeActionProvi
private readonly client: ITypeScriptServiceClient,
commandManager: CommandManager,
private readonly fileConfigManager: FileConfigurationManager,
telemetryReporter: TelemetryReporter,
) {
commandManager.register(new OrganizeImportsCommand(client));
commandManager.register(new OrganizeImportsCommand(client, telemetryReporter));
}
public readonly metadata: vscode.CodeActionProviderMetadata = {
@ -82,10 +95,11 @@ export function register(
selector: vscode.DocumentSelector,
client: ITypeScriptServiceClient,
commandManager: CommandManager,
fileConfigurationManager: FileConfigurationManager
fileConfigurationManager: FileConfigurationManager,
telemetryReporter: TelemetryReporter,
) {
return new VersionDependentRegistration(client, API.v280, () => {
const organizeImportsProvider = new OrganizeImportsCodeActionProvider(client, commandManager, fileConfigurationManager);
const organizeImportsProvider = new OrganizeImportsCodeActionProvider(client, commandManager, fileConfigurationManager, telemetryReporter);
return vscode.languages.registerCodeActionsProvider(selector,
organizeImportsProvider,
organizeImportsProvider.metadata);

View file

@ -84,7 +84,7 @@ export default class LanguageProvider {
this.disposables.push((await import('./features/implementations')).register(selector, this.client));
this.disposables.push((await import('./features/implementationsCodeLens')).register(selector, this.description.id, this.client, cachedResponse));
this.disposables.push((await import('./features/jsDocCompletions')).register(selector, this.client, this.commandManager));
this.disposables.push((await import('./features/organizeImports')).register(selector, this.client, this.commandManager, this.fileConfigurationManager));
this.disposables.push((await import('./features/organizeImports')).register(selector, this.client, this.commandManager, this.fileConfigurationManager, this.telemetryReporter));
this.disposables.push((await import('./features/quickFix')).register(selector, this.client, this.fileConfigurationManager, this.commandManager, this.diagnosticsManager, this.telemetryReporter));
this.disposables.push((await import('./features/refactor')).register(selector, this.client, this.fileConfigurationManager, this.commandManager, this.telemetryReporter));
this.disposables.push((await import('./features/references')).register(selector, this.client));

View file

@ -693,9 +693,52 @@ suite('workspace-namespace', () => {
test('WorkspaceEdit: create & ignoreIfExists', async function () {
let docUri = await createRandomFile('before');
let we = new vscode.WorkspaceEdit();
we.createFile(docUri, { ignoreIfExists: true });
assert.ok(await vscode.workspace.applyEdit(we));
assert.equal((await vscode.workspace.openTextDocument(docUri)).getText(), 'before');
we = new vscode.WorkspaceEdit();
we.createFile(docUri, { overwrite: true, ignoreIfExists: true });
assert.ok(await vscode.workspace.applyEdit(we));
assert.equal((await vscode.workspace.openTextDocument(docUri)).getText(), '');
});
test('WorkspaceEdit: rename & ignoreIfExists', async function () {
let aUri = await createRandomFile('aaa');
let bUri = await createRandomFile('bbb');
let we = new vscode.WorkspaceEdit();
we.renameFile(aUri, bUri);
assert.ok(!await vscode.workspace.applyEdit(we));
we = new vscode.WorkspaceEdit();
we.renameFile(aUri, bUri, { ignoreIfExists: true });
assert.ok(await vscode.workspace.applyEdit(we));
we = new vscode.WorkspaceEdit();
we.renameFile(aUri, bUri, { overwrite: false, ignoreIfExists: true });
assert.ok(!await vscode.workspace.applyEdit(we));
we = new vscode.WorkspaceEdit();
we.renameFile(aUri, bUri, { overwrite: true, ignoreIfExists: true });
assert.ok(await vscode.workspace.applyEdit(we));
});
test('WorkspaceEdit: delete & ignoreIfNotExists', async function () {
let docUri = await createRandomFile();
let we = new vscode.WorkspaceEdit();
we.deleteFile(docUri, { ignoreIfNotExists: false });
assert.ok(await vscode.workspace.applyEdit(we));
we = new vscode.WorkspaceEdit();
we.deleteFile(docUri, { ignoreIfNotExists: false });
assert.ok(!await vscode.workspace.applyEdit(we));
we = new vscode.WorkspaceEdit();
we.deleteFile(docUri, { ignoreIfNotExists: true });
assert.ok(await vscode.workspace.applyEdit(we));
});
});

View file

@ -13,6 +13,7 @@
"postinstall": "node build/npm/postinstall.js",
"compile": "gulp compile --max_old_space_size=4095",
"watch": "gulp watch --max_old_space_size=4095",
"watch-client": "gulp watch-client --max_old_space_size=4095",
"monaco-editor-test": "mocha --only-monaco-editor",
"precommit": "node build/gulpfile.hygiene.js",
"gulp": "gulp --max_old_space_size=4095",

View file

@ -11,7 +11,7 @@ import * as nls from 'vs/nls';
import * as lifecycle from 'vs/base/common/lifecycle';
import { TPromise } from 'vs/base/common/winjs.base';
import { Builder, $ } from 'vs/base/browser/builder';
import { SelectBox } from 'vs/base/browser/ui/selectBox/selectBox';
import { SelectBox, ISelectBoxOptions } from 'vs/base/browser/ui/selectBox/selectBox';
import { IAction, IActionRunner, Action, IActionChangeEvent, ActionRunner, IRunEvent } from 'vs/base/common/actions';
import * as DOM from 'vs/base/browser/dom';
import * as types from 'vs/base/common/types';
@ -762,10 +762,10 @@ export class SelectActionItem extends BaseActionItem {
protected selectBox: SelectBox;
protected toDispose: lifecycle.IDisposable[];
constructor(ctx: any, action: IAction, options: string[], selected: number, contextViewProvider: IContextViewProvider
constructor(ctx: any, action: IAction, options: string[], selected: number, contextViewProvider: IContextViewProvider, selectBoxOptions?: ISelectBoxOptions
) {
super(ctx, action);
this.selectBox = new SelectBox(options, selected, contextViewProvider);
this.selectBox = new SelectBox(options, selected, contextViewProvider, null, selectBoxOptions);
this.toDispose = [];
this.toDispose.push(this.selectBox);

View file

@ -56,6 +56,7 @@ export interface IBreadcrumbsItemEvent {
type: 'select' | 'focus';
item: BreadcrumbsItem;
node: HTMLElement;
payload: any;
}
export class BreadcrumbsWidget {
@ -164,23 +165,23 @@ export class BreadcrumbsWidget {
return this._items[this._focusedItemIdx];
}
setFocused(item: BreadcrumbsItem): void {
this._focus(this._items.indexOf(item));
setFocused(item: BreadcrumbsItem, payload?: any): void {
this._focus(this._items.indexOf(item), payload);
}
focusPrev(): any {
focusPrev(payload?: any): any {
if (this._focusedItemIdx > 0) {
this._focus(this._focusedItemIdx - 1);
this._focus(this._focusedItemIdx - 1, payload);
}
}
focusNext(): any {
focusNext(payload?: any): any {
if (this._focusedItemIdx + 1 < this._nodes.length) {
this._focus(this._focusedItemIdx + 1);
this._focus(this._focusedItemIdx + 1, payload);
}
}
private _focus(nth: number): void {
private _focus(nth: number, payload: any): void {
this._focusedItemIdx = -1;
for (let i = 0; i < this._nodes.length; i++) {
const node = this._nodes[i];
@ -192,7 +193,7 @@ export class BreadcrumbsWidget {
}
}
this._reveal(this._focusedItemIdx);
this._onDidFocusItem.fire({ type: 'focus', item: this._items[this._focusedItemIdx], node: this._nodes[this._focusedItemIdx] });
this._onDidFocusItem.fire({ type: 'focus', item: this._items[this._focusedItemIdx], node: this._nodes[this._focusedItemIdx], payload });
}
reveal(item: BreadcrumbsItem): void {
@ -213,11 +214,11 @@ export class BreadcrumbsWidget {
return this._items[this._selectedItemIdx];
}
setSelection(item: BreadcrumbsItem): void {
this._select(this._items.indexOf(item));
setSelection(item: BreadcrumbsItem, payload?: any): void {
this._select(this._items.indexOf(item), payload);
}
private _select(nth: number): void {
private _select(nth: number, payload: any): void {
this._selectedItemIdx = -1;
for (let i = 0; i < this._nodes.length; i++) {
const node = this._nodes[i];
@ -228,7 +229,7 @@ export class BreadcrumbsWidget {
dom.addClass(node, 'selected');
}
}
this._onDidSelectItem.fire({ type: 'select', item: this._items[this._selectedItemIdx], node: this._nodes[this._selectedItemIdx] });
this._onDidSelectItem.fire({ type: 'select', item: this._items[this._selectedItemIdx], node: this._nodes[this._selectedItemIdx], payload });
}
setItems(items: BreadcrumbsItem[]): void {
@ -236,7 +237,7 @@ export class BreadcrumbsWidget {
let removed = this._items.splice(prefix, this._items.length - prefix, ...items.slice(prefix));
this._render(prefix);
dispose(removed);
this._focus(-1);
this._focus(-1, undefined);
}
private _render(start: number): void {
@ -275,8 +276,8 @@ export class BreadcrumbsWidget {
for (let el = event.target; el; el = el.parentElement) {
let idx = this._nodes.indexOf(el as any);
if (idx >= 0) {
this._focus(idx);
this._select(idx);
this._focus(idx, event);
this._select(idx, event);
break;
}
}

View file

@ -524,6 +524,10 @@ export class HistoryInputBox extends InputBox implements IHistoryNavigationWidge
}
public showNextValue(): void {
if (!this.history.has(this.value)) {
this.addToHistory();
}
let next = this.getNextValue();
if (next) {
next = next === this.value ? this.getNextValue() : next;

View file

@ -23,6 +23,7 @@ export interface ISelectBoxDelegate {
readonly onDidSelect: Event<ISelectData>;
setOptions(options: string[], selected?: number, disabled?: number): void;
select(index: number): void;
setAriaLabel(label: string);
focus(): void;
blur(): void;
dispose(): void;
@ -34,6 +35,7 @@ export interface ISelectBoxDelegate {
}
export interface ISelectBoxOptions {
ariaLabel?: string;
minBottomMargin?: number;
}
@ -67,7 +69,7 @@ export class SelectBox extends Widget implements ISelectBoxDelegate {
// Instantiate select implementation based on platform
if (isMacintosh) {
this.selectBoxDelegate = new SelectBoxNative(options, selected, styles);
this.selectBoxDelegate = new SelectBoxNative(options, selected, styles, selectBoxOptions);
} else {
this.selectBoxDelegate = new SelectBoxList(options, selected, contextViewProvider, styles, selectBoxOptions);
}
@ -89,6 +91,10 @@ export class SelectBox extends Widget implements ISelectBoxDelegate {
this.selectBoxDelegate.select(index);
}
public setAriaLabel(label: string): void {
this.selectBoxDelegate.setAriaLabel(label);
}
public focus(): void {
this.selectBoxDelegate.focus();
}

View file

@ -117,7 +117,12 @@ export class SelectBoxList implements ISelectBoxDelegate, IVirtualDelegate<ISele
// Use custom CSS vars for padding calculation
this.selectElement.className = 'monaco-select-box monaco-select-box-dropdown-padding';
if (typeof this.selectBoxOptions.ariaLabel === 'string') {
this.selectElement.setAttribute('aria-label', this.selectBoxOptions.ariaLabel);
}
this._onDidSelect = new Emitter<ISelectData>();
this.styles = styles;
this.registerListeners();
@ -271,6 +276,12 @@ export class SelectBoxList implements ISelectBoxDelegate, IVirtualDelegate<ISele
this.selectElement.title = this.options[this.selected];
}
public setAriaLabel(label: string): void {
this.selectBoxOptions.ariaLabel = label;
this.selectElement.setAttribute('aria-label', this.selectBoxOptions.ariaLabel);
this.selectList.getHTMLElement().setAttribute('aria-label', this.selectBoxOptions.ariaLabel);
}
public focus(): void {
if (this.selectElement) {
this.selectElement.focus();
@ -417,7 +428,15 @@ export class SelectBoxList implements ISelectBoxDelegate, IVirtualDelegate<ISele
this.layoutSelectDropDown();
return {
dispose: () => container.removeChild(this.selectDropDownContainer) // remove to take out the CSS rules we add
dispose: () => {
// contextView will dispose itself if moving from one View to another
try {
container.removeChild(this.selectDropDownContainer); // remove to take out the CSS rules we add
}
catch (error) {
// Ignore, removed already by change of focus
}
}
};
}
@ -489,8 +508,8 @@ export class SelectBoxList implements ISelectBoxDelegate, IVirtualDelegate<ISele
// Set final container height after adjustments
this.selectDropDownContainer.style.height = (listHeight + verticalPadding) + 'px';
// Determine optimal width - min(longest option), opt(parent select), max(ContextView controlled)
const selectWidth = dom.getTotalWidth(this.selectElement);
// Determine optimal width - min(longest option), opt(parent select, excluding margins), max(ContextView controlled)
const selectWidth = this.selectElement.offsetWidth;
const selectMinWidth = this.setWidthControlElement(this.widthControlElement);
const selectOptimalWidth = Math.max(selectMinWidth, Math.round(selectWidth)).toString() + 'px';
@ -537,6 +556,7 @@ export class SelectBoxList implements ISelectBoxDelegate, IVirtualDelegate<ISele
this.listRenderer = new SelectListRenderer();
this.selectList = new List(this.selectDropDownListContainer, this, [this.listRenderer], {
ariaLabel: this.selectBoxOptions.ariaLabel,
useShadows: false,
selectOnMouseDown: false,
verticalScrollMode: ScrollbarVisibility.Visible,
@ -566,6 +586,8 @@ export class SelectBoxList implements ISelectBoxDelegate, IVirtualDelegate<ISele
.on(e => this.onMouseUp(e), this, this.toDispose);
this.toDispose.push(this.selectList.onDidBlur(e => this.onListBlur()));
this.selectList.getHTMLElement().setAttribute('aria-expanded', 'true');
}
// List methods

View file

@ -8,31 +8,36 @@ import { Event, Emitter } from 'vs/base/common/event';
import { KeyCode } from 'vs/base/common/keyCodes';
import * as dom from 'vs/base/browser/dom';
import * as arrays from 'vs/base/common/arrays';
import { ISelectBoxDelegate, ISelectBoxStyles, ISelectData } from 'vs/base/browser/ui/selectBox/selectBox';
import { ISelectBoxDelegate, ISelectBoxOptions, ISelectBoxStyles, ISelectData } from 'vs/base/browser/ui/selectBox/selectBox';
import { isMacintosh } from 'vs/base/common/platform';
export class SelectBoxNative implements ISelectBoxDelegate {
private selectElement: HTMLSelectElement;
private selectBoxOptions: ISelectBoxOptions;
private options: string[];
private selected: number;
private readonly _onDidSelect: Emitter<ISelectData>;
private toDispose: IDisposable[];
private styles: ISelectBoxStyles;
constructor(options: string[], selected: number, styles: ISelectBoxStyles) {
constructor(options: string[], selected: number, styles: ISelectBoxStyles, selectBoxOptions?: ISelectBoxOptions) {
this.toDispose = [];
this.selectBoxOptions = selectBoxOptions || Object.create(null);
this.selectElement = document.createElement('select');
this.selectElement.className = 'monaco-select-box';
if (typeof this.selectBoxOptions.ariaLabel === 'string') {
this.selectElement.setAttribute('aria-label', this.selectBoxOptions.ariaLabel);
}
this._onDidSelect = new Emitter<ISelectData>();
this.styles = styles;
this.registerListeners();
this.setOptions(options, selected);
}
@ -103,6 +108,11 @@ export class SelectBoxNative implements ISelectBoxDelegate {
this.selectElement.title = this.options[this.selected];
}
public setAriaLabel(label: string): void {
this.selectBoxOptions.ariaLabel = label;
this.selectElement.setAttribute('aria-label', label);
}
public focus(): void {
if (this.selectElement) {
this.selectElement.focus();

View file

@ -474,14 +474,19 @@ export function arrayInsert<T>(target: T[], insertIndex: number, insertArr: T[])
* Uses Fisher-Yates shuffle to shuffle the given array
* @param array
*/
export function shuffle<T>(array: T[]): void {
var i = 0
, j = 0
, temp = null;
export function shuffle<T>(array: T[], seed?: number): void {
// Seeded random number generator in JS. Modified from:
// https://stackoverflow.com/questions/521295/seeding-the-random-number-generator-in-javascript
const random = () => {
var x = Math.sin(seed++) * 179426549; // throw away most significant digits and reduce any potential bias
return x - Math.floor(x);
};
for (i = array.length - 1; i > 0; i -= 1) {
j = Math.floor(Math.random() * (i + 1));
temp = array[i];
const rand = typeof seed === 'number' ? random : Math.random;
for (let i = array.length - 1; i > 0; i -= 1) {
let j = Math.floor(rand() * (i + 1));
let temp = array[i];
array[i] = array[j];
array[j] = temp;
}

View file

@ -69,19 +69,23 @@ export interface IDebouceReducer<T> {
export function debounce<T>(delay: number, reducer?: IDebouceReducer<T>, initialValueProvider?: () => T): Function {
return createDecorator((fn, key) => {
const timerKey = `$debounce$${key}`;
let result = initialValueProvider ? initialValueProvider() : void 0;
const resultKey = `$debounce$result$${key}`;
return function (this: any, ...args: any[]) {
if (!this[resultKey]) {
this[resultKey] = initialValueProvider ? initialValueProvider() : void 0;
}
clearTimeout(this[timerKey]);
if (reducer) {
result = reducer(result, ...args);
args = [result];
this[resultKey] = reducer(this[resultKey], ...args);
args = [this[resultKey]];
}
this[timerKey] = setTimeout(() => {
fn.apply(this, args);
result = initialValueProvider ? initialValueProvider() : void 0;
this[resultKey] = initialValueProvider ? initialValueProvider() : void 0;
}, delay);
};
});

View file

@ -229,7 +229,7 @@ export class Scrollable extends Disposable {
/**
* Returns the final scroll position that the instance will have once the smooth scroll animation concludes.
* If no scroll animation is occuring, it will return the current scroll position instead.
* If no scroll animation is occurring, it will return the current scroll position instead.
*/
public getFutureScrollPosition(): IScrollPosition {
if (this._smoothScrolling) {

View file

@ -1052,7 +1052,7 @@
/users/foo/src/vs/workbench/parts/extensions/browser/extensionsList.ts
/users/foo/src/vs/workbench/parts/extensions/browser/extensionsActions.ts
/users/foo/src/vs/workbench/parts/extensions/browser/media
/users/foo/src/vs/workbench/parts/extensions/browser/media/language-icon.png
/users/foo/src/vs/workbench/parts/extensions/browser/media/language-icon.svg
/users/foo/src/vs/workbench/parts/extensions/browser/media/theme-icon.png
/users/foo/src/vs/workbench/parts/extensions/browser/media/clear.svg
/users/foo/src/vs/workbench/parts/extensions/browser/media/HalfStarLight.svg

View file

@ -43,7 +43,6 @@ import { LocalizationsChannel } from 'vs/platform/localizations/common/localizat
import { DialogChannelClient } from 'vs/platform/dialogs/common/dialogIpc';
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { DefaultURITransformer } from 'vs/base/common/uriIpc';
export interface ISharedProcessConfiguration {
readonly machineId: string;
@ -123,7 +122,7 @@ function main(server: Server, initData: ISharedProcessInitData, configuration: I
instantiationService2.invokeFunction(accessor => {
const extensionManagementService = accessor.get(IExtensionManagementService);
const channel = new ExtensionManagementChannel(extensionManagementService, DefaultURITransformer);
const channel = new ExtensionManagementChannel(extensionManagementService);
server.registerChannel('extensions', channel);
// clean up deprecated extensions

View file

@ -318,7 +318,7 @@ export async function main(argv: string[]): Promise<any> {
env
};
if (typeof args['upload-logs'] !== undefined) {
if (typeof args['upload-logs'] !== 'undefined') {
options['stdio'] = ['pipe', 'pipe', 'pipe'];
} else if (!verbose) {
options['stdio'] = 'ignore';

View file

@ -578,9 +578,9 @@ export interface ICodeEditor extends editorCommon.IEditor {
* The edits will land on the undo-redo stack, but no "undo stop" will be pushed.
* @param source The source of the call.
* @param edits The edits to execute.
* @param endCursoState Cursor state after the edits were applied.
* @param endCursorState Cursor state after the edits were applied.
*/
executeEdits(source: string, edits: IIdentifiedSingleEditOperation[], endCursoState?: Selection[]): boolean;
executeEdits(source: string, edits: IIdentifiedSingleEditOperation[], endCursorState?: Selection[]): boolean;
/**
* Execute multiple (concommitent) commands on the editor.
@ -853,4 +853,4 @@ export function getCodeEditor(thing: any): ICodeEditor {
}
return null;
}
}

View file

@ -8,7 +8,6 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
import { WorkspaceEdit } from 'vs/editor/common/modes';
import { TPromise } from 'vs/base/common/winjs.base';
import { ICodeEditor } from '../editorBrowser';
import { Selection } from 'vs/editor/common/core/selection';
import { IProgressRunner } from 'vs/platform/progress/common/progress';
export const IBulkEditService = createDecorator<IBulkEditService>('IWorkspaceEditService');
@ -20,7 +19,6 @@ export interface IBulkEditOptions {
}
export interface IBulkEditResult {
selection: Selection;
ariaSummary: string;
}

View file

@ -31,7 +31,7 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle
import { Event, Emitter } from 'vs/base/common/event';
import * as editorOptions from 'vs/editor/common/config/editorOptions';
import { registerThemingParticipant, IThemeService, ITheme, getThemeTypeSelector } from 'vs/platform/theme/common/themeService';
import { scrollbarShadow, diffInserted, diffRemoved, defaultInsertColor, defaultRemoveColor, diffInsertedOutline, diffRemovedOutline } from 'vs/platform/theme/common/colorRegistry';
import { scrollbarShadow, diffInserted, diffRemoved, defaultInsertColor, defaultRemoveColor, diffInsertedOutline, diffRemovedOutline, diffBorder } from 'vs/platform/theme/common/colorRegistry';
import { Color } from 'vs/base/common/color';
import { OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager';
import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer';
@ -2052,4 +2052,9 @@ registerThemingParticipant((theme, collector) => {
if (shadow) {
collector.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${shadow}; }`);
}
let border = theme.getColor(diffBorder);
if (border) {
collector.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${border}; }`);
}
});

View file

@ -607,7 +607,7 @@ export namespace CursorMove {
\`\`\`
'left', 'right', 'up', 'down'
'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'
'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter',
'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'
'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'
\`\`\`
* 'by': Unit to move. Default is computed based on 'to' value.

View file

@ -906,7 +906,7 @@ export function isResourceTextEdit(thing: any): thing is ResourceTextEdit {
export interface ResourceFileEdit {
oldUri: URI;
newUri: URI;
options: { overwrite?: boolean, ignoreIfExists?: boolean, recursive?: boolean };
options: { overwrite?: boolean, ignoreIfNotExists?: boolean, ignoreIfExists?: boolean, recursive?: boolean };
}
export interface ResourceTextEdit {

View file

@ -9,6 +9,7 @@ export class CodeActionKind {
private static readonly sep = '.';
public static readonly Empty = new CodeActionKind('');
public static readonly QuickFix = new CodeActionKind('quickfix');
public static readonly Refactor = new CodeActionKind('refactor');
public static readonly Source = new CodeActionKind('source');
public static readonly SourceOrganizeImports = new CodeActionKind('source.organizeImports');

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-bg{fill:#424242}.icon-vs-fg{fill:#f0eff1}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M16 14H0V2h16v12z" id="outline"/><path class="icon-vs-bg" d="M1 3v10h14V3H1zm13 9H8V8.507l3.998.006-2.121 2.129.707.707 3.35-3.35-3.35-3.338-.707.706 2.138 2.146L8 7.507V4h6v8z" id="iconBg"/><path class="icon-vs-fg" d="M14 4v8H8V8.507l3.998.006-2.121 2.129.707.707 3.35-3.35-3.35-3.338-.707.706 2.138 2.146L8 7.507V4h6zM6.057 5.367L5.35 4.66 2 8.01l3.35 3.338.707-.707-2.139-2.146L8 8.501v-1l-4.064-.005 2.121-2.129z" id="iconFg"/></svg>

After

Width:  |  Height:  |  Size: 738 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#252526}.icon-vs-out{fill:#252526}.icon-vs-bg{fill:#c5c5c5}.icon-vs-fg{fill:#2a292c}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M16 14H0V2h16v12z" id="outline"/><path class="icon-vs-bg" d="M1 3v10h14V3H1zm13 9H8V8.507l3.998.006-2.121 2.129.707.707 3.35-3.35-3.35-3.338-.707.706 2.138 2.146L8 7.507V4h6v8z" id="iconBg"/><path class="icon-vs-fg" d="M14 4v8H8V8.507l3.998.006-2.121 2.129.707.707 3.35-3.35-3.35-3.338-.707.706 2.138 2.146L8 7.507V4h6zM6.057 5.367L5.35 4.66 2 8.01l3.35 3.338.707-.707-2.139-2.146L8 8.501v-1l-4.064-.005 2.121-2.129z" id="iconFg"/></svg>

After

Width:  |  Height:  |  Size: 738 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-action-orange{fill:#c27d1a}</style><g id="canvas"><path id="XMLID_1_" class="icon-canvas-transparent" d="M16 16H0V0h16v16z"/></g><path class="icon-vs-out" d="M16 6.586l-3-3L11.586 5H9.414l1-1-4-4h-.828L0 5.586v.828l4 4L6.414 8H7v5h1.586l3 3h.828L16 12.414v-.828L13.914 9.5 16 7.414v-.828z" id="outline"/><g id="iconBg"><path class="icon-vs-action-orange" d="M13 10l2 2-3 3-2-2 1-1H8V7H6L4 9 1 6l5-5 3 3-2 2h5l1-1 2 2-3 3-2-2 1-1H9v4l2.999.002L13 10z"/></g></svg>

After

Width:  |  Height:  |  Size: 612 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#252526}.icon-vs-out{fill:#252526}.icon-vs-action-orange{fill:#f1cb95}</style><g id="canvas"><path id="XMLID_1_" class="icon-canvas-transparent" d="M16 16H0V0h16v16z"/></g><path class="icon-vs-out" d="M16 6.586l-3-3L11.586 5H9.414l1-1-4-4h-.828L0 5.586v.828l4 4L6.414 8H7v5h1.586l3 3h.828L16 12.414v-.828L13.914 9.5 16 7.414v-.828z" id="outline"/><g id="iconBg"><path class="icon-vs-action-orange" d="M13 10l2 2-3 3-2-2 1-1H8V7H6L4 9 1 6l5-5 3 3-2 2h5l1-1 2 2-3 3-2-2 1-1H9v4l2.999.002L13 10z"/></g></svg>

After

Width:  |  Height:  |  Size: 612 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-bg{fill:#424242}.icon-vs-red{fill:#e51400}.icon-vs-yellow{fill:#ffcc00}.icon-vs-green{fill:#339933}.icon-vs-blue{fill:#1ba1e2}.icon-vs-action-purple{fill:#652d90}.icon-white{fill:#ffffff}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M16 8c0 4.411-3.589 8-8 8a2.803 2.803 0 0 1-2.8-2.8c0-.833.272-1.629.766-2.241a.596.596 0 0 0 .101-.359.667.667 0 0 0-.667-.666.58.58 0 0 0-.358.102A3.584 3.584 0 0 1 2.8 10.8 2.803 2.803 0 0 1 0 8c0-4.411 3.589-8 8-8s8 3.589 8 8z" id="outline"/><path class="icon-white" d="M5.4 7.933a2.67 2.67 0 0 1 2.667 2.666c0 .606-.193 1.179-.544 1.614a1.599 1.599 0 0 0-.323.987.8.8 0 0 0 .8.8c3.309 0 6-2.691 6-6s-2.691-6-6-6-6 2.691-6 6c0 .441.359.8.8.8.378 0 .729-.114.986-.322A2.568 2.568 0 0 1 5.4 7.933z" id="iconFg"/><g id="iconBg"><path class="icon-vs-bg" d="M8 15c-.992 0-1.8-.808-1.8-1.8 0-.606.193-1.179.544-1.613.208-.259.323-.609.323-.987 0-.919-.748-1.666-1.667-1.666-.377 0-.728.115-.986.323A2.58 2.58 0 0 1 2.8 9.8C1.808 9.8 1 8.992 1 8c0-3.86 3.14-7 7-7 3.859 0 7 3.14 7 7 0 3.859-3.141 7-7 7zM5.4 7.933a2.67 2.67 0 0 1 2.667 2.666c0 .606-.193 1.179-.544 1.614a1.599 1.599 0 0 0-.323.987.8.8 0 0 0 .8.8c3.309 0 6-2.691 6-6s-2.691-6-6-6-6 2.691-6 6c0 .441.359.8.8.8.378 0 .729-.114.986-.322A2.568 2.568 0 0 1 5.4 7.933z"/><path class="icon-vs-action-purple" d="M4.5 5.375a.875.875 0 1 0 0 1.75.875.875 0 0 0 0-1.75z"/><path class="icon-vs-blue" d="M7.125 3.625a.875.875 0 1 0 0 1.75.875.875 0 0 0 0-1.75z"/><path class="icon-vs-green" d="M10.625 4.5a.875.875 0 1 0 0 1.75.875.875 0 0 0 0-1.75z"/><path class="icon-vs-yellow" d="M11.5 8a.875.875 0 1 0 0 1.75.875.875 0 0 0 0-1.75z"/><path class="icon-vs-red" d="M9.75 10.625a.875.875 0 1 0 0 1.75.875.875 0 0 0 0-1.75z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#252526}.icon-vs-out{fill:#252526}.icon-vs-bg{fill:#c5c5c5}.icon-vs-red{fill:#ff4635}.icon-vs-yellow{fill:#ffda48}.icon-vs-green{fill:#78d278}.icon-vs-blue{fill:#37aee7}.icon-vs-action-purple{fill:#b180d7}.icon-white{fill:#000000}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M16 8c0 4.411-3.589 8-8 8a2.803 2.803 0 0 1-2.8-2.8c0-.833.272-1.629.766-2.241a.596.596 0 0 0 .101-.359.667.667 0 0 0-.667-.666.58.58 0 0 0-.358.102A3.584 3.584 0 0 1 2.8 10.8 2.803 2.803 0 0 1 0 8c0-4.411 3.589-8 8-8s8 3.589 8 8z" id="outline"/><path class="icon-white" d="M5.4 7.933a2.67 2.67 0 0 1 2.667 2.666c0 .606-.193 1.179-.544 1.614a1.599 1.599 0 0 0-.323.987.8.8 0 0 0 .8.8c3.309 0 6-2.691 6-6s-2.691-6-6-6-6 2.691-6 6c0 .441.359.8.8.8.378 0 .729-.114.986-.322A2.568 2.568 0 0 1 5.4 7.933z" id="iconFg"/><g id="iconBg"><path class="icon-vs-bg" d="M8 15c-.992 0-1.8-.808-1.8-1.8 0-.606.193-1.179.544-1.613.208-.259.323-.609.323-.987 0-.919-.748-1.666-1.667-1.666-.377 0-.728.115-.986.323A2.58 2.58 0 0 1 2.8 9.8C1.808 9.8 1 8.992 1 8c0-3.86 3.14-7 7-7 3.859 0 7 3.14 7 7 0 3.859-3.141 7-7 7zM5.4 7.933a2.67 2.67 0 0 1 2.667 2.666c0 .606-.193 1.179-.544 1.614a1.599 1.599 0 0 0-.323.987.8.8 0 0 0 .8.8c3.309 0 6-2.691 6-6s-2.691-6-6-6-6 2.691-6 6c0 .441.359.8.8.8.378 0 .729-.114.986-.322A2.568 2.568 0 0 1 5.4 7.933z"/><path class="icon-vs-action-purple" d="M4.5 5.375a.875.875 0 1 0 0 1.75.875.875 0 0 0 0-1.75z"/><path class="icon-vs-blue" d="M7.125 3.625a.875.875 0 1 0 0 1.75.875.875 0 0 0 0-1.75z"/><path class="icon-vs-green" d="M10.625 4.5a.875.875 0 1 0 0 1.75.875.875 0 0 0 0-1.75z"/><path class="icon-vs-yellow" d="M11.5 8a.875.875 0 1 0 0 1.75.875.875 0 0 0 0-1.75z"/><path class="icon-vs-red" d="M9.75 10.625a.875.875 0 1 0 0 1.75.875.875 0 0 0 0-1.75z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" enable-background="new 0 0 16 16"><style type="text/css">.icon-canvas-transparent{opacity:0;fill:#F6F6F6;} .icon-vs-out{fill:#F6F6F6;} .icon-vs-bg{fill:#424242;} .icon-vs-fg_x0020_2{fill:#F0EFF1;}</style><path class="icon-canvas-transparent" d="M16 16h-16v-16h16v16z" id="canvas"/><path class="icon-vs-out" d="M15 16h-13v-16h8.621l4.379 4.379v11.621z" id="outline"/><path class="icon-vs-fg_x0020_2" d="M13 14h-9v-12h5v4h4v8zm-3-9v-2.793l2.793 2.793h-2.793z" id="iconFg"/><path class="icon-vs-bg" d="M3 1v14h11v-10.207l-3.793-3.793h-7.207zm10 13h-9v-12h5v4h4v8zm-3-9v-2.793l2.793 2.793h-2.793z" id="iconBg"/></svg>

After

Width:  |  Height:  |  Size: 673 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" enable-background="new 0 0 16 16"><style type="text/css">.icon-canvas-transparent{opacity:0;fill:#F6F6F6;} .icon-vs-out{fill:#F6F6F6;} .icon-vs-bg{fill:#c5c5c5;} .icon-vs-fg_x0020_2{fill:#F0EFF1;}</style><path class="icon-canvas-transparent" d="M16 16h-16v-16h16v16z" id="canvas"/><path class="icon-vs-out" d="M15 16h-13v-16h8.621l4.379 4.379v11.621z" id="outline"/><path class="icon-vs-fg_x0020_2" d="M13 14h-9v-12h5v4h4v8zm-3-9v-2.793l2.793 2.793h-2.793z" id="iconFg"/><path class="icon-vs-bg" d="M3 1v14h11v-10.207l-3.793-3.793h-7.207zm10 13h-9v-12h5v4h4v8zm-3-9v-2.793l2.793 2.793h-2.793z" id="iconBg"/></svg>

After

Width:  |  Height:  |  Size: 673 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-fg{fill:#f0eff1}.icon-vs-action-orange{fill:#c27d1a}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M14.414 1L16 2.586v5.828L14.414 10H10v3.416L8.414 15H1.586L0 13.416v-5.83L1.586 6H6V2.586L7.586 1h6.828z" id="outline"/><path class="icon-vs-fg" d="M2 13h6V8H2v5zm1-4h4v1H3V9zm0 2h4v1H3v-1zm11-5V3H8v3h.414L9 6.586V6h4v1H9.414l.586.586V8h4V6zm-1-1H9V4h4v1z" id="iconFg"/><path class="icon-vs-action-orange" d="M3 11h4.001v1H3v-1zm0-1h4.001V9H3v1zm6-2v5l-1 1H2l-1-1V8l1-1h6l1 1zM8 8H2v5h6V8zm1-2l1 1h3V6H9zm0-1h4V4H9v1zm5-3H8L7 3v3h1V3h6v5h-4v1h4l1-1V3l-1-1z" id="iconBg"/></svg>

After

Width:  |  Height:  |  Size: 789 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#2d2d30}.icon-vs-out{fill:#2d2d30}.icon-vs-fg{fill:#2b282e}.icon-vs-action-orange{fill:#e8ab53}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M14.414 1L16 2.586v5.828L14.414 10H10v3.416L8.414 15H1.586L0 13.416v-5.83L1.586 6H6V2.586L7.586 1h6.828z" id="outline"/><path class="icon-vs-fg" d="M2 13h6V8H2v5zm1-4h4v1H3V9zm0 2h4v1H3v-1zm11-5V3H8v3h.414L9 6.586V6h4v1H9.414l.586.586V8h4V6zm-1-1H9V4h4v1z" id="iconFg"/><path class="icon-vs-action-orange" d="M3 11h4.001v1H3v-1zm0-1h4.001V9H3v1zm6-2v5l-1 1H2l-1-1V8l1-1h6l1 1zM8 8H2v5h6V8zm1-2l1 1h3V6H9zm0-1h4V4H9v1zm5-3H8L7 3v3h1V3h6v5h-4v1h4l1-1V3l-1-1z" id="iconBg"/></svg>

After

Width:  |  Height:  |  Size: 789 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" enable-background="new 0 0 16 16"><style type="text/css">.icon-canvas-transparent{opacity:0;fill:#F6F6F6;} .icon-vs-out{fill:#F6F6F6;} .icon-vs-fg{fill:#F0EFF1;} .icon-vs-action-blue{fill:#00539C;}</style><path class="icon-canvas-transparent" d="M16 16h-16v-16h16v16z" id="canvas"/><path class="icon-vs-out" d="M0 10.736v-6.236l9-4.5 7 3.5v6.236l-9 4.5-7-3.5z" id="outline"/><path class="icon-vs-action-blue" d="M9 1l-8 4v5l6 3 8-4v-5l-6-3zm-2 5.882l-3.764-1.882 5.764-2.882 3.764 1.882-5.764 2.882z" id="iconBg"/><path class="icon-vs-fg" d="M9 2.118l3.764 1.882-5.764 2.882-3.764-1.882 5.764-2.882z" id="iconFg"/></svg>

After

Width:  |  Height:  |  Size: 680 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" enable-background="new 0 0 16 16"><style type="text/css">.icon-canvas-transparent{opacity:0;fill:#F6F6F6;} .icon-vs-out{fill:#F6F6F6;} .icon-vs-fg{fill:#F0EFF1;} .icon-vs-action-blue{fill:#00539C;}</style><path class="icon-canvas-transparent" d="M16 16h-16v-16h16v16z" id="canvas"/><path class="icon-vs-out" d="M0 10.736v-6.236l9-4.5 7 3.5v6.236l-9 4.5-7-3.5z" id="outline"/><path class="icon-vs-action-blue" d="M9 1l-8 4v5l6 3 8-4v-5l-6-3zm-2 5.882l-3.764-1.882 5.764-2.882 3.764 1.882-5.764 2.882z" id="iconBg"/><path class="icon-vs-fg" d="M9 2.118l3.764 1.882-5.764 2.882-3.764-1.882 5.764-2.882z" id="iconFg"/></svg>

After

Width:  |  Height:  |  Size: 680 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-bg{fill:#424242}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M11 15v-3h2V4h-2V1h5v14h-5zM0 15V1h5v3H3v8h2v3H0z" id="outline"/><g id="iconBg"><path class="icon-vs-bg" d="M4 14H1V2h3v1H2v10h2v1zM15 2h-3v1h2v10h-2v1h3V2z"/></g></svg>

After

Width:  |  Height:  |  Size: 445 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#252526}.icon-vs-out{fill:#252526}.icon-vs-bg{fill:#c5c5c5}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M11 15v-3h2V4h-2V1h5v14h-5zM0 15V1h5v3H3v8h2v3H0z" id="outline"/><g id="iconBg"><path class="icon-vs-bg" d="M4 14H1V2h3v1H2v10h2v1zM15 2h-3v1h2v10h-2v1h3V2z"/></g></svg>

After

Width:  |  Height:  |  Size: 445 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-bg{fill:#424242}.icon-vs-fg{fill:#f0eff1}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M16 5V2H9V1H0v14h13v-3h3V9h-1V6H9V5h7zm-8 7V9h1v3H8z" id="outline"/><path class="icon-vs-fg" d="M2 3h5v1H2V3z" id="iconFg"/><g id="iconBg"><path class="icon-vs-bg" d="M15 4h-5V3h5v1zm-1 3h-2v1h2V7zm-4 0H1v1h9V7zm2 6H1v1h11v-1zm-5-3H1v1h6v-1zm8 0h-5v1h5v-1zM8 2v3H1V2h7zM7 3H2v1h5V3z"/></g></svg>

After

Width:  |  Height:  |  Size: 596 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#252526}.icon-vs-out{fill:#252526}.icon-vs-bg{fill:#c5c5c5}.icon-vs-fg{fill:#2a292c}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M16 5V2H9V1H0v14h13v-3h3V9h-1V6H9V5h7zm-8 7V9h1v3H8z" id="outline"/><path class="icon-vs-fg" d="M2 3h5v1H2V3z" id="iconFg"/><g id="iconBg"><path class="icon-vs-bg" d="M15 4h-5V3h5v1zm-1 3h-2v1h2V7zm-4 0H1v1h9V7zm2 6H1v1h11v-1zm-5-3H1v1h6v-1zm8 0h-5v1h5v-1zM8 2v3H1V2h7zM7 3H2v1h5V3z"/></g></svg>

After

Width:  |  Height:  |  Size: 596 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" enable-background="new 0 0 16 16"><style type="text/css">.icon-canvas-transparent{opacity:0;fill:#F6F6F6;} .icon-vs-out{fill:#F6F6F6;} .icon-vs-fg{fill:#F0EFF1;} .icon-vs-action-blue{fill:#00539C;}</style><path class="icon-canvas-transparent" d="M16 16h-16v-16h16v16z" id="canvas"/><path class="icon-vs-out" d="M11.5 12c-1.915 0-3.602-1.241-4.228-3h-1.41c-.536.985-1.572 1.625-2.737 1.625-1.723 0-3.125-1.402-3.125-3.125s1.402-3.125 3.125-3.125c1.165 0 2.201.639 2.737 1.625h1.41c.626-1.759 2.313-3 4.228-3 2.481 0 4.5 2.019 4.5 4.5s-2.019 4.5-4.5 4.5z" id="outline"/><path class="icon-vs-fg" d="M11.5 9c-.827 0-1.5-.674-1.5-1.5 0-.828.673-1.5 1.5-1.5s1.5.672 1.5 1.5c0 .826-.673 1.5-1.5 1.5z" id="iconFg"/><path class="icon-vs-action-blue" d="M11.5 4c-1.762 0-3.205 1.306-3.45 3h-2.865c-.226-.931-1.059-1.625-2.06-1.625-1.174 0-2.125.951-2.125 2.125s.951 2.125 2.125 2.125c1 0 1.834-.694 2.06-1.625h2.865c.245 1.694 1.688 3 3.45 3 1.933 0 3.5-1.567 3.5-3.5s-1.567-3.5-3.5-3.5zm0 5c-.827 0-1.5-.673-1.5-1.5s.673-1.5 1.5-1.5 1.5.673 1.5 1.5-.673 1.5-1.5 1.5z" id="iconBg"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" enable-background="new 0 0 16 16"><style type="text/css">.icon-canvas-transparent{opacity:0;fill:#F6F6F6;} .icon-vs-out{fill:#F6F6F6;} .icon-vs-fg{fill:#F0EFF1;} .icon-vs-action-blue{fill:#00539C;}</style><path class="icon-canvas-transparent" d="M16 16h-16v-16h16v16z" id="canvas"/><path class="icon-vs-out" d="M11.5 12c-1.915 0-3.602-1.241-4.228-3h-1.41c-.536.985-1.572 1.625-2.737 1.625-1.723 0-3.125-1.402-3.125-3.125s1.402-3.125 3.125-3.125c1.165 0 2.201.639 2.737 1.625h1.41c.626-1.759 2.313-3 4.228-3 2.481 0 4.5 2.019 4.5 4.5s-2.019 4.5-4.5 4.5z" id="outline"/><path class="icon-vs-fg" d="M11.5 9c-.827 0-1.5-.674-1.5-1.5 0-.828.673-1.5 1.5-1.5s1.5.672 1.5 1.5c0 .826-.673 1.5-1.5 1.5z" id="iconFg"/><path class="icon-vs-action-blue" d="M11.5 4c-1.762 0-3.205 1.306-3.45 3h-2.865c-.226-.931-1.059-1.625-2.06-1.625-1.174 0-2.125.951-2.125 2.125s.951 2.125 2.125 2.125c1 0 1.834-.694 2.06-1.625h2.865c.245 1.694 1.688 3 3.45 3 1.933 0 3.5-1.567 3.5-3.5s-1.567-3.5-3.5-3.5zm0 5c-.827 0-1.5-.673-1.5-1.5s.673-1.5 1.5-1.5 1.5.673 1.5 1.5-.673 1.5-1.5 1.5z" id="iconBg"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><style>.icon-canvas-transparent,.icon-vs-out{fill:#f6f6f6;}.icon-canvas-transparent{opacity:0;}.icon-vs-fg{fill:#f0eff1;}.icon-vs-action-purple{fill:#652d90;}</style></defs><title>Method_16x</title><g id="canvas"><path class="icon-canvas-transparent" d="M16,16H0V0H16Z"/></g><g id="outline"><path class="icon-vs-out" d="M15,3.349v8.4L8.975,16h-.9L1,11.582V3.327L7.6,0H8.713Z"/></g><g id="iconFg"><path class="icon-vs-fg" d="M12.715,4.4,8.487,7.02,3.565,4.272,8.144,1.963ZM3,5.1,8,7.894v5.7L3,10.473Zm6,8.434V7.878L13,5.4v5.318Z"/></g><g id="iconBg"><path class="icon-vs-action-purple" d="M8.156.837,2,3.942v7.085L8.517,15.1,14,11.233V3.95ZM12.715,4.4,8.487,7.02,3.565,4.272,8.144,1.963ZM3,5.1,8,7.894v5.7L3,10.473Zm6,8.434V7.878L13,5.4v5.318Z"/></g></svg>

After

Width:  |  Height:  |  Size: 821 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><style>.icon-canvas-transparent,.icon-vs-out{fill:#252526;}.icon-canvas-transparent{opacity:0;}.icon-vs-fg{fill:#2a292c;}.icon-vs-action-purple{fill:#b180d7;}</style></defs><title>Method_16x</title><g id="canvas"><path class="icon-canvas-transparent" d="M16,16H0V0H16Z"/></g><g id="outline"><path class="icon-vs-out" d="M15,3.349v8.4L8.975,16h-.9L1,11.582V3.327L7.6,0H8.713Z"/></g><g id="iconFg"><path class="icon-vs-fg" d="M12.715,4.4,8.487,7.02,3.565,4.272,8.144,1.963ZM3,5.1,8,7.894v5.7L3,10.473Zm6,8.434V7.878L13,5.4v5.318Z"/></g><g id="iconBg"><path class="icon-vs-action-purple" d="M8.156.837,2,3.942v7.085L8.517,15.1,14,11.233V3.95ZM12.715,4.4,8.487,7.02,3.565,4.272,8.144,1.963ZM3,5.1,8,7.894v5.7L3,10.473Zm6,8.434V7.878L13,5.4v5.318Z"/></g></svg>

After

Width:  |  Height:  |  Size: 821 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-bg{fill:#424242}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M9.26 11.984l.978-.021a.962.962 0 0 0 .09-.006c.011-.063.026-.179.026-.361V9.688c0-.679.185-1.257.53-1.707-.346-.452-.53-1.03-.53-1.705V4.35c0-.167-.021-.259-.034-.302L9.26 4.02V.973l1.011.011c2.167.024 3.409 1.156 3.409 3.105v1.962c0 .351.071.461.072.462l.936.06.053.927v1.936l-.936.061c-.076.016-.125.146-.125.424v2.017c0 .914-.332 3.043-3.408 3.078l-1.012.011v-3.043zm-3.521 3.032c-3.089-.035-3.422-2.164-3.422-3.078V9.921c0-.327-.066-.432-.067-.433l-.937-.06-.063-.929V6.563l.942-.06c.058 0 .125-.114.125-.452V4.09c0-1.949 1.248-3.081 3.422-3.105L6.75.973V4.02l-.975.023a.572.572 0 0 0-.093.01c.006.021-.019.115-.019.297v1.928c0 .675-.186 1.253-.534 1.705.348.45.534 1.028.534 1.707v1.907c0 .175.014.291.027.363.023.002 1.06.025 1.06.025v3.043l-1.011-.012z" id="outline"/><g id="iconBg"><path class="icon-vs-bg" d="M5.75 14.016c-1.623-.019-2.434-.711-2.434-2.078V9.921c0-.902-.355-1.376-1.066-1.422v-.998c.711-.045 1.066-.529 1.066-1.449V4.09c0-1.385.811-2.087 2.434-2.105v1.06c-.725.017-1.087.453-1.087 1.305v1.928c0 .92-.454 1.488-1.36 1.702V8c.907.201 1.36.763 1.36 1.688v1.907c0 .488.081.835.243 1.042.162.208.443.316.844.325v1.054zm7.99-5.517c-.706.045-1.06.52-1.06 1.422v2.017c0 1.367-.807 2.06-2.42 2.078v-1.053c.396-.009.678-.118.844-.328.167-.21.25-.556.25-1.039V9.688c0-.925.449-1.488 1.347-1.688v-.021c-.898-.214-1.347-.782-1.347-1.702V4.35c0-.852-.364-1.288-1.094-1.306v-1.06c1.613.018 2.42.72 2.42 2.105v1.962c0 .92.354 1.404 1.06 1.449v.999z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#252526}.icon-vs-out{fill:#252526}.icon-vs-bg{fill:#c5c5c5}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M9.26 11.984l.978-.021a.962.962 0 0 0 .09-.006c.011-.063.026-.179.026-.361V9.688c0-.679.185-1.257.53-1.707-.346-.452-.53-1.03-.53-1.705V4.35c0-.167-.021-.259-.034-.302L9.26 4.02V.973l1.011.011c2.167.024 3.409 1.156 3.409 3.105v1.962c0 .351.071.461.072.462l.936.06.053.927v1.936l-.936.061c-.076.016-.125.146-.125.424v2.017c0 .914-.332 3.043-3.408 3.078l-1.012.011v-3.043zm-3.521 3.032c-3.089-.035-3.422-2.164-3.422-3.078V9.921c0-.327-.066-.432-.067-.433l-.937-.06-.063-.929V6.563l.942-.06c.058 0 .125-.114.125-.452V4.09c0-1.949 1.248-3.081 3.422-3.105L6.75.973V4.02l-.975.023a.572.572 0 0 0-.093.01c.006.021-.019.115-.019.297v1.928c0 .675-.186 1.253-.534 1.705.348.45.534 1.028.534 1.707v1.907c0 .175.014.291.027.363.023.002 1.06.025 1.06.025v3.043l-1.011-.012z" id="outline"/><g id="iconBg"><path class="icon-vs-bg" d="M5.75 14.016c-1.623-.019-2.434-.711-2.434-2.078V9.921c0-.902-.355-1.376-1.066-1.422v-.998c.711-.045 1.066-.529 1.066-1.449V4.09c0-1.385.811-2.087 2.434-2.105v1.06c-.725.017-1.087.453-1.087 1.305v1.928c0 .92-.454 1.488-1.36 1.702V8c.907.201 1.36.763 1.36 1.688v1.907c0 .488.081.835.243 1.042.162.208.443.316.844.325v1.054zm7.99-5.517c-.706.045-1.06.52-1.06 1.422v2.017c0 1.367-.807 2.06-2.42 2.078v-1.053c.396-.009.678-.118.844-.328.167-.21.25-.556.25-1.039V9.688c0-.925.449-1.488 1.347-1.688v-.021c-.898-.214-1.347-.782-1.347-1.702V4.35c0-.852-.364-1.288-1.094-1.306v-1.06c1.613.018 2.42.72 2.42 2.105v1.962c0 .92.354 1.404 1.06 1.449v.999z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-bg{fill:#424242}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M9 15v-3H7v3H4v-3H1V9h3V7H1V4h3V1h3v3h2V1h3v3h3v3h-3v2h3v3h-3v3H9z" id="outline"/><g id="iconBg"><path class="icon-vs-bg" d="M14 6V5h-3V2h-1v3H6V2H5v3H2v1h3v4H2v1h3v3h1v-3h4v3h1v-3h3v-1h-3V6h3zm-4 4H6V6h4v4z"/></g></svg>

After

Width:  |  Height:  |  Size: 496 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#252526}.icon-vs-out{fill:#252526}.icon-vs-bg{fill:#c5c5c5}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M9 15v-3H7v3H4v-3H1V9h3V7H1V4h3V1h3v3h2V1h3v3h3v3h-3v2h3v3h-3v3H9z" id="outline"/><g id="iconBg"><path class="icon-vs-bg" d="M14 6V5h-3V2h-1v3H6V2H5v3H2v1h3v4H2v1h3v3h1v-3h4v3h1v-3h3v-1h-3V6h3zm-4 4H6V6h4v4z"/></g></svg>

After

Width:  |  Height:  |  Size: 496 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><style>.icon-canvas-transparent,.icon-vs-out{fill:#f6f6f6;}.icon-canvas-transparent{opacity:0;}.icon-vs-bg{fill:#424242;}</style></defs><title>Property_16x</title><g id="canvas"><path class="icon-canvas-transparent" d="M16,16H0V0H16Z"/></g><g id="outline"><path class="icon-vs-out" d="M16,5.5a5.46,5.46,0,0,1-6.307,5.434l-.078-.012a5.439,5.439,0,0,1-.811-.191L4.268,15.268A2.5,2.5,0,0,1,.732,11.732L5.269,7.2a5.452,5.452,0,0,1-.191-.812c0-.025-.008-.051-.012-.077A5.5,5.5,0,1,1,16,5.5Z"/></g><g id="iconBg"><path class="icon-vs-bg" d="M15,5.5A4.474,4.474,0,0,1,8.571,9.55l-5.01,5.01a1.5,1.5,0,0,1-2.122-2.12L6.45,7.429A4.474,4.474,0,0,1,12.429,1.45L9.636,4.243l2.121,2.121L14.55,3.571A4.462,4.462,0,0,1,15,5.5Z"/></g></svg>

After

Width:  |  Height:  |  Size: 789 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><style>.icon-canvas-transparent,.icon-vs-out{fill:#252526;}.icon-canvas-transparent{opacity:0;}.icon-vs-bg{fill:#c5c5c5;}</style></defs><title>Property_16x</title><g id="canvas"><path class="icon-canvas-transparent" d="M16,16H0V0H16Z"/></g><g id="outline"><path class="icon-vs-out" d="M16,5.5a5.46,5.46,0,0,1-6.307,5.434l-.078-.012a5.439,5.439,0,0,1-.811-.191L4.268,15.268A2.5,2.5,0,0,1,.732,11.732L5.269,7.2a5.452,5.452,0,0,1-.191-.812c0-.025-.008-.051-.012-.077A5.5,5.5,0,1,1,16,5.5Z"/></g><g id="iconBg"><path class="icon-vs-bg" d="M15,5.5A4.474,4.474,0,0,1,8.571,9.55l-5.01,5.01a1.5,1.5,0,0,1-2.122-2.12L6.45,7.429A4.474,4.474,0,0,1,12.429,1.45L9.636,4.243l2.121,2.121L14.55,3.571A4.462,4.462,0,0,1,15,5.5Z"/></g></svg>

After

Width:  |  Height:  |  Size: 789 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.st0{opacity:0}.st0,.st1{fill:#f6f6f6}.st2{fill:#424242}.st3{fill:none}.st4{fill:#f0eff1}</style><g id="outline"><path class="st0" d="M0 0h16v16H0z"/><path class="st1" d="M2 0h13v15H2z"/></g><g id="icon_x5F_bg"><path class="st2" d="M7 13h1v1H7zM5 13h1v1H5zM3 13h1v1H3zM9 13h1v1H9zM11 13h1v1h-1zM13 13h1v1h-1zM3 1v11h1V2h9v10h1V1z"/></g><g id="icon_x5F_fg"><path class="st3" d="M13 2H4h9z"/><path class="st4" d="M4 2h9v10H4z"/></g></svg>

After

Width:  |  Height:  |  Size: 503 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.st0{opacity:0}.st0,.st1{fill:#252526}.st2{fill:#c5c5c5}.st3{fill:none}.st4{fill:#2a292c}</style><g id="outline"><path class="st0" d="M0 0h16v16H0z"/><path class="st1" d="M2 0h13v15H2z"/></g><g id="icon_x5F_bg"><path class="st2" d="M7 13h1v1H7zM5 13h1v1H5zM3 13h1v1H3zM9 13h1v1H9zM11 13h1v1h-1zM13 13h1v1h-1zM3 1v11h1V2h9v10h1V1z"/></g><g id="icon_x5F_fg"><path class="st3" d="M13 2H4h9z"/><path class="st4" d="M4 2h9v10H4z"/></g></svg>

After

Width:  |  Height:  |  Size: 503 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-bg{fill:#424242}</style><path class="icon-canvas-transparent" d="M0 0h16v16H0z" id="canvas"/><path class="icon-vs-out" d="M15.256 5.539a3.579 3.579 0 0 0-1.501-.306c-1.014 0-1.85.328-2.482.974-.084.086-.149.185-.222.278-.057-.091-.109-.186-.175-.27-.512-.642-1.243-.982-2.117-.982-.189 0-.372.016-.547.048V3.176h-3.02v2.736c-.463-.438-1.123-.68-1.949-.68-.8 0-1.524.189-2.153.562l-.49.291v2.081c-.288.393-.44.887-.44 1.464 0 .667.236 1.246.684 1.676.442.423 1.024.638 1.731.638.265 0 .517-.036.753-.105H7.8c.237.07.49.105.755.105.928 0 1.709-.365 2.258-1.055.052-.066.091-.142.138-.212.087.117.171.236.275.342.604.614 1.388.925 2.33.925.668 0 1.267-.15 1.779-.446l.5-.289V9.39l.004.003V5.806l-.583-.267zm-6.88 3.59l-.123-.013c-.024-.026-.051-.055-.051-.159v-.558c0-.21.063-.284.09-.315.021-.024.033-.038.119-.038l.033-.003c.02.025.084.128.084.418-.001.418-.091.587-.152.668zm5.834-.165c-.191.154-.326.171-.411.171-.229 0-.293-.066-.322-.097-.073-.076-.11-.214-.11-.411 0-.31.103-.418.14-.458.057-.061.134-.125.332-.125.086 0 .221.016.403.152l.479.358-.511.41z" id="outline"/><g id="iconBg"><path class="icon-vs-bg" d="M3.243 6.233c-.621 0-1.169.141-1.644.422v.892c.431-.369.914-.554 1.45-.554.609 0 .914.321.914.962l-1.336.189c-.978.141-1.467.636-1.467 1.486 0 .396.125.713.375.954.251.24.597.36 1.04.36.601 0 1.056-.27 1.367-.809h.018v.703h.989V7.911c-.001-1.119-.57-1.678-1.706-1.678zm.72 2.786c0 .331-.102.606-.305.824a1.011 1.011 0 0 1-.771.327c-.229 0-.411-.061-.547-.183a.595.595 0 0 1-.205-.467c0-.261.074-.443.222-.547.147-.104.368-.175.661-.213l.945-.132v.391zM8.758 6.233c-.671 0-1.181.299-1.529.896h-.018V4.176h-1.02v6.662h1.02v-.65h.018c.299.504.741.756 1.327.756.624 0 1.116-.227 1.476-.679.361-.453.541-1.056.541-1.809 0-.677-.16-1.216-.48-1.619s-.767-.604-1.335-.604zm.445 3.46c-.214.294-.511.441-.889.441-.322 0-.588-.114-.798-.343s-.314-.506-.314-.834v-.558c0-.387.11-.709.332-.967s.514-.387.877-.387c.343 0 .615.125.816.375.199.251.301.597.301 1.04-.001.528-.108.939-.325 1.233zM13.838 7.046c.354 0 .688.117 1.002.352v-.95a2.572 2.572 0 0 0-1.085-.215c-.738 0-1.328.225-1.769.675-.441.45-.662 1.045-.662 1.786 0 .665.205 1.206.615 1.624.41.417.949.626 1.617.626.492 0 .919-.104 1.279-.312v-.888c-.325.261-.671.391-1.037.391-.437 0-.784-.135-1.044-.404-.259-.27-.389-.637-.389-1.103 0-.472.138-.853.413-1.145.277-.291.63-.437 1.06-.437z"/></g></svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#252526}.icon-vs-out{fill:#252526}.icon-vs-bg{fill:#c5c5c5}</style><path class="icon-canvas-transparent" d="M0 0h16v16H0z" id="canvas"/><path class="icon-vs-out" d="M15.256 5.539a3.579 3.579 0 0 0-1.501-.306c-1.014 0-1.85.328-2.482.974-.084.086-.149.185-.222.278-.057-.091-.109-.186-.175-.27-.512-.642-1.243-.982-2.117-.982-.189 0-.372.016-.547.048V3.176h-3.02v2.736c-.463-.438-1.123-.68-1.949-.68-.8 0-1.524.189-2.153.562l-.49.291v2.081c-.288.393-.44.887-.44 1.464 0 .667.236 1.246.684 1.676.442.423 1.024.638 1.731.638.265 0 .517-.036.753-.105H7.8c.237.07.49.105.755.105.928 0 1.709-.365 2.258-1.055.052-.066.091-.142.138-.212.087.117.171.236.275.342.604.614 1.388.925 2.33.925.668 0 1.267-.15 1.779-.446l.5-.289V9.39l.004.003V5.806l-.583-.267zm-6.88 3.59l-.123-.013c-.024-.026-.051-.055-.051-.159v-.558c0-.21.063-.284.09-.315.021-.024.033-.038.119-.038l.033-.003c.02.025.084.128.084.418-.001.418-.091.587-.152.668zm5.834-.165c-.191.154-.326.171-.411.171-.229 0-.293-.066-.322-.097-.073-.076-.11-.214-.11-.411 0-.31.103-.418.14-.458.057-.061.134-.125.332-.125.086 0 .221.016.403.152l.479.358-.511.41z" id="outline"/><g id="iconBg"><path class="icon-vs-bg" d="M3.243 6.233c-.621 0-1.169.141-1.644.422v.892c.431-.369.914-.554 1.45-.554.609 0 .914.321.914.962l-1.336.189c-.978.141-1.467.636-1.467 1.486 0 .396.125.713.375.954.251.24.597.36 1.04.36.601 0 1.056-.27 1.367-.809h.018v.703h.989V7.911c-.001-1.119-.57-1.678-1.706-1.678zm.72 2.786c0 .331-.102.606-.305.824a1.011 1.011 0 0 1-.771.327c-.229 0-.411-.061-.547-.183a.595.595 0 0 1-.205-.467c0-.261.074-.443.222-.547.147-.104.368-.175.661-.213l.945-.132v.391zM8.758 6.233c-.671 0-1.181.299-1.529.896h-.018V4.176h-1.02v6.662h1.02v-.65h.018c.299.504.741.756 1.327.756.624 0 1.116-.227 1.476-.679.361-.453.541-1.056.541-1.809 0-.677-.16-1.216-.48-1.619s-.767-.604-1.335-.604zm.445 3.46c-.214.294-.511.441-.889.441-.322 0-.588-.114-.798-.343s-.314-.506-.314-.834v-.558c0-.387.11-.709.332-.967s.514-.387.877-.387c.343 0 .615.125.816.375.199.251.301.597.301 1.04-.001.528-.108.939-.325 1.233zM13.838 7.046c.354 0 .688.117 1.002.352v-.95a2.572 2.572 0 0 0-1.085-.215c-.738 0-1.328.225-1.769.675-.441.45-.662 1.045-.662 1.786 0 .665.205 1.206.615 1.624.41.417.949.626 1.617.626.492 0 .919-.104 1.279-.312v-.888c-.325.261-.671.391-1.037.391-.437 0-.784-.135-1.044-.404-.259-.27-.389-.637-.389-1.103 0-.472.138-.853.413-1.145.277-.291.63-.437 1.06-.437z"/></g></svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -11,171 +11,257 @@
min-width: 16px;
}
.monaco-workbench .symbol-icon.constant {
background-image: url('Constant_16x.svg');
/* default icons */
.monaco-workbench .symbol-icon {
background-image: url('Field_16x.svg');
background-repeat: no-repeat;
background-position: 0 -2px;
}
.vs-dark .monaco-workbench .symbol-icon,
.hc-black .monaco-workbench .symbol-icon {
background-image: url('Field_16x_darkp.svg');
}
.vs-dark .monaco-workbench .symbol-icon.constant, .hc-black .monaco-workbench .symbol-icon.constant {
/* constant */
.monaco-workbench .symbol-icon.constant {
background-image: url('Constant_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.constant,
.hc-black .monaco-workbench .symbol-icon.constant {
background-image: url('Constant_16x_inverse.svg');
}
.monaco-workbench .symbol-icon.enum-member {
background-image: url('EnumItem_16x.svg');
background-repeat: no-repeat;
background-position: 0 -2px;
/* enum */
.monaco-workbench .symbol-icon.enum {
background-image: url('Enumerator_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.enum,
.hc-black .monaco-workbench .symbol-icon.enum {
background-image: url('Enumerator_inverse_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.enum-member, .hc-black .monaco-workbench .symbol-icon.enum-member {
/* enum-member */
.monaco-workbench .symbol-icon.enum-member {
background-image: url('EnumItem_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.enum-member,
.hc-black .monaco-workbench .symbol-icon.enum-member {
background-image: url('EnumItem_inverse_16x.svg');
}
/* struct */
.monaco-workbench .symbol-icon.struct {
background-image: url('Structure_16x_vscode.svg');
background-repeat: no-repeat;
background-position: 0 -2px;
}
.vs-dark .monaco-workbench .symbol-icon.struct, .hc-black .monaco-workbench .symbol-icon.struct {
.vs-dark .monaco-workbench .symbol-icon.struct,
.hc-black .monaco-workbench .symbol-icon.struct {
background-image: url('Structure_16x_vscode_inverse.svg');
}
/* event */
.monaco-workbench .symbol-icon.event {
background-image: url('Event_16x_vscode.svg');
background-repeat: no-repeat;
background-position: 0 -2px;
}
.vs-dark .monaco-workbench .symbol-icon.event, .hc-black .monaco-workbench .symbol-icon.event {
.vs-dark .monaco-workbench .symbol-icon.event,
.hc-black .monaco-workbench .symbol-icon.event {
background-image: url('Event_16x_vscode_inverse.svg');
}
/* operator */
.monaco-workbench .symbol-icon.operator {
background-image: url('Operator_16x_vscode.svg');
background-repeat: no-repeat;
background-position: 0 -2px;
}
.vs-dark .monaco-workbench .symbol-icon.operator, .hc-black .monaco-workbench .symbol-icon.operator {
.vs-dark .monaco-workbench .symbol-icon.operator,
.hc-black .monaco-workbench .symbol-icon.operator {
background-image: url('Operator_16x_vscode_inverse.svg');
}
/* type paramter */
.monaco-workbench .symbol-icon.type-parameter {
background-image: url('Template_16x_vscode.svg');
background-repeat: no-repeat;
background-position: 0 -2px;
}
.vs-dark .monaco-workbench .symbol-icon.type-parameter, .hc-black .monaco-workbench .symbol-icon.type-parameter {
.vs-dark .monaco-workbench .symbol-icon.type-parameter,
.hc-black .monaco-workbench .symbol-icon.type-parameter {
background-image: url('Template_16x_vscode_inverse.svg');
}
.monaco-workbench .symbol-icon.method, .monaco-workbench .symbol-icon.function, .monaco-workbench .symbol-icon.constructor, .monaco-workbench .symbol-icon.field, .monaco-workbench .symbol-icon.variable, .monaco-workbench .symbol-icon.class, .monaco-workbench .symbol-icon.interface, .monaco-workbench .symbol-icon.object, .monaco-workbench .symbol-icon.namespace, .monaco-workbench .symbol-icon.package, .monaco-workbench .symbol-icon.module, .monaco-workbench .symbol-icon.property, .monaco-workbench .symbol-icon.enum, .monaco-workbench .symbol-icon.key, .monaco-workbench .symbol-icon.string, .monaco-workbench .symbol-icon.rule, .monaco-workbench .symbol-icon.file, .monaco-workbench .symbol-icon.array, .monaco-workbench .symbol-icon.number, .monaco-workbench .symbol-icon.null, .monaco-workbench .symbol-icon.boolean {
background-image: url('symbol-sprite.svg');
background-repeat: no-repeat;
/* boolean, null */
.monaco-workbench .symbol-icon.boolean {
background-image: url('BooleanData_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.boolean,
.hc-black .monaco-workbench .symbol-icon.boolean {
background-image: url('BooleanData_16x_darkp.svg');
}
.vs .monaco-workbench .symbol-icon.method, .vs .monaco-workbench .symbol-icon.function, .vs .monaco-workbench .symbol-icon.constructor {
background-position: 0 -4px;
/* null */
.monaco-workbench .symbol-icon.null {
background-image: url('BooleanData_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.null,
.hc-black .monaco-workbench .symbol-icon.null {
background-image: url('BooleanData_16x_darkp.svg');
}
.vs .monaco-workbench .symbol-icon.field, .vs .monaco-workbench .symbol-icon.variable {
background-position: -22px -4px;
/* class */
.monaco-workbench .symbol-icon.class {
background-image: url('Class_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.class,
.hc-black .monaco-workbench .symbol-icon.class {
background-image: url('Class_16x_darkp.svg');
}
.vs .monaco-workbench .symbol-icon.class {
background-position: -43px -3px;
/* file */
.monaco-workbench .symbol-icon.file {
background-image: url('Document_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.file,
.hc-black .monaco-workbench .symbol-icon.file {
background-image: url('Document_16x_darkp.svg');
}
.vs .monaco-workbench .symbol-icon.interface {
background-position: -63px -4px;
/* field */
.monaco-workbench .symbol-icon.field {
background-image: url('Field_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.field,
.hc-black .monaco-workbench .symbol-icon.field {
background-image: url('Field_16x_darkp.svg');
}
.vs .monaco-workbench .symbol-icon.object, .vs .monaco-workbench .symbol-icon.namespace, .vs .monaco-workbench .symbol-icon.package, .vs .monaco-workbench .symbol-icon.module {
background-position: -82px -4px;
/* variable */
.monaco-workbench .symbol-icon.variable {
background-image: url('Field_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.variable,
.hc-black .monaco-workbench .symbol-icon.variable {
background-image: url('Field_16x_darkp.svg');
}
.vs .monaco-workbench .symbol-icon.property {
background-position: -102px -3px;
/* array */
.monaco-workbench .symbol-icon.array {
background-image: url('Indexer_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.array,
.hc-black .monaco-workbench .symbol-icon.array {
background-image: url('Indexer_16x_darkp.svg');
}
.vs .monaco-workbench .symbol-icon.enum {
background-position: -122px -3px;
/* keyword */
/* todo@joh not used? */
.monaco-workbench .symbol-icon.keyword {
background-image: url('IntelliSenseKeyword_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.keyword,
.hc-black .monaco-workbench .symbol-icon.keyword {
background-image: url('IntelliSenseKeyword_16x_darkp.svg');
}
.vs .monaco-workbench .symbol-icon.key, .vs .monaco-workbench .symbol-icon.string {
background-position: -202px -3px;
/* interface */
.monaco-workbench .symbol-icon.interface {
background-image: url('Interface_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.interface,
.hc-black .monaco-workbench .symbol-icon.interface {
background-image: url('Interface_16x_darkp.svg');
}
.vs .monaco-workbench .symbol-icon.rule {
background-position: -242px -4px;
/* method */
.monaco-workbench .symbol-icon.method {
background-image: url('Method_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.method,
.hc-black .monaco-workbench .symbol-icon.method {
background-image: url('Method_16x_darkp.svg');
}
.vs .monaco-workbench .symbol-icon.file {
background-position: -262px -4px;
/* function */
.monaco-workbench .symbol-icon.function {
background-image: url('Method_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.function,
.hc-black .monaco-workbench .symbol-icon.function {
background-image: url('Method_16x_darkp.svg');
}
.vs .monaco-workbench .symbol-icon.array {
background-position: -302px -4px;
/* object */
.monaco-workbench .symbol-icon.object {
background-image: url('Namespace_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.object,
.hc-black .monaco-workbench .symbol-icon.object {
background-image: url('Namespace_16x_darkp.svg');
}
.vs .monaco-workbench .symbol-icon.number {
background-position: -322px -4px;
/* namespace */
.monaco-workbench .symbol-icon.namespace {
background-image: url('Namespace_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.namespace,
.hc-black .monaco-workbench .symbol-icon.namespace {
background-image: url('Namespace_16x_darkp.svg');
}
.vs .monaco-workbench .symbol-icon.null, .vs .monaco-workbench .symbol-icon.boolean {
background-position: -343px -4px;
/* package */
.monaco-workbench .symbol-icon.package {
background-image: url('Namespace_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.package,
.hc-black .monaco-workbench .symbol-icon.package {
background-image: url('Namespace_16x_darkp.svg');
}
.vs-dark .monaco-workbench .symbol-icon.method, .vs-dark .monaco-workbench .symbol-icon.function, .vs-dark .monaco-workbench .symbol-icon.constructor, .hc-black .monaco-workbench .symbol-icon.method, .hc-black .monaco-workbench .symbol-icon.function, .hc-black .monaco-workbench .symbol-icon.constructor {
background-position: 0 -24px;
/* module */
.monaco-workbench .symbol-icon.module {
background-image: url('Namespace_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.module,
.hc-black .monaco-workbench .symbol-icon.module {
background-image: url('Namespace_16x_darkp.svg');
}
.vs-dark .monaco-workbench .symbol-icon.field, .hc-black .monaco-workbench .symbol-icon.field, .vs-dark .monaco-workbench .symbol-icon.variable, .hc-black .monaco-workbench .symbol-icon.variable {
background-position: -22px -24px;
/* number */
.monaco-workbench .symbol-icon.number {
background-image: url('Numeric_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.number,
.hc-black .monaco-workbench .symbol-icon.number {
background-image: url('Numeric_16x_darkp.svg');
}
.vs-dark .monaco-workbench .symbol-icon.class, .hc-black .monaco-workbench .symbol-icon.class {
background-position: -43px -23px;
/* property */
.monaco-workbench .symbol-icon.property {
background-image: url('Property_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.property,
.hc-black .monaco-workbench .symbol-icon.property {
background-image: url('Property_16x_darkp.svg');
}
.vs-dark .monaco-workbench .symbol-icon.interface, .hc-black .monaco-workbench .symbol-icon.interface {
background-position: -63px -24px;
/* snippet */
/* todo@joh unused? */
.monaco-workbench .symbol-icon.snippet {
background-image: url('Snippet_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.snippet,
.hc-black .monaco-workbench .symbol-icon.snippet {
background-image: url('Snippet_16x_darkp.svg');
}
.vs-dark .monaco-workbench .symbol-icon.object, .vs-dark .monaco-workbench .symbol-icon.namespace, .vs-dark .monaco-workbench .symbol-icon.package, .vs-dark .monaco-workbench .symbol-icon.module, .hc-black .monaco-workbench .symbol-icon.object, .hc-black .monaco-workbench .symbol-icon.namespace, .hc-black .monaco-workbench .symbol-icon.package, .hc-black .monaco-workbench .symbol-icon.module {
background-position: -82px -24px;
/* string */
.monaco-workbench .symbol-icon.string {
background-image: url('String_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.string,
.hc-black .monaco-workbench .symbol-icon.string {
background-image: url('String_16x_darkp.svg');
}
.vs-dark .monaco-workbench .symbol-icon.property, .hc-black .monaco-workbench .symbol-icon.property {
background-position: -102px -23px;
/* key */
.monaco-workbench .symbol-icon.key {
background-image: url('String_16x.svg');
}
.vs-dark .monaco-workbench .symbol-icon.key, .vs-dark .monaco-workbench .symbol-icon.string, .hc-black .monaco-workbench .symbol-icon.key, .hc-black .monaco-workbench .symbol-icon.string {
background-position: -202px -23px;
}
.vs-dark .monaco-workbench .symbol-icon.enum, .hc-black .monaco-workbench .symbol-icon.enum {
background-position: -122px -23px;
}
.vs-dark .monaco-workbench .symbol-icon.rule, .hc-black .monaco-workbench .symbol-icon.rule {
background-position: -242px -24px;
}
.vs-dark .monaco-workbench .symbol-icon.file, .hc-black .monaco-workbench .symbol-icon.file {
background-position: -262px -24px;
}
.vs-dark .monaco-workbench .symbol-icon.array, .hc-black .monaco-workbench .symbol-icon.array {
background-position: -302px -24px;
}
.vs-dark .monaco-workbench .symbol-icon.number, .hc-black .monaco-workbench .symbol-icon.number {
background-position: -322px -24px;
}
.vs-dark .monaco-workbench .symbol-icon.null, .vs-dark .monaco-workbench .symbol-icon.boolean, .hc-black .monaco-workbench .symbol-icon.null, .hc-black .monaco-workbench .symbol-icon.boolean {
background-position: -342px -24px;
.vs-dark .monaco-workbench .symbol-icon.key,
.hc-black .monaco-workbench .symbol-icon.key {
background-image: url('String_16x_darkp.svg');
}

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 16 KiB

View file

@ -495,7 +495,7 @@ class UnfoldAction extends FoldingAction<FoldingArguments> {
name: 'Unfold editor argument',
description: `Property-value pairs that can be passed through this argument:
* 'levels': Number of levels to unfold. If not set, defaults to 1.
* 'direction': If 'up', unfold given number of levels up otherwise unfolds down
* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.
* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.
`,
constraint: foldingArgumentsConstraint
@ -557,8 +557,8 @@ class FoldAction extends FoldingAction<FoldingArguments> {
{
name: 'Fold editor argument',
description: `Property-value pairs that can be passed through this argument:
* 'levels': Number of levels to fold. Defaults to 1
* 'direction': If 'up', folds given number of levels up otherwise folds down
* 'levels': Number of levels to fold. Defaults to 1.
* 'direction': If 'up', folds given number of levels up otherwise folds down.
* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.
`,
constraint: foldingArgumentsConstraint

View file

@ -183,9 +183,6 @@ class RenameController implements IEditorContribution {
}
return this._bulkEditService.apply(result, { editor: this.editor }).then(result => {
if (result.selection) {
this.editor.setSelection(result.selection);
}
// alert
if (result.ariaSummary) {
alert(nls.localize('aria', "Successfully renamed '{0}' to '{1}'. Summary: {2}", loc.text, newNameOrFocusFlag, result.ariaSummary));

5
src/vs/monaco.d.ts vendored
View file

@ -3870,9 +3870,9 @@ declare namespace monaco.editor {
* The edits will land on the undo-redo stack, but no "undo stop" will be pushed.
* @param source The source of the call.
* @param edits The edits to execute.
* @param endCursoState Cursor state after the edits were applied.
* @param endCursorState Cursor state after the edits were applied.
*/
executeEdits(source: string, edits: IIdentifiedSingleEditOperation[], endCursoState?: Selection[]): boolean;
executeEdits(source: string, edits: IIdentifiedSingleEditOperation[], endCursorState?: Selection[]): boolean;
/**
* Execute multiple (concommitent) commands on the editor.
* @param source The source of the call.
@ -5210,6 +5210,7 @@ declare namespace monaco.languages {
newUri: Uri;
options: {
overwrite?: boolean;
ignoreIfNotExists?: boolean;
ignoreIfExists?: boolean;
recursive?: boolean;
};

View file

@ -33,7 +33,7 @@ export class ExtensionManagementChannel implements IExtensionManagementChannel {
onUninstallExtension: Event<IExtensionIdentifier>;
onDidUninstallExtension: Event<DidUninstallExtensionEvent>;
constructor(private service: IExtensionManagementService, private uriTransformer: IURITransformer) {
constructor(private service: IExtensionManagementService) {
this.onInstallExtension = buffer(service.onInstallExtension, true);
this.onDidInstallExtension = buffer(service.onDidInstallExtension, true);
this.onUninstallExtension = buffer(service.onUninstallExtension, true);
@ -66,7 +66,7 @@ export class ExtensionManagementChannel implements IExtensionManagementChannel {
}
private _transform(extension: ILocalExtension): ILocalExtension {
return extension ? { ...extension, ...{ location: URI.revive(this.uriTransformer.transformIncoming(extension.location)) } } : extension;
return extension ? { ...extension, ...{ location: URI.revive(extension.location) } } : extension;
}
}
@ -77,7 +77,7 @@ export class ExtensionManagementChannelClient implements IExtensionManagementSer
constructor(private channel: IExtensionManagementChannel, private uriTransformer: IURITransformer) { }
get onInstallExtension(): Event<InstallExtensionEvent> { return this.channel.listen('onInstallExtension'); }
get onDidInstallExtension(): Event<DidInstallExtensionEvent> { return mapEvent(this.channel.listen('onDidInstallExtension'), i => ({ ...i, local: this._transform(i.local) })); }
get onDidInstallExtension(): Event<DidInstallExtensionEvent> { return mapEvent(this.channel.listen('onDidInstallExtension'), i => ({ ...i, local: this._transformIncoming(i.local) })); }
get onUninstallExtension(): Event<IExtensionIdentifier> { return this.channel.listen('onUninstallExtension'); }
get onDidUninstallExtension(): Event<DidUninstallExtensionEvent> { return this.channel.listen('onDidUninstallExtension'); }
@ -90,29 +90,33 @@ export class ExtensionManagementChannelClient implements IExtensionManagementSer
}
uninstall(extension: ILocalExtension, force = false): TPromise<void> {
return this.channel.call('uninstall', [extension, force]);
return this.channel.call('uninstall', [this._transformOutgoing(extension), force]);
}
reinstallFromGallery(extension: ILocalExtension): TPromise<void> {
return this.channel.call('reinstallFromGallery', [extension]);
return this.channel.call('reinstallFromGallery', [this._transformOutgoing(extension)]);
}
getInstalled(type: LocalExtensionType = null): TPromise<ILocalExtension[]> {
return this.channel.call('getInstalled', [type])
.then(extensions => extensions.map(extension => this._transform(extension)));
.then(extensions => extensions.map(extension => this._transformIncoming(extension)));
}
updateMetadata(local: ILocalExtension, metadata: IGalleryMetadata): TPromise<ILocalExtension> {
return this.channel.call('updateMetadata', [local, metadata])
.then(extension => this._transform(extension));
return this.channel.call('updateMetadata', [this._transformOutgoing(local), metadata])
.then(extension => this._transformIncoming(extension));
}
getExtensionsReport(): TPromise<IReportedExtension[]> {
return this.channel.call('getExtensionsReport');
}
private _transform(extension: ILocalExtension): ILocalExtension {
private _transformIncoming(extension: ILocalExtension): ILocalExtension {
return extension ? { ...extension, ...{ location: URI.revive(this.uriTransformer.transformIncoming(extension.location)) } } : extension;
}
private _transformOutgoing(extension: ILocalExtension): ILocalExtension {
return extension ? { ...extension, ...{ location: this.uriTransformer.transformOutgoing(extension.location) } } : extension;
}
}

View file

@ -23,12 +23,12 @@ import { DefaultController, IControllerOptions, OpenMode, ClickBehavior, Default
import { isUndefinedOrNull } from 'vs/base/common/types';
import { IEditorOptions } from 'vs/platform/editor/common/editor';
import { Event, Emitter } from 'vs/base/common/event';
import { createStyleSheet, addStandardDisposableListener } from 'vs/base/browser/dom';
import { createStyleSheet, addStandardDisposableListener, getTotalHeight, removeClass, addClass } from 'vs/base/browser/dom';
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
import { InputBox, IInputOptions } from 'vs/base/browser/ui/inputbox/inputBox';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { TPromise } from 'vs/base/common/winjs.base';
import { onUnexpectedError } from 'vs/base/common/errors';
import { onUnexpectedError, canceled } from 'vs/base/common/errors';
import { KeyCode } from 'vs/base/common/keyCodes';
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
@ -605,7 +605,9 @@ export class HighlightingTreeController extends WorkbenchTreeController {
export class HighlightingWorkbenchTree extends WorkbenchTree {
readonly input: InputBox;
protected readonly domNode: HTMLElement;
protected readonly inputContainer: HTMLElement;
protected readonly input: InputBox;
protected readonly renderer: IHighlightingRenderer;
@ -633,11 +635,15 @@ export class HighlightingWorkbenchTree extends WorkbenchTree {
parent.appendChild(container);
// create tree
treeConfiguration.controller = treeConfiguration.controller || instantiationService.createInstance(HighlightingTreeController, {}, () => this.input.focus());
treeConfiguration.controller = treeConfiguration.controller || instantiationService.createInstance(HighlightingTreeController, {}, () => this.onTypeInTree());
super(treeContainer, treeConfiguration, treeOptions, contextKeyService, listService, themeService, instantiationService, configurationService);
this.renderer = treeConfiguration.renderer;
this.domNode = container;
addClass(this.domNode, 'inactive');
// create input
this.inputContainer = inputContainer;
this.input = new InputBox(inputContainer, contextViewService, listOptions);
this.input.setEnabled(false);
this.input.onDidChange(this.updateHighlights, this, this.disposables);
@ -663,6 +669,10 @@ export class HighlightingWorkbenchTree extends WorkbenchTree {
setInput(element: any): TPromise<any> {
this.input.setEnabled(false);
return super.setInput(element).then(value => {
if (!this.input.inputElement) {
// has been disposed in the meantime -> cancel
return Promise.reject(canceled());
}
this.input.setEnabled(true);
return value;
});
@ -670,7 +680,13 @@ export class HighlightingWorkbenchTree extends WorkbenchTree {
layout(height?: number, width?: number): void {
this.input.layout();
super.layout(isNaN(height) ? height : height - this.input.height, width);
super.layout(isNaN(height) ? height : height - getTotalHeight(this.inputContainer), width);
}
private onTypeInTree(): void {
removeClass(this.domNode, 'inactive');
this.input.focus();
this.layout();
}
private lastSelection: any[];
@ -691,6 +707,7 @@ export class HighlightingWorkbenchTree extends WorkbenchTree {
if (topElement && pattern) {
this.reveal(topElement).then(_ => {
this.setSelection([topElement], this);
this.setFocus(topElement, this);
return this.refresh();
}, onUnexpectedError);
} else {

View file

@ -152,35 +152,39 @@ const configurationValueWhitelist = [
'editor.formatOnSave',
'editor.colorDecorators',
'window.zoomLevel',
'files.autoSave',
'files.hotExit',
'breadcrumbs.enabled',
'breadcrumbs.filePath',
'breadcrumbs.symbolPath',
'breadcrumbs.useQuickPick',
'explorer.openEditors.visible',
'extensions.autoUpdate',
'files.associations',
'workbench.statusBar.visible',
'files.autoGuessEncoding',
'files.autoSave',
'files.autoSaveDelay',
'files.encoding',
'files.eol',
'files.hotExit',
'files.trimTrailingWhitespace',
'git.confirmSync',
'workbench.sideBar.location',
'window.openFilesInNewWindow',
'javascript.validate.enable',
'window.restoreWindows',
'extensions.autoUpdate',
'files.eol',
'explorer.openEditors.visible',
'workbench.editor.enablePreview',
'files.autoSaveDelay',
'workbench.editor.showTabs',
'files.encoding',
'files.autoGuessEncoding',
'git.enabled',
'http.proxyStrictSSL',
'terminal.integrated.fontFamily',
'workbench.editor.enablePreviewFromQuickOpen',
'workbench.editor.swipeToNavigate',
'javascript.validate.enable',
'php.builtInCompletions.enable',
'php.validate.enable',
'php.validate.run',
'workbench.welcome.enabled',
'terminal.integrated.fontFamily',
'window.openFilesInNewWindow',
'window.restoreWindows',
'window.zoomLevel',
'workbench.editor.enablePreview',
'workbench.editor.enablePreviewFromQuickOpen',
'workbench.editor.showTabs',
'workbench.editor.swipeToNavigate',
'workbench.sideBar.location',
'workbench.startupEditor',
'workbench.statusBar.visible',
'workbench.welcome.enabled',
];
export function configurationTelemetry(telemetryService: ITelemetryService, configurationService: IConfigurationService): IDisposable {

View file

@ -292,6 +292,8 @@ export const diffRemoved = registerColor('diffEditor.removedTextBackground', { d
export const diffInsertedOutline = registerColor('diffEditor.insertedTextBorder', { dark: null, light: null, hc: '#33ff2eff' }, nls.localize('diffEditorInsertedOutline', 'Outline color for the text that got inserted.'));
export const diffRemovedOutline = registerColor('diffEditor.removedTextBorder', { dark: null, light: null, hc: '#FF008F' }, nls.localize('diffEditorRemovedOutline', 'Outline color for text that got removed.'));
export const diffBorder = registerColor('diffEditor.border', { dark: null, light: null, hc: contrastBorder }, nls.localize('diffEditorBorder', 'Border color between the two text editors.'));
/**
* Merge-conflict colors
*/

View file

@ -80,7 +80,7 @@ export class Win32UpdateService extends AbstractUpdateService {
if (getUpdateType() === UpdateType.Setup) {
/* __GDPR__
"update:win32SetupTarget" : {
"explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
"target" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
telemetryService.publicLog('update:win32SetupTarget', { target: product.target });

View file

@ -990,6 +990,11 @@ declare module 'vscode' {
*/
export interface WorkspaceEdit {
/**
* The number of affected resources of textual or resource changes.
*/
readonly size: number;
/**
* Create a regular file.
*
@ -1003,7 +1008,7 @@ declare module 'vscode' {
*
* @param uri The uri of the file that is to be deleted.
*/
deleteFile(uri: Uri, options?: { recursive?: boolean }): void;
deleteFile(uri: Uri, options?: { recursive?: boolean, ignoreIfNotExists?: boolean }): void;
/**
* Rename a file or folder.
@ -1012,11 +1017,7 @@ declare module 'vscode' {
* @param newUri The new location.
* @param options Defines if existing files should be overwritten.
*/
renameFile(oldUri: Uri, newUri: Uri, options?: { overwrite?: boolean }): void;
// replaceText(uri: Uri, range: Range, newText: string): void;
// insertText(uri: Uri, position: Position, newText: string): void;
// deleteText(uri: Uri, range: Range): void;
renameFile(oldUri: Uri, newUri: Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean }): void;
}
export namespace workspace {

View file

@ -94,11 +94,11 @@ function _generateMarkdown(description: string | ICommandHandlerDescription): st
parts.push('\n\n');
if (description.args) {
for (let arg of description.args) {
parts.push(`* _${arg.name}_ ${arg.description || ''}\n`);
parts.push(`* _${arg.name}_ - ${arg.description || ''}\n`);
}
}
if (description.returns) {
parts.push(`* _(returns)_ ${description.returns}`);
parts.push(`* _(returns)_ - ${description.returns}`);
}
parts.push('\n\n');
return parts.join('');

View file

@ -253,7 +253,7 @@ export class ExtHostApiCommands {
});
this._register(SetEditorLayoutAPICommand.ID, adjustHandler(SetEditorLayoutAPICommand.execute), {
description: 'Sets the editor layout. The layout is described as object with an initial (optional) orientation (0 = horizontal, 1 = vertical) and an array of editor groups within. Each editor group can have a size and another array of editor groups that will be layed out orthogonal to the orientation. If editor group sizes are provided, their sum must be 1 to be applied per row or column. Example for a 2x2 grid: `{ orientation: 0, groups: [{ groups: [{}, {}], size: 0.5 }, { groups: [{}, {}], size: 0.5 }] }`',
description: 'Sets the editor layout. The layout is described as object with an initial (optional) orientation (0 = horizontal, 1 = vertical) and an array of editor groups within. Each editor group can have a size and another array of editor groups that will be laid out orthogonal to the orientation. If editor group sizes are provided, their sum must be 1 to be applied per row or column. Example for a 2x2 grid: `{ orientation: 0, groups: [{ groups: [{}, {}], size: 0.5 }, { groups: [{}, {}], size: 0.5 }] }`',
args: [
{ name: 'layout', description: 'The editor layout to set.', constraint: (value: EditorGroupLayout) => typeof value === 'object' && Array.isArray(value.groups) }
]

View file

@ -18,15 +18,17 @@ import { keys } from 'vs/base/common/map';
export class DiagnosticCollection implements vscode.DiagnosticCollection {
private readonly _name: string;
private readonly _owner: string;
private readonly _maxDiagnosticsPerFile: number;
private readonly _onDidChangeDiagnostics: Emitter<(vscode.Uri | string)[]>;
private readonly _proxy: MainThreadDiagnosticsShape;
private _proxy: MainThreadDiagnosticsShape;
private _isDisposed = false;
private _data = new Map<string, vscode.Diagnostic[]>();
constructor(name: string, maxDiagnosticsPerFile: number, proxy: MainThreadDiagnosticsShape, onDidChangeDiagnostics: Emitter<(vscode.Uri | string)[]>) {
constructor(name: string, owner: string, maxDiagnosticsPerFile: number, proxy: MainThreadDiagnosticsShape, onDidChangeDiagnostics: Emitter<(vscode.Uri | string)[]>) {
this._name = name;
this._owner = owner;
this._maxDiagnosticsPerFile = maxDiagnosticsPerFile;
this._proxy = proxy;
this._onDidChangeDiagnostics = onDidChangeDiagnostics;
@ -35,8 +37,7 @@ export class DiagnosticCollection implements vscode.DiagnosticCollection {
dispose(): void {
if (!this._isDisposed) {
this._onDidChangeDiagnostics.fire(keys(this._data));
this._proxy.$clear(this.name);
this._proxy = undefined;
this._proxy.$clear(this._owner);
this._data = undefined;
this._isDisposed = true;
}
@ -142,21 +143,21 @@ export class DiagnosticCollection implements vscode.DiagnosticCollection {
}
this._onDidChangeDiagnostics.fire(toSync);
this._proxy.$changeMany(this.name, entries);
this._proxy.$changeMany(this._owner, entries);
}
delete(uri: vscode.Uri): void {
this._checkDisposed();
this._onDidChangeDiagnostics.fire([uri]);
this._data.delete(uri.toString());
this._proxy.$changeMany(this.name, [[uri, undefined]]);
this._proxy.$changeMany(this._owner, [[uri, undefined]]);
}
clear(): void {
this._checkDisposed();
this._onDidChangeDiagnostics.fire(keys(this._data));
this._data.clear();
this._proxy.$clear(this.name);
this._proxy.$clear(this._owner);
}
forEach(callback: (uri: URI, diagnostics: vscode.Diagnostic[], collection: DiagnosticCollection) => any, thisArg?: any): void {
@ -204,7 +205,7 @@ export class ExtHostDiagnostics implements ExtHostDiagnosticsShape {
private static readonly _maxDiagnosticsPerFile: number = 1000;
private readonly _proxy: MainThreadDiagnosticsShape;
private readonly _collections: DiagnosticCollection[] = [];
private readonly _collections = new Map<string, DiagnosticCollection>();
private readonly _onDidChangeDiagnostics = new Emitter<(vscode.Uri | string)[]>();
static _debouncer(last: (vscode.Uri | string)[], current: (vscode.Uri | string)[]): (vscode.Uri | string)[] {
@ -242,22 +243,28 @@ export class ExtHostDiagnostics implements ExtHostDiagnosticsShape {
}
createDiagnosticCollection(name: string): vscode.DiagnosticCollection {
let { _collections, _proxy, _onDidChangeDiagnostics } = this;
let owner: string;
if (!name) {
name = '_generated_diagnostic_collection_name_#' + ExtHostDiagnostics._idPool++;
owner = name;
} else if (!_collections.has(name)) {
owner = name;
} else {
console.warn(`DiagnosticCollection with name '${name}' does already exist.`);
do {
owner = name + ExtHostDiagnostics._idPool++;
} while (_collections.has(owner));
}
const { _collections, _proxy, _onDidChangeDiagnostics } = this;
const result = new class extends DiagnosticCollection {
constructor() {
super(name, ExtHostDiagnostics._maxDiagnosticsPerFile, _proxy, _onDidChangeDiagnostics);
_collections.push(this);
super(name, owner, ExtHostDiagnostics._maxDiagnosticsPerFile, _proxy, _onDidChangeDiagnostics);
_collections.set(owner, this);
}
dispose() {
super.dispose();
let idx = _collections.indexOf(this);
if (idx !== -1) {
_collections.splice(idx, 1);
}
_collections.delete(owner);
}
};
@ -272,7 +279,7 @@ export class ExtHostDiagnostics implements ExtHostDiagnosticsShape {
} else {
let index = new Map<string, number>();
let res: [vscode.Uri, vscode.Diagnostic[]][] = [];
for (const collection of this._collections) {
this._collections.forEach(collection => {
collection.forEach((uri, diagnostics) => {
let idx = index.get(uri.toString());
if (typeof idx === 'undefined') {
@ -282,18 +289,18 @@ export class ExtHostDiagnostics implements ExtHostDiagnosticsShape {
}
res[idx][1] = res[idx][1].concat(...diagnostics);
});
}
});
return res;
}
}
private _getDiagnostics(resource: vscode.Uri): vscode.Diagnostic[] {
let res: vscode.Diagnostic[] = [];
for (const collection of this._collections) {
this._collections.forEach(collection => {
if (collection.has(resource)) {
res = res.concat(collection.get(resource));
}
}
});
return res;
}
}

View file

@ -72,7 +72,11 @@ export class ExtHostProgress implements ExtHostProgressShape {
function mergeProgress(result: IProgressStep, currentValue: IProgressStep): IProgressStep {
result.message = currentValue.message;
if (typeof currentValue.increment === 'number') {
result.increment = currentValue.increment;
if (typeof result.increment === 'number') {
result.increment += currentValue.increment;
} else {
result.increment = currentValue.increment;
}
}
return result;

View file

@ -498,6 +498,7 @@ export class TextEdit {
export interface IFileOperationOptions {
overwrite?: boolean;
ignoreIfExists?: boolean;
ignoreIfNotExists?: boolean;
recursive?: boolean;
}
@ -518,7 +519,7 @@ export class WorkspaceEdit implements vscode.WorkspaceEdit {
private _edits = new Array<IFileOperation | IFileTextEdit>();
renameFile(from: vscode.Uri, to: vscode.Uri, options?: { overwrite?: boolean }): void {
renameFile(from: vscode.Uri, to: vscode.Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean }): void {
this._edits.push({ _type: 1, from, to, options });
}
@ -526,7 +527,7 @@ export class WorkspaceEdit implements vscode.WorkspaceEdit {
this._edits.push({ _type: 1, from: undefined, to: uri, options });
}
deleteFile(uri: vscode.Uri, options?: { recursive?: boolean }): void {
deleteFile(uri: vscode.Uri, options?: { recursive?: boolean, ignoreIfNotExists?: boolean }): void {
this._edits.push({ _type: 1, from: uri, to: undefined, options });
}

View file

@ -66,6 +66,9 @@ export abstract class BreadcrumbsConfig<T> {
}
static IsEnabled = BreadcrumbsConfig._stub<boolean>('breadcrumbs.enabled');
static UseQuickPick = BreadcrumbsConfig._stub<boolean>('breadcrumbs.useQuickPick');
static FilePath = BreadcrumbsConfig._stub<'on' | 'off' | 'last'>('breadcrumbs.filePath');
static SymbolPath = BreadcrumbsConfig._stub<'on' | 'off' | 'last'>('breadcrumbs.symbolPath');
private static _stub<T>(name: string): { bindTo(service: IConfigurationService): BreadcrumbsConfig<T> } {
return {
@ -101,10 +104,37 @@ Registry.as<IConfigurationRegistry>(Extensions.Configuration).registerConfigurat
type: 'object',
properties: {
'breadcrumbs.enabled': {
'description': localize('enabled', "Enable/disable navigation breadcrumbss"),
'type': 'boolean',
'default': false
}
description: localize('enabled', "Enable/disable navigation breadcrumbs"),
type: 'boolean',
default: false
},
'breadcrumbs.useQuickPick': {
description: localize('useQuickPick', "Use quick pick instead of breadcrumb-pickers."),
type: 'boolean',
default: false
},
'breadcrumbs.filePath': {
description: localize('filepath', "Controls if and how file paths are shown in the breadcrumbs view."),
type: 'string',
default: 'on',
enum: ['on', 'off', 'last'],
enumDescriptions: [
localize('filepath.on', "Show the file path in the breadcrumbs view."),
localize('filepath.off', "Do not show the file path in the breadcrumbs view."),
localize('filepath.last', "Only show the last element of the file path in the breadcrumbs view."),
]
},
'breadcrumbs.symbolPath': {
description: localize('symbolpath', "Controls if and how symbols are shown in the breadcrumbs view."),
type: 'string',
default: 'on',
enum: ['on', 'off', 'last'],
enumDescriptions: [
localize('symbolpath.on', "Show all symbols the breadcrumbs view."),
localize('symbolpath.off', "Do not show symbols in the breadcrumbs view."),
localize('symbolpath.last', "Only show the current symbol in the breadcrumbs view."),
]
},
}
});

View file

@ -18,7 +18,7 @@ import { Range } from 'vs/editor/common/core/range';
import { OutlineElement, OutlineGroup, OutlineModel, TreeElement } from 'vs/editor/contrib/documentSymbols/outlineModel';
import { ContextKeyExpr, IContextKey, IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { FileKind } from 'vs/platform/files/common/files';
import { FileKind, IFileService } from 'vs/platform/files/common/files';
import { IConstructorSignature2, IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { attachBreadcrumbsStyler } from 'vs/platform/theme/common/styler';
@ -29,9 +29,13 @@ import { BreadcrumbElement, EditorBreadcrumbsModel, FileElement } from 'vs/workb
import { EditorGroupView } from 'vs/workbench/browser/parts/editor/editorGroupView';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IEditorGroupsService } from 'vs/workbench/services/group/common/editorGroupsService';
import { IBreadcrumbsService } from 'vs/workbench/browser/parts/editor/breadcrumbs';
import { IBreadcrumbsService, BreadcrumbsConfig } from 'vs/workbench/browser/parts/editor/breadcrumbs';
import { symbolKindToCssClass } from 'vs/editor/common/modes';
import { BreadcrumbsPicker, BreadcrumbsFilePicker, BreadcrumbsOutlinePicker } from 'vs/workbench/browser/parts/editor/breadcrumbsPicker';
import { StandardMouseEvent } from 'vs/base/browser/mouseEvent';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen';
import { Schemas } from 'vs/base/common/network';
class Item extends BreadcrumbsItem {
@ -113,16 +117,21 @@ export class BreadcrumbsControl {
static HEIGHT = 25;
static readonly Payload_Reveal = {};
static readonly Payload_Pick = {};
static CK_BreadcrumbsVisible = new RawContextKey('breadcrumbsVisible', false);
static CK_BreadcrumbsActive = new RawContextKey('breadcrumbsActive', false);
private readonly _ckBreadcrumbsVisible: IContextKey<boolean>;
private readonly _ckBreadcrumbsActive: IContextKey<boolean>;
private readonly _cfUseQuickPick: BreadcrumbsConfig<boolean>;
readonly domNode: HTMLDivElement;
private readonly _widget: BreadcrumbsWidget;
private _disposables = new Array<IDisposable>();
private _disposables = new Array<IDisposable>();
private _breadcrumbsDisposables = new Array<IDisposable>();
private _breadcrumbsPickerShowing = false;
@ -136,6 +145,9 @@ export class BreadcrumbsControl {
@IWorkspaceContextService private readonly _workspaceService: IWorkspaceContextService,
@IInstantiationService private readonly _instantiationService: IInstantiationService,
@IThemeService private readonly _themeService: IThemeService,
@IQuickOpenService private readonly _quickOpenService: IQuickOpenService,
@IConfigurationService private readonly _configurationService: IConfigurationService,
@IFileService private readonly _fileService: IFileService,
@IBreadcrumbsService breadcrumbsService: IBreadcrumbsService,
) {
this.domNode = document.createElement('div');
@ -151,6 +163,8 @@ export class BreadcrumbsControl {
this._ckBreadcrumbsVisible = BreadcrumbsControl.CK_BreadcrumbsVisible.bindTo(this._contextKeyService);
this._ckBreadcrumbsActive = BreadcrumbsControl.CK_BreadcrumbsActive.bindTo(this._contextKeyService);
this._cfUseQuickPick = BreadcrumbsConfig.UseQuickPick.bindTo(_configurationService);
this._disposables.push(breadcrumbsService.register(this._editorGroup.id, this._widget));
}
@ -159,6 +173,7 @@ export class BreadcrumbsControl {
this._breadcrumbsDisposables = dispose(this._breadcrumbsDisposables);
this._ckBreadcrumbsVisible.reset();
this._ckBreadcrumbsActive.reset();
this._cfUseQuickPick.dispose();
this._widget.dispose();
this.domNode.remove();
}
@ -181,7 +196,7 @@ export class BreadcrumbsControl {
const input = this._editorGroup.activeEditor;
this._breadcrumbsDisposables = dispose(this._breadcrumbsDisposables);
if (!input || !input.getResource()) {
if (!input || !input.getResource() || (input.getResource().scheme !== Schemas.untitled && !this._fileService.canHandleResource(input.getResource()))) {
// cleanup and return when there is no input or when
// we cannot handle this input
if (!this.isHidden()) {
@ -196,7 +211,8 @@ export class BreadcrumbsControl {
this._ckBreadcrumbsVisible.set(true);
let control = this._editorGroup.activeControl.getControl() as ICodeEditor;
let model = new EditorBreadcrumbsModel(input.getResource(), isCodeEditor(control) ? control : undefined, this._workspaceService);
let model = new EditorBreadcrumbsModel(input.getResource(), isCodeEditor(control) ? control : undefined, this._workspaceService, this._configurationService);
dom.toggleClass(this.domNode, 'relative-path', model.isRelative());
let updateBreadcrumbs = () => {
let items = model.getElements().map(element => new Item(element, this._options, this._instantiationService));
@ -223,39 +239,39 @@ export class BreadcrumbsControl {
}
this._editorGroup.focus();
const { element } = event.item as Item;
if (this._shouldRevealItem(event)) {
// reveal the item
this._widget.setFocused(undefined);
this._widget.setSelection(undefined);
this._revealInEditor(element);
return;
}
if (this._cfUseQuickPick.value) {
// using quick pick
this._widget.setFocused(undefined);
this._widget.setSelection(undefined);
this._quickOpenService.show(element instanceof TreeElement ? '@' : '');
return;
}
// show picker
this._contextViewService.showContextView({
getAnchor() {
return event.node;
},
render: (parent: HTMLElement) => {
let { element } = event.item as Item;
let ctor: IConstructorSignature2<HTMLElement, BreadcrumbElement, BreadcrumbsPicker> = element instanceof FileElement ? BreadcrumbsFilePicker : BreadcrumbsOutlinePicker;
let res = this._instantiationService.createInstance(ctor, parent, element);
res.layout({ width: 220, height: 330 });
let listener = res.onDidPickElement(data => {
this._contextViewService.hideContextView();
this._widget.setFocused(undefined);
this._widget.setSelection(undefined);
if (!data) {
return;
}
if (URI.isUri(data)) {
// open new editor
this._editorService.openEditor({ resource: data });
} else if (data instanceof OutlineElement) {
let resource: URI;
let candidate = data.parent;
while (candidate) {
if (candidate instanceof OutlineModel) {
resource = candidate.textModel.uri;
break;
}
candidate = candidate.parent;
}
this._editorService.openEditor({ resource, options: { selection: Range.collapseToStart(data.symbol.selectionRange) } });
if (data) {
this._revealInEditor(data);
}
});
this._breadcrumbsPickerShowing = true;
@ -274,6 +290,28 @@ export class BreadcrumbsControl {
const value = this._widget.isDOMFocused() || this._breadcrumbsPickerShowing;
this._ckBreadcrumbsActive.set(value);
}
private _revealInEditor(data: any): void {
if (URI.isUri(data)) {
// open new editor
this._editorService.openEditor({ resource: data });
} else if (data instanceof FileElement) {
//
this._editorService.openEditor({ resource: data.uri });
} else if (data instanceof OutlineElement) {
//
let model = OutlineModel.get(data);
this._editorService.openEditor({
resource: model.textModel.uri,
options: { selection: Range.collapseToStart(data.symbol.selectionRange) }
});
}
}
private _shouldRevealItem({ payload }: IBreadcrumbsItemEvent): boolean {
return payload === BreadcrumbsControl.Payload_Reveal || (payload instanceof StandardMouseEvent && payload.metaKey);
}
}
//#region commands
@ -318,13 +356,26 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
id: 'breadcrumbs.selectFocused',
weight: KeybindingsRegistry.WEIGHT.workbenchContrib(),
primary: KeyCode.Enter,
secondary: [KeyCode.DownArrow, KeyCode.Space],
secondary: [KeyCode.DownArrow],
when: ContextKeyExpr.and(BreadcrumbsControl.CK_BreadcrumbsVisible, BreadcrumbsControl.CK_BreadcrumbsActive),
handler(accessor) {
const groups = accessor.get(IEditorGroupsService);
const breadcrumbs = accessor.get(IBreadcrumbsService);
const widget = breadcrumbs.getWidget(groups.activeGroup.id);
widget.setSelection(widget.getFocused());
widget.setSelection(widget.getFocused(), BreadcrumbsControl.Payload_Pick);
}
});
KeybindingsRegistry.registerCommandAndKeybindingRule({
id: 'breadcrumbs.revealFocused',
weight: KeybindingsRegistry.WEIGHT.workbenchContrib(),
primary: KeyMod.Shift | KeyCode.Enter,
secondary: [KeyCode.Space],
when: ContextKeyExpr.and(BreadcrumbsControl.CK_BreadcrumbsVisible, BreadcrumbsControl.CK_BreadcrumbsActive),
handler(accessor) {
const groups = accessor.get(IEditorGroupsService);
const breadcrumbs = accessor.get(IBreadcrumbsService);
const widget = breadcrumbs.getWidget(groups.activeGroup.id);
widget.setSelection(widget.getFocused(), BreadcrumbsControl.Payload_Reveal);
}
});
KeybindingsRegistry.registerCommandAndKeybindingRule({

View file

@ -19,8 +19,10 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { IPosition } from 'vs/editor/common/core/position';
import { DocumentSymbolProviderRegistry } from 'vs/editor/common/modes';
import { OutlineElement, OutlineGroup, OutlineModel } from 'vs/editor/contrib/documentSymbols/outlineModel';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { IWorkspaceContextService, IWorkspaceFolder, WorkbenchState } from 'vs/platform/workspace/common/workspace';
import { Schemas } from 'vs/base/common/network';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { BreadcrumbsConfig } from 'vs/workbench/browser/parts/editor/breadcrumbs';
export class FileElement {
constructor(
@ -31,10 +33,15 @@ export class FileElement {
export type BreadcrumbElement = FileElement | OutlineGroup | OutlineElement;
type FileInfo = { path: FileElement[], folder: IWorkspaceFolder, showFolder: boolean };
export class EditorBreadcrumbsModel {
private readonly _disposables: IDisposable[] = [];
private readonly _fileElements: FileElement[] = [];
private readonly _fileInfo: FileInfo;
private readonly _cfgFilePath: BreadcrumbsConfig<'on' | 'off' | 'last'>;
private readonly _cfgSymbolPath: BreadcrumbsConfig<'on' | 'off' | 'last'>;
private _outlineElements: (OutlineGroup | OutlineElement)[] = [];
private _outlineDisposables: IDisposable[] = [];
@ -46,38 +53,74 @@ export class EditorBreadcrumbsModel {
private readonly _uri: URI,
private readonly _editor: ICodeEditor | undefined,
@IWorkspaceContextService workspaceService: IWorkspaceContextService,
@IConfigurationService configurationService: IConfigurationService,
) {
this._fileElements = EditorBreadcrumbsModel._getFileElements(this._uri, workspaceService);
this._cfgFilePath = BreadcrumbsConfig.FilePath.bindTo(configurationService);
this._cfgSymbolPath = BreadcrumbsConfig.SymbolPath.bindTo(configurationService);
this._disposables.push(this._cfgFilePath.onDidChange(_ => this._onDidUpdate.fire(this)));
this._disposables.push(this._cfgSymbolPath.onDidChange(_ => this._onDidUpdate.fire(this)));
this._fileInfo = EditorBreadcrumbsModel._initFilePathInfo(this._uri, workspaceService);
this._bindToEditor();
this._onDidUpdate.fire(this);
}
dispose(): void {
this._cfgFilePath.dispose();
this._cfgSymbolPath.dispose();
dispose(this._disposables);
}
getElements(): ReadonlyArray<BreadcrumbElement> {
return [].concat(this._fileElements, this._outlineElements);
isRelative(): boolean {
return Boolean(this._fileInfo.folder);
}
private static _getFileElements(uri: URI, workspaceService: IWorkspaceContextService): FileElement[] {
getElements(): ReadonlyArray<BreadcrumbElement> {
let result: BreadcrumbElement[] = [];
// file path elements
if (this._cfgFilePath.value === 'on') {
result = result.concat(this._fileInfo.path);
} else if (this._cfgFilePath.value === 'last' && this._fileInfo.path.length > 0) {
result = result.concat(this._fileInfo.path.slice(-1));
}
// symbol path elements
if (this._cfgSymbolPath.value === 'on') {
result = result.concat(this._outlineElements);
} else if (this._cfgSymbolPath.value === 'last' && this._outlineElements.length > 0) {
result = result.concat(this._outlineElements.slice(-1));
}
return result;
}
private static _initFilePathInfo(uri: URI, workspaceService: IWorkspaceContextService): FileInfo {
if (uri.scheme === Schemas.untitled) {
return [];
return {
showFolder: false,
folder: undefined,
path: []
};
}
let result: FileElement[] = [];
let workspace = workspaceService.getWorkspaceFolder(uri);
let path = uri.path;
while (path !== '/') {
if (workspace && isEqual(workspace.uri, uri)) {
let info: FileInfo = {
showFolder: workspaceService.getWorkbenchState() === WorkbenchState.WORKSPACE,
folder: workspaceService.getWorkspaceFolder(uri),
path: []
};
while (uri.path !== '/') {
if (info.folder && isEqual(info.folder.uri, uri)) {
break;
}
result.push(new FileElement(uri, result.length === 0));
path = paths.dirname(path);
uri = uri.with({ path });
info.path.unshift(new FileElement(uri, info.path.length === 0));
uri = uri.with({ path: paths.dirname(uri.path) });
}
return result.reverse();
return info;
}
private _bindToEditor(): void {

View file

@ -56,9 +56,6 @@ export abstract class BreadcrumbsPicker {
this._focus = dom.trackFocus(this._domNode);
this._focus.onDidBlur(_ => this._onDidPickElement.fire(undefined), undefined, this._disposables);
const treeContainer = document.createElement('div');
treeContainer.className = 'breadcrumbs-picker-tree';
this._domNode.appendChild(treeContainer);
const treeConifg = this._completeTreeConfiguration({ dataSource: undefined, renderer: undefined });
this._tree = this._instantiationService.createInstance(HighlightingWorkbenchTree, this._domNode, treeConifg, {}, { placeholder: localize('placeholder', "Find") });
this._disposables.push(this._tree.onDidChangeSelection(e => {

View file

@ -24,9 +24,18 @@
padding: 5px 9px;
position: relative;
box-sizing: border-box;
height: 36px;
}
.monaco-workbench .monaco-breadcrumbs-picker .highlighting-tree>.tree {
height: calc(100% - 36px);
}
.monaco-workbench .monaco-breadcrumbs-picker .highlighting-tree.inactive>.input {
display: none;
}
.monaco-workbench .monaco-breadcrumbs-picker .highlighting-tree.inactive>.tree {
height: 100%;
}

View file

@ -42,7 +42,7 @@
font-style: italic;
}
.monaco-workbench > .part.editor > .content .editor-group-container > .title .no-tabs-breadcrumbs .breadcrumbs-control .monaco-breadcrumb-item:not(:first-child)::before {
.monaco-workbench > .part.editor > .content .editor-group-container > .title .no-tabs-breadcrumbs .breadcrumbs-control .monaco-breadcrumb-item::before {
content: '/';
opacity: 1;
height: inherit;
@ -50,9 +50,15 @@
background-image: none;
}
.monaco-workbench.windows > .part.editor > .content .editor-group-container > .title .no-tabs-breadcrumbs .breadcrumbs-control .monaco-breadcrumb-item:not(:first-child)::before {
.monaco-workbench.windows > .part.editor > .content .editor-group-container > .title .no-tabs-breadcrumbs .breadcrumbs-control .monaco-breadcrumb-item::before {
content: '\\';
}
.monaco-workbench > .part.editor > .content .editor-group-container > .title .no-tabs-breadcrumbs .breadcrumbs-control.relative-path .monaco-breadcrumb-item:nth-child(2)::before {
/* relative path -> hide first seperator */
display: none;
}
.monaco-workbench > .part.editor > .content .editor-group-container > .title .no-tabs-breadcrumbs .breadcrumbs-control .monaco-breadcrumb-item.shows-symbol-icon,
.monaco-workbench > .part.editor > .content .editor-group-container > .title .no-tabs-breadcrumbs .breadcrumbs-control .monaco-breadcrumb-item:last-child {
padding-right: 4px; /* does not have trailing separator*/

View file

@ -151,7 +151,7 @@ export class MenubarPart extends Part {
this.actionRunner = this._register(new ActionRunner());
this._register(this.actionRunner.onDidBeforeRun(() => {
this.focusState = this.currentMenubarVisibility === 'toggle' ? MenubarState.HIDDEN : MenubarState.VISIBLE;
this.setUnfocusedState();
}));
this._onVisibilityChange = this._register(new Emitter<Dimension>());
@ -330,6 +330,7 @@ export class MenubarPart extends Part {
this.container.removeClass('inactive');
} else {
this.container.addClass('inactive');
this.setUnfocusedState();
}
}
}
@ -340,6 +341,10 @@ export class MenubarPart extends Part {
}
}
private setUnfocusedState(): void {
this.focusState = this.currentMenubarVisibility === 'toggle' ? MenubarState.HIDDEN : MenubarState.VISIBLE;
}
private hideMenubar(): void {
this._onVisibilityChange.fire(new Dimension(0, 0));
this.container.style('visibility', 'hidden');
@ -370,7 +375,7 @@ export class MenubarPart extends Part {
this.focusedMenu = { index: 0 };
this.focusState = MenubarState.FOCUSED;
} else if (!this.isOpen) {
this.focusState = this.currentMenubarVisibility === 'toggle' ? MenubarState.HIDDEN : MenubarState.VISIBLE;
this.setUnfocusedState();
}
}
@ -664,14 +669,14 @@ export class MenubarPart extends Part {
}
});
this.customMenus[menuIndex].buttonElement.on(EventType.CLICK, () => {
this.customMenus[menuIndex].buttonElement.on(EventType.CLICK, (e) => {
if (this._modifierKeyStatus && (this._modifierKeyStatus.shiftKey || this._modifierKeyStatus.ctrlKey)) {
return; // supress keyboard shortcuts that shouldn't conflict
}
if (this.isOpen) {
if (this.isCurrentMenu(menuIndex)) {
this.focusState = this.currentMenubarVisibility === 'toggle' ? MenubarState.HIDDEN : MenubarState.VISIBLE;
this.setUnfocusedState();
} else {
this.cleanupCustomMenu();
this.showCustomMenu(menuIndex);
@ -680,6 +685,9 @@ export class MenubarPart extends Part {
this.focusedMenu = { index: menuIndex };
this.focusState = MenubarState.OPEN;
}
e.preventDefault();
e.stopPropagation();
});
this.customMenus[menuIndex].buttonElement.on(EventType.MOUSE_ENTER, () => {
@ -706,7 +714,7 @@ export class MenubarPart extends Part {
} else if (event.equals(KeyCode.RightArrow) || event.equals(KeyCode.Tab)) {
this.focusNext();
} else if (event.equals(KeyCode.Escape) && this.isFocused && !this.isOpen) {
this.focusState = this.currentMenubarVisibility === 'toggle' ? MenubarState.HIDDEN : MenubarState.VISIBLE;
this.setUnfocusedState();
} else {
eventHandled = false;
}
@ -716,6 +724,13 @@ export class MenubarPart extends Part {
event.stopPropagation();
}
});
this._register($(window).on(EventType.CLICK, () => {
// This click is outside the menubar so it counts as a focus out
if (this.isFocused) {
this.setUnfocusedState();
}
}));
}
this.container.on(EventType.FOCUS_IN, (e) => {
@ -734,7 +749,7 @@ export class MenubarPart extends Part {
if (event.relatedTarget) {
if (!this.container.getHTMLElement().contains(event.relatedTarget as HTMLElement)) {
this.focusToReturn = null;
this.focusState = this.currentMenubarVisibility === 'toggle' ? MenubarState.HIDDEN : MenubarState.VISIBLE;
this.setUnfocusedState();
}
}
});
@ -1025,8 +1040,8 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
const menuBgColor = theme.getColor(MENU_BACKGROUND);
if (menuBgColor) {
collector.addRule(`
.monaco-menu .monaco-action-bar.vertical,
.monaco-menu .monaco-action-bar.vertical .action-item {
.monaco-shell .monaco-menu .monaco-action-bar.vertical,
.monaco-shell .monaco-menu .monaco-action-bar.vertical .action-item {
background-color: ${menuBgColor};
}
`);
@ -1035,8 +1050,8 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
const menuFgColor = theme.getColor(MENU_FOREGROUND);
if (menuFgColor) {
collector.addRule(`
.monaco-menu .monaco-action-bar.vertical,
.monaco-menu .monaco-action-bar.vertical .action-item {
.monaco-shell .monaco-menu .monaco-action-bar.vertical,
.monaco-shell .monaco-menu .monaco-action-bar.vertical .action-item {
color: ${menuFgColor};
}
`);
@ -1045,8 +1060,8 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
const selectedMenuItemBgColor = theme.getColor(MENU_SELECTION_BACKGROUND);
if (menuBgColor) {
collector.addRule(`
.monaco-menu .monaco-action-bar.vertical .action-item.focused,
.monaco-menu .monaco-action-bar.vertical .action-item:hover:not(.disabled) {
.monaco-shell .monaco-menu .monaco-action-bar.vertical .action-item.focused,
.monaco-shell .monaco-menu .monaco-action-bar.vertical .action-item:hover:not(.disabled) {
background-color: ${selectedMenuItemBgColor};
}
`);
@ -1055,8 +1070,8 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
const selectedMenuItemFgColor = theme.getColor(MENU_SELECTION_FOREGROUND);
if (selectedMenuItemFgColor) {
collector.addRule(`
.monaco-menu .monaco-action-bar.vertical .action-item.focused,
.monaco-menu .monaco-action-bar.vertical .action-item:hover:not(.disabled) {
.monaco-shell .monaco-menu .monaco-action-bar.vertical .action-item.focused,
.monaco-shell .monaco-menu .monaco-action-bar.vertical .action-item:hover:not(.disabled) {
color: ${selectedMenuItemFgColor};
}
`);
@ -1065,16 +1080,16 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
const selectedMenuItemBorderColor = theme.getColor(MENU_SELECTION_BORDER);
if (selectedMenuItemBorderColor) {
collector.addRule(`
.monaco-menu .monaco-action-bar.vertical .action-item.focused {
.monaco-shell .monaco-menu .monaco-action-bar.vertical .action-item.focused {
outline: solid 1px;
}
.monaco-menu .monaco-action-bar.vertical .action-item:hover:not(.disabled) {
.monaco-shell .monaco-menu .monaco-action-bar.vertical .action-item:hover:not(.disabled) {
outline: dashed 1px;
}
.monaco-menu .monaco-action-bar.vertical .action-item.focused,
.monaco-menu .monaco-action-bar.vertical .action-item:hover:not(.disabled) {
.monaco-shell .monaco-menu .monaco-action-bar.vertical .action-item.focused,
.monaco-shell .monaco-menu .monaco-action-bar.vertical .action-item:hover:not(.disabled) {
outline-offset: -1px;
outline-color: ${selectedMenuItemBorderColor};
}

View file

@ -29,13 +29,12 @@ let _source: string = null;
function getSource(): string {
if (!_source) {
const root = URI.parse(require.toUrl('')).fsPath;
_source = path.resolve(root, '..', 'resources', 'darwin', 'bin', 'code.sh');
_source = path.resolve(root, '..', 'bin', 'code');
}
return _source;
}
function isAvailable(): TPromise<boolean> {
console.log(getSource());
return pfs.exists(getSource());
}

View file

@ -208,9 +208,10 @@ export class ReviewZoneWidget extends ZoneWidget {
this._actionbarWidget = new ActionBar(actionsContainer.getHTMLElement(), {});
this._disposables.push(this._actionbarWidget);
this._toggleAction = new Action('review.expand', nls.localize('label.expand', "Expand"), this._isCollapsed ? EXPAND_ACTION_CLASS : COLLAPSE_ACTION_CLASS, true, () => {
this._toggleAction = new Action('review.expand', nls.localize('label.collapse', "Collapse"), this._isCollapsed ? EXPAND_ACTION_CLASS : COLLAPSE_ACTION_CLASS, true, () => {
if (this._isCollapsed) {
this.show({ lineNumber: this._commentThread.range.startLineNumber, column: 1 }, 2);
this._toggleAction.label = nls.localize('label.collapse', "Collapse");
}
else {
if (this._commentThread.comments.length === 0) {
@ -219,6 +220,7 @@ export class ReviewZoneWidget extends ZoneWidget {
}
this._isCollapsed = true;
this.hide();
this._toggleAction.label = nls.localize('label.expand', "Expand");
}
return null;
});

View file

@ -47,7 +47,7 @@ export class StartDebugActionItem implements IActionItem {
@IContextViewService contextViewService: IContextViewService,
) {
this.toDispose = [];
this.selectBox = new SelectBox([], -1, contextViewService);
this.selectBox = new SelectBox([], -1, contextViewService, null, { ariaLabel: nls.localize('debugLaunchConfigurations', 'Debug Launch Configurations') });
this.toDispose.push(this.selectBox);
this.toDispose.push(attachSelectBoxStyler(this.selectBox, themeService, {
selectBackground: SIDE_BAR_BACKGROUND
@ -194,7 +194,7 @@ export class FocusSessionActionItem extends SelectActionItem {
@IThemeService themeService: IThemeService,
@IContextViewService contextViewService: IContextViewService
) {
super(null, action, [], -1, contextViewService);
super(null, action, [], -1, contextViewService, { ariaLabel: nls.localize('debugSession', 'Debug Session') });
this.toDispose.push(attachSelectBoxStyler(this.selectBox, themeService));

View file

@ -115,7 +115,7 @@ export interface IRawSession {
evaluate(args: DebugProtocol.EvaluateArguments): TPromise<DebugProtocol.EvaluateResponse>;
readonly capabilities: DebugProtocol.Capabilities;
disconnect(restart?: boolean, force?: boolean): TPromise<DebugProtocol.DisconnectResponse>;
terminate(restart?: boolean): TPromise<DebugProtocol.TerminateResponse>;
custom(request: string, args: any): TPromise<DebugProtocol.Response>;
onDidEvent: Event<DebugProtocol.Event>;
onDidInitialize: Event<DebugProtocol.InitializedEvent>;

View file

@ -429,6 +429,22 @@ declare module DebugProtocol {
export interface DisconnectResponse extends Response {
}
/** Terminate request; value of command field is 'terminate'.
The 'terminate' request is sent from the client to the debug adapter in order to give the debuggee a chance to terminate itself.
*/
export interface TerminateRequest extends Request {
// command: 'terminate';
arguments?: TerminateArguments;
}
/** Arguments for 'terminate' request. */
export interface TerminateArguments {
}
/** Response to 'terminate' request. This is just an acknowledgement, so no body field is required. */
export interface TerminateResponse extends Response {
}
/** SetBreakpoints request; value of command field is 'setBreakpoints'.
Sets multiple breakpoints for a single source and clears all previous breakpoints in that source.
To clear all breakpoint for a source, specify an empty array.
@ -1176,6 +1192,8 @@ declare module DebugProtocol {
supportsTerminateThreadsRequest?: boolean;
/** The debug adapter supports the 'setExpression' request. */
supportsSetExpression?: boolean;
/** The debug adapter supports the 'terminate' request. */
supportsTerminateRequest?: boolean;
}
/** An ExceptionBreakpointsFilter is shown in the UI as an option for configuring how exceptions are dealt with. */

View file

@ -127,7 +127,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
protected _fillContainer(container: HTMLElement): void {
this.setCssClass('breakpoint-widget');
const selectBox = new SelectBox([nls.localize('expression', "Expression"), nls.localize('hitCount', "Hit Count"), nls.localize('logMessage', "Log Message")], this.context, this.contextViewService);
const selectBox = new SelectBox([nls.localize('expression', "Expression"), nls.localize('hitCount', "Hit Count"), nls.localize('logMessage', "Log Message")], this.context, this.contextViewService, null, { ariaLabel: nls.localize('breakpointType', 'Breakpoint Type') });
this.toDispose.push(attachSelectBoxStyler(selectBox, this.themeService));
this.selectContainer = $('.breakpoint-select-container');
selectBox.render(dom.append(container, this.selectContainer));

View file

@ -167,15 +167,16 @@ export class DebugService implements debug.IDebugService {
(<RawDebugSession>session.raw).attach(session.configuration);
});
} else {
this.onRawSessionEnd(raw);
this.doCreateSession(session.raw.root, { resolved: session.configuration, unresolved: session.unresolvedConfiguration }, session.getId());
const root = raw.root;
raw.dispose();
this.doCreateSession(root, { resolved: session.configuration, unresolved: session.unresolvedConfiguration }, session.getId());
}
return;
}
if (broadcast.channel === EXTENSION_TERMINATE_BROADCAST_CHANNEL) {
this.onRawSessionEnd(raw);
raw.terminate().done(undefined, errors.onUnexpectedError);
return;
}
@ -285,8 +286,6 @@ export class DebugService implements debug.IDebugService {
}
private registerSessionListeners(session: debug.ISession, raw: RawDebugSession): void {
this.toDisposeOnSessionEnd.get(raw.getId()).push(raw);
this.toDisposeOnSessionEnd.get(raw.getId()).push(raw.onDidInitialize(event => {
aria.status(nls.localize('debuggingStarted', "Debugging started."));
const sendConfigurationDone = () => {
@ -294,7 +293,7 @@ export class DebugService implements debug.IDebugService {
return raw.configurationDone().done(null, e => {
// Disconnect the debug session on configuration done error #10596
if (raw) {
raw.disconnect().done(null, errors.onUnexpectedError);
raw.dispose();
}
this.notificationService.error(e.message);
});
@ -344,7 +343,7 @@ export class DebugService implements debug.IDebugService {
if (event.body && event.body.restart && session) {
this.restartSession(session, event.body.restart).done(null, err => this.notificationService.error(err.message));
} else {
raw.disconnect().done(null, errors.onUnexpectedError);
raw.dispose();
}
}
}));
@ -447,7 +446,7 @@ export class DebugService implements debug.IDebugService {
});
}
if (session && session.getId() === event.sessionId) {
this.onRawSessionEnd(raw);
this.onExitAdapter(raw);
}
}));
@ -977,7 +976,7 @@ export class DebugService implements debug.IDebugService {
this.telemetryService.publicLog('debugMisconfiguration', { type: resolved ? resolved.type : undefined, error: errorMessage });
this.updateStateAndEmit(raw.getId(), debug.State.Inactive);
if (!raw.disconnected) {
raw.disconnect().done(null, errors.onUnexpectedError);
raw.dispose();
} else if (session) {
this.model.removeSession(session.getId());
}
@ -986,7 +985,7 @@ export class DebugService implements debug.IDebugService {
if (this.model.getReplElements().length > 0) {
this.panelService.openPanel(debug.REPL_ID, false).done(undefined, errors.onUnexpectedError);
}
if (this.model.getReplElements().length === 0) {
if (this.model.getSessions().length === 0) {
this.inDebugMode.reset();
}
@ -1117,7 +1116,7 @@ export class DebugService implements debug.IDebugService {
// Do not run preLaunch and postDebug tasks for automatic restarts
this.skipRunningTask = !!restartData;
return session.raw.disconnect(true).then(() => {
return session.raw.terminate(true).then(() => {
if (strings.equalsIgnoreCase(session.configuration.type, 'extensionHost') && session.raw.root) {
return this.broadcastService.broadcast({
channel: EXTENSION_RELOAD_BROADCAST_CHANNEL,
@ -1159,12 +1158,12 @@ export class DebugService implements debug.IDebugService {
public stopSession(session: debug.ISession): TPromise<any> {
if (session) {
return session.raw.disconnect(false, true);
return session.raw.terminate();
}
const sessions = this.model.getSessions();
if (sessions.length) {
return TPromise.join(sessions.map(s => s.raw.disconnect(false, true)));
return TPromise.join(sessions.map(s => s.raw.terminate(false)));
}
this.sessionStates.clear();
@ -1172,7 +1171,7 @@ export class DebugService implements debug.IDebugService {
return undefined;
}
private onRawSessionEnd(raw: RawDebugSession): void {
private onExitAdapter(raw: RawDebugSession): void {
const breakpoints = this.model.getBreakpoints();
const session = this.model.getSessions().filter(p => p.getId() === raw.getId()).pop();
/* __GDPR__

View file

@ -10,32 +10,32 @@ import { Action } from 'vs/base/common/actions';
import * as errors from 'vs/base/common/errors';
import { TPromise } from 'vs/base/common/winjs.base';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import * as debug from 'vs/workbench/parts/debug/common/debug';
import { Debugger } from 'vs/workbench/parts/debug/node/debugger';
import { IOutputService } from 'vs/workbench/parts/output/common/output';
import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { formatPII } from 'vs/workbench/parts/debug/common/debugUtils';
import { SocketDebugAdapter } from 'vs/workbench/parts/debug/node/debugAdapter';
import { SessionState, DebugEvent, IRawSession, IDebugAdapter } from 'vs/workbench/parts/debug/common/debug';
export interface SessionExitedEvent extends debug.DebugEvent {
export interface SessionExitedEvent extends DebugEvent {
body: {
exitCode: number,
sessionId: string
};
}
export interface SessionTerminatedEvent extends debug.DebugEvent {
export interface SessionTerminatedEvent extends DebugEvent {
body: {
restart?: boolean,
sessionId: string
};
}
export class RawDebugSession implements debug.IRawSession {
export class RawDebugSession implements IRawSession {
private debugAdapter: debug.IDebugAdapter;
private debugAdapter: IDebugAdapter;
public emittedStopped: boolean;
public readyForBreakpoints: boolean;
@ -43,9 +43,11 @@ export class RawDebugSession implements debug.IRawSession {
private cachedInitServerP: TPromise<void>;
private startTime: number;
public disconnected: boolean;
private terminated: boolean;
private sentPromises: TPromise<DebugProtocol.Response>[];
private _capabilities: DebugProtocol.Capabilities;
private allThreadsContinued: boolean;
private state: SessionState = SessionState.LAUNCH;
private readonly _onDidInitialize: Emitter<DebugProtocol.InitializedEvent>;
private readonly _onDidStop: Emitter<DebugProtocol.StoppedEvent>;
@ -56,7 +58,7 @@ export class RawDebugSession implements debug.IRawSession {
private readonly _onDidThread: Emitter<DebugProtocol.ThreadEvent>;
private readonly _onDidOutput: Emitter<DebugProtocol.OutputEvent>;
private readonly _onDidBreakpoint: Emitter<DebugProtocol.BreakpointEvent>;
private readonly _onDidCustomEvent: Emitter<debug.DebugEvent>;
private readonly _onDidCustomEvent: Emitter<DebugEvent>;
private readonly _onDidEvent: Emitter<DebugProtocol.Event>;
constructor(
@ -83,7 +85,7 @@ export class RawDebugSession implements debug.IRawSession {
this._onDidThread = new Emitter<DebugProtocol.ThreadEvent>();
this._onDidOutput = new Emitter<DebugProtocol.OutputEvent>();
this._onDidBreakpoint = new Emitter<DebugProtocol.BreakpointEvent>();
this._onDidCustomEvent = new Emitter<debug.DebugEvent>();
this._onDidCustomEvent = new Emitter<DebugEvent>();
this._onDidEvent = new Emitter<DebugProtocol.Event>();
}
@ -127,7 +129,7 @@ export class RawDebugSession implements debug.IRawSession {
return this._onDidBreakpoint.event;
}
public get onDidCustomEvent(): Event<debug.DebugEvent> {
public get onDidCustomEvent(): Event<DebugEvent> {
return this._onDidCustomEvent.event;
}
@ -229,7 +231,7 @@ export class RawDebugSession implements debug.IRawSession {
}, () => errorCallback(errors.canceled()));
}
private onDapEvent(event: debug.DebugEvent): void {
private onDapEvent(event: DebugEvent): void {
event.sessionId = this.id;
if (event.event === 'initialized') {
@ -282,6 +284,7 @@ export class RawDebugSession implements debug.IRawSession {
}
public attach(args: DebugProtocol.AttachRequestArguments): TPromise<DebugProtocol.AttachResponse> {
this.state = SessionState.ATTACH;
return this.send('attach', args).then(response => this.readCapabilities(response));
}
@ -339,24 +342,13 @@ export class RawDebugSession implements debug.IRawSession {
return this.send<DebugProtocol.CompletionsResponse>('completions', args);
}
public disconnect(restart = false, force = false): TPromise<DebugProtocol.DisconnectResponse> {
if (this.disconnected && force) {
return this.stopServer();
}
// Cancel all sent promises on disconnect so debug trees are not left in a broken state #3666.
// Give a 1s timeout to give a chance for some promises to complete.
setTimeout(() => {
this.sentPromises.forEach(p => p && p.cancel());
this.sentPromises = [];
}, 1000);
if (this.debugAdapter && !this.disconnected) {
// point of no return: from now on don't report any errors
this.disconnected = true;
return this.send('disconnect', { restart: restart }, false).then(() => this.stopServer(), () => this.stopServer());
public terminate(restart = false): TPromise<DebugProtocol.TerminateResponse> {
if (this.capabilities.supportsTerminateRequest && !this.terminated && this.state === SessionState.LAUNCH) {
this.terminated = true;
return this.send('terminate', { restart });
}
this.dispose(restart);
return TPromise.as(null);
}
@ -483,6 +475,26 @@ export class RawDebugSession implements debug.IRawSession {
});
}
public dispose(restart = false): void {
if (this.disconnected) {
this.stopServer().done(undefined, errors.onUnexpectedError);
} else {
// Cancel all sent promises on disconnect so debug trees are not left in a broken state #3666.
// Give a 1s timeout to give a chance for some promises to complete.
setTimeout(() => {
this.sentPromises.forEach(p => p && p.cancel());
this.sentPromises = [];
}, 1000);
if (this.debugAdapter && !this.disconnected) {
// point of no return: from now on don't report any errors
this.disconnected = true;
this.send('disconnect', { restart }, false).then(() => this.stopServer(), () => this.stopServer()).done(undefined, errors.onUnexpectedError);
}
}
}
private stopServer(): TPromise<any> {
if (/* this.socket !== null */ this.debugAdapter instanceof SocketDebugAdapter) {
@ -513,8 +525,4 @@ export class RawDebugSession implements debug.IRawSession {
}
this._onDidExitAdapter.fire({ sessionId: this.getId() });
}
public dispose(): void {
this.disconnect().done(null, errors.onUnexpectedError);
}
}

View file

@ -186,7 +186,7 @@ export class MockSession implements IRawSession {
return TPromise.as(null);
}
public disconnect(restart?: boolean, force?: boolean): TPromise<DebugProtocol.DisconnectResponse> {
public terminate(restart = false): TPromise<DebugProtocol.TerminateResponse> {
return TPromise.as(null);
}

View file

@ -87,6 +87,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
private readonly _onRecommendationChange: Emitter<RecommendationChangeNotification> = new Emitter<RecommendationChangeNotification>();
onRecommendationChange: Event<RecommendationChangeNotification> = this._onRecommendationChange.event;
private sessionSeed: number;
constructor(
@IExtensionGalleryService private readonly _galleryService: IExtensionGalleryService,
@ -109,7 +110,6 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
) {
super();
if (!this.isEnabled()) {
return;
}
@ -118,6 +118,8 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
this._extensionsRecommendationsUrl = product.extensionsGallery.recommendationsUrl;
}
this.sessionSeed = +new Date();
let globallyIgnored = <string[]>JSON.parse(this.storageService.get('extensionsAssistant/ignored_recommendations', StorageScope.GLOBAL, '[]'));
this._globallyIgnoredRecommendations = globallyIgnored.map(id => id.toLowerCase());
@ -403,7 +405,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
...this._dynamicWorkspaceRecommendations,
...Object.keys(this._experimentalRecommendations),
]).filter(extensionId => this.isExtensionAllowedToBeRecommended(extensionId));
shuffle(others);
shuffle(others, this.sessionSeed);
return others.map(extensionId => {
const sources: ExtensionRecommendationSource[] = [];
if (this._exeBasedRecommendations[extensionId]) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><title>Market_LanguageGeneric</title><path d="M14.315,11H1.685a6.912,6.912,0,0,1,0-6h12.63a6.912,6.912,0,0,1,0,6Z" fill="#fff"/><path d="M8,0a8,8,0,1,0,8,8A8.009,8.009,0,0,0,8,0ZM8,1a6.993,6.993,0,0,1,5.736,3H2.264A6.991,6.991,0,0,1,8,1ZM8,15a6.991,6.991,0,0,1-5.736-3H13.736A6.993,6.993,0,0,1,8,15Zm6.315-4H1.685a6.912,6.912,0,0,1,0-6h12.63a6.912,6.912,0,0,1,0,6Z" fill="#2b2b2b"/><path d="M8,1a6.993,6.993,0,0,1,5.736,3H2.264A6.991,6.991,0,0,1,8,1ZM8,15a6.991,6.991,0,0,1-5.736-3H13.736A6.993,6.993,0,0,1,8,15Z" fill="#ff8c00"/><path d="M8,0a8,8,0,1,0,8,8A8.009,8.009,0,0,0,8,0ZM8,1a6.993,6.993,0,0,1,5.736,3H2.264A6.991,6.991,0,0,1,8,1ZM8,15a6.991,6.991,0,0,1-5.736-3H13.736A6.993,6.993,0,0,1,8,15Zm6.315-4H1.685a6.912,6.912,0,0,1,0-6h12.63a6.912,6.912,0,0,1,0,6Z" fill="#2b2b2b"/><path d="M8,1a6.993,6.993,0,0,1,5.736,3H2.264A6.991,6.991,0,0,1,8,1ZM8,15a6.991,6.991,0,0,1-5.736-3H13.736A6.993,6.993,0,0,1,8,15Z" fill="#767676"/><path d="M5.783,6.783,4.565,8,5.783,9.217l-.566.566L3.435,8,5.217,6.217Zm5-.566-.566.566L11.435,8,10.217,9.217l.566.566L12.565,8Zm-4.14,3.6.714.358,2-4-.714-.358Z" fill="#2b2b2b"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -151,7 +151,7 @@ class Extension implements IExtension {
return require.toUrl('../electron-browser/media/theme-icon.png');
}
if (Array.isArray(this.local.manifest.contributes.grammars) && this.local.manifest.contributes.grammars.length) {
return require.toUrl('../electron-browser/media/language-icon.png');
return require.toUrl('../electron-browser/media/language-icon.svg');
}
}
}

View file

@ -15,7 +15,7 @@ import { EncodingMode, ConfirmResult, EditorInput, IFileEditorInput, ITextEditor
import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel';
import { BinaryEditorModel } from 'vs/workbench/common/editor/binaryEditorModel';
import { FileOperationError, FileOperationResult } from 'vs/platform/files/common/files';
import { ITextFileService, AutoSaveMode, ModelState, TextFileModelChangeEvent } from 'vs/workbench/services/textfile/common/textfiles';
import { ITextFileService, AutoSaveMode, ModelState, TextFileModelChangeEvent, LoadReason } from 'vs/workbench/services/textfile/common/textfiles';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IReference } from 'vs/base/common/lifecycle';
@ -260,7 +260,8 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput {
return this.textFileService.models.loadOrCreate(this.resource, {
encoding: this.preferredEncoding,
reload: { async: true }, // trigger a reload of the model if it exists already but do not wait to show the model
allowBinary: this.forceOpenAsText
allowBinary: this.forceOpenAsText,
reason: LoadReason.EDITOR
}).then(model => {
// This is a bit ugly, because we first resolve the model and then resolve a model reference. the reason being that binary

View file

@ -7,7 +7,7 @@
import * as paths from 'vs/base/common/paths';
import URI from 'vs/base/common/uri';
import { Range, IRange } from 'vs/editor/common/core/range';
import { IMarker, MarkerSeverity, IRelatedInformation } from 'vs/platform/markers/common/markers';
import { IMarker, MarkerSeverity, IRelatedInformation, IMarkerData } from 'vs/platform/markers/common/markers';
import { IFilter, IMatch, or, matchesContiguousSubString, matchesPrefix, matchesFuzzy } from 'vs/base/common/filters';
import Messages from 'vs/workbench/parts/markers/electron-browser/messages';
import { Schemas } from 'vs/base/common/network';
@ -18,7 +18,7 @@ import * as strings from 'vs/base/common/strings';
import { ITextModelService } from 'vs/editor/common/services/resolverService';
import { CodeAction } from 'vs/editor/common/modes';
import { getCodeActions } from 'vs/editor/contrib/codeAction/codeAction';
import { CodeActionTrigger } from 'vs/editor/contrib/codeAction/codeActionTrigger';
import { CodeActionKind } from 'vs/editor/contrib/codeAction/codeActionTrigger';
function compareUris(a: URI, b: URI) {
if (a.toString() < b.toString()) {
@ -38,6 +38,7 @@ export class ResourceMarkers extends NodeWithId {
private _name: string = null;
private _path: string = null;
private _allFixesPromise: Promise<CodeAction[]>;
markers: Marker[] = [];
isExcluded: boolean = false;
@ -46,7 +47,8 @@ export class ResourceMarkers extends NodeWithId {
uriMatches: IMatch[] = [];
constructor(
readonly uri: URI
readonly uri: URI,
private textModelService: ITextModelService
) {
super(uri.toString());
}
@ -65,6 +67,37 @@ export class ResourceMarkers extends NodeWithId {
return this._name;
}
public getFixes(marker: Marker): Promise<CodeAction[]> {
return this._getFixes(new Range(marker.range.startLineNumber, marker.range.startColumn, marker.range.endLineNumber, marker.range.endColumn));
}
public async hasFixes(marker: Marker): Promise<boolean> {
if (!this._allFixesPromise) {
this._allFixesPromise = this._getFixes();
}
const allFixes = await this._allFixesPromise;
if (allFixes.length) {
const markerKey = IMarkerData.makeKey(marker.raw);
for (const fix of allFixes) {
if (fix.diagnostics && fix.diagnostics.some(d => IMarkerData.makeKey(d) === markerKey)) {
return true;
}
}
}
return false;
}
private async _getFixes(range?: Range): Promise<CodeAction[]> {
const modelReference = await this.textModelService.createModelReference(this.uri);
if (modelReference) {
const model = modelReference.object.textEditorModel;
const codeActions = await getCodeActions(model, range ? range : model.getFullModelRange(), { type: 'manual', filter: { kind: CodeActionKind.QuickFix } });
modelReference.dispose();
return codeActions;
}
return [];
}
static compare(a: ResourceMarkers, b: ResourceMarkers): number {
let [firstMarkerOfA] = a.markers;
let [firstMarkerOfB] = b.markers;
@ -88,8 +121,7 @@ export class Marker extends NodeWithId {
constructor(
id: string,
readonly raw: IMarker,
private textModelService: ITextModelService
readonly raw: IMarker
) {
super(id);
}
@ -102,17 +134,6 @@ export class Marker extends NodeWithId {
return this.raw;
}
public async getCodeActions(trigger: CodeActionTrigger): Promise<CodeAction[]> {
const modelReference = await this.textModelService.createModelReference(this.resource);
if (modelReference) {
const model = modelReference.object.textEditorModel;
const codeActions = await getCodeActions(model, new Range(this.range.startLineNumber, this.range.startColumn, this.range.endLineNumber, this.range.endColumn), trigger);
modelReference.dispose();
return codeActions;
}
return [];
}
public toString(): string {
return JSON.stringify({
...this.raw,
@ -289,11 +310,11 @@ export class MarkersModel {
private createResource(uri: URI, rawMarkers: IMarker[]): ResourceMarkers {
const markers: Marker[] = [];
const resource = new ResourceMarkers(uri);
const resource = new ResourceMarkers(uri, this.textModelService);
this.updateResource(resource);
rawMarkers.forEach((rawMarker, index) => {
const marker = new Marker(uri.toString() + index, rawMarker, this.textModelService);
const marker = new Marker(uri.toString() + index, rawMarker);
if (rawMarker.relatedInformation) {
const groupedByResource = groupBy(rawMarker.relatedInformation, MarkersModel._compareMarkersByUri);
groupedByResource.sort((a, b) => compareUris(a[0].resource, b[0].resource));

View file

@ -7,7 +7,7 @@
import { TPromise } from 'vs/base/common/winjs.base';
import * as mouse from 'vs/base/browser/mouseEvent';
import * as tree from 'vs/base/parts/tree/browser/tree';
import { MarkersModel, Marker } from 'vs/workbench/parts/markers/electron-browser/markersModel';
import { MarkersModel, Marker, ResourceMarkers } from 'vs/workbench/parts/markers/electron-browser/markersModel';
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
import { IMenuService, MenuId } from 'vs/platform/actions/common/actions';
import { IAction, Action } from 'vs/base/common/actions';
@ -19,6 +19,7 @@ import { IBulkEditService } from 'vs/editor/browser/services/bulkEditService';
import { applyCodeAction } from 'vs/editor/contrib/codeAction/codeActionCommands';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { IEditorService, ACTIVE_GROUP } from 'vs/workbench/services/editor/common/editorService';
import { localize } from 'vs/nls';
export class Controller extends WorkbenchTreeController {
@ -79,10 +80,14 @@ export class Controller extends WorkbenchTreeController {
private async _getMenuActions(tree: WorkbenchTree, element: any): Promise<IAction[]> {
const result: IAction[] = [];
const quickFixActions = await this._getQuickFixActions(element);
if (quickFixActions.length) {
result.push(...quickFixActions);
if (element instanceof Marker) {
const quickFixActions = await this._getQuickFixActions(tree, element);
if (quickFixActions.length) {
result.push(...quickFixActions);
} else {
result.push(new Action('problems.no.fixes', localize('no fixes available', "No fixes available"), void 0, false));
}
result.push(new Separator());
}
@ -100,9 +105,10 @@ export class Controller extends WorkbenchTreeController {
return result;
}
private async _getQuickFixActions(element: any): Promise<IAction[]> {
if (element instanceof Marker) {
const codeActions = await element.getCodeActions({ type: 'manual' });
private async _getQuickFixActions(tree: WorkbenchTree, element: Marker): Promise<IAction[]> {
const parent = tree.getNavigator(element).parent();
if (parent instanceof ResourceMarkers) {
const codeActions = await parent.getFixes(element);
return codeActions.map(codeAction => new Action(
codeAction.command ? codeAction.command.id : codeAction.title,
codeAction.title,
@ -112,9 +118,8 @@ export class Controller extends WorkbenchTreeController {
return this.openFileAtMarker(element)
.then(() => applyCodeAction(codeAction, this.bulkEditService, this.commandService));
}));
}
return Promise.resolve([]);
return [];
}
public openFileAtMarker(element: Marker): TPromise<void> {

Some files were not shown because too many files have changed in this diff Show more