Merge remote-tracking branch 'origin/main' into tyriar/hangul

This commit is contained in:
Daniel Imms
2023-10-28 07:11:40 -07:00
272 changed files with 5082 additions and 3118 deletions
+1 -1
View File
@@ -1,4 +1,5 @@
# https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt
# https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
# mjbvz: Fix spacing
13f4f052582bcec3d6c6c6a70d995c9dee2cac13
@@ -23,6 +24,5 @@ ae1452eea678f5266ef513f22dacebb90955d6c9
a3cb14be7f2cceadb17adf843675b1a59537dbbd
ee1655a82ebdfd38bf8792088a6602c69f7bbd94
# jrieken: new eslint-rule
4a130c40ed876644ed8af2943809d08221375408
+1 -1
View File
@@ -7,7 +7,7 @@
{
"kind": 2,
"language": "github-issues",
"value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-unpkg repo:microsoft/vscode-references-view repo:microsoft/vscode-anycode repo:microsoft/vscode-hexeditor repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-livepreview repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remote-repositories-github repo:microsoft/monaco-editor repo:microsoft/vscode-vsce repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-livepreview repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n repo:microsoft/vscode-remote-tunnels\n\n$MILESTONE=milestone:\"October 2023\"\n"
"value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-unpkg repo:microsoft/vscode-references-view repo:microsoft/vscode-anycode repo:microsoft/vscode-hexeditor repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-livepreview repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remote-repositories-github repo:microsoft/monaco-editor repo:microsoft/vscode-vsce repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-livepreview repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n repo:microsoft/vscode-remote-tunnels repo:microsoft/vscode-pylint repo:microsoft/vscode-black-formatter repo:microsoft/vscode-isort repo:microsoft/lsprotocol repo:microsoft/vscode-flake8 repo:microsoft/vscode-autopep8 repo:microsoft/vscode-python-tools-extension-template repo:microsoft/vscode-mypy repo:microsoft/vscode-python-debugger\n\n$MILESTONE=milestone:\"October 2023\"\n"
},
{
"kind": 1,
+1 -1
View File
@@ -7,7 +7,7 @@
{
"kind": 2,
"language": "github-issues",
"value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-unpkg repo:microsoft/vscode-references-view repo:microsoft/vscode-anycode repo:microsoft/vscode-hexeditor repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-livepreview repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remote-repositories-github repo:microsoft/monaco-editor repo:microsoft/vscode-vsce repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-livepreview repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n repo:microsoft/vscode-remote-tunnels\n\n$MILESTONE=milestone:\"October 2023\"\n\n$MINE=assignee:@me\n"
"value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-unpkg repo:microsoft/vscode-references-view repo:microsoft/vscode-anycode repo:microsoft/vscode-hexeditor repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-livepreview repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remote-repositories-github repo:microsoft/monaco-editor repo:microsoft/vscode-vsce repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-livepreview repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n repo:microsoft/vscode-remote-tunnels repo:microsoft/vscode-pylint repo:microsoft/vscode-black-formatter repo:microsoft/vscode-isort repo:microsoft/lsprotocol repo:microsoft/vscode-flake8 repo:microsoft/vscode-autopep8 repo:microsoft/vscode-python-tools-extension-template repo:microsoft/vscode-mypy repo:microsoft/vscode-python-debugger\n\n$MILESTONE=milestone:\"October 2023\"\n\n$MINE=assignee:@me\n"
},
{
"kind": 1,
+11 -1
View File
@@ -12,7 +12,7 @@
{
"kind": 2,
"language": "github-issues",
"value": "$repos=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-unpkg repo:microsoft/vscode-references-view repo:microsoft/vscode-anycode repo:microsoft/vscode-hexeditor repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-livepreview repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remote-repositories-github repo:microsoft/monaco-editor repo:microsoft/vscode-vsce repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-livepreview repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n repo:microsoft/vscode-remote-tunnels\n$milestone=milestone:\"October 2023\"\n"
"value": "$repos=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-dev repo:microsoft/vscode-unpkg repo:microsoft/vscode-references-view repo:microsoft/vscode-anycode repo:microsoft/vscode-hexeditor repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-livepreview repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remote-repositories-github repo:microsoft/monaco-editor repo:microsoft/vscode-vsce repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-livepreview repo:microsoft/vscode-livepreview repo:microsoft/vscode-python repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-l10n repo:microsoft/vscode-remote-tunnels\n$milestone=milestone:\"October 2023\"\n$closedRecently=closed:>2023-09-29\n"
},
{
"kind": 1,
@@ -43,5 +43,15 @@
"kind": 2,
"language": "github-issues",
"value": "$repos $milestone is:closed reason:completed -assignee:@me label:bug -label:verified -label:*duplicate\n"
},
{
"kind": 1,
"language": "markdown",
"value": "### Issues recently closed via PR without a milestone"
},
{
"kind": 2,
"language": "github-issues",
"value": "$repos is:closed linked:pr $closedRecently no:milestone -label:verified -label:*duplicate\n"
}
]
-1
View File
@@ -1,7 +1,6 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch-clientd",
+2 -2
View File
@@ -1,5 +1,5 @@
disturl "https://electronjs.org/headers"
target "25.9.1"
ms_build_id "24472542"
target "25.9.2"
ms_build_id "24603566"
runtime "electron"
build_from_source "true"
+32 -707
View File
@@ -592,34 +592,6 @@ without specific, written prior permission. Title to copyright in this document
---------------------------------------------------------
Ikuyadeu/vscode-R 2.3.8 - MIT
https://github.com/Ikuyadeu/vscode-R
MIT License
Copyright (c) 2022 REditorSupport
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.
---------------------------------------------------------
---------------------------------------------------------
Ionic documentation 1.2.4 - Apache2
https://github.com/ionic-team/ionic-site
@@ -771,682 +743,7 @@ SOFTWARE.
jeff-hykin/better-cpp-syntax 1.17.4 - MIT
https://github.com/jeff-hykin/better-cpp-syntax
The MIT License (MIT)
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
MIT License,,Copyright (c) 2019 Jeff Hykin,,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.
---------------------------------------------------------
---------------------------------------------------------
@@ -1563,7 +860,7 @@ SOFTWARE.
---------------------------------------------------------
jlelong/vscode-latex-basics 1.5.2 - MIT
jlelong/vscode-latex-basics 1.5.4 - MIT
https://github.com/jlelong/vscode-latex-basics
Copyright (c) vscode-latex-basics authors
@@ -2286,7 +1583,35 @@ suitability for any purpose.
---------------------------------------------------------
rust-syntax 0.5.0 - MIT
REditorSupport/vscode-R 2.8.1 - MIT
https://github.com/REditorSupport/vscode-R
MIT License
Copyright (c) 2022 REditorSupport
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.
---------------------------------------------------------
---------------------------------------------------------
rust-syntax 0.6.1 - MIT
https://github.com/dustypomerleau/rust-syntax
MIT License
@@ -2665,7 +1990,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SO
---------------------------------------------------------
trond-snekvik/vscode-rst 1.5.2 - MIT
trond-snekvik/vscode-rst 1.5.3 - MIT
https://github.com/trond-snekvik/vscode-rst
The MIT License (MIT)
+1
View File
@@ -108,6 +108,7 @@ stages:
exec { git clone https://github.com/rzhao271/node-gyp.git . } "Cloning rzhao271/node-gyp failed"
exec { git checkout 102b347da0c92c29f9c67df22e864e70249cf086 } "Checking out 102b347 failed"
exec { npm install } "Building rzhao271/node-gyp failed"
exec { python3 -m pip install setuptools } "Installing setuptools failed"
displayName: Install custom node-gyp
workingDirectory: .build/node-gyp
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
@@ -105,6 +105,7 @@ steps:
exec { git checkout v9.4.0 } "Checking out v9.4.0 failed"
exec { git am --3way --whitespace=fix ../../build/npm/gyp/patches/gyp_spectre_mitigation_support.patch } "Apply spectre patch failed"
exec { npm install } "Building node-gyp failed"
exec { python3 -m pip install setuptools } "Installing setuptools failed"
displayName: Install custom node-gyp
workingDirectory: .build/node-gyp
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
+75 -23
View File
@@ -1,23 +1,75 @@
4a472f48b54e92855ad77606f11a620523f3abe4ee1bc2997a300ae72da4b2f5 *electron-v25.9.1-darwin-arm64-symbols.zip
247daa6c9faf711162dc623832fcb189d3c1ef6a15884084cb45c8da3a037b6b *electron-v25.9.1-darwin-arm64.zip
7d8ec9d3272dbe356deb09b47ccfda30c421b32f7e906f1186ea26f894b22dc1 *electron-v25.9.1-darwin-x64-symbols.zip
35fc99808ea026a21afeca537c218ace398d299fba7ab73d2630be513f1e1617 *electron-v25.9.1-darwin-x64.zip
bfcd6ac66f067cfec08b6d18ed80b519e6d70a96d9b1d31dc2cfcf86f4a9af96 *electron-v25.9.1-linux-arm64-symbols.zip
1c8aa3f13ade23858664b687ad334634ccd698ec7d627554d16cbb596ffa7a0f *electron-v25.9.1-linux-arm64.zip
dcfb4a1d6b2ceffa7a8d9a60b9de027d006753eae1278f07de907c474e71c270 *electron-v25.9.1-linux-armv7l-symbols.zip
f4320f1888354e17595fb6901c03c383f45325bfba5e6e1b91b4200ff696049f *electron-v25.9.1-linux-armv7l.zip
772dd276d328549e0111b93b43d395de51ff46eba550be48c649c386997125a8 *electron-v25.9.1-linux-x64-symbols.zip
35529c411275791abf9aa46f0a2e216b0affa542757583afb438a76047f6b90c *electron-v25.9.1-linux-x64.zip
5b0b4595691da19258ce0b2c09f58ba969987d24ae8160661a715eaadf42c16b *electron-v25.9.1-win32-arm64-pdb.zip
1e67a35b41927962765a8d8cb01ce73e8c28db6453323f2661e63afd8fdf49e8 *electron-v25.9.1-win32-arm64-symbols.zip
a378f5fc44e872f05d037c3ca7f03802ed3a9b2611f59741ce933f500557af7c *electron-v25.9.1-win32-arm64.zip
b50f8675b12eda5d0717f83179e40b411ba3254f81bd7142821745c00b566560 *electron-v25.9.1-win32-x64-pdb.zip
8ddaa416e51bac1e93c63d1223bec37b6dd78b00c860e5b91912da09af7ff7b5 *electron-v25.9.1-win32-x64-symbols.zip
f6762a98193baa9877f443c9414b1f825f99b7cf1094be579d5202b72442b5be *electron-v25.9.1-win32-x64.zip
a0c2566efff0a796f751cfc63cddd52d6c4153b35b6ad582bbdd15a2c4317bc9 *ffmpeg-v25.9.1-darwin-arm64.zip
b8cd9d93cdf8ebbd3caf68581b6504529b8bf2dea984b6e5f637343ea9d61946 *ffmpeg-v25.9.1-darwin-x64.zip
bd52d57ff97fb56ac01a3482af905d04f0d4e9c13c53858c6d9f99957eca82da *ffmpeg-v25.9.1-linux-arm64.zip
9b3d09177fa1e63e2a6beecfa70aeec30aeb5c1873ff21128a68051c4e23f95d *ffmpeg-v25.9.1-linux-armv7l.zip
edc7b1c9f1a0733f109a2c0375a4e40c5bfe0bf28b7f06dcc76e1ada0aa2f125 *ffmpeg-v25.9.1-linux-x64.zip
2467f6567356340e8d9872753a3df486555334b7c868c0d12991f80f2353ce1f *ffmpeg-v25.9.1-win32-arm64.zip
fe4676a13bf9d6f87353f3496e0fb37cd3db151fcea13dad7610a2835d238062 *ffmpeg-v25.9.1-win32-x64.zip
2606d6745056d248fe7ba21e6a30467d3ea80d2689c5fa6d2a35acf1b4a72ddd *chromedriver-v25.9.2-darwin-arm64.zip
22a86732b9e6c2afc07021ea0adeb92cdbaaa8751843c0d5170b5e96550685e7 *chromedriver-v25.9.2-darwin-x64.zip
f5f42513bb55c7c1098e669d12488844ca2e63cd0d3a375db2eab517975c130c *chromedriver-v25.9.2-linux-arm64.zip
28a5613f7e4b117a65ec2882b124bf1d388f1c4fb86b228acadc297601faa6fd *chromedriver-v25.9.2-linux-armv7l.zip
7d01d537383df4b1653647e14fb768d27879943596a87b57ae3f171aa2aaf5d1 *chromedriver-v25.9.2-linux-x64.zip
3fac66fe45b4a5dcd9a4784d66bd8087d0dee5fccf06cb3f34e78f8bef3f0f8f *chromedriver-v25.9.2-mas-arm64.zip
a15fc80fac243330f15a7ff7cc834c50c79833e81b871cc45f7239bf1743b4ac *chromedriver-v25.9.2-mas-x64.zip
f0a354e01e277b14422e34f8af9c8c43ae975c6fb69a2e61ef275b6ec919f2ab *chromedriver-v25.9.2-win32-arm64.zip
570a6b5bc485bfea9681c97b79832d5d5bcafdd993c13dc4ab11558e3a27c554 *chromedriver-v25.9.2-win32-ia32.zip
4134f539ac304c65dfca9812b0d3943ea64d886989eba8f62828718b106c4eee *chromedriver-v25.9.2-win32-x64.zip
835418b9274c76503542c986d63bb9d98f071c702170536bdd62c1760589e01e *electron-api.json
fd9f5b1439445acc69441ef66cc47f56c5c0848dec5f6daf91a476073e72a756 *electron-v25.9.2-darwin-arm64-dsym-snapshot.zip
de29ef2a4c7b76281b1cf3ac9e6047a9275cc60167c6cd60509f2eb2a3258842 *electron-v25.9.2-darwin-arm64-dsym.zip
732f51802f2902ca08c3a06a45fe23820b1effbeb3ebd39fcae9fce5a1e0b25d *electron-v25.9.2-darwin-arm64-symbols.zip
ab82efb59077a85fd20264f8ad0dedc4c8b0b2fc9d2948ed9461425faf5e35f6 *electron-v25.9.2-darwin-arm64.zip
fb924b4dd0d781a14114e54fa556ca326c60665b674712c59163e7b44db675d8 *electron-v25.9.2-darwin-x64-dsym-snapshot.zip
197fc3e120e54578658e2f10b5fcec1d2004f1637d4bee116ff1e12b0c5a1429 *electron-v25.9.2-darwin-x64-dsym.zip
57d0a0f55726524ff843a040e516e425c3537a4602ab8c23120433fbc51470fb *electron-v25.9.2-darwin-x64-symbols.zip
0fe310e2ed13a97cd9c28fb0cf806338cd2e720083e6d1b13d60ba4cedb8f295 *electron-v25.9.2-darwin-x64.zip
eb1a31ccd6a89a21538a8b1f0b5d3b77e1fe946b898319e1832cb9dc3abcd753 *electron-v25.9.2-linux-arm64-debug.zip
b5b128bed0a09955ad5bb91fa9f5ab9155a547f787ad580bcd5bf409bb697ff6 *electron-v25.9.2-linux-arm64-symbols.zip
0b2d48a29d79fcd21d72d05fdb7638dd2fd257cf0d4cf9bd32f182b2634de466 *electron-v25.9.2-linux-arm64.zip
eb1a31ccd6a89a21538a8b1f0b5d3b77e1fe946b898319e1832cb9dc3abcd753 *electron-v25.9.2-linux-armv7l-debug.zip
43f1f4c1475335719ba8f1f7f036a084fb22b5faa908bf4f7d30a96d5d9c159d *electron-v25.9.2-linux-armv7l-symbols.zip
4ea3ee3ad41c69454d9a12518eeff1ec5dbd841c8200dc8652e6c0b101d1259c *electron-v25.9.2-linux-armv7l.zip
1a8daf1f9e155d7143d16367e54e4e3b8e9d71ad580b44c8dfba0cb4e7a1c640 *electron-v25.9.2-linux-x64-debug.zip
803f32ca345d8974cc074dc177e06c62f8bcc98d4a39eccb676b7d302b8fc466 *electron-v25.9.2-linux-x64-symbols.zip
aab65a562723e04eadbdee1251a749756b366dc1c5014bcc987c21c0a523fe2f *electron-v25.9.2-linux-x64.zip
fd9f5b1439445acc69441ef66cc47f56c5c0848dec5f6daf91a476073e72a756 *electron-v25.9.2-mas-arm64-dsym-snapshot.zip
0ec88ec7bd2b7cb2e5e6b94f13df7d8c22433637004a473370e0959cb01f78cc *electron-v25.9.2-mas-arm64-dsym.zip
398a0575c1974565af99b6759a74967c0709bc101059542a00bfe64a1210a86f *electron-v25.9.2-mas-arm64-symbols.zip
17f86ad33f9fc2ca5eaac5ef87604e65b1eefba5a51d4ad58e70018fdfb84ac6 *electron-v25.9.2-mas-arm64.zip
db61b29802ee1f598a3e61211a281656f16e70ae84041e6b2b5dd8ecae43cd67 *electron-v25.9.2-mas-x64-dsym-snapshot.zip
2f76620eb7d632335f7620f5d3713af5e59c98bdb0b323269c2319b7164fcaac *electron-v25.9.2-mas-x64-dsym.zip
ea226c8d049e527d84ec5058474fd4e64476e6924fef42b1dbea774925f59064 *electron-v25.9.2-mas-x64-symbols.zip
51b9d192ccb7612211ca9cc8ddb373a86f791d38b369337ad099a133e9d9807a *electron-v25.9.2-mas-x64.zip
53b39857303191ea2f26dda06461e6e612ca0ed799bdf0c26a1a63ff89f7ea1b *electron-v25.9.2-win32-arm64-pdb.zip
49199591c69fbeb68dd57252a3d8525babe79ab98447ad639f2d0c3e63aba4b6 *electron-v25.9.2-win32-arm64-symbols.zip
e7b968fc53cc7a10a4ccb5133af045968479685ebb9617f06817f03667fdd425 *electron-v25.9.2-win32-arm64-toolchain-profile.zip
6abd0a6697d7fe8b6add4d1017a01a0ac756d16da5bfa077bd373a685b529bd8 *electron-v25.9.2-win32-arm64.zip
cc5c67b027c679eb86882c2ec267d38fafcc5127b49e8a060002541253e2b26b *electron-v25.9.2-win32-ia32-pdb.zip
2cd8aab8aa4eadfce90c8ba6565a77689db1efe55b7eaafedede3b08e8c41f53 *electron-v25.9.2-win32-ia32-symbols.zip
e7b968fc53cc7a10a4ccb5133af045968479685ebb9617f06817f03667fdd425 *electron-v25.9.2-win32-ia32-toolchain-profile.zip
ac2aebe7d7b21351256fb3b60219269e75ff33f8c3cfbbca682c3622d1943b94 *electron-v25.9.2-win32-ia32.zip
000b506bab92c92e0ff8428033fc7e1c15049437606794c4bec84a66eb29b6cd *electron-v25.9.2-win32-x64-pdb.zip
fd40d04de0ef4a04dd720505f03a6d209a38387fe05493869f441037aa950e4d *electron-v25.9.2-win32-x64-symbols.zip
e7b968fc53cc7a10a4ccb5133af045968479685ebb9617f06817f03667fdd425 *electron-v25.9.2-win32-x64-toolchain-profile.zip
de3fc45f4fa5572d6dbb4f21580e75d3b6429a6b3b833a962c810e7e199b8573 *electron-v25.9.2-win32-x64.zip
c3f22fbf99713bb44546278ef1456e4fc9a83d33bf038f6752fea12c7a721337 *electron.d.ts
2a088f4c227405783466e456e69154193a730130f5cc39520091abc8993977bc *ffmpeg-v25.9.2-darwin-arm64.zip
4da4197282a9a31379d2194d1072888b9ed3200663e322df2759b971725a2915 *ffmpeg-v25.9.2-darwin-x64.zip
bd52d57ff97fb56ac01a3482af905d04f0d4e9c13c53858c6d9f99957eca82da *ffmpeg-v25.9.2-linux-arm64.zip
9b3d09177fa1e63e2a6beecfa70aeec30aeb5c1873ff21128a68051c4e23f95d *ffmpeg-v25.9.2-linux-armv7l.zip
39c3e411873262873edff4b9f4b5d9973fb3cab8f700d6ff665872dab3b39eb3 *ffmpeg-v25.9.2-linux-x64.zip
861287a6cb0f546c0e39f49a2b28f5575d66fbddb26486584cc7802e84402339 *ffmpeg-v25.9.2-mas-arm64.zip
bcc8315a9e07394510c96ffca20720e3cdb2a4aecc75798bfca8fd60417782aa *ffmpeg-v25.9.2-mas-x64.zip
0ebfe5a72aaf0a9af81ffbcba03763f4baa142c93c31b50ad0145365366f0076 *ffmpeg-v25.9.2-win32-arm64.zip
d8e7ea1268145d3481a74152ced8ae677ca5b174f06eb874a6ce0005ff0d471c *ffmpeg-v25.9.2-win32-ia32.zip
d1f499b957377c3822c43eadf3bc32e7cb04b52fb2fd51ba22f14cd61ef01727 *ffmpeg-v25.9.2-win32-x64.zip
86a0df1394e741feb21a891747775911d5c2f9cd940662826b33c309275abb7c *hunspell_dictionaries.zip
4c4bab279b39c4e463dcb3a897e256e5e4f088e6e6495f6aea10e26703ecafc3 *libcxx-objects-v25.9.2-linux-arm64.zip
d2b6349a89c9fce3ccc0a9a430b059eb18cd3967dbbe34bfcae54b3f58cd462a *libcxx-objects-v25.9.2-linux-armv7l.zip
e8d4b1a3228c0709dc54d780bd4d33727fff30c38f8e00409a6eaf54a69e5869 *libcxx-objects-v25.9.2-linux-x64.zip
7679259e7cb02140806cc616d012102462d671ae07c4673ad0c2c9a6716444a6 *libcxx_headers.zip
b1683af6708bceaa966e5168fda51223fa51e09549abc90f5744d500f9260c92 *libcxxabi_headers.zip
4fed33611a889d0100a6fbf4253cf9dcb9fbe3c42f7c86d8886d460a9a9cf8e6 *mksnapshot-v25.9.2-darwin-arm64.zip
5e1daea6393bd977a70020c36f1e4ee4e416c8c4eafe2b27b38292e4acb1764b *mksnapshot-v25.9.2-darwin-x64.zip
92ff719eb83df7f107d4dd3970122333f4bde194292c568b5c0a5ea4684bc9f1 *mksnapshot-v25.9.2-linux-arm64-x64.zip
e621d50652f2afa49f47ab7cccd07f7d29ef60f694a0e70d4e6434ddd07cf282 *mksnapshot-v25.9.2-linux-armv7l-x64.zip
012c24dd59f7b5b4322e53c12bb6450a7b15bc6800042fcf3804ba14685f8188 *mksnapshot-v25.9.2-linux-x64.zip
62e880bf8594b1d83926984c252d86990f1386655bd1375afc0fd3054018adef *mksnapshot-v25.9.2-mas-arm64.zip
0742e1bfcbe171199f0a333fddbf401a61777928d462b852d21fec2822b2c46e *mksnapshot-v25.9.2-mas-x64.zip
b019e6e117e13238465d1758274ebbaf7ccb999921dcb11ef1e3a9a5a6df952b *mksnapshot-v25.9.2-win32-arm64-x64.zip
bc7196f1fd2ba3aedc6c16e96e455d280155dfc493a0d0f6ce7bffe645e39e1e *mksnapshot-v25.9.2-win32-ia32.zip
2d152f09969d69439e831b4212e77ea157a9e4b3a9b3ad55d4f2efcc547c25eb *mksnapshot-v25.9.2-win32-x64.zip
+1 -1
View File
@@ -64,7 +64,7 @@ const vscodeResources = [
'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh,cpuUsage.sh,ps.sh}',
'out-build/vs/base/browser/ui/codicons/codicon/**',
'out-build/vs/base/parts/sandbox/electron-sandbox/preload.js',
'out-build/vs/base/parts/sandbox/electron-sandbox/preload-slim.js',
'out-build/vs/base/parts/sandbox/electron-sandbox/preload-aux.js',
'out-build/vs/workbench/browser/media/*-theme.css',
'out-build/vs/workbench/contrib/debug/**/*.json',
'out-build/vs/workbench/contrib/externalTerminal/**/*.scpt',
@@ -37,6 +37,8 @@
"--vscode-charts-purple",
"--vscode-charts-red",
"--vscode-charts-yellow",
"--vscode-chat-avatarBackground",
"--vscode-chat-avatarForeground",
"--vscode-chat-requestBorder",
"--vscode-chat-slashCommandBackground",
"--vscode-chat-slashCommandForeground",
@@ -696,8 +698,6 @@
"--vscode-tree-indentGuidesStroke",
"--vscode-tree-tableColumnsBorder",
"--vscode-tree-tableOddRowsBackground",
"--vscode-voiceRecording-background",
"--vscode-voiceRecording-dimmedBackground",
"--vscode-walkThrough-embeddedEditorBackground",
"--vscode-walkthrough-stepTitle-foreground",
"--vscode-welcomePage-background",
@@ -784,4 +784,4 @@
"--z-index-notebook-sticky-scroll",
"--zoom-factor"
]
}
}
+1 -1
View File
@@ -112,4 +112,4 @@ for (let dir of dirs) {
}
cp.execSync('git config pull.rebase merges');
cp.execSync('git config blame.ignoreRevsFile .git-blame-ignore');
cp.execSync('git config blame.ignoreRevsFile .git-blame-ignore-revs');
+2 -2
View File
@@ -528,12 +528,12 @@
"git": {
"name": "electron",
"repositoryUrl": "https://github.com/electron/electron",
"commitHash": "805674fa8aae4d652b6956a96f8eadf9d9137457"
"commitHash": "468c4af6611c88762b7ba6c4400c5022895457c2"
}
},
"isOnlyProductionDependency": true,
"license": "MIT",
"version": "25.9.1"
"version": "25.9.2"
},
{
"component": {
+2 -2
View File
@@ -1952,9 +1952,9 @@ dependencies = [
[[package]]
name = "rustix"
version = "0.37.19"
version = "0.37.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d"
checksum = "d4eb579851244c2c03e7c24f501c3432bed80b8f720af1d6e5b0e0f01555a035"
dependencies = [
"bitflags",
"errno",
+73 -105
View File
@@ -557,7 +557,6 @@ DEALINGS IN THE SOFTWARE.
---------------------------------------------------------
base64 0.13.0 - MIT/Apache-2.0
base64 0.21.2 - MIT OR Apache-2.0
https://github.com/marshallpierce/rust-base64
@@ -4591,7 +4590,7 @@ THE SOFTWARE.
---------------------------------------------------------
native-tls 0.2.10 - MIT/Apache-2.0
native-tls 0.2.11 - MIT/Apache-2.0
https://github.com/sfackler/rust-native-tls
Copyright (c) 2016 The rust-native-tls Developers
@@ -6934,7 +6933,7 @@ DEALINGS IN THE SOFTWARE.
---------------------------------------------------------
reqwest 0.11.18 - MIT OR Apache-2.0
reqwest 0.11.22 - MIT OR Apache-2.0
https://github.com/seanmonstar/reqwest
Copyright (c) 2016 Sean McArthur
@@ -7640,7 +7639,7 @@ Apache License
---------------------------------------------------------
rustix 0.37.19 - Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
rustix 0.37.25 - Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
https://github.com/bytecodealliance/rustix
Permission is hereby granted, free of charge, to any
@@ -8036,99 +8035,6 @@ DEALINGS IN THE SOFTWARE.
---------------------------------------------------------
sha-1 0.10.0 - MIT OR Apache-2.0
https://github.com/RustCrypto/hashes
All crates licensed under either of
* [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
* [MIT license](http://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
[//]: # (badges)
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260041-hashes
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
[deps-image]: https://deps.rs/repo/github/RustCrypto/hashes/status.svg
[deps-link]: https://deps.rs/repo/github/RustCrypto/hashes
[msrv-1.41]: https://img.shields.io/badge/rustc-1.41.0+-blue.svg
[msrv-1.56]: https://img.shields.io/badge/rustc-1.56.0+-blue.svg
[msrv-1.57]: https://img.shields.io/badge/rustc-1.57.0+-blue.svg
[//]: # (crates)
[`asconhash`]: ./ascon-hash
[`belthash`]: ./belt-hash
[`blake2`]: ./blake2
[`fsb`]: ./fsb
[`gost94`]: ./gost94
[`groestl`]: ./groestl
[`jh`]: ./jh
[`k12`]: ./k12
[`md2`]: ./md2
[`md4`]: ./md4
[`md5`]: ./md5
[`ripemd`]: ./ripemd
[`sha1`]: ./sha1
[`sha2`]: ./sha2
[`sha3`]: ./sha3
[`shabal`]: ./shabal
[`skein`]: ./skein
[`sm3`]: ./sm3
[`streebog`]: ./streebog
[`tiger`]: ./tiger
[`whirlpool`]: ./whirlpool
[//]: # (footnotes)
[1]: https://en.wikipedia.org/wiki/Cryptographic_hash_function
[`blake3`]: https://github.com/BLAKE3-team/BLAKE3
[`base16ct`]: https://docs.rs/base16ct
[`base64ct`]: https://docs.rs/base64ct
[`digest`]: https://docs.rs/digest
[`Digest`]: https://docs.rs/digest/0.10.0/digest/trait.Digest.html
[`Digest::digest`]: https://docs.rs/digest/0.10.0/digest/trait.Digest.html#tymethod.digest
[`DynDigest`]: https://docs.rs/digest/0.10.0/digest/trait.DynDigest.html
[`generic-array`]: https://docs.rs/generic-array
[HMAC]: https://en.wikipedia.org/wiki/Hash-based_message_authentication_code
[`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
[`Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
[`hmac`]: https://docs.rs/hmac
[RustCrypto/MACs]: https://github.com/RustCrypto/MACs
[//]: # (algorithms)
[Ascon]: https://ascon.iaik.tugraz.at
[BelT]: https://ru.wikipedia.org/wiki/BelT
[BLAKE2]: https://en.wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE2
[FSB]: https://en.wikipedia.org/wiki/Fast_syndrome-based_hash
[GOST94]: https://en.wikipedia.org/wiki/GOST_(hash_function)
[Grøstl]: https://en.wikipedia.org/wiki/Grøstl
[JH]: https://www3.ntu.edu.sg/home/wuhj/research/jh
[KangarooTwelve]: https://keccak.team/kangarootwelve.html
[MD2]: https://en.wikipedia.org/wiki/MD2_(cryptography)
[MD4]: https://en.wikipedia.org/wiki/MD4
[MD5]: https://en.wikipedia.org/wiki/MD5
[RIPEMD]: https://en.wikipedia.org/wiki/RIPEMD
[SHA-1]: https://en.wikipedia.org/wiki/SHA-1
[SHA-2]: https://en.wikipedia.org/wiki/SHA-2
[SHA-3]: https://en.wikipedia.org/wiki/SHA-3
[SHABAL]: https://www.cs.rit.edu/~ark/20090927/Round2Candidates/Shabal.pdf
[Skein]: https://schneier.com/academic/skein
[SM3]: https://en.wikipedia.org/wiki/SM3_(hash_function)
[Streebog]: https://en.wikipedia.org/wiki/Streebog
[Whirlpool]: https://en.wikipedia.org/wiki/Whirlpool_(cryptography)
[Tiger]: http://www.cs.technion.ac.il/~biham/Reports/Tiger/tiger/tiger.html
---------------------------------------------------------
---------------------------------------------------------
sha1 0.10.5 - MIT OR Apache-2.0
https://github.com/RustCrypto/hashes
@@ -8693,6 +8599,70 @@ SOFTWARE.
---------------------------------------------------------
system-configuration 0.5.1 - MIT OR Apache-2.0
https://github.com/mullvad/system-configuration-rs
Copyright (c) 2017 Amagicom AB
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.
---------------------------------------------------------
---------------------------------------------------------
system-configuration-sys 0.5.0 - MIT OR Apache-2.0
https://github.com/mullvad/system-configuration-rs
Copyright (c) 2017 Amagicom AB
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.
---------------------------------------------------------
---------------------------------------------------------
tar 0.4.38 - MIT/Apache-2.0
https://github.com/alexcrichton/tar-rs
@@ -9005,7 +8975,7 @@ DEALINGS IN THE SOFTWARE.
---------------------------------------------------------
tokio-native-tls 0.3.0 - MIT
tokio-native-tls 0.3.1 - MIT
https://github.com/tokio-rs/tls
The MIT License (MIT)
@@ -9073,7 +9043,7 @@ DEALINGS IN THE SOFTWARE.
---------------------------------------------------------
tokio-tungstenite 0.17.2 - MIT
tokio-tungstenite 0.20.1 - MIT
https://github.com/snapview/tokio-tungstenite
The MIT License (MIT)
@@ -9327,7 +9297,7 @@ THE SOFTWARE.
---------------------------------------------------------
tungstenite 0.17.3 - MIT/Apache-2.0
tungstenite 0.20.1 - MIT OR Apache-2.0
https://github.com/snapview/tungstenite-rs
Copyright (c) 2017 Alexey Galakhov
@@ -9354,7 +9324,7 @@ THE SOFTWARE.
---------------------------------------------------------
tunnels 3141ad7be00e18c4231f7c4fb6c11f9219ac49af
tunnels 97233d20448e1c3cb0e0fd9114acf68c7e5c0249
https://github.com/microsoft/dev-tunnels
MIT License
@@ -9699,8 +9669,7 @@ DEALINGS IN THE SOFTWARE.
---------------------------------------------------------
uuid 0.8.2 - Apache-2.0 OR MIT
uuid 1.3.3 - Apache-2.0 OR MIT
uuid 1.4.1 - Apache-2.0 OR MIT
https://github.com/uuid-rs/uuid
Copyright (c) 2014 The Rust Project Developers
@@ -10072,7 +10041,7 @@ DEALINGS IN THE SOFTWARE.
---------------------------------------------------------
wasm-streams 0.2.3 - MIT OR Apache-2.0
wasm-streams 0.3.0 - MIT OR Apache-2.0
https://github.com/MattiasBuelens/wasm-streams/
Permission is hereby granted, free of charge, to any
@@ -10590,7 +10559,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------------------------
winreg 0.10.1 - MIT
winreg 0.50.0 - MIT
https://github.com/gentoo90/winreg-rs
+6 -3
View File
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
use crate::{
constants::{get_default_user_agent, IS_INTERACTIVE_CLI, PRODUCT_NAME_LONG},
constants::{get_default_user_agent, APPLICATION_NAME, IS_INTERACTIVE_CLI, PRODUCT_NAME_LONG},
debug, error, info, log,
state::{LauncherPaths, PersistedState},
trace,
@@ -84,7 +84,9 @@ impl AuthProvider {
pub fn grant_uri(&self) -> &'static str {
match self {
AuthProvider::Microsoft => "https://login.microsoftonline.com/organizations/oauth2/v2.0/token",
AuthProvider::Microsoft => {
"https://login.microsoftonline.com/organizations/oauth2/v2.0/token"
}
AuthProvider::Github => "https://github.com/login/oauth/access_token",
}
}
@@ -673,7 +675,8 @@ impl Auth {
if !*IS_INTERACTIVE_CLI {
info!(
self.log,
"Using Github for authentication, pass the `--provider` option to change this."
"Using Github for authentication, run `{} tunnel user login --provider <provider>` option to change this.",
APPLICATION_NAME
);
return Ok(AuthProvider::Github);
}
+33 -13
View File
@@ -1153,18 +1153,19 @@ where
let mut p = p.spawn().map_err(CodeError::ProcessSpawnFailed)?;
let futs = FuturesUnordered::new();
let block_futs = FuturesUnordered::new();
let poll_futs = FuturesUnordered::new();
if let (Some(mut a), Some(mut b)) = (p.stdout.take(), stdout) {
futs.push(async move { tokio::io::copy(&mut a, &mut b).await }.boxed());
block_futs.push(async move { tokio::io::copy(&mut a, &mut b).await }.boxed());
}
if let (Some(mut a), Some(mut b)) = (p.stderr.take(), stderr) {
futs.push(async move { tokio::io::copy(&mut a, &mut b).await }.boxed());
block_futs.push(async move { tokio::io::copy(&mut a, &mut b).await }.boxed());
}
if let (Some(mut b), Some(mut a)) = (p.stdin.take(), stdin) {
futs.push(async move { tokio::io::copy(&mut a, &mut b).await }.boxed());
poll_futs.push(async move { tokio::io::copy(&mut a, &mut b).await }.boxed());
}
wait_for_process_exit(log, &params.command, p, futs).await
wait_for_process_exit(log, &params.command, p, block_futs, poll_futs).await
}
async fn handle_spawn_cli(
@@ -1212,23 +1213,42 @@ async fn handle_spawn_cli(
}
debug!(log, "cli authenticated, attaching stdio");
let futs = FuturesUnordered::new();
futs.push(async move { tokio::io::copy(&mut protocol_in, &mut stdin).await }.boxed());
futs.push(async move { tokio::io::copy(&mut stderr, &mut protocol_out).await }.boxed());
futs.push(async move { log_pump.await.unwrap() }.boxed());
let block_futs = FuturesUnordered::new();
let poll_futs = FuturesUnordered::new();
poll_futs.push(async move { tokio::io::copy(&mut protocol_in, &mut stdin).await }.boxed());
block_futs.push(async move { tokio::io::copy(&mut stderr, &mut protocol_out).await }.boxed());
block_futs.push(async move { log_pump.await.unwrap() }.boxed());
wait_for_process_exit(log, &params.command, p, futs).await
wait_for_process_exit(log, &params.command, p, block_futs, poll_futs).await
}
type TokioCopyFuture = dyn futures::Future<Output = Result<u64, std::io::Error>> + Send;
async fn get_joined_result(
mut process: tokio::process::Child,
block_futs: FuturesUnordered<std::pin::Pin<Box<TokioCopyFuture>>>,
) -> Result<std::process::ExitStatus, std::io::Error> {
let (_, r) = tokio::join!(futures::future::join_all(block_futs), process.wait());
r
}
/// Wait for the process to exit and sends the spawn result. Waits until the
/// `block_futs` and the process have exited, and polls the `poll_futs` while
/// doing so.
async fn wait_for_process_exit(
log: &log::Logger,
command: &str,
mut process: tokio::process::Child,
futs: FuturesUnordered<std::pin::Pin<Box<TokioCopyFuture>>>,
process: tokio::process::Child,
block_futs: FuturesUnordered<std::pin::Pin<Box<TokioCopyFuture>>>,
poll_futs: FuturesUnordered<std::pin::Pin<Box<TokioCopyFuture>>>,
) -> Result<SpawnResult, AnyError> {
let (_, r) = tokio::join!(futures::future::join_all(futs), process.wait());
let joined = get_joined_result(process, block_futs);
pin!(joined);
let r = tokio::select! {
_ = futures::future::join_all(poll_futs) => joined.await,
r = &mut joined => r,
};
let r = match r {
Ok(e) => SpawnResult {
+2 -2
View File
@@ -6,7 +6,7 @@
"git": {
"name": "dotnet/csharp-tmLanguage",
"repositoryUrl": "https://github.com/dotnet/csharp-tmLanguage",
"commitHash": "772323937fedd65c6dc1c8ce6ea41d97415ed7d1"
"commitHash": "6666eb1d5e6fb565a4110d6db645cc534fb3c6d2"
}
},
"license": "MIT",
@@ -15,4 +15,4 @@
}
],
"version": 1
}
}
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -6,7 +6,7 @@
"git": {
"name": "ionide/ionide-fsgrammar",
"repositoryUrl": "https://github.com/ionide/ionide-fsgrammar",
"commitHash": "8740e610a367c5e3f15be716acc7207655ced4cf"
"commitHash": "078bbf85225b82de3ae4c2db7ee74d9239b249ce"
}
},
"license": "MIT",
@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/ionide/ionide-fsgrammar/commit/8740e610a367c5e3f15be716acc7207655ced4cf",
"version": "https://github.com/ionide/ionide-fsgrammar/commit/078bbf85225b82de3ae4c2db7ee74d9239b249ce",
"name": "fsharp",
"scopeName": "source.fsharp",
"patterns": [
@@ -590,8 +590,8 @@
},
{
"name": "comment.line.markdown.fsharp",
"begin": "///",
"while": "///",
"begin": "(?<![!%&+-.<=>?@^|/])///(?!/)",
"while": "(?<![!%&+-.<=>?@^|/])///(?!/)",
"patterns": [
{
"include": "text.html.markdown"
@@ -600,7 +600,7 @@
},
{
"name": "comment.line.double-slash.fsharp",
"match": "//.*$"
"match": "(?<![!%&+-.<=>?@^|/])//(?![!%&+-.<=>?@^|]).*$"
}
]
},
@@ -1125,7 +1125,7 @@
},
{
"name": "keyword.symbol.fsharp",
"match": "(&&&|\\|\\|\\||\\^\\^\\^|~~~|<<<|>>>|\\|>|:>|:\\?>|:|\\[|\\]|\\;|<>|=|@|\\|\\||&&|{|}|\\||_|\\.\\.|\\,|\\+|\\-|\\*|\\/|\\^|\\!|\\>|\\>\\=|\\>\\>|\\<|\\<\\=|\\(|\\)|\\<\\<)"
"match": "(&&&|\\|\\|\\||\\^\\^\\^|~~~|~\\+|~\\-|<<<|>>>|\\|>|:>|:\\?>|:|\\[|\\]|\\;|<>|=|@|\\|\\||&&|&|%|{|}|\\||_|\\.\\.|\\,|\\+|\\-|\\*|\\/|\\^|\\!|\\>|\\>\\=|\\>\\>|\\<|\\<\\=|\\(|\\)|\\<\\<)"
}
]
},
@@ -1133,7 +1133,7 @@
"patterns": [
{
"name": "entity.name.section.fsharp",
"begin": "\\b(namespace global)|\\b(namespace|module)\\s*(public|internal|private|rec)?\\s+([[:alpha:]][[:alpha:]0-9'_. ]*)",
"begin": "\\b(namespace global)|\\b(namespace|module)\\s*(public|internal|private|rec)?\\s+([[:alpha:]|``][[:alpha:]0-9'_. ]*)",
"end": "(\\s?=|\\s|$)",
"beginCaptures": {
"1": {
@@ -1171,7 +1171,7 @@
},
{
"name": "namespace.open.fsharp",
"begin": "\\b(open type|open)\\s+([[:alpha:]][[:alpha:]0-9'_]*)(?=(\\.[A-Z][[:alpha:]0-9_]*)*)",
"begin": "\\b(open type|open)\\s+([[:alpha:]|``][[:alpha:]0-9'_]*)(?=(\\.[A-Z][[:alpha:]0-9_]*)*)",
"end": "(\\s|$)",
"beginCaptures": {
"1": {
@@ -1331,7 +1331,7 @@
"match": "\\(\\)"
},
{
"match": "(\\?{0,1})(``[[:alpha:]0-9'`^:,._ ]+``|(?!private\\b)\\b[\\w[:alpha:]0-9'`<>^._ ]+)",
"match": "(\\?{0,1})(``[[:alpha:]0-9'`^:,._ ]+``|(?!private|struct\\b)\\b[\\w[:alpha:]0-9'`<>^._ ]+)",
"captures": {
"1": {
"name": "keyword.symbol.fsharp"
+5
View File
@@ -2569,6 +2569,11 @@
"default": true,
"description": "%config.useForcePushWithLease%"
},
"git.useForcePushIfIncludes": {
"type": "boolean",
"default": true,
"markdownDescription": "%config.useForcePushIfIncludes%"
},
"git.confirmForcePush": {
"type": "boolean",
"default": true,
+1
View File
@@ -217,6 +217,7 @@
"config.autoStash": "Stash any changes before pulling and restore them after successful pull.",
"config.allowForcePush": "Controls whether force push (with or without lease) is enabled.",
"config.useForcePushWithLease": "Controls whether force pushing uses the safer force-with-lease variant.",
"config.useForcePushIfIncludes": "Controls whether force pushing uses the safer force-if-includes variant. Note: This setting requires the `#git.useForcePushWithLease#` setting to be enabled, and Git version `2.30.0` or later.",
"config.confirmForcePush": "Controls whether to ask for confirmation before force-pushing.",
"config.allowNoVerifyCommit": "Controls whether commits without running pre-commit and commit-msg hooks are allowed.",
"config.confirmNoVerifyCommit": "Controls whether to ask for confirmation before committing without verification.",
+4 -1
View File
@@ -16,7 +16,8 @@ export interface InputBox {
export const enum ForcePushMode {
Force,
ForceWithLease
ForceWithLease,
ForceWithLeaseIfIncludes,
}
export const enum RefType {
@@ -366,6 +367,8 @@ export const enum GitErrorCodes {
StashConflict = 'StashConflict',
UnmergedChanges = 'UnmergedChanges',
PushRejected = 'PushRejected',
ForcePushWithLeaseRejected = 'ForcePushWithLeaseRejected',
ForcePushWithLeaseIfIncludesRejected = 'ForcePushWithLeaseIfIncludesRejected',
RemoteConnectionError = 'RemoteConnectionError',
DirtyWorkTree = 'DirtyWorkTree',
CantOpenResource = 'CantOpenResource',
+7 -1
View File
@@ -2793,7 +2793,9 @@ export class CommandCenter {
return;
}
forcePushMode = config.get<boolean>('useForcePushWithLease') === true ? ForcePushMode.ForceWithLease : ForcePushMode.Force;
const useForcePushWithLease = config.get<boolean>('useForcePushWithLease') === true;
const useForcePushIfIncludes = config.get<boolean>('useForcePushIfIncludes') === true;
forcePushMode = useForcePushWithLease ? useForcePushIfIncludes ? ForcePushMode.ForceWithLeaseIfIncludes : ForcePushMode.ForceWithLease : ForcePushMode.Force;
if (config.get<boolean>('confirmForcePush')) {
const message = l10n.t('You are about to force push your changes, this can be destructive and could inadvertently overwrite changes made by others.\n\nAre you sure to continue?');
@@ -3682,6 +3684,10 @@ export class CommandCenter {
case GitErrorCodes.PushRejected:
message = l10n.t('Can\'t push refs to remote. Try running "Pull" first to integrate your changes.');
break;
case GitErrorCodes.ForcePushWithLeaseRejected:
case GitErrorCodes.ForcePushWithLeaseIfIncludesRejected:
message = l10n.t('Can\'t force push refs to remote. The tip of the remote-tracking branch has been updated since the last checkout. Try running "Pull" first to pull the latest changes from the remote branch first.');
break;
case GitErrorCodes.Conflict:
message = l10n.t('There are merge conflicts. Resolve them before committing.');
type = 'warning';
+26 -2
View File
@@ -20,7 +20,9 @@ export class TestCommitMessageProvider implements CommitMessageProvider {
readonly icon = new ThemeIcon('rocket');
readonly title = 'Generate Commit Message (Test)';
async provideCommitMessage(repository: ApiRepository, _: string[], token: CancellationToken): Promise<string | undefined> {
private readonly _changesMap = new Map<string, [string[], number]>();
async provideCommitMessage(repository: ApiRepository, changes: string[], token: CancellationToken): Promise<string | undefined> {
console.log('Repository: ', repository.rootUri.fsPath);
if (token.isCancellationRequested) {
@@ -29,9 +31,31 @@ export class TestCommitMessageProvider implements CommitMessageProvider {
return new Promise(resolve => {
token.onCancellationRequested(() => resolve(undefined));
setTimeout(() => resolve(`Test commit message (${Math.random()})`), 5000);
setTimeout(() => {
const attemptCount = this.getAttemptCount(repository, changes);
this._changesMap.set(repository.rootUri.fsPath, [changes, attemptCount]);
resolve(`Test commit message (Attempt No. ${attemptCount})`);
}, 5000);
});
}
private getAttemptCount(repository: ApiRepository, changes: string[]): number {
const [previousChanges, previousCount] = this._changesMap.get(repository.rootUri.fsPath) ?? [[], 1];
if (previousChanges.length !== changes.length) {
return 1;
}
for (let index = 0; index < changes.length; index++) {
if (previousChanges[index] !== changes[index]) {
return 1;
}
}
return previousCount + 1;
}
}
interface ActionButtonState {
+11 -2
View File
@@ -1910,8 +1910,11 @@ export class Repository {
async push(remote?: string, name?: string, setUpstream: boolean = false, followTags = false, forcePushMode?: ForcePushMode, tags = false): Promise<void> {
const args = ['push'];
if (forcePushMode === ForcePushMode.ForceWithLease) {
if (forcePushMode === ForcePushMode.ForceWithLease || forcePushMode === ForcePushMode.ForceWithLeaseIfIncludes) {
args.push('--force-with-lease');
if (forcePushMode === ForcePushMode.ForceWithLeaseIfIncludes && this._git.compareGitVersionTo('2.30') !== -1) {
args.push('--force-if-includes');
}
} else if (forcePushMode === ForcePushMode.Force) {
args.push('--force');
}
@@ -1940,7 +1943,13 @@ export class Repository {
await this.exec(args, { env: { 'GIT_HTTP_USER_AGENT': this.git.userAgent } });
} catch (err) {
if (/^error: failed to push some refs to\b/m.test(err.stderr || '')) {
err.gitErrorCode = GitErrorCodes.PushRejected;
if (forcePushMode === ForcePushMode.ForceWithLease && /! \[rejected\].*\(stale info\)/m.test(err.stderr || '')) {
err.gitErrorCode = GitErrorCodes.ForcePushWithLeaseRejected;
} else if (forcePushMode === ForcePushMode.ForceWithLeaseIfIncludes && /! \[rejected\].*\(remote ref updated since checkout\)/m.test(err.stderr || '')) {
err.gitErrorCode = GitErrorCodes.ForcePushWithLeaseIfIncludesRejected;
} else {
err.gitErrorCode = GitErrorCodes.PushRejected;
}
} else if (/Permission.*denied/.test(err.stderr || '')) {
err.gitErrorCode = GitErrorCodes.PermissionDenied;
} else if (/Could not read from remote repository/.test(err.stderr || '')) {
+1 -1
View File
@@ -602,8 +602,8 @@ export class Model implements IRepositoryResolver, IBranchProtectionProviderRegi
}
async openParentRepository(repoPath: string): Promise<void> {
await this.openRepository(repoPath);
this._parentRepositoriesManager.openRepository(repoPath);
await this.openRepository(repoPath);
}
private async getRepositoryRoot(repoPath: string): Promise<{ repositoryRoot: string; unsafeRepositoryMatch: RegExpMatchArray | null }> {
+46 -1
View File
@@ -34,6 +34,47 @@ function getIconUri(iconName: string, theme: string): Uri {
return Uri.file(path.join(iconsRootPath, theme, `${iconName}.svg`));
}
function wrapCommitMessage(message: string, subjectLineLength: number, bodyLineLength: number): string {
const messageLinesWrapped: string[] = [];
const messageLines = message.split(/\r?\n/g);
for (let index = 0; index < messageLines.length; index++) {
const messageLine = messageLines[index];
const threshold = index === 0 ? subjectLineLength : bodyLineLength;
if (messageLine.length <= threshold) {
messageLinesWrapped.push(messageLine);
continue;
}
let position = 0;
const lineSegments: string[] = [];
while (messageLine.length - position > threshold) {
const lastSpaceBeforeThreshold = messageLine.lastIndexOf(' ', position + threshold);
if (lastSpaceBeforeThreshold !== -1 && lastSpaceBeforeThreshold > position) {
lineSegments.push(...[messageLine.substring(position, lastSpaceBeforeThreshold), '\n']);
position = lastSpaceBeforeThreshold + 1;
} else {
// Find first space after threshold
const firstSpaceAfterThreshold = messageLine.indexOf(' ', position);
if (firstSpaceAfterThreshold !== -1) {
lineSegments.push(...[messageLine.substring(position, firstSpaceAfterThreshold), '\n']);
position = firstSpaceAfterThreshold + 1;
} else {
lineSegments.push(messageLine.substring(position));
position = messageLine.length;
}
}
}
if (position < messageLine.length) {
lineSegments.push(messageLine.substring(position));
}
messageLinesWrapped.push(lineSegments.join(''));
}
return messageLinesWrapped.join('\n');
}
export const enum RepositoryState {
Idle,
Disposed
@@ -2050,7 +2091,11 @@ export class Repository implements Disposable {
const provider = this.commitMessageProviderRegistry.commitMessageProvider;
const commitMessage = await provider.provideCommitMessage(new ApiRepository(this), diff, token);
if (commitMessage) {
this.inputBox.value = commitMessage;
const config = workspace.getConfiguration('git');
const subjectLineLength = config.get<number | null>('inputValidationSubjectLength', null);
const bodyLineLength = config.get<number>('inputValidationLength', 50);
this.inputBox.value = wrapCommitMessage(commitMessage, subjectLineLength ?? bodyLineLength, bodyLineLength);
}
}
catch (err) {
@@ -11,7 +11,7 @@
"dependencies": {
"@vscode/l10n": "^0.0.16",
"vscode-css-languageservice": "^6.2.10",
"vscode-html-languageservice": "^5.1.0",
"vscode-html-languageservice": "^5.1.1",
"vscode-languageserver": "^9.0.1",
"vscode-languageserver-textdocument": "^1.0.11",
"vscode-uri": "^3.0.8"
@@ -27,15 +27,15 @@ vscode-css-languageservice@^6.2.10:
vscode-languageserver-types "3.17.5"
vscode-uri "^3.0.8"
vscode-html-languageservice@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-5.1.0.tgz#ba4f302eda5d8c248bcf5d173d862f241c4b48d3"
integrity sha512-cGOu5+lrz+2dDXSGS15y24lDtPaML1T8K/SfqgFbLmCZ1btYOxceFieR+ybTS2es/A67kRc62m2cKFLUQPWG5g==
vscode-html-languageservice@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-5.1.1.tgz#8e56f7e11c1e3f4a9d56de0f97badea9296f4e04"
integrity sha512-JenrspIIG/Q+93R6G3L6HdK96itSisMynE0glURqHpQbL3dKAKzdm8L40lAHNkwJeBg+BBPpAshZKv/38onrTQ==
dependencies:
"@vscode/l10n" "^0.0.16"
vscode-languageserver-textdocument "^1.0.8"
vscode-languageserver-types "^3.17.3"
vscode-uri "^3.0.7"
vscode-languageserver-textdocument "^1.0.11"
vscode-languageserver-types "^3.17.5"
vscode-uri "^3.0.8"
vscode-jsonrpc@8.2.0:
version "8.2.0"
@@ -55,21 +55,11 @@ vscode-languageserver-textdocument@^1.0.11:
resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz#0822a000e7d4dc083312580d7575fe9e3ba2e2bf"
integrity sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==
vscode-languageserver-textdocument@^1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.8.tgz#9eae94509cbd945ea44bca8dcfe4bb0c15bb3ac0"
integrity sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q==
vscode-languageserver-types@3.17.5:
vscode-languageserver-types@3.17.5, vscode-languageserver-types@^3.17.5:
version "3.17.5"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz#3273676f0cf2eab40b3f44d085acbb7f08a39d8a"
integrity sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==
vscode-languageserver-types@^3.17.3:
version "3.17.3"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz#72d05e47b73be93acb84d6e311b5786390f13f64"
integrity sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==
vscode-languageserver@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz#500aef82097eb94df90d008678b0b6b5f474015b"
@@ -77,11 +67,6 @@ vscode-languageserver@^9.0.1:
dependencies:
vscode-languageserver-protocol "3.17.5"
vscode-uri@^3.0.7:
version "3.0.7"
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.7.tgz#6d19fef387ee6b46c479e5fb00870e15e58c1eb8"
integrity sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA==
vscode-uri@^3.0.8:
version "3.0.8"
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.8.tgz#1770938d3e72588659a172d0fd4642780083ff9f"
+1 -1
View File
@@ -639,4 +639,4 @@
]
}
}
}
}
+1 -1
View File
@@ -12,7 +12,7 @@ function patchGrammar(grammar) {
}
const razorGrammarRepo = 'dotnet/razor';
const grammarPath = 'src/Razor/src/Microsoft.AspNetCore.Razor.VSCode.Extension/syntaxes/aspnetcorerazor.tmLanguage.json';
const grammarPath = 'src/Razor/src/Microsoft.VisualStudio.RazorExtension/EmbeddedGrammars/aspnetcorerazor.tmLanguage.json';
vscodeGrammarUpdater.update(razorGrammarRepo, grammarPath, './syntaxes/cshtml.tmLanguage.json', grammar => patchGrammar(grammar), 'main');
+1 -1
View File
@@ -6,7 +6,7 @@
"git": {
"name": "dotnet/razor",
"repositoryUrl": "https://github.com/dotnet/razor",
"commitHash": "69f60231df08319b544d3d32a588575acbb58ff0"
"commitHash": "b44d0a906d054d2d343adc3f58cbea11d97d7488"
}
},
"license": "MIT",
@@ -1,10 +1,10 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/dotnet/razor/blob/master/src/Razor/src/Microsoft.AspNetCore.Razor.VSCode.Extension/syntaxes/aspnetcorerazor.tmLanguage.json",
"This file has been converted from https://github.com/dotnet/razor/blob/master/src/Razor/src/Microsoft.VisualStudio.RazorExtension/EmbeddedGrammars/aspnetcorerazor.tmLanguage.json",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/dotnet/razor/commit/69f60231df08319b544d3d32a588575acbb58ff0",
"version": "https://github.com/dotnet/razor/commit/b44d0a906d054d2d343adc3f58cbea11d97d7488",
"name": "ASP.NET Razor",
"scopeName": "text.html.cshtml",
"patterns": [
+1 -1
View File
@@ -6,7 +6,7 @@
"git": {
"name": "rust-syntax",
"repositoryUrl": "https://github.com/dustypomerleau/rust-syntax",
"commitHash": "328a68299533bc2b8c71028be741cce78a9e0d53"
"commitHash": "20730dff3c367cb40a7edd278fdaf0239ea50833"
}
},
"license": "MIT",
+62 -56
View File
@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/dustypomerleau/rust-syntax/commit/328a68299533bc2b8c71028be741cce78a9e0d53",
"version": "https://github.com/dustypomerleau/rust-syntax/commit/20730dff3c367cb40a7edd278fdaf0239ea50833",
"name": "Rust",
"scopeName": "source.rust",
"patterns": [
@@ -119,54 +119,6 @@
}
}
},
{
"comment": "attributes",
"name": "meta.attribute.rust",
"begin": "(#)(\\!?)(\\[)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.attribute.rust"
},
"2": {
"name": "keyword.operator.attribute.inner.rust"
},
"3": {
"name": "punctuation.brackets.attribute.rust"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.brackets.attribute.rust"
}
},
"patterns": [
{
"include": "#block-comments"
},
{
"include": "#comments"
},
{
"include": "#keywords"
},
{
"include": "#lifetimes"
},
{
"include": "#punctuation"
},
{
"include": "#strings"
},
{
"include": "#gtypes"
},
{
"include": "#types"
}
]
},
{
"comment": "modules",
"match": "(mod)\\s+((?:r#(?!crate|[Ss]elf|super))?[a-z][A-Za-z0-9_]*)",
@@ -257,6 +209,9 @@
{
"include": "#comments"
},
{
"include": "#attributes"
},
{
"include": "#lvariables"
},
@@ -421,7 +376,7 @@
"escapes": {
"comment": "escapes: ASCII, byte, Unicode, quote, regex",
"name": "constant.character.escape.rust",
"match": "(\\\\)(?:(?:(x[0-7][0-7a-fA-F])|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))",
"match": "(\\\\)(?:(?:(x[0-7][\\da-fA-F])|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))",
"captures": {
"1": {
"name": "constant.character.escape.backslash.rust"
@@ -440,6 +395,51 @@
}
}
},
"attributes": {
"comment": "attributes",
"name": "meta.attribute.rust",
"begin": "(#)(\\!?)(\\[)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.attribute.rust"
},
"3": {
"name": "punctuation.brackets.attribute.rust"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.brackets.attribute.rust"
}
},
"patterns": [
{
"include": "#block-comments"
},
{
"include": "#comments"
},
{
"include": "#keywords"
},
{
"include": "#lifetimes"
},
{
"include": "#punctuation"
},
{
"include": "#strings"
},
{
"include": "#gtypes"
},
{
"include": "#types"
}
]
},
"functions": {
"patterns": [
{
@@ -548,6 +548,9 @@
{
"include": "#comments"
},
{
"include": "#attributes"
},
{
"include": "#keywords"
},
@@ -608,6 +611,9 @@
{
"include": "#comments"
},
{
"include": "#attributes"
},
{
"include": "#keywords"
},
@@ -913,7 +919,7 @@
},
{
"comment": "parameterized types",
"begin": "\\b([A-Z][A-Za-z0-9]*)(<)",
"begin": "\\b(_?[A-Z][A-Za-z0-9_]*)(<)",
"beginCaptures": {
"1": {
"name": "entity.name.type.rust"
@@ -962,7 +968,7 @@
},
{
"comment": "trait declarations",
"match": "\\b(trait)\\s+([A-Z][A-Za-z0-9]*)\\b",
"match": "\\b(trait)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b",
"captures": {
"1": {
"name": "keyword.declaration.trait.rust storage.type.rust"
@@ -974,7 +980,7 @@
},
{
"comment": "struct declarations",
"match": "\\b(struct)\\s+([A-Z][A-Za-z0-9]*)\\b",
"match": "\\b(struct)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b",
"captures": {
"1": {
"name": "keyword.declaration.struct.rust storage.type.rust"
@@ -986,7 +992,7 @@
},
{
"comment": "enum declarations",
"match": "\\b(enum)\\s+([A-Z][A-Za-z0-9_]*)\\b",
"match": "\\b(enum)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b",
"captures": {
"1": {
"name": "keyword.declaration.enum.rust storage.type.rust"
@@ -998,7 +1004,7 @@
},
{
"comment": "type declarations",
"match": "\\b(type)\\s+([A-Z][A-Za-z0-9_]*)\\b",
"match": "\\b(type)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b",
"captures": {
"1": {
"name": "keyword.declaration.type.rust storage.type.rust"
@@ -1011,7 +1017,7 @@
{
"comment": "types",
"name": "entity.name.type.rust",
"match": "\\b[A-Z][A-Za-z0-9]*\\b(?!!)"
"match": "\\b_?[A-Z][A-Za-z0-9_]*\\b(?!!)"
}
]
},
@@ -1,16 +1,16 @@
[
{
"c": "using",
"t": "source.cs keyword.other.using.cs",
"t": "source.cs keyword.other.directive.using.cs",
"r": {
"dark_plus": "keyword.other.using: #C586C0",
"light_plus": "keyword.other.using: #AF00DB",
"dark_plus": "keyword.other.directive.using: #C586C0",
"light_plus": "keyword.other.directive.using: #AF00DB",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword.other.using: #C586C0",
"dark_modern": "keyword.other.using: #C586C0",
"hc_light": "keyword.other.using: #B5200D",
"light_modern": "keyword.other.using: #AF00DB"
"hc_black": "keyword.other.directive.using: #C586C0",
"dark_modern": "keyword.other.directive.using: #C586C0",
"hc_light": "keyword.other.directive.using: #B5200D",
"light_modern": "keyword.other.directive.using: #AF00DB"
}
},
{
@@ -57,16 +57,16 @@
},
{
"c": "namespace",
"t": "source.cs keyword.other.namespace.cs",
"t": "source.cs storage.type.namespace.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6",
"dark_modern": "keyword: #569CD6",
"hc_light": "keyword: #0F4A85",
"light_modern": "keyword: #0000FF"
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
"dark_vs": "storage.type: #569CD6",
"light_vs": "storage.type: #0000FF",
"hc_black": "storage.type: #569CD6",
"dark_modern": "storage.type: #569CD6",
"hc_light": "storage.type: #0F4A85",
"light_modern": "storage.type: #0000FF"
}
},
{
@@ -127,16 +127,16 @@
},
{
"c": "class",
"t": "source.cs keyword.other.class.cs",
"t": "source.cs storage.type.class.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6",
"dark_modern": "keyword: #569CD6",
"hc_light": "keyword: #0F4A85",
"light_modern": "keyword: #0000FF"
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
"dark_vs": "storage.type: #569CD6",
"light_vs": "storage.type: #0000FF",
"hc_black": "storage.type: #569CD6",
"dark_modern": "storage.type: #569CD6",
"hc_light": "storage.type: #0F4A85",
"light_modern": "storage.type: #0000FF"
}
},
{
@@ -211,7 +211,7 @@
},
{
"c": "static",
"t": "source.cs storage.modifier.cs",
"t": "source.cs storage.modifier.static.cs",
"r": {
"dark_plus": "storage.modifier: #569CD6",
"light_plus": "storage.modifier: #0000FF",
@@ -239,7 +239,7 @@
},
{
"c": "void",
"t": "source.cs keyword.type.cs",
"t": "source.cs keyword.type.void.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -295,7 +295,7 @@
},
{
"c": "string",
"t": "source.cs keyword.type.cs",
"t": "source.cs keyword.type.string.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -925,7 +925,7 @@
},
{
"c": "int",
"t": "source.cs keyword.type.cs",
"t": "source.cs keyword.type.int.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -1303,7 +1303,7 @@
},
{
"c": "const",
"t": "source.cs storage.modifier.cs",
"t": "source.cs storage.modifier.const.cs",
"r": {
"dark_plus": "storage.modifier: #569CD6",
"light_plus": "storage.modifier: #0000FF",
@@ -1331,7 +1331,7 @@
},
{
"c": "double",
"t": "source.cs keyword.type.cs",
"t": "source.cs keyword.type.double.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -1527,7 +1527,7 @@
},
{
"c": "int",
"t": "source.cs keyword.type.cs",
"t": "source.cs keyword.type.int.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -1681,7 +1681,7 @@
},
{
"c": "double",
"t": "source.cs keyword.type.cs",
"t": "source.cs keyword.type.double.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -1933,16 +1933,16 @@
},
{
"c": " ",
"t": "source.cs punctuation.whitespace.comment.leading.cs",
"t": "source.cs comment.line.double-slash.cs punctuation.whitespace.comment.leading.cs",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF",
"dark_modern": "default: #CCCCCC",
"hc_light": "default: #292929",
"light_modern": "default: #3B3B3B"
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
"dark_vs": "comment: #6A9955",
"light_vs": "comment: #008000",
"hc_black": "comment: #7CA668",
"dark_modern": "comment: #6A9955",
"hc_light": "comment: #515151",
"light_modern": "comment: #008000"
}
},
{
@@ -2255,7 +2255,7 @@
},
{
"c": "public",
"t": "source.cs storage.modifier.cs",
"t": "source.cs storage.modifier.public.cs",
"r": {
"dark_plus": "storage.modifier: #569CD6",
"light_plus": "storage.modifier: #0000FF",
@@ -2283,7 +2283,7 @@
},
{
"c": "void",
"t": "source.cs keyword.type.cs",
"t": "source.cs keyword.type.void.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -2451,16 +2451,16 @@
},
{
"c": "new",
"t": "source.cs keyword.other.new.cs",
"t": "source.cs keyword.operator.expression.new.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6",
"dark_modern": "keyword: #569CD6",
"hc_light": "keyword: #0F4A85",
"light_modern": "keyword: #0000FF"
"dark_plus": "keyword.operator.expression: #569CD6",
"light_plus": "keyword.operator.expression: #0000FF",
"dark_vs": "keyword.operator.expression: #569CD6",
"light_vs": "keyword.operator.expression: #0000FF",
"hc_black": "keyword.operator.expression: #569CD6",
"dark_modern": "keyword.operator.expression: #569CD6",
"hc_light": "keyword.operator.expression: #0F4A85",
"light_modern": "keyword.operator.expression: #0000FF"
}
},
{
@@ -2507,7 +2507,7 @@
},
{
"c": "int",
"t": "source.cs keyword.type.cs",
"t": "source.cs keyword.type.int.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -2619,7 +2619,7 @@
},
{
"c": "int",
"t": "source.cs keyword.type.cs",
"t": "source.cs keyword.type.int.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -2759,16 +2759,16 @@
},
{
"c": "new",
"t": "source.cs keyword.other.new.cs",
"t": "source.cs keyword.operator.expression.new.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6",
"dark_modern": "keyword: #569CD6",
"hc_light": "keyword: #0F4A85",
"light_modern": "keyword: #0000FF"
"dark_plus": "keyword.operator.expression: #569CD6",
"light_plus": "keyword.operator.expression: #0000FF",
"dark_vs": "keyword.operator.expression: #569CD6",
"light_vs": "keyword.operator.expression: #0000FF",
"hc_black": "keyword.operator.expression: #569CD6",
"dark_modern": "keyword.operator.expression: #569CD6",
"hc_light": "keyword.operator.expression: #0F4A85",
"light_modern": "keyword.operator.expression: #0000FF"
}
},
{
@@ -2815,7 +2815,7 @@
},
{
"c": "int",
"t": "source.cs keyword.type.cs",
"t": "source.cs keyword.type.int.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -2927,7 +2927,7 @@
},
{
"c": "int",
"t": "source.cs keyword.type.cs",
"t": "source.cs keyword.type.int.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -3025,16 +3025,16 @@
},
{
"c": "new",
"t": "source.cs keyword.other.new.cs",
"t": "source.cs keyword.operator.expression.new.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6",
"dark_modern": "keyword: #569CD6",
"hc_light": "keyword: #0F4A85",
"light_modern": "keyword: #0000FF"
"dark_plus": "keyword.operator.expression: #569CD6",
"light_plus": "keyword.operator.expression: #0000FF",
"dark_vs": "keyword.operator.expression: #569CD6",
"light_vs": "keyword.operator.expression: #0000FF",
"hc_black": "keyword.operator.expression: #569CD6",
"dark_modern": "keyword.operator.expression: #569CD6",
"hc_light": "keyword.operator.expression: #0F4A85",
"light_modern": "keyword.operator.expression: #0000FF"
}
},
{
@@ -3081,7 +3081,7 @@
},
{
"c": "int",
"t": "source.cs keyword.type.cs",
"t": "source.cs keyword.type.int.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
@@ -43,16 +43,16 @@
},
{
"c": "var",
"t": "text.html.cshtml meta.structure.razor.codeblock source.cs keyword.other.var.cs",
"t": "text.html.cshtml meta.structure.razor.codeblock source.cs storage.type.var.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6",
"dark_modern": "keyword: #569CD6",
"hc_light": "keyword: #0F4A85",
"light_modern": "keyword: #0000FF"
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
"dark_vs": "storage.type: #569CD6",
"light_vs": "storage.type: #0000FF",
"hc_black": "storage.type: #569CD6",
"dark_modern": "storage.type: #569CD6",
"hc_light": "storage.type: #0F4A85",
"light_modern": "storage.type: #0000FF"
}
},
{
@@ -169,16 +169,16 @@
},
{
"c": "var",
"t": "text.html.cshtml meta.structure.razor.codeblock source.cs keyword.other.var.cs",
"t": "text.html.cshtml meta.structure.razor.codeblock source.cs storage.type.var.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6",
"dark_modern": "keyword: #569CD6",
"hc_light": "keyword: #0F4A85",
"light_modern": "keyword: #0000FF"
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
"dark_vs": "storage.type: #569CD6",
"light_vs": "storage.type: #0000FF",
"hc_black": "storage.type: #569CD6",
"dark_modern": "storage.type: #569CD6",
"hc_light": "storage.type: #0F4A85",
"light_modern": "storage.type: #0000FF"
}
},
{
@@ -505,16 +505,16 @@
},
{
"c": " ",
"t": "text.html.cshtml meta.structure.razor.codeblock source.cs meta.statement.if.razor meta.structure.razor.csharp.codeblock punctuation.whitespace.comment.leading.cs",
"t": "text.html.cshtml meta.structure.razor.codeblock source.cs meta.statement.if.razor meta.structure.razor.csharp.codeblock comment.line.double-slash.cs punctuation.whitespace.comment.leading.cs",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF",
"dark_modern": "default: #CCCCCC",
"hc_light": "default: #292929",
"light_modern": "default: #3B3B3B"
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
"dark_vs": "comment: #6A9955",
"light_vs": "comment: #008000",
"hc_black": "comment: #7CA668",
"dark_modern": "comment: #6A9955",
"hc_light": "comment: #515151",
"light_modern": "comment: #008000"
}
},
{
@@ -561,16 +561,16 @@
},
{
"c": "var",
"t": "text.html.cshtml meta.structure.razor.codeblock source.cs meta.statement.if.razor meta.structure.razor.csharp.codeblock keyword.other.var.cs",
"t": "text.html.cshtml meta.structure.razor.codeblock source.cs meta.statement.if.razor meta.structure.razor.csharp.codeblock storage.type.var.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6",
"dark_modern": "keyword: #569CD6",
"hc_light": "keyword: #0F4A85",
"light_modern": "keyword: #0000FF"
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
"dark_vs": "storage.type: #569CD6",
"light_vs": "storage.type: #0000FF",
"hc_black": "storage.type: #569CD6",
"dark_modern": "storage.type: #569CD6",
"hc_light": "storage.type: #0F4A85",
"light_modern": "storage.type: #0000FF"
}
},
{
@@ -757,16 +757,16 @@
},
{
"c": "var",
"t": "text.html.cshtml meta.structure.razor.codeblock source.cs meta.statement.if.razor meta.structure.razor.csharp.codeblock keyword.other.var.cs",
"t": "text.html.cshtml meta.structure.razor.codeblock source.cs meta.statement.if.razor meta.structure.razor.csharp.codeblock storage.type.var.cs",
"r": {
"dark_plus": "keyword: #569CD6",
"light_plus": "keyword: #0000FF",
"dark_vs": "keyword: #569CD6",
"light_vs": "keyword: #0000FF",
"hc_black": "keyword: #569CD6",
"dark_modern": "keyword: #569CD6",
"hc_light": "keyword: #0F4A85",
"light_modern": "keyword: #0000FF"
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
"dark_vs": "storage.type: #569CD6",
"light_vs": "storage.type: #0000FF",
"hc_black": "storage.type: #569CD6",
"dark_modern": "storage.type: #569CD6",
"hc_light": "storage.type: #0F4A85",
"light_modern": "storage.type: #0000FF"
}
},
{
@@ -939,16 +939,16 @@
},
{
"c": " ",
"t": "text.html.cshtml meta.structure.razor.codeblock source.cs meta.statement.if.razor meta.structure.razor.csharp.codeblock punctuation.whitespace.comment.leading.cs",
"t": "text.html.cshtml meta.structure.razor.codeblock source.cs meta.statement.if.razor meta.structure.razor.csharp.codeblock comment.line.double-slash.cs punctuation.whitespace.comment.leading.cs",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF",
"dark_modern": "default: #CCCCCC",
"hc_light": "default: #292929",
"light_modern": "default: #3B3B3B"
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
"dark_vs": "comment: #6A9955",
"light_vs": "comment: #008000",
"hc_black": "comment: #7CA668",
"dark_modern": "comment: #6A9955",
"hc_light": "comment: #515151",
"light_modern": "comment: #008000"
}
},
{
@@ -4535,4 +4535,4 @@
"light_modern": "punctuation.definition.tag: #800000"
}
}
]
]
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.84.0",
"distro": "b30d9687a6941b0d17b73334fc5a0f12590bff90",
"version": "1.85.0",
"distro": "ff0198cd90b25ba7ca853279cea9b8bb3cf5164d",
"author": {
"name": "Microsoft Corporation"
},
@@ -73,7 +73,7 @@
"@vscode/policy-watcher": "^1.1.4",
"@vscode/proxy-agent": "^0.17.5",
"@vscode/ripgrep": "^1.15.6",
"@vscode/spdlog": "^0.13.11",
"@vscode/spdlog": "^0.13.12",
"@vscode/sqlite3": "5.1.6-vscode",
"@vscode/sudo-prompt": "9.3.1",
"@vscode/vscode-languagedetection": "1.0.21",
@@ -150,7 +150,7 @@
"cssnano": "^4.1.11",
"debounce": "^1.0.0",
"deemon": "^1.8.0",
"electron": "25.9.1",
"electron": "25.9.2",
"eslint": "8.36.0",
"eslint-plugin-header": "3.1.1",
"eslint-plugin-jsdoc": "^46.5.0",
+2 -2
View File
@@ -50,8 +50,8 @@
},
{
"name": "ms-vscode.js-debug",
"version": "1.83.1",
"sha256": "1452fdbab8d0d83ca5765bb66170d50b005c97ca4dcd13e154c3401d842a92d4",
"version": "1.84.0",
"sha256": "a57691eb4440e549edba7472c0313e94f24d46ebe1ede18784b552fc5d11e596",
"repo": "https://github.com/microsoft/vscode-js-debug",
"metadata": {
"id": "25629058-ddac-4e17-abba-74678e126c5d",
+1 -1
View File
@@ -9,7 +9,7 @@
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/proxy-agent": "^0.17.5",
"@vscode/ripgrep": "^1.15.6",
"@vscode/spdlog": "^0.13.11",
"@vscode/spdlog": "^0.13.12",
"@vscode/vscode-languagedetection": "1.0.21",
"@vscode/windows-process-tree": "^0.5.0",
"@vscode/windows-registry": "^1.1.0",
+9 -11
View File
@@ -80,13 +80,13 @@
https-proxy-agent "^7.0.2"
proxy-from-env "^1.1.0"
"@vscode/spdlog@^0.13.11":
version "0.13.11"
resolved "https://registry.yarnpkg.com/@vscode/spdlog/-/spdlog-0.13.11.tgz#1c65c3527dd8e9679ada7f427c4d9e4af2ea097a"
integrity sha512-4qk6G3XKTJNsrqsGwmo9lr8NPaH84WeLsoFVPrpvoEC1t1tFu7H6l4RRMgzKNeE92nwRbjejLv1nATJNoabRfA==
"@vscode/spdlog@^0.13.12":
version "0.13.12"
resolved "https://registry.yarnpkg.com/@vscode/spdlog/-/spdlog-0.13.12.tgz#8b8e3308468fd7d613c350ecd7fcfaa27064960a"
integrity sha512-8Qw8VwBzFkH6AWVKh+ULeVDff0lwTh/PkEKUOwRpyuu7Mr7W2zQoc+oAaGmTWKb1NPmvVeXmo+qF9X+jXuBCOg==
dependencies:
bindings "^1.5.0"
mkdirp "^0.5.5"
mkdirp "^1.0.4"
nan "^2.17.0"
"@vscode/vscode-languagedetection@1.0.21":
@@ -338,12 +338,10 @@ mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3:
resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113"
integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==
mkdirp@^0.5.5:
version "0.5.6"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6"
integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==
dependencies:
minimist "^1.2.6"
mkdirp@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
ms@2.1.2:
version "2.1.2"
+104 -17
View File
@@ -17,9 +17,9 @@ import { FileAccess, RemoteAuthorities, Schemas } from 'vs/base/common/network';
import * as platform from 'vs/base/common/platform';
import { URI } from 'vs/base/common/uri';
export const { registerWindow, getWindows, onDidRegisterWindow, onWillUnregisterWindow, onDidUnregisterWindow } = (function () {
export const { registerWindow, getWindows, getWindowsCount, onDidRegisterWindow, onWillUnregisterWindow, onDidUnregisterWindow } = (function () {
const windows = new Set([window]);
const onDidRegisterWindow = new event.Emitter<{ window: Window & typeof globalThis; disposableStore: DisposableStore }>();
const onDidRegisterWindow = new event.Emitter<{ window: Window & typeof globalThis; disposables: DisposableStore }>();
const onDidUnregisterWindow = new event.Emitter<Window & typeof globalThis>();
const onWillUnregisterWindow = new event.Emitter<Window & typeof globalThis>();
return {
@@ -33,22 +33,27 @@ export const { registerWindow, getWindows, onDidRegisterWindow, onWillUnregister
windows.add(window);
const disposableStore = new DisposableStore();
disposableStore.add(toDisposable(() => {
const disposables = new DisposableStore();
disposables.add(toDisposable(() => {
windows.delete(window);
onDidUnregisterWindow.fire(window);
}));
onDidRegisterWindow.fire({ window, disposableStore });
disposableStore.add(addDisposableListener(window, 'beforeunload', () => {
disposables.add(addDisposableListener(window, EventType.BEFORE_UNLOAD, () => {
onWillUnregisterWindow.fire(window);
}));
return disposableStore;
const eventDisposables = new DisposableStore();
disposables.add(eventDisposables);
onDidRegisterWindow.fire({ window, disposables: eventDisposables });
return disposables;
},
getWindows(): Iterable<Window & typeof globalThis> {
return windows;
},
getWindowsCount(): number {
return windows.size;
}
};
})();
@@ -735,6 +740,13 @@ export function isAncestorOfActiveElement(ancestor: Element): boolean {
return isAncestor(ancestor.ownerDocument.activeElement, ancestor);
}
/**
* Returns whether the element is in the active `document`.
*/
export function isActiveDocument(element: Element): boolean {
return element.ownerDocument === getActiveDocument();
}
/**
* Returns the active document across all child windows.
* Use this instead of `document` when reacting to dom events to handle multiple windows.
@@ -773,16 +785,77 @@ export function focusWindow(element: Node): void {
}
}
export function createStyleSheet(container: HTMLElement = document.getElementsByTagName('head')[0], beforeAppend?: (style: HTMLStyleElement) => void): HTMLStyleElement {
const globalStylesheets = new Map<HTMLStyleElement /* main stylesheet */, Set<HTMLStyleElement /* aux window clones that track the main stylesheet */>>();
export function createStyleSheet(container: HTMLElement = document.head, beforeAppend?: (style: HTMLStyleElement) => void): HTMLStyleElement {
const style = document.createElement('style');
style.type = 'text/css';
style.media = 'screen';
beforeAppend?.(style);
container.appendChild(style);
// With <head> as container, the stylesheet becomes global and is tracked
// to support auxiliary windows to clone the stylesheet.
if (container === document.head) {
const clonedGlobalStylesheets = new Set<HTMLStyleElement>();
globalStylesheets.set(style, clonedGlobalStylesheets);
for (const targetWindow of getWindows()) {
if (targetWindow === window) {
continue; // main window is already tracked
}
const disposable = cloneGlobalStyleSheet(style, targetWindow);
event.Event.once(onDidUnregisterWindow)(unregisteredWindow => {
if (unregisteredWindow === targetWindow) {
disposable.dispose();
}
});
}
}
return style;
}
export function createMetaElement(container: HTMLElement = document.getElementsByTagName('head')[0]): HTMLMetaElement {
export function isGlobalStylesheet(node: Node): boolean {
return globalStylesheets.has(node as HTMLStyleElement);
}
export function cloneGlobalStylesheets(targetWindow: Window & typeof globalThis): IDisposable {
const disposables = new DisposableStore();
for (const [globalStylesheet] of globalStylesheets) {
disposables.add(cloneGlobalStyleSheet(globalStylesheet, targetWindow));
}
return disposables;
}
function cloneGlobalStyleSheet(globalStylesheet: HTMLStyleElement, targetWindow: Window & typeof globalThis): IDisposable {
const clone = globalStylesheet.cloneNode(true) as HTMLStyleElement;
targetWindow.document.head.appendChild(clone);
for (const rule of getDynamicStyleSheetRules(globalStylesheet)) {
clone.sheet?.insertRule(rule.cssText, clone.sheet?.cssRules.length);
}
const observer = new MutationObserver(() => {
clone.textContent = globalStylesheet.textContent;
});
observer.observe(globalStylesheet, { childList: true });
globalStylesheets.get(globalStylesheet)?.add(clone);
return toDisposable(() => {
observer.disconnect();
targetWindow.document.head.removeChild(clone);
globalStylesheets.get(globalStylesheet)?.delete(clone);
});
}
export function createMetaElement(container: HTMLElement = document.head): HTMLMetaElement {
const meta = document.createElement('meta');
container.appendChild(meta);
return meta;
@@ -796,7 +869,7 @@ function getSharedStyleSheet(): HTMLStyleElement {
return _sharedStyleSheet;
}
function getDynamicStyleSheetRules(style: any) {
function getDynamicStyleSheetRules(style: HTMLStyleElement) {
if (style?.sheet?.rules) {
// Chrome, IE
return style.sheet.rules;
@@ -808,15 +881,20 @@ function getDynamicStyleSheetRules(style: any) {
return [];
}
export function createCSSRule(selector: string, cssText: string, style: HTMLStyleElement = getSharedStyleSheet()): void {
export function createCSSRule(selector: string, cssText: string, style = getSharedStyleSheet()): void {
if (!style || !cssText) {
return;
}
(<CSSStyleSheet>style.sheet).insertRule(selector + '{' + cssText + '}', 0);
style.sheet?.insertRule(`${selector} {${cssText}}`, 0);
// Apply rule also to all cloned global stylesheets
for (const clonedGlobalStylesheet of globalStylesheets.get(style) ?? []) {
createCSSRule(selector, cssText, clonedGlobalStylesheet);
}
}
export function removeCSSRulesContainingSelector(ruleName: string, style: HTMLStyleElement = getSharedStyleSheet()): void {
export function removeCSSRulesContainingSelector(ruleName: string, style = getSharedStyleSheet()): void {
if (!style) {
return;
}
@@ -825,14 +903,23 @@ export function removeCSSRulesContainingSelector(ruleName: string, style: HTMLSt
const toDelete: number[] = [];
for (let i = 0; i < rules.length; i++) {
const rule = rules[i];
if (rule.selectorText.indexOf(ruleName) !== -1) {
if (isCSSStyleRule(rule) && rule.selectorText.indexOf(ruleName) !== -1) {
toDelete.push(i);
}
}
for (let i = toDelete.length - 1; i >= 0; i--) {
(<any>style.sheet).deleteRule(toDelete[i]);
style.sheet?.deleteRule(toDelete[i]);
}
// Remove rules also from all cloned global stylesheets
for (const clonedGlobalStylesheet of globalStylesheets.get(style) ?? []) {
removeCSSRulesContainingSelector(ruleName, clonedGlobalStylesheet);
}
}
function isCSSStyleRule(rule: CSSRule): rule is CSSStyleRule {
return typeof (rule as CSSStyleRule).selectorText === 'string';
}
export function isMouseEvent(e: unknown): e is MouseEvent {
@@ -1652,7 +1739,7 @@ export class ModifierKeyEmitter extends event.Emitter<IModifierKeyStatus> {
metaKey: false
};
this._subscriptions.add(event.Event.runAndSubscribe(onDidRegisterWindow, ({ window, disposableStore }) => this.registerListeners(window, disposableStore), { window, disposableStore: this._subscriptions }));
this._subscriptions.add(event.Event.runAndSubscribe(onDidRegisterWindow, ({ window, disposables }) => this.registerListeners(window, disposables), { window, disposables: this._subscriptions }));
}
private registerListeners(window: Window, disposables: DisposableStore): void {
+5 -5
View File
@@ -91,11 +91,11 @@ export class Gesture extends Disposable {
this.handle = null;
this._lastSetTapCountTime = 0;
this._register(EventUtils.runAndSubscribe(DomUtils.onDidRegisterWindow, ({ window, disposableStore }) => {
disposableStore.add(DomUtils.addDisposableListener(window.document, 'touchstart', (e: TouchEvent) => this.onTouchStart(e), { passive: false }));
disposableStore.add(DomUtils.addDisposableListener(window.document, 'touchend', (e: TouchEvent) => this.onTouchEnd(e)));
disposableStore.add(DomUtils.addDisposableListener(window.document, 'touchmove', (e: TouchEvent) => this.onTouchMove(e), { passive: false }));
}, { window, disposableStore: this._store }));
this._register(EventUtils.runAndSubscribe(DomUtils.onDidRegisterWindow, ({ window, disposables }) => {
disposables.add(DomUtils.addDisposableListener(window.document, 'touchstart', (e: TouchEvent) => this.onTouchStart(e), { passive: false }));
disposables.add(DomUtils.addDisposableListener(window.document, 'touchend', (e: TouchEvent) => this.onTouchEnd(e)));
disposables.add(DomUtils.addDisposableListener(window.document, 'touchmove', (e: TouchEvent) => this.onTouchMove(e), { passive: false }));
}, { window, disposables: this._store }));
}
public static addTarget(element: HTMLElement): IDisposable {
Binary file not shown.
+20 -3
View File
@@ -23,6 +23,7 @@ export interface IIconLabelCreationOptions {
export interface IIconLabelValueOptions {
title?: string | ITooltipMarkdownString;
descriptionTitle?: string;
suffix?: string;
hideIcon?: boolean;
extraClasses?: readonly string[];
italic?: boolean;
@@ -85,9 +86,11 @@ export class IconLabel extends Disposable {
private readonly creationOptions?: IIconLabelCreationOptions;
private readonly domNode: FastLabelNode;
private readonly nameContainer: HTMLElement;
private readonly nameNode: Label | LabelWithHighlights;
private descriptionNode: FastLabelNode | HighlightedLabel | undefined;
private suffixNode: FastLabelNode | undefined;
private readonly labelContainer: HTMLElement;
@@ -102,12 +105,12 @@ export class IconLabel extends Disposable {
this.labelContainer = dom.append(this.domNode.element, dom.$('.monaco-icon-label-container'));
const nameContainer = dom.append(this.labelContainer, dom.$('span.monaco-icon-name-container'));
this.nameContainer = dom.append(this.labelContainer, dom.$('span.monaco-icon-name-container'));
if (options?.supportHighlights || options?.supportIcons) {
this.nameNode = new LabelWithHighlights(nameContainer, !!options.supportIcons);
this.nameNode = new LabelWithHighlights(this.nameContainer, !!options.supportIcons);
} else {
this.nameNode = new Label(nameContainer);
this.nameNode = new Label(this.nameContainer);
}
this.hoverDelegate = options?.hoverDelegate;
@@ -164,6 +167,11 @@ export class IconLabel extends Disposable {
descriptionNode.empty = !description;
}
}
if (options?.suffix || this.suffixNode) {
const suffixNode = this.getOrCreateSuffixNode();
suffixNode.textContent = options?.suffix ?? '';
}
}
private setupHover(htmlElement: HTMLElement, tooltip: string | ITooltipMarkdownString | undefined): void {
@@ -196,6 +204,15 @@ export class IconLabel extends Disposable {
this.customHovers.clear();
}
private getOrCreateSuffixNode() {
if (!this.suffixNode) {
const suffixContainer = this._register(new FastLabelNode(dom.after(this.nameContainer, dom.$('span.monaco-icon-suffix-container'))));
this.suffixNode = this._register(new FastLabelNode(dom.append(suffixContainer.element, dom.$('span.label-suffix'))));
}
return this.suffixNode;
}
private getOrCreateDescriptionNode() {
if (!this.descriptionNode) {
const descriptionContainer = this._register(new FastLabelNode(dom.append(this.labelContainer, dom.$('span.monaco-icon-description-container'))));
@@ -51,6 +51,11 @@
opacity: 0.5;
}
.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-suffix-container>.label-suffix {
opacity: .7;
white-space: pre;
}
.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {
opacity: .7;
margin-left: 0.5em;
+3 -6
View File
@@ -85,7 +85,6 @@ interface ISubMenuData {
export class Menu extends ActionBar {
private mnemonics: Map<string, Array<BaseMenuActionViewItem>>;
private readonly menuDisposables: DisposableStore;
private scrollableElement: DomScrollableElement;
private menuElement: HTMLElement;
static globalStyleSheet: HTMLStyleElement;
@@ -113,23 +112,21 @@ export class Menu extends ActionBar {
this.actionsList.tabIndex = 0;
this.menuDisposables = this._register(new DisposableStore());
this.initializeOrUpdateStyleSheet(container, menuStyles);
this._register(Gesture.addTarget(menuElement));
addDisposableListener(menuElement, EventType.KEY_DOWN, (e) => {
this._register(addDisposableListener(menuElement, EventType.KEY_DOWN, (e) => {
const event = new StandardKeyboardEvent(e);
// Stop tab navigation of menus
if (event.equals(KeyCode.Tab)) {
e.preventDefault();
}
});
}));
if (options.enableMnemonics) {
this.menuDisposables.add(addDisposableListener(menuElement, EventType.KEY_DOWN, (e) => {
this._register(addDisposableListener(menuElement, EventType.KEY_DOWN, (e) => {
const key = e.key.toLocaleLowerCase();
if (this.mnemonics.has(key)) {
EventHelper.stop(e, true);
@@ -5,13 +5,13 @@
.monaco-progress-container {
width: 100%;
height: 5px;
height: 2px;
overflow: hidden; /* keep progress bit in bounds */
}
.monaco-progress-container .progress-bit {
width: 2%;
height: 5px;
height: 2px;
position: absolute;
left: 0;
display: none;
+12 -1
View File
@@ -568,7 +568,18 @@ export const Codicon = {
sparkle: register('sparkle', 0xec10),
insert: register('insert', 0xec11),
mic: register('mic', 0xec12),
thumbsDownFilled: register('thumbsdown-filled', 0xec13),
thumbsUpFilled: register('thumbsup-filled', 0xec14),
coffee: register('coffee', 0xec15),
snake: register('snake', 0xec16),
game: register('game', 0xec17),
vr: register('vr', 0xec18),
chip: register('chip', 0xec19),
piano: register('piano', 0xec1a),
music: register('music', 0xec1b),
micFilled: register('mic-filled', 0xec1c),
gitFetch: register('git-fetch', 0xec1d),
copilot: register('copilot', 0xec1e),
// derived icons, that could become separate icons
+2 -1
View File
@@ -293,8 +293,9 @@ export interface IAiGeneratedWorkspaceTrust {
export interface IGitHubEntitlement {
providerId: string;
command: { title: string; titleWithoutPlaceHolder: string; action: string; when: string };
altCommand: { title: string; action: string; when: string };
entitlementUrl: string;
extensionId: string;
enablementKey: string;
confirmationMessage: string;
confirmationAction: string;
}
+3
View File
@@ -42,6 +42,9 @@ const _format2Regexp = /{([^}]+)}/g;
* Similar to `format` but with objects instead of positional arguments.
*/
export function format2(template: string, values: Record<string, unknown>): string {
if (Object.keys(values).length === 0) {
return template;
}
return template.replace(_format2Regexp, (match, group) => (values[group] ?? match) as string);
}
@@ -121,31 +121,11 @@ export const webFrame: WebFrame = globals.vscode.webFrame;
export const process: ISandboxNodeProcess = globals.vscode.process;
export const context: ISandboxContext = globals.vscode.context;
export interface IGlobalsSlim {
/**
* A set of globals that are available in all windows that either
* depend on `preload.js` or `preload-aux.js`.
*/
export interface ISandboxGlobals {
readonly ipcRenderer: Pick<import('vs/base/parts/sandbox/electron-sandbox/electronTypes').IpcRenderer, 'send' | 'invoke'>;
readonly webFrame: import('vs/base/parts/sandbox/electron-sandbox/electronTypes').WebFrame;
}
/**
* Get the globals that are available in the given window. Since
* this method supports auxiliary windows, only a subset of globals
* is returned.
*/
export function getGlobals(win: Window): IGlobalsSlim | undefined {
if (win === window) {
return { ipcRenderer, webFrame };
}
const auxiliaryWindowCandidate = win as unknown as {
vscode: {
ipcRenderer: Pick<import('vs/base/parts/sandbox/electron-sandbox/electronTypes').IpcRenderer, 'send' | 'invoke'>;
webFrame: import('vs/base/parts/sandbox/electron-sandbox/electronTypes').WebFrame;
};
};
if (auxiliaryWindowCandidate?.vscode?.ipcRenderer && auxiliaryWindowCandidate?.vscode?.webFrame) {
return auxiliaryWindowCandidate.vscode;
}
return undefined;
}
@@ -46,12 +46,12 @@
/**
* @param {string} channel
* @param {any[]} args
* @returns {Promise<any> | never}
* @returns {Promise<any>}
*/
invoke(channel, ...args) {
if (validateIPC(channel)) {
return ipcRenderer.invoke(channel, ...args);
}
validateIPC(channel);
return ipcRenderer.invoke(channel, ...args);
}
},
@@ -56,24 +56,23 @@
}
try {
if (validateIPC(windowConfigIpcChannel)) {
validateIPC(windowConfigIpcChannel);
// Resolve configuration from electron-main
configuration = await ipcRenderer.invoke(windowConfigIpcChannel);
// Resolve configuration from electron-main
const resolvedConfiguration = configuration = await ipcRenderer.invoke(windowConfigIpcChannel);
// Apply `userEnv` directly
Object.assign(process.env, configuration.userEnv);
// Apply `userEnv` directly
Object.assign(process.env, resolvedConfiguration.userEnv);
// Apply zoom level early before even building the
// window DOM elements to avoid UI flicker. We always
// have to set the zoom level from within the window
// because Chrome has it's own way of remembering zoom
// settings per origin (if vscode-file:// is used) and
// we want to ensure that the user configuration wins.
webFrame.setZoomLevel(configuration.zoomLevel ?? 0);
// Apply zoom level early before even building the
// window DOM elements to avoid UI flicker. We always
// have to set the zoom level from within the window
// because Chrome has it's own way of remembering zoom
// settings per origin (if vscode-file:// is used) and
// we want to ensure that the user configuration wins.
webFrame.setZoomLevel(resolvedConfiguration.zoomLevel ?? 0);
return configuration;
}
return resolvedConfiguration;
} catch (error) {
throw new Error(`Preload: unable to fetch vscode-window-config: ${error}`);
}
@@ -145,51 +144,51 @@
/**
* @param {string} channel
* @param {any[]} args
* @returns {Promise<any> | never}
* @returns {Promise<any>}
*/
invoke(channel, ...args) {
if (validateIPC(channel)) {
return ipcRenderer.invoke(channel, ...args);
}
validateIPC(channel);
return ipcRenderer.invoke(channel, ...args);
},
/**
* @param {string} channel
* @param {(event: IpcRendererEvent, ...args: any[]) => void} listener
* @returns {IpcRenderer | never}
* @returns {IpcRenderer}
*/
on(channel, listener) {
if (validateIPC(channel)) {
ipcRenderer.on(channel, listener);
validateIPC(channel);
return this;
}
ipcRenderer.on(channel, listener);
return this;
},
/**
* @param {string} channel
* @param {(event: IpcRendererEvent, ...args: any[]) => void} listener
* @returns {IpcRenderer | never}
* @returns {IpcRenderer}
*/
once(channel, listener) {
if (validateIPC(channel)) {
ipcRenderer.once(channel, listener);
validateIPC(channel);
return this;
}
ipcRenderer.once(channel, listener);
return this;
},
/**
* @param {string} channel
* @param {(event: IpcRendererEvent, ...args: any[]) => void} listener
* @returns {IpcRenderer | never}
* @returns {IpcRenderer}
*/
removeListener(channel, listener) {
if (validateIPC(channel)) {
ipcRenderer.removeListener(channel, listener);
validateIPC(channel);
return this;
}
ipcRenderer.removeListener(channel, listener);
return this;
}
},
@@ -3,22 +3,22 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./media/issueReporter';
import 'vs/base/browser/ui/codicons/codiconStyles'; // make sure codicon css is loaded
import { safeInnerHtml } from 'vs/base/browser/dom';
import 'vs/base/browser/ui/codicons/codiconStyles'; // make sure codicon css is loaded
import { isLinux, isWindows } from 'vs/base/common/platform';
import BaseHtml from 'vs/code/electron-sandbox/issue/issueReporterPage';
import 'vs/css!./media/issueReporter';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
import { getSingletonServiceDescriptors } from 'vs/platform/instantiation/common/extensions';
import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService';
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { IMainProcessService } from 'vs/platform/ipc/common/mainProcessService';
import { ElectronIPCMainProcessService } from 'vs/platform/ipc/electron-sandbox/mainProcessService';
import { registerMainProcessRemoteService } from 'vs/platform/ipc/electron-sandbox/services';
import { IIssueMainService, IssueReporterWindowConfiguration } from 'vs/platform/issue/common/issue';
import { INativeHostService } from 'vs/platform/native/common/native';
import { NativeHostService } from 'vs/platform/native/electron-sandbox/nativeHostService';
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
import { IMainProcessService } from 'vs/platform/ipc/common/mainProcessService';
import { IssueReporter } from './issueReporterService';
import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService';
import { getSingletonServiceDescriptors } from 'vs/platform/instantiation/common/extensions';
import { registerMainProcessRemoteService } from 'vs/platform/ipc/electron-sandbox/services';
export function startup(configuration: IssueReporterWindowConfiguration) {
const platformClass = isWindows ? 'windows' : isLinux ? 'linux' : 'mac';
@@ -9,6 +9,7 @@ import { ISettingSearchResult, IssueReporterExtensionData, IssueType } from 'vs/
export interface IssueReporterData {
issueType: IssueType;
issueDescription?: string;
extensionData?: string;
versionInfo?: any;
systemInfo?: SystemInfo;
@@ -20,6 +21,7 @@ export interface IssueReporterData {
includeProcessInfo: boolean;
includeExtensions: boolean;
includeExperiments: boolean;
includeExtensionData: boolean;
numberOfThemeExtesions?: number;
allExtensions: IssueReporterExtensionData[];
@@ -47,6 +49,7 @@ export class IssueReporterModel {
includeProcessInfo: true,
includeExtensions: true,
includeExperiments: true,
includeExtensionData: true,
allExtensions: []
};
@@ -120,6 +123,12 @@ ${this.getInfos()}
private getInfos(): string {
let info = '';
if (this._data.issueType === IssueType.Bug || this._data.issueType === IssueType.PerformanceIssue) {
if (!this._data.fileOnMarketplace && this._data.includeExtensionData && this._data.extensionData) {
info += this.getExtensionData();
}
}
if (this._data.issueType === IssueType.Bug || this._data.issueType === IssueType.PerformanceIssue) {
if (!this._data.fileOnMarketplace && this._data.includeSystemInfo && this._data.systemInfo) {
info += this.generateSystemInfoMd();
@@ -152,6 +161,10 @@ ${this.getInfos()}
return info;
}
private getExtensionData(): string {
return this._data.extensionData ?? '';
}
private generateSystemInfoMd(): string {
let md = `<details>
<summary>System Info</summary>
@@ -11,6 +11,7 @@ const sendProcessInfoLabel = escape(localize('sendProcessInfo', "Include my curr
const sendWorkspaceInfoLabel = escape(localize('sendWorkspaceInfo', "Include my workspace metadata"));
const sendExtensionsLabel = escape(localize('sendExtensions', "Include my enabled extensions"));
const sendExperimentsLabel = escape(localize('sendExperiments', "Include A/B experiment info"));
const sendExtensionData = escape(localize('sendExtensionData', "Include additional extension info"));
const reviewGuidanceLabel = localize( // intentionally not escaped because of its embedded tags
{
key: 'reviewGuidanceLabel',
@@ -85,6 +86,18 @@ export default (): string => `
</div>
<div class="system-info" id="block-container">
<div class="block block-extension-data">
<input class="send-extension-data" aria-label="${sendExtensionData}" type="checkbox" id="includeExtensionData" checked/>
<label class="extension-caption" id="extension-caption" for="includeExtensionData">
${sendExtensionData}
<span id="ext-loading" hidden></span>
<span class="ext-parens" hidden>(</span><a href="#" class="showInfo" id="extension-id">${escape(localize('show', "show"))}</a><span class="ext-parens" hidden>)</span>
</label>
<pre class="block-info" id="extension-data" placeholder="${escape(localize('extensionData', "Extension does not have additional data to include."))}">
<!-- To be dynamically filled -->
</pre>
</div>
<div class="block block-system">
<input class="sendData" aria-label="${sendSystemInfoLabel}" type="checkbox" id="includeSystemInfo" checked/>
<label class="caption" for="includeSystemInfo">
@@ -2,24 +2,26 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { localize } from 'vs/nls';
import { $, reset, windowOpenNoOpener } from 'vs/base/browser/dom';
import { $, createStyleSheet, reset, windowOpenNoOpener } from 'vs/base/browser/dom';
import { Button, unthemedButtonStyles } from 'vs/base/browser/ui/button/button';
import { renderIcon } from 'vs/base/browser/ui/iconLabel/iconLabels';
import { Delayer } from 'vs/base/common/async';
import { Delayer, RunOnceScheduler } from 'vs/base/common/async';
import { Codicon } from 'vs/base/common/codicons';
import { groupBy } from 'vs/base/common/collections';
import { debounce } from 'vs/base/common/decorators';
import { CancellationError } from 'vs/base/common/errors';
import { Disposable } from 'vs/base/common/lifecycle';
import { isLinuxSnap, isMacintosh } from 'vs/base/common/platform';
import { escape } from 'vs/base/common/strings';
import { IssueReporterData as IssueReporterModelData, IssueReporterModel } from 'vs/code/electron-sandbox/issue/issueReporterModel';
import { ThemeIcon } from 'vs/base/common/themables';
import { IssueReporterModel, IssueReporterData as IssueReporterModelData } from 'vs/code/electron-sandbox/issue/issueReporterModel';
import { localize } from 'vs/nls';
import { isRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnostics';
import { IIssueMainService, IssueReporterData, IssueReporterExtensionData, IssueReporterStyles, IssueReporterWindowConfiguration, IssueType } from 'vs/platform/issue/common/issue';
import { normalizeGitHubUrl } from 'vs/platform/issue/common/issueReporterUtil';
import { INativeHostService } from 'vs/platform/native/common/native';
import { getIconsStyleSheet } from 'vs/platform/theme/browser/iconsStyleSheet';
import { applyZoom, zoomIn, zoomOut } from 'vs/platform/window/electron-sandbox/window';
import { CancellationError } from 'vs/base/common/errors';
// GitHub has let us know that we could up our limit here to 8k. We chose 7500 to play it safe.
// ref https://github.com/microsoft/vscode/issues/159191
@@ -41,11 +43,11 @@ export class IssueReporter extends Disposable {
private readonly issueReporterModel: IssueReporterModel;
private numberOfSearchResultsDisplayed = 0;
private receivedSystemInfo = false;
private receivedExtensionData = false;
private receivedPerformanceInfo = false;
private shouldQueueSearch = false;
private hasBeenSubmitted = false;
private delayedSubmit = new Delayer<void>(300);
private readonly previewButton!: Button;
constructor(
@@ -67,6 +69,8 @@ export class IssueReporter extends Disposable {
selectedExtension: targetExtension
});
//TODO: Handle case where extension is not activated
const issueReporterElement = this.getElementById('issue-reporter');
if (issueReporterElement) {
this.previewButton = new Button(issueReporterElement, unthemedButtonStyles);
@@ -107,6 +111,19 @@ export class IssueReporter extends Disposable {
show(this.getElementById('english'));
}
const codiconStyleSheet = createStyleSheet();
codiconStyleSheet.id = 'codiconStyles';
// TODO: Is there a way to use the IThemeService here instead
const iconsStyleSheet = getIconsStyleSheet(undefined);
function updateAll() {
codiconStyleSheet.textContent = iconsStyleSheet.getCSS();
}
const delayer = new RunOnceScheduler(updateAll, 0);
iconsStyleSheet.onDidChange(() => delayer.schedule());
delayer.schedule();
this.setUpTypes();
this.setEventHandlers();
applyZoom(configuration.data.zoomLevel);
@@ -235,6 +252,31 @@ export class IssueReporter extends Disposable {
}
}
private async getIssueDataFromExtension(extension: IssueReporterExtensionData): Promise<string> {
try {
const data = await this.issueMainService.$getIssueReporterData(extension.id);
extension.extensionData = data;
this.receivedExtensionData = true;
this.issueReporterModel.update({ extensionData: data });
return data;
} catch (e) {
extension.hasIssueDataProviders = false;
// The issue handler failed so fall back to old issue reporter experience.
this.renderBlocks();
throw e;
}
}
private async getIssueTemplateFromExtension(extension: IssueReporterExtensionData): Promise<string> {
try {
const data = await this.issueMainService.$getIssueReporterTemplate(extension.id);
extension.extensionTemplate = data;
return data;
} catch (e) {
throw e;
}
}
private setEventHandlers(): void {
this.addEventListener('issue-type', 'change', (event: Event) => {
const issueType = parseInt((<HTMLInputElement>event.target).value);
@@ -249,7 +291,7 @@ export class IssueReporter extends Disposable {
this.render();
});
(['includeSystemInfo', 'includeProcessInfo', 'includeWorkspaceInfo', 'includeExtensions', 'includeExperiments'] as const).forEach(elementId => {
(['includeSystemInfo', 'includeProcessInfo', 'includeWorkspaceInfo', 'includeExtensions', 'includeExperiments', 'includeExtensionData'] as const).forEach(elementId => {
this.addEventListener(elementId, 'click', (event: Event) => {
event.stopPropagation();
this.issueReporterModel.update({ [elementId]: !this.issueReporterModel.getData()[elementId] });
@@ -428,6 +470,11 @@ export class IssueReporter extends Disposable {
private isPreviewEnabled() {
const issueType = this.issueReporterModel.getData().issueType;
if (this.issueReporterModel.getData().selectedExtension?.hasIssueDataProviders && !this.receivedExtensionData) {
return false;
}
if (issueType === IssueType.Bug && this.receivedSystemInfo) {
return true;
}
@@ -453,6 +500,10 @@ export class IssueReporter extends Disposable {
return selectedExtension && selectedExtension.bugsUrl;
}
private getExtensionData(): string | undefined {
return this.issueReporterModel.getData().selectedExtension?.extensionData;
}
private searchVSCodeIssues(title: string, issueDescription?: string): void {
if (title) {
this.searchDuplicates(title, issueDescription);
@@ -692,6 +743,7 @@ export class IssueReporter extends Disposable {
const workspaceBlock = document.querySelector('.block-workspace');
const extensionsBlock = document.querySelector('.block-extensions');
const experimentsBlock = document.querySelector('.block-experiments');
const extensionDataBlock = document.querySelector('.block-extension-data');
const problemSource = this.getElementById('problem-source')!;
const descriptionTitle = this.getElementById('issue-description-label')!;
@@ -700,6 +752,7 @@ export class IssueReporter extends Disposable {
const titleTextArea = this.getElementById('issue-title-container')!;
const descriptionTextArea = this.getElementById('description')!;
const extensionDataTextArea = this.getElementById('extension-data')!;
// Hide all by default
hide(blockContainer);
@@ -710,6 +763,8 @@ export class IssueReporter extends Disposable {
hide(experimentsBlock);
hide(problemSource);
hide(extensionSelector);
hide(extensionDataTextArea);
hide(extensionDataBlock);
show(problemSource);
show(titleTextArea);
@@ -728,6 +783,15 @@ export class IssueReporter extends Disposable {
return;
}
if (fileOnExtension && selectedExtension?.hasIssueDataProviders) {
const data = this.getExtensionData();
if (data) {
(extensionDataTextArea as HTMLElement).innerText = data.toString();
}
(extensionDataTextArea as HTMLTextAreaElement).readOnly = true;
show(extensionDataBlock);
}
if (issueType === IssueType.Bug) {
if (!fileOnMarketplace) {
show(blockContainer);
@@ -1061,7 +1125,7 @@ export class IssueReporter extends Disposable {
extensionsSelector.selectedIndex = 0;
}
this.addEventListener('extension-selector', 'change', (e: Event) => {
this.addEventListener('extension-selector', 'change', async (e: Event) => {
const selectedExtensionId = (<HTMLInputElement>e.target).value;
const extensions = this.issueReporterModel.getData().allExtensions;
const matches = extensions.filter(extension => extension.id === selectedExtensionId);
@@ -1069,8 +1133,27 @@ export class IssueReporter extends Disposable {
this.issueReporterModel.update({ selectedExtension: matches[0] });
if (matches[0].hasIssueUriRequestHandler) {
this.updateIssueReporterUri(matches[0]);
} else if (matches[0].hasIssueDataProviders) {
const template = await this.getIssueTemplateFromExtension(matches[0]);
const descriptionTextArea = this.getElementById('description')!;
const descriptionText = (descriptionTextArea as HTMLTextAreaElement).value;
if (descriptionText === '' || !descriptionText.includes(template)) {
const fullTextArea = descriptionText + (descriptionText === '' ? '' : '\n') + template;
(descriptionTextArea as HTMLTextAreaElement).value = fullTextArea;
this.issueReporterModel.update({ issueDescription: fullTextArea });
}
const extensionDataBlock = document.querySelector('.block-extension-data')!;
show(extensionDataBlock);
// Start loading for extension data.
const iconElement = document.createElement('span');
iconElement.classList.add(...ThemeIcon.asClassNameArray(Codicon.loading), 'codicon-modifier-spin');
this.setLoading(iconElement);
await this.getIssueDataFromExtension(matches[0]);
this.removeLoading(iconElement);
} else {
this.validateSelectedExtension();
this.issueReporterModel.update({ extensionData: undefined });
const title = (<HTMLInputElement>this.getElementById('issue-title')).value;
this.searchExtensionIssues(title);
}
@@ -1110,6 +1193,36 @@ export class IssueReporter extends Disposable {
}
}
private setLoading(element: HTMLElement) {
// Show loading
this.receivedExtensionData = false;
this.updatePreviewButtonState();
const extensionDataCaption = this.getElementById('extension-id')!;
hide(extensionDataCaption);
const extensionDataCaption2 = Array.from(document.querySelectorAll('.ext-parens'));
extensionDataCaption2.forEach(extensionDataCaption2 => hide(extensionDataCaption2));
const showLoading = this.getElementById('ext-loading')!;
show(showLoading);
showLoading.append(element);
}
private removeLoading(element: HTMLElement) {
this.updatePreviewButtonState();
const extensionDataCaption = this.getElementById('extension-id')!;
show(extensionDataCaption);
const extensionDataCaption2 = Array.from(document.querySelectorAll('.ext-parens'));
extensionDataCaption2.forEach(extensionDataCaption2 => show(extensionDataCaption2));
const hideLoading = this.getElementById('ext-loading')!;
hide(hideLoading);
hideLoading.removeChild(element);
}
private setExtensionValidationMessage(): void {
const extensionValidationMessage = this.getElementById('extension-selection-validation-error')!;
const extensionValidationNoUrlsMessage = this.getElementById('extension-selection-validation-error-no-url')!;
@@ -100,6 +100,11 @@ html {
height: 100%;
}
.extension-caption .codicon-modifier-spin {
padding-bottom: 3px;
margin-left: 2px;
}
/* Font Families (with CJK support) */
.mac { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
@@ -15,6 +15,7 @@ suite('IssueReporter', () => {
assert.deepStrictEqual(issueReporterModel.getData(), {
allExtensions: [],
includeSystemInfo: true,
includeExtensionData: true,
includeWorkspaceInfo: true,
includeProcessInfo: true,
includeExtensions: true,
@@ -346,9 +346,8 @@ class RefCountedStyleSheet {
}
}
public insertRule(rule: string, index?: number): void {
const sheet = <CSSStyleSheet>this._styleSheet.sheet;
sheet.insertRule(rule, index);
public insertRule(selector: string, rule: string): void {
dom.createCSSRule(selector, rule, this._styleSheet);
}
public removeRulesContainingSelector(ruleName: string): void {
@@ -373,9 +372,8 @@ export class GlobalStyleSheet {
public unref(): void {
}
public insertRule(rule: string, index?: number): void {
const sheet = <CSSStyleSheet>this._styleSheet.sheet;
sheet.insertRule(rule, index);
public insertRule(selector: string, rule: string): void {
dom.createCSSRule(selector, rule, this._styleSheet);
}
public removeRulesContainingSelector(ruleName: string): void {
@@ -714,15 +712,15 @@ class DecorationCSSRules {
let hasContent = false;
if (unthemedCSS.length > 0) {
sheet.insertRule(`${this._unThemedSelector} {${unthemedCSS}}`, 0);
sheet.insertRule(this._unThemedSelector, unthemedCSS);
hasContent = true;
}
if (lightCSS.length > 0) {
sheet.insertRule(`.vs${this._unThemedSelector}, .hc-light${this._unThemedSelector} {${lightCSS}}`, 0);
sheet.insertRule(`.vs${this._unThemedSelector}, .hc-light${this._unThemedSelector}`, lightCSS);
hasContent = true;
}
if (darkCSS.length > 0) {
sheet.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${darkCSS}}`, 0);
sheet.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector}`, darkCSS);
hasContent = true;
}
this._hasContent = hasContent;
@@ -562,6 +562,11 @@ export interface IEditorOptions {
* Defaults to true.
*/
occurrencesHighlight?: boolean;
/**
* Enable semantic occurrences highlight.
* Defaults to true.
*/
multiDocumentOccurrencesHighlight?: boolean;
/**
* Show code lens
* Defaults to true.
@@ -5116,6 +5121,7 @@ export const enum EditorOption {
multiCursorModifier,
multiCursorPaste,
multiCursorLimit,
multiDocumentOccurrencesHighlight,
occurrencesHighlight,
overviewRulerBorder,
overviewRulerLanes,
@@ -5616,6 +5622,10 @@ export const EditorOptions = {
EditorOption.occurrencesHighlight, 'occurrencesHighlight', true,
{ description: nls.localize('occurrencesHighlight', "Controls whether the editor should highlight semantic symbol occurrences.") }
)),
multiDocumentOccurrencesHighlight: register(new EditorBooleanOption(
EditorOption.multiDocumentOccurrencesHighlight, 'multiDocumentOccurrencesHighlight', false,
{ description: nls.localize('multiDocumentOccurrencesHighlight', "Experimental: Controls whether the editor should highlight word occurrences accross multiple open editors.") }
)),
overviewRulerBorder: register(new EditorBooleanOption(
EditorOption.overviewRulerBorder, 'overviewRulerBorder', true,
{ description: nls.localize('overviewRulerBorder', "Controls whether a border should be drawn around the overview ruler.") }
+11
View File
@@ -965,6 +965,17 @@ export interface DocumentHighlightProvider {
provideDocumentHighlights(model: model.ITextModel, position: Position, token: CancellationToken): ProviderResult<DocumentHighlight[]>;
}
export interface MultiDocumentHighlightProvider {
/**
* Provide a Map of URI --> document highlights, like all occurrences of a variable or
* all exit-points of a function.
*
* Used in cases such as split view, notebooks, etc. where there can be multiple documents
* with shared symbols.
*/
provideMultiDocumentHighlights(primaryModel: model.ITextModel, position: Position, otherModels: model.ITextModel[], token: CancellationToken): ProviderResult<Map<URI, DocumentHighlight[]>>;
}
/**
* The linked editing range provider interface defines the contract between extensions and
* the linked editing feature.
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { LanguageFeatureRegistry, NotebookInfoResolver } from 'vs/editor/common/languageFeatureRegistry';
import { CodeActionProvider, CodeLensProvider, CompletionItemProvider, DeclarationProvider, DefinitionProvider, DocumentColorProvider, DocumentFormattingEditProvider, DocumentHighlightProvider, DocumentOnDropEditProvider, DocumentPasteEditProvider, DocumentRangeFormattingEditProvider, DocumentRangeSemanticTokensProvider, DocumentSemanticTokensProvider, DocumentSymbolProvider, EvaluatableExpressionProvider, FoldingRangeProvider, HoverProvider, ImplementationProvider, InlayHintsProvider, InlineCompletionsProvider, InlineValuesProvider, LinkedEditingRangeProvider, LinkProvider, MappedEditsProvider, OnTypeFormattingEditProvider, ReferenceProvider, RenameProvider, SelectionRangeProvider, SignatureHelpProvider, TypeDefinitionProvider } from 'vs/editor/common/languages';
import { CodeActionProvider, CodeLensProvider, CompletionItemProvider, DeclarationProvider, DefinitionProvider, DocumentColorProvider, DocumentFormattingEditProvider, DocumentHighlightProvider, DocumentOnDropEditProvider, DocumentPasteEditProvider, DocumentRangeFormattingEditProvider, DocumentRangeSemanticTokensProvider, DocumentSemanticTokensProvider, DocumentSymbolProvider, EvaluatableExpressionProvider, FoldingRangeProvider, HoverProvider, ImplementationProvider, InlayHintsProvider, InlineCompletionsProvider, InlineValuesProvider, LinkedEditingRangeProvider, LinkProvider, MappedEditsProvider, MultiDocumentHighlightProvider, OnTypeFormattingEditProvider, ReferenceProvider, RenameProvider, SelectionRangeProvider, SignatureHelpProvider, TypeDefinitionProvider } from 'vs/editor/common/languages';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
export const ILanguageFeaturesService = createDecorator<ILanguageFeaturesService>('ILanguageFeaturesService');
@@ -49,6 +49,8 @@ export interface ILanguageFeaturesService {
readonly documentHighlightProvider: LanguageFeatureRegistry<DocumentHighlightProvider>;
readonly multiDocumentHighlightProvider: LanguageFeatureRegistry<MultiDocumentHighlightProvider>;
readonly documentRangeSemanticTokensProvider: LanguageFeatureRegistry<DocumentRangeSemanticTokensProvider>;
readonly documentSemanticTokensProvider: LanguageFeatureRegistry<DocumentSemanticTokensProvider>;
@@ -5,7 +5,7 @@
import { URI } from 'vs/base/common/uri';
import { LanguageFeatureRegistry, NotebookInfo, NotebookInfoResolver } from 'vs/editor/common/languageFeatureRegistry';
import { CodeActionProvider, CodeLensProvider, CompletionItemProvider, DocumentPasteEditProvider, DeclarationProvider, DefinitionProvider, DocumentColorProvider, DocumentFormattingEditProvider, DocumentHighlightProvider, DocumentOnDropEditProvider, DocumentRangeFormattingEditProvider, DocumentRangeSemanticTokensProvider, DocumentSemanticTokensProvider, DocumentSymbolProvider, EvaluatableExpressionProvider, FoldingRangeProvider, HoverProvider, ImplementationProvider, InlayHintsProvider, InlineCompletionsProvider, InlineValuesProvider, LinkedEditingRangeProvider, LinkProvider, OnTypeFormattingEditProvider, ReferenceProvider, RenameProvider, SelectionRangeProvider, SignatureHelpProvider, TypeDefinitionProvider, MappedEditsProvider } from 'vs/editor/common/languages';
import { CodeActionProvider, CodeLensProvider, CompletionItemProvider, DocumentPasteEditProvider, DeclarationProvider, DefinitionProvider, DocumentColorProvider, DocumentFormattingEditProvider, MultiDocumentHighlightProvider, DocumentHighlightProvider, DocumentOnDropEditProvider, DocumentRangeFormattingEditProvider, DocumentRangeSemanticTokensProvider, DocumentSemanticTokensProvider, DocumentSymbolProvider, EvaluatableExpressionProvider, FoldingRangeProvider, HoverProvider, ImplementationProvider, InlayHintsProvider, InlineCompletionsProvider, InlineValuesProvider, LinkedEditingRangeProvider, LinkProvider, OnTypeFormattingEditProvider, ReferenceProvider, RenameProvider, SelectionRangeProvider, SignatureHelpProvider, TypeDefinitionProvider, MappedEditsProvider } from 'vs/editor/common/languages';
import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures';
import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions';
@@ -30,6 +30,7 @@ export class LanguageFeaturesService implements ILanguageFeaturesService {
readonly signatureHelpProvider = new LanguageFeatureRegistry<SignatureHelpProvider>(this._score.bind(this));
readonly hoverProvider = new LanguageFeatureRegistry<HoverProvider>(this._score.bind(this));
readonly documentHighlightProvider = new LanguageFeatureRegistry<DocumentHighlightProvider>(this._score.bind(this));
readonly multiDocumentHighlightProvider = new LanguageFeatureRegistry<MultiDocumentHighlightProvider>(this._score.bind(this));
readonly selectionRangeProvider = new LanguageFeatureRegistry<SelectionRangeProvider>(this._score.bind(this));
readonly foldingRangeProvider = new LanguageFeatureRegistry<FoldingRangeProvider>(this._score.bind(this));
readonly linkProvider = new LanguageFeatureRegistry<LinkProvider>(this._score.bind(this));
@@ -253,74 +253,75 @@ export enum EditorOption {
multiCursorModifier = 77,
multiCursorPaste = 78,
multiCursorLimit = 79,
occurrencesHighlight = 80,
overviewRulerBorder = 81,
overviewRulerLanes = 82,
padding = 83,
pasteAs = 84,
parameterHints = 85,
peekWidgetDefaultFocus = 86,
definitionLinkOpensInPeek = 87,
quickSuggestions = 88,
quickSuggestionsDelay = 89,
readOnly = 90,
readOnlyMessage = 91,
renameOnType = 92,
renderControlCharacters = 93,
renderFinalNewline = 94,
renderLineHighlight = 95,
renderLineHighlightOnlyWhenFocus = 96,
renderValidationDecorations = 97,
renderWhitespace = 98,
revealHorizontalRightPadding = 99,
roundedSelection = 100,
rulers = 101,
scrollbar = 102,
scrollBeyondLastColumn = 103,
scrollBeyondLastLine = 104,
scrollPredominantAxis = 105,
selectionClipboard = 106,
selectionHighlight = 107,
selectOnLineNumbers = 108,
showFoldingControls = 109,
showUnused = 110,
snippetSuggestions = 111,
smartSelect = 112,
smoothScrolling = 113,
stickyScroll = 114,
stickyTabStops = 115,
stopRenderingLineAfter = 116,
suggest = 117,
suggestFontSize = 118,
suggestLineHeight = 119,
suggestOnTriggerCharacters = 120,
suggestSelection = 121,
tabCompletion = 122,
tabIndex = 123,
unicodeHighlighting = 124,
unusualLineTerminators = 125,
useShadowDOM = 126,
useTabStops = 127,
wordBreak = 128,
wordSeparators = 129,
wordWrap = 130,
wordWrapBreakAfterCharacters = 131,
wordWrapBreakBeforeCharacters = 132,
wordWrapColumn = 133,
wordWrapOverride1 = 134,
wordWrapOverride2 = 135,
wrappingIndent = 136,
wrappingStrategy = 137,
showDeprecated = 138,
inlayHints = 139,
editorClassName = 140,
pixelRatio = 141,
tabFocusMode = 142,
layoutInfo = 143,
wrappingInfo = 144,
defaultColorDecorators = 145,
colorDecoratorsActivatedOn = 146,
inlineCompletionsAccessibilityVerbose = 147
multiDocumentOccurrencesHighlight = 80,
occurrencesHighlight = 81,
overviewRulerBorder = 82,
overviewRulerLanes = 83,
padding = 84,
pasteAs = 85,
parameterHints = 86,
peekWidgetDefaultFocus = 87,
definitionLinkOpensInPeek = 88,
quickSuggestions = 89,
quickSuggestionsDelay = 90,
readOnly = 91,
readOnlyMessage = 92,
renameOnType = 93,
renderControlCharacters = 94,
renderFinalNewline = 95,
renderLineHighlight = 96,
renderLineHighlightOnlyWhenFocus = 97,
renderValidationDecorations = 98,
renderWhitespace = 99,
revealHorizontalRightPadding = 100,
roundedSelection = 101,
rulers = 102,
scrollbar = 103,
scrollBeyondLastColumn = 104,
scrollBeyondLastLine = 105,
scrollPredominantAxis = 106,
selectionClipboard = 107,
selectionHighlight = 108,
selectOnLineNumbers = 109,
showFoldingControls = 110,
showUnused = 111,
snippetSuggestions = 112,
smartSelect = 113,
smoothScrolling = 114,
stickyScroll = 115,
stickyTabStops = 116,
stopRenderingLineAfter = 117,
suggest = 118,
suggestFontSize = 119,
suggestLineHeight = 120,
suggestOnTriggerCharacters = 121,
suggestSelection = 122,
tabCompletion = 123,
tabIndex = 124,
unicodeHighlighting = 125,
unusualLineTerminators = 126,
useShadowDOM = 127,
useTabStops = 128,
wordBreak = 129,
wordSeparators = 130,
wordWrap = 131,
wordWrapBreakAfterCharacters = 132,
wordWrapBreakBeforeCharacters = 133,
wordWrapColumn = 134,
wordWrapOverride1 = 135,
wordWrapOverride2 = 136,
wrappingIndent = 137,
wrappingStrategy = 138,
showDeprecated = 139,
inlayHints = 140,
editorClassName = 141,
pixelRatio = 142,
tabFocusMode = 143,
layoutInfo = 144,
wrappingInfo = 145,
defaultColorDecorators = 146,
colorDecoratorsActivatedOn = 147,
inlineCompletionsAccessibilityVerbose = 148
}
/**
@@ -491,7 +491,12 @@ export class ViewModel extends Disposable implements IViewModel {
this.viewLayout.onFlushed(this.getLineCount());
this.viewLayout.onHeightMaybeChanged();
}
stableViewport.recoverViewportStart(this.coordinatesConverter, this.viewLayout);
const firstModelLineInViewPort = stableViewport.viewportStartModelPosition?.lineNumber;
const firstModelLineIsHidden = firstModelLineInViewPort && mergedRanges.some(range => range.startLineNumber <= firstModelLineInViewPort && firstModelLineInViewPort <= range.endLineNumber);
if (!firstModelLineIsHidden) {
stableViewport.recoverViewportStart(this.coordinatesConverter, this.viewLayout);
}
} finally {
this._eventDispatcher.endEmitViewEvents();
}
@@ -105,7 +105,8 @@ export async function formatDocumentRangesWithSelectedProvider(
rangeOrRanges: Range | Range[],
mode: FormattingMode,
progress: IProgress<DocumentRangeFormattingEditProvider>,
token: CancellationToken
token: CancellationToken,
userGesture: boolean
): Promise<void> {
const instaService = accessor.get(IInstantiationService);
@@ -115,7 +116,7 @@ export async function formatDocumentRangesWithSelectedProvider(
const selected = await FormattingConflicts.select(provider, model, mode);
if (selected) {
progress.report(selected);
await instaService.invokeFunction(formatDocumentRangesWithProvider, selected, editorOrModel, rangeOrRanges, token);
await instaService.invokeFunction(formatDocumentRangesWithProvider, selected, editorOrModel, rangeOrRanges, token, userGesture);
}
}
@@ -124,10 +125,12 @@ export async function formatDocumentRangesWithProvider(
provider: DocumentRangeFormattingEditProvider,
editorOrModel: ITextModel | IActiveCodeEditor,
rangeOrRanges: Range | Range[],
token: CancellationToken
token: CancellationToken,
userGesture: boolean
): Promise<boolean> {
const workerService = accessor.get(IEditorWorkerService);
const logService = accessor.get(ILogService);
const accessibleNotificationService = accessor.get(IAccessibleNotificationService);
let model: ITextModel;
let cts: CancellationTokenSource;
@@ -271,7 +274,7 @@ export async function formatDocumentRangesWithProvider(
return null;
});
}
accessibleNotificationService.notify(AccessibleNotificationEvent.Format, userGesture);
return true;
}
@@ -21,6 +21,7 @@ import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeat
import { formatDocumentRangesWithSelectedProvider, formatDocumentWithSelectedProvider, FormattingMode, getOnTypeFormattingEdits } from 'vs/editor/contrib/format/browser/format';
import { FormattingEdit } from 'vs/editor/contrib/format/browser/formattingEdit';
import * as nls from 'vs/nls';
import { AccessibleNotificationEvent, IAccessibleNotificationService } from 'vs/platform/accessibility/common/accessibility';
import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands';
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
@@ -38,7 +39,8 @@ export class FormatOnType implements IEditorContribution {
constructor(
private readonly _editor: ICodeEditor,
@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,
@IEditorWorkerService private readonly _workerService: IEditorWorkerService
@IEditorWorkerService private readonly _workerService: IEditorWorkerService,
@IAccessibleNotificationService private readonly _accessibleNotificationService: IAccessibleNotificationService
) {
this._disposables.add(_languageFeaturesService.onTypeFormattingEditProvider.onDidChange(this._update, this));
this._disposables.add(_editor.onDidChangeModel(() => this._update()));
@@ -141,6 +143,7 @@ export class FormatOnType implements IEditorContribution {
return;
}
if (isNonEmptyArray(edits)) {
this._accessibleNotificationService.notify(AccessibleNotificationEvent.Format, false);
FormattingEdit.execute(this._editor, edits, true);
}
}).finally(() => {
@@ -202,7 +205,7 @@ class FormatOnPaste implements IEditorContribution {
if (this.editor.getSelections().length > 1) {
return;
}
this._instantiationService.invokeFunction(formatDocumentRangesWithSelectedProvider, this.editor, range, FormattingMode.Silent, Progress.None, CancellationToken.None).catch(onUnexpectedError);
this._instantiationService.invokeFunction(formatDocumentRangesWithSelectedProvider, this.editor, range, FormattingMode.Silent, Progress.None, CancellationToken.None, false).catch(onUnexpectedError);
}
}
@@ -275,7 +278,7 @@ class FormatSelectionAction extends EditorAction {
const progressService = accessor.get(IEditorProgressService);
await progressService.showWhile(
instaService.invokeFunction(formatDocumentRangesWithSelectedProvider, editor, ranges, FormattingMode.Explicit, Progress.None, CancellationToken.None),
instaService.invokeFunction(formatDocumentRangesWithSelectedProvider, editor, ranges, FormattingMode.Explicit, Progress.None, CancellationToken.None, true),
250
);
}
+12 -6
View File
@@ -83,14 +83,13 @@ export class ModesHoverController extends Disposable implements IEditorContribut
this._hookEvents();
}
}));
this._register(this._editor.onMouseLeave(() => {
this._mouseMoveEvent = undefined;
this._reactToEditorMouseMoveRunner.cancel();
}));
}
private _hookEvents(): void {
const hideWidgetsEventHandler = () => this._hideWidgets();
const hideWidgetsCancelSchedulerEventHandler = () => {
this._cancelScheduler();
this._hideWidgets();
};
const hoverOpts = this._editor.getOption(EditorOption.hover);
this._isHoverEnabled = hoverOpts.enabled;
@@ -107,10 +106,16 @@ export class ModesHoverController extends Disposable implements IEditorContribut
}
this._toUnhook.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e)));
this._toUnhook.add(this._editor.onDidChangeModel(hideWidgetsEventHandler));
this._toUnhook.add(this._editor.onDidChangeModel(hideWidgetsCancelSchedulerEventHandler));
this._toUnhook.add(this._editor.onDidChangeModelContent(hideWidgetsCancelSchedulerEventHandler));
this._toUnhook.add(this._editor.onDidScrollChange((e: IScrollEvent) => this._onEditorScrollChanged(e)));
}
private _cancelScheduler() {
this._mouseMoveEvent = undefined;
this._reactToEditorMouseMoveRunner.cancel();
}
private _unhookEvents(): void {
this._toUnhook.clear();
}
@@ -150,6 +155,7 @@ export class ModesHoverController extends Disposable implements IEditorContribut
}
private _onEditorMouseLeave(mouseEvent: IPartialEditorMouseEvent): void {
this._cancelScheduler();
const targetEm = (mouseEvent.event.browserEvent.relatedTarget) as HTMLElement;
if (this._contentWidget?.widget.isResizing || this._contentWidget?.containsNode(targetEm)) {
// When the content widget is resizing
@@ -3,38 +3,39 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { alert } from 'vs/base/browser/ui/aria/aria';
import * as nls from 'vs/nls';
import * as arrays from 'vs/base/common/arrays';
import { alert } from 'vs/base/browser/ui/aria/aria';
import { CancelablePromise, createCancelablePromise, first, timeout } from 'vs/base/common/async';
import { CancellationToken } from 'vs/base/common/cancellation';
import { onUnexpectedError, onUnexpectedExternalError } from 'vs/base/common/errors';
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import { Disposable, DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
import { IActiveCodeEditor, ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { Disposable, DisposableStore } from 'vs/base/common/lifecycle';
import { IActiveCodeEditor, ICodeEditor, isDiffEditor } from 'vs/editor/browser/editorBrowser';
import { EditorAction, EditorContributionInstantiation, IActionOptions, registerEditorAction, registerEditorContribution, registerModelAndPositionCommand } from 'vs/editor/browser/editorExtensions';
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
import { EditorOption } from 'vs/editor/common/config/editorOptions';
import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/cursorEvents';
import { Position } from 'vs/editor/common/core/position';
import { Range } from 'vs/editor/common/core/range';
import { Selection } from 'vs/editor/common/core/selection';
import { IEditorContribution, IEditorDecorationsCollection } from 'vs/editor/common/editorCommon';
import { IWordAtPosition } from 'vs/editor/common/core/wordHelper';
import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/cursorEvents';
import { IDiffEditor, IEditorContribution, IEditorDecorationsCollection } from 'vs/editor/common/editorCommon';
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
import { LanguageFeatureRegistry } from 'vs/editor/common/languageFeatureRegistry';
import { DocumentHighlight, DocumentHighlightKind, DocumentHighlightProvider, MultiDocumentHighlightProvider } from 'vs/editor/common/languages';
import { IModelDeltaDecoration, ITextModel } from 'vs/editor/common/model';
import { DocumentHighlight, DocumentHighlightKind, DocumentHighlightProvider } from 'vs/editor/common/languages';
import * as nls from 'vs/nls';
import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures';
import { getHighlightDecorationOptions } from 'vs/editor/contrib/wordHighlighter/browser/highlightDecorations';
import { IContextKey, IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { IWordAtPosition } from 'vs/editor/common/core/wordHelper';
import { LanguageFeatureRegistry } from 'vs/editor/common/languageFeatureRegistry';
import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures';
import { getHighlightDecorationOptions } from 'vs/editor/contrib/wordHighlighter/browser/highlightDecorations';
import { Iterable } from 'vs/base/common/iterator';
import { Schemas } from 'vs/base/common/network';
import { ResourceMap } from 'vs/base/common/map';
const ctxHasWordHighlights = new RawContextKey<boolean>('hasWordHighlights', false);
export function getOccurrencesAtPosition(registry: LanguageFeatureRegistry<DocumentHighlightProvider>, model: ITextModel, position: Position, token: CancellationToken): Promise<DocumentHighlight[] | null | undefined> {
export function getOccurrencesAtPosition(registry: LanguageFeatureRegistry<DocumentHighlightProvider>, model: ITextModel, position: Position, token: CancellationToken): Promise<ResourceMap<DocumentHighlight[]> | null | undefined> {
const orderedByScore = registry.ordered(model);
// in order of score ask the occurrences provider
@@ -43,19 +44,46 @@ export function getOccurrencesAtPosition(registry: LanguageFeatureRegistry<Docum
return first<DocumentHighlight[] | null | undefined>(orderedByScore.map(provider => () => {
return Promise.resolve(provider.provideDocumentHighlights(model, position, token))
.then(undefined, onUnexpectedExternalError);
}), arrays.isNonEmptyArray);
}), arrays.isNonEmptyArray).then(result => {
if (result) {
const map = new ResourceMap<DocumentHighlight[]>();
map.set(model.uri, result);
return map;
}
return new ResourceMap<DocumentHighlight[]>();
});
}
export function getOccurrencesAcrossMultipleModels(registry: LanguageFeatureRegistry<MultiDocumentHighlightProvider>, model: ITextModel, position: Position, wordSeparators: string, token: CancellationToken, otherModels: ITextModel[]): Promise<ResourceMap<DocumentHighlight[]> | null | undefined> {
const orderedByScore = registry.ordered(model);
// in order of score ask the occurrences provider
// until someone response with a good result
// (good = none empty array)
return first<ResourceMap<DocumentHighlight[]> | null | undefined>(orderedByScore.map(provider => () => {
return Promise.resolve(provider.provideMultiDocumentHighlights(model, position, otherModels, token))
.then(undefined, onUnexpectedExternalError);
}), (t: ResourceMap<DocumentHighlight[]> | null | undefined): t is ResourceMap<DocumentHighlight[]> => t instanceof Map && t.size > 0);
}
interface IOccurenceAtPositionRequest {
readonly result: Promise<DocumentHighlight[]>;
readonly result: Promise<ResourceMap<DocumentHighlight[]>>;
isValid(model: ITextModel, selection: Selection, decorations: IEditorDecorationsCollection): boolean;
cancel(): void;
}
interface IWordHighlighterQuery {
modelInfo: {
model: ITextModel;
selection: Selection;
} | null;
readonly word: IWordAtPosition | null;
}
abstract class OccurenceAtPositionRequest implements IOccurenceAtPositionRequest {
private readonly _wordRange: Range | null;
private _result: CancelablePromise<DocumentHighlight[]> | null;
private _result: CancelablePromise<ResourceMap<DocumentHighlight[]>> | null;
constructor(private readonly _model: ITextModel, private readonly _selection: Selection, private readonly _wordSeparators: string) {
this._wordRange = this._getCurrentWordRange(_model, _selection);
@@ -67,10 +95,9 @@ abstract class OccurenceAtPositionRequest implements IOccurenceAtPositionRequest
this._result = createCancelablePromise(token => this._compute(this._model, this._selection, this._wordSeparators, token));
}
return this._result;
}
protected abstract _compute(model: ITextModel, selection: Selection, wordSeparators: string, token: CancellationToken): Promise<DocumentHighlight[]>;
protected abstract _compute(model: ITextModel, selection: Selection, wordSeparators: string, token: CancellationToken): Promise<ResourceMap<DocumentHighlight[]>>;
private _getCurrentWordRange(model: ITextModel, selection: Selection): Range | null {
const word = model.getWordAtPosition(selection.getPosition());
@@ -117,38 +144,82 @@ class SemanticOccurenceAtPositionRequest extends OccurenceAtPositionRequest {
this._providers = providers;
}
protected _compute(model: ITextModel, selection: Selection, wordSeparators: string, token: CancellationToken): Promise<DocumentHighlight[]> {
return getOccurrencesAtPosition(this._providers, model, selection.getPosition(), token).then(value => value || []);
protected _compute(model: ITextModel, selection: Selection, wordSeparators: string, token: CancellationToken): Promise<ResourceMap<DocumentHighlight[]>> {
return getOccurrencesAtPosition(this._providers, model, selection.getPosition(), token).then(value => {
if (!value) {
return new ResourceMap<DocumentHighlight[]>();
}
return value;
});
}
}
class TextualOccurenceAtPositionRequest extends OccurenceAtPositionRequest {
class MultiModelOccurenceRequest extends OccurenceAtPositionRequest {
private readonly _providers: LanguageFeatureRegistry<MultiDocumentHighlightProvider>;
private readonly _otherModels: ITextModel[];
private readonly _selectionIsEmpty: boolean;
constructor(model: ITextModel, selection: Selection, wordSeparators: string) {
constructor(model: ITextModel, selection: Selection, wordSeparators: string, providers: LanguageFeatureRegistry<MultiDocumentHighlightProvider>, otherModels: ITextModel[]) {
super(model, selection, wordSeparators);
this._selectionIsEmpty = selection.isEmpty();
this._providers = providers;
this._otherModels = otherModels;
}
protected _compute(model: ITextModel, selection: Selection, wordSeparators: string, token: CancellationToken): Promise<DocumentHighlight[]> {
protected override _compute(model: ITextModel, selection: Selection, wordSeparators: string, token: CancellationToken): Promise<ResourceMap<DocumentHighlight[]>> {
return getOccurrencesAcrossMultipleModels(this._providers, model, selection.getPosition(), wordSeparators, token, this._otherModels).then(value => {
if (!value) {
return new ResourceMap<DocumentHighlight[]>();
}
return value;
});
}
}
class TextualOccurenceRequest extends OccurenceAtPositionRequest {
private readonly _otherModels: ITextModel[];
private readonly _selectionIsEmpty: boolean;
private readonly _word: IWordAtPosition | null;
constructor(model: ITextModel, selection: Selection, word: IWordAtPosition | null, wordSeparators: string, otherModels: ITextModel[]) {
super(model, selection, wordSeparators);
this._otherModels = otherModels;
this._selectionIsEmpty = selection.isEmpty();
this._word = word;
}
protected _compute(model: ITextModel, selection: Selection, wordSeparators: string, token: CancellationToken): Promise<ResourceMap<DocumentHighlight[]>> {
return timeout(250, token).then(() => {
if (!selection.isEmpty()) {
return [];
const result = new ResourceMap<DocumentHighlight[]>();
let wordResult;
if (this._word) {
wordResult = this._word;
} else {
wordResult = model.getWordAtPosition(selection.getPosition());
}
const word = model.getWordAtPosition(selection.getPosition());
if (!word || word.word.length > 1000) {
return [];
if (!wordResult) {
return new ResourceMap<DocumentHighlight[]>();
}
const matches = model.findMatches(word.word, true, false, true, wordSeparators, false);
return matches.map(m => {
return {
const allModels = [model, ...this._otherModels];
for (const otherModel of allModels) {
if (otherModel.isDisposed()) {
continue;
}
const matches = otherModel.findMatches(wordResult.word, true, false, true, wordSeparators, false);
const highlights = matches.map(m => ({
range: m.range,
kind: DocumentHighlightKind.Text
};
});
}));
if (highlights) {
result.set(otherModel.uri, highlights);
}
}
return result;
});
}
@@ -161,11 +232,18 @@ class TextualOccurenceAtPositionRequest extends OccurenceAtPositionRequest {
}
}
function computeOccurencesAtPosition(registry: LanguageFeatureRegistry<DocumentHighlightProvider>, model: ITextModel, selection: Selection, wordSeparators: string): IOccurenceAtPositionRequest {
function computeOccurencesAtPosition(registry: LanguageFeatureRegistry<DocumentHighlightProvider>, model: ITextModel, selection: Selection, word: IWordAtPosition | null, wordSeparators: string): IOccurenceAtPositionRequest {
if (registry.has(model)) {
return new SemanticOccurenceAtPositionRequest(model, selection, wordSeparators, registry);
}
return new TextualOccurenceAtPositionRequest(model, selection, wordSeparators);
return new TextualOccurenceRequest(model, selection, word, wordSeparators, []);
}
function computeOccurencesMultiModel(registry: LanguageFeatureRegistry<MultiDocumentHighlightProvider>, model: ITextModel, selection: Selection, word: IWordAtPosition | null, wordSeparators: string, otherModels: ITextModel[]): IOccurenceAtPositionRequest {
if (registry.has(model)) {
return new MultiModelOccurenceRequest(model, selection, wordSeparators, registry, otherModels);
}
return new TextualOccurenceRequest(model, selection, word, wordSeparators, otherModels);
}
registerModelAndPositionCommand('_executeDocumentHighlights', (accessor, model, position) => {
@@ -177,15 +255,18 @@ class WordHighlighter {
private readonly editor: IActiveCodeEditor;
private readonly providers: LanguageFeatureRegistry<DocumentHighlightProvider>;
private readonly multiDocumentProviders: LanguageFeatureRegistry<MultiDocumentHighlightProvider>;
private occurrencesHighlight: boolean;
private multiDocumentOccurrencesHighlight: boolean;
private readonly model: ITextModel;
private readonly decorations: IEditorDecorationsCollection;
private readonly toUnhook = new DisposableStore();
private readonly codeEditorService: ICodeEditorService;
private workerRequestTokenId: number = 0;
private workerRequest: IOccurenceAtPositionRequest | null;
private workerRequestCompleted: boolean = false;
private workerRequestValue: DocumentHighlight[] = [];
private workerRequestValue: ResourceMap<DocumentHighlight[]> = new ResourceMap();
private lastCursorPositionChangeTime: number = 0;
private renderDecorationsTimer: any = -1;
@@ -193,18 +274,20 @@ class WordHighlighter {
private readonly _hasWordHighlights: IContextKey<boolean>;
private _ignorePositionChangeEvent: boolean;
private readonly linkedHighlighters: () => Iterable<WordHighlighter | null>;
private static storedDecorations: ResourceMap<string[]> = new ResourceMap();
private static query: IWordHighlighterQuery | null = null;
constructor(editor: IActiveCodeEditor, providers: LanguageFeatureRegistry<DocumentHighlightProvider>, linkedHighlighters: () => Iterable<WordHighlighter | null>, contextKeyService: IContextKeyService) {
constructor(editor: IActiveCodeEditor, providers: LanguageFeatureRegistry<DocumentHighlightProvider>, multiProviders: LanguageFeatureRegistry<MultiDocumentHighlightProvider>, contextKeyService: IContextKeyService, @ICodeEditorService codeEditorService: ICodeEditorService) {
this.editor = editor;
this.providers = providers;
this.linkedHighlighters = linkedHighlighters;
this.multiDocumentProviders = multiProviders;
this.codeEditorService = codeEditorService;
this._hasWordHighlights = ctxHasWordHighlights.bindTo(contextKeyService);
this._ignorePositionChangeEvent = false;
this.occurrencesHighlight = this.editor.getOption(EditorOption.occurrencesHighlight);
this.multiDocumentOccurrencesHighlight = this.editor.getOption(EditorOption.multiDocumentOccurrencesHighlight);
this.model = this.editor.getModel();
this.toUnhook.add(editor.onDidChangeCursorPosition((e: ICursorPositionChangedEvent) => {
if (this._ignorePositionChangeEvent) {
// We are changing the position => ignore this event
return;
@@ -221,12 +304,27 @@ class WordHighlighter {
this.toUnhook.add(editor.onDidChangeModelContent((e) => {
this._stopAll();
}));
this.toUnhook.add(editor.onDidChangeModel((e) => {
if (!e.newModelUrl && e.oldModelUrl) {
this._stopSingular();
} else {
if (WordHighlighter.query) {
this._run();
}
}
}));
this.toUnhook.add(editor.onDidChangeConfiguration((e) => {
const newValue = this.editor.getOption(EditorOption.occurrencesHighlight);
if (this.occurrencesHighlight !== newValue) {
this.occurrencesHighlight = newValue;
this._stopAll();
}
const newMultiDocumentValue = this.editor.getOption(EditorOption.multiDocumentOccurrencesHighlight);
if (this.multiDocumentOccurrencesHighlight !== newMultiDocumentValue) {
this.multiDocumentOccurrencesHighlight = newMultiDocumentValue;
this._stopAll();
}
}));
this.decorations = this.editor.createDecorationsCollection();
@@ -236,6 +334,11 @@ class WordHighlighter {
this.lastCursorPositionChangeTime = 0;
this.renderDecorationsTimer = -1;
// if there is a query already, highlight off that query
if (WordHighlighter.query) {
this._run();
}
}
public hasDecorations(): boolean {
@@ -302,17 +405,91 @@ class WordHighlighter {
}
}
private _removeDecorations(): void {
private _removeSingleDecorations(): void {
// return if no model
if (!this.editor.hasModel()) {
return;
}
const currentDecorationIDs = WordHighlighter.storedDecorations.get(this.editor.getModel().uri);
if (!currentDecorationIDs) {
return;
}
this.editor.removeDecorations(currentDecorationIDs);
WordHighlighter.storedDecorations.delete(this.editor.getModel().uri);
if (this.decorations.length > 0) {
// remove decorations
this.decorations.clear();
this._hasWordHighlights.set(false);
}
}
private _removeAllDecorations(): void {
const currentEditors = this.codeEditorService.listCodeEditors();
// iterate over editors and store models in currentModels
for (const editor of currentEditors) {
if (!editor.hasModel()) {
continue;
}
const currentDecorationIDs = WordHighlighter.storedDecorations.get(editor.getModel().uri);
if (!currentDecorationIDs) {
continue;
}
editor.removeDecorations(currentDecorationIDs);
WordHighlighter.storedDecorations.delete(editor.getModel().uri);
const editorHighlighterContrib = WordHighlighterContribution.get(editor);
if (!editorHighlighterContrib?.wordHighlighter) {
continue;
}
if (editorHighlighterContrib.wordHighlighter.decorations.length > 0) {
editorHighlighterContrib.wordHighlighter.decorations.clear();
editorHighlighterContrib.wordHighlighter._hasWordHighlights.set(false);
}
}
}
private _stopSingular(): void {
// Remove any existing decorations + a possible query, and re - run to update decorations
this._removeSingleDecorations();
if (this.editor.hasWidgetFocus()) {
if (this.editor.getModel()?.uri.scheme !== Schemas.vscodeNotebookCell && WordHighlighter.query?.modelInfo?.model.uri.scheme !== Schemas.vscodeNotebookCell) { // clear query if focused non-nb editor
WordHighlighter.query = null;
this._run();
} else { // remove modelInfo to account for nb cell being disposed
if (WordHighlighter.query?.modelInfo) {
WordHighlighter.query.modelInfo = null;
}
}
}
// Cancel any renderDecorationsTimer
if (this.renderDecorationsTimer !== -1) {
clearTimeout(this.renderDecorationsTimer);
this.renderDecorationsTimer = -1;
}
// Cancel any worker request
if (this.workerRequest !== null) {
this.workerRequest.cancel();
this.workerRequest = null;
}
// Invalidate any worker request callback
if (!this.workerRequestCompleted) {
this.workerRequestTokenId++;
this.workerRequestCompleted = true;
}
}
private _stopAll(): void {
// Remove any existing decorations
this._removeDecorations();
this._removeAllDecorations();
// Cancel any renderDecorationsTimer
if (this.renderDecorationsTimer !== -1) {
@@ -342,7 +519,8 @@ class WordHighlighter {
}
// ignore typing & other
if (e.reason !== CursorChangeReason.Explicit) {
// need to check if the model is a notebook cell, should not stop if nb
if (e.reason !== CursorChangeReason.Explicit && this.editor.getModel()?.uri.scheme !== Schemas.vscodeNotebookCell) {
this._stopAll();
return;
}
@@ -361,33 +539,107 @@ class WordHighlighter {
});
}
private getOtherModelsToHighlight(model: ITextModel): ITextModel[] {
if (!model) {
return [];
}
// notebook case
const isNotebookEditor = model.uri.scheme === Schemas.vscodeNotebookCell;
if (isNotebookEditor) {
const currentModels: ITextModel[] = [];
const currentEditors = this.codeEditorService.listCodeEditors();
for (const editor of currentEditors) {
const tempModel = editor.getModel();
if (tempModel && tempModel !== model && tempModel.uri.scheme === Schemas.vscodeNotebookCell) {
currentModels.push(tempModel);
}
}
return currentModels;
}
// inline case
// ? current works when highlighting outside of an inline diff, highlighting in.
// ? broken when highlighting within a diff editor. highlighting the main editor does not work
// ? editor group service could be useful here
const currentModels: ITextModel[] = [];
const currentEditors = this.codeEditorService.listCodeEditors();
for (const editor of currentEditors) {
if (!isDiffEditor(editor)) {
continue;
}
const diffModel = (editor as IDiffEditor).getModel();
if (!diffModel) {
continue;
}
if (model === diffModel.modified) { // embedded inline chat diff would pass this, allowing highlights
//? currentModels.push(diffModel.original);
currentModels.push(diffModel.modified);
}
}
if (currentModels.length) { // no matching editors have been found
return currentModels;
}
// multi-doc OFF
if (!this.multiDocumentOccurrencesHighlight) {
return [];
}
// multi-doc ON
for (const editor of currentEditors) {
const tempModel = editor.getModel();
if (tempModel && tempModel !== model) {
currentModels.push(tempModel);
}
}
return currentModels;
}
private _run(): void {
const editorSelection = this.editor.getSelection();
// ignore multiline selection
if (editorSelection.startLineNumber !== editorSelection.endLineNumber) {
this._stopAll();
return;
let workerRequestIsValid;
if (!this.editor.hasWidgetFocus()) { // no focus (new nb cell, etc)
if (WordHighlighter.query === null) {
// no previous query, nothing to highlight
return;
}
} else {
const editorSelection = this.editor.getSelection();
// ignore multiline selection
if (!editorSelection || editorSelection.startLineNumber !== editorSelection.endLineNumber) {
this._stopAll();
return;
}
const startColumn = editorSelection.startColumn;
const endColumn = editorSelection.endColumn;
const word = this._getWord();
// The selection must be inside a word or surround one word at most
if (!word || word.startColumn > startColumn || word.endColumn < endColumn) {
// no previous query, nothing to highlight
this._stopAll();
return;
}
// All the effort below is trying to achieve this:
// - when cursor is moved to a word, trigger immediately a findOccurrences request
// - 250ms later after the last cursor move event, render the occurrences
// - no flickering!
workerRequestIsValid = (this.workerRequest && this.workerRequest.isValid(this.model, editorSelection, this.decorations));
WordHighlighter.query = {
modelInfo: {
model: this.model,
selection: editorSelection,
},
word: word
};
}
const startColumn = editorSelection.startColumn;
const endColumn = editorSelection.endColumn;
const word = this._getWord();
// The selection must be inside a word or surround one word at most
if (!word || word.startColumn > startColumn || word.endColumn < endColumn) {
this._stopAll();
return;
}
// All the effort below is trying to achieve this:
// - when cursor is moved to a word, trigger immediately a findOccurrences request
// - 250ms later after the last cursor move event, render the occurrences
// - no flickering!
const workerRequestIsValid = (this.workerRequest && this.workerRequest.isValid(this.model, editorSelection, this.decorations));
// There are 4 cases:
// a) old workerRequest is valid & completed, renderDecorationsTimer fired
// b) old workerRequest is valid & completed, renderDecorationsTimer not fired
@@ -415,9 +667,23 @@ class WordHighlighter {
const myRequestId = ++this.workerRequestTokenId;
this.workerRequestCompleted = false;
this.workerRequest = computeOccurencesAtPosition(this.providers, this.model, this.editor.getSelection(), this.editor.getOption(EditorOption.wordSeparators));
const otherModelsToHighlight = this.getOtherModelsToHighlight(this.editor.getModel());
this.workerRequest.result.then(data => {
// 2 cases where we want to send the word
// a) there is no stored query model, but there is a word. This signals the editor that drove the highlight is disposed (cell out of viewport, etc)
// b) the queried model is not the current model. This signals that the editor that drove the highlight is still in the viewport, but we are highlighting a different cell
// otherwise, we send null in place of the word, and the model and selection are used to compute the word
const sendWord = (!WordHighlighter.query.modelInfo && WordHighlighter.query.word) ||
(WordHighlighter.query.modelInfo?.model.uri !== this.model.uri)
? true : false;
if (!WordHighlighter.query.modelInfo || (WordHighlighter.query.modelInfo.model.uri !== this.model.uri)) { // use this.model
this.workerRequest = this.computeWithModel(this.model, this.editor.getSelection(), sendWord ? WordHighlighter.query.word : null, otherModelsToHighlight);
} else { // use stored query model + selection
this.workerRequest = this.computeWithModel(WordHighlighter.query.modelInfo.model, WordHighlighter.query.modelInfo.selection, WordHighlighter.query.word, otherModelsToHighlight);
}
this.workerRequest?.result.then(data => {
if (myRequestId === this.workerRequestTokenId) {
this.workerRequestCompleted = true;
this.workerRequestValue = data || [];
@@ -427,6 +693,14 @@ class WordHighlighter {
}
}
private computeWithModel(model: ITextModel, selection: Selection, word: IWordAtPosition | null, otherModels: ITextModel[]): IOccurenceAtPositionRequest | null {
if (!otherModels.length) {
return computeOccurencesAtPosition(this.providers, model, selection, word, this.editor.getOption(EditorOption.wordSeparators));
} else {
return computeOccurencesMultiModel(this.multiDocumentProviders, model, selection, word, this.editor.getOption(EditorOption.wordSeparators), otherModels);
}
}
private _beginRenderDecorations(): void {
const currentTime = (new Date()).getTime();
const minimumRenderTime = this.lastCursorPositionChangeTime + 250;
@@ -445,31 +719,46 @@ class WordHighlighter {
private renderDecorations(): void {
this.renderDecorationsTimer = -1;
const decorations: IModelDeltaDecoration[] = [];
for (const info of this.workerRequestValue) {
if (info.range) {
decorations.push({
range: info.range,
options: getHighlightDecorationOptions(info.kind)
});
// create new loop, iterate over current editors using this.codeEditorService.listCodeEditors(),
// if the URI of that codeEditor is in the map, then add the decorations to the decorations array
// then set the decorations for the editor
const currentEditors = this.codeEditorService.listCodeEditors();
for (const editor of currentEditors) {
const editorHighlighterContrib = WordHighlighterContribution.get(editor);
if (!editorHighlighterContrib) {
continue;
}
}
this.decorations.set(decorations);
this._hasWordHighlights.set(this.hasDecorations());
const newDecorations: IModelDeltaDecoration[] = [];
const uri = editor.getModel()?.uri;
if (uri && this.workerRequestValue.has(uri)) {
const oldDecorationIDs: string[] | undefined = WordHighlighter.storedDecorations.get(uri);
const newDocumentHighlights = this.workerRequestValue.get(uri);
if (newDocumentHighlights) {
for (const highlight of newDocumentHighlights) {
newDecorations.push({
range: highlight.range,
options: getHighlightDecorationOptions(highlight.kind)
});
}
}
// update decorators of friends
for (const other of this.linkedHighlighters()) {
if (other?.editor.getModel() === this.editor.getModel()) {
other._stopAll();
other.decorations.set(decorations);
other._hasWordHighlights.set(other.hasDecorations());
let newDecorationIDs: string[] = [];
editor.changeDecorations((changeAccessor) => {
newDecorationIDs = changeAccessor.deltaDecorations(oldDecorationIDs ?? [], newDecorations);
});
WordHighlighter.storedDecorations = WordHighlighter.storedDecorations.set(uri, newDecorationIDs);
if (newDecorations.length > 0) {
editorHighlighterContrib.wordHighlighter?.decorations.set(newDecorations);
editorHighlighterContrib.wordHighlighter?._hasWordHighlights.set(true);
}
}
}
}
public dispose(): void {
this._stopAll();
this._stopSingular();
this.toUnhook.dispose();
}
}
@@ -482,70 +771,59 @@ export class WordHighlighterContribution extends Disposable implements IEditorCo
return editor.getContribution<WordHighlighterContribution>(WordHighlighterContribution.ID);
}
private wordHighlighter: WordHighlighter | null;
private linkedContributions: Set<WordHighlighterContribution>;
private _wordHighlighter: WordHighlighter | null;
constructor(editor: ICodeEditor, @IContextKeyService contextKeyService: IContextKeyService, @ILanguageFeaturesService languageFeaturesService: ILanguageFeaturesService) {
constructor(editor: ICodeEditor, @IContextKeyService contextKeyService: IContextKeyService, @ILanguageFeaturesService languageFeaturesService: ILanguageFeaturesService, @ICodeEditorService codeEditorService: ICodeEditorService) {
super();
this.wordHighlighter = null;
this.linkedContributions = new Set();
this._wordHighlighter = null;
const createWordHighlighterIfPossible = () => {
if (editor.hasModel() && !editor.getModel().isTooLargeForTokenization()) {
this.wordHighlighter = new WordHighlighter(editor, languageFeaturesService.documentHighlightProvider, () => Iterable.map(this.linkedContributions, c => c.wordHighlighter), contextKeyService);
this._wordHighlighter = new WordHighlighter(editor, languageFeaturesService.documentHighlightProvider, languageFeaturesService.multiDocumentHighlightProvider, contextKeyService, codeEditorService);
}
};
this._register(editor.onDidChangeModel((e) => {
if (this.wordHighlighter) {
this.wordHighlighter.dispose();
this.wordHighlighter = null;
if (this._wordHighlighter) {
this._wordHighlighter.dispose();
this._wordHighlighter = null;
}
createWordHighlighterIfPossible();
}));
createWordHighlighterIfPossible();
}
public get wordHighlighter(): WordHighlighter | null {
return this._wordHighlighter;
}
public saveViewState(): boolean {
if (this.wordHighlighter && this.wordHighlighter.hasDecorations()) {
if (this._wordHighlighter && this._wordHighlighter.hasDecorations()) {
return true;
}
return false;
}
public moveNext() {
this.wordHighlighter?.moveNext();
this._wordHighlighter?.moveNext();
}
public moveBack() {
this.wordHighlighter?.moveBack();
this._wordHighlighter?.moveBack();
}
public restoreViewState(state: boolean | undefined): void {
if (this.wordHighlighter && state) {
this.wordHighlighter.restore();
if (this._wordHighlighter && state) {
this._wordHighlighter.restore();
}
}
public stopHighlighting() {
this.wordHighlighter?.stop();
}
public linkWordHighlighters(editor: ICodeEditor): IDisposable {
const other = WordHighlighterContribution.get(editor);
if (!other) {
return Disposable.None;
}
this.linkedContributions.add(other);
other.linkedContributions.add(this);
return toDisposable(() => {
this.linkedContributions.delete(other);
other.linkedContributions.delete(this);
});
this._wordHighlighter?.stop();
}
public override dispose(): void {
if (this.wordHighlighter) {
this.wordHighlighter.dispose();
this.wordHighlighter = null;
if (this._wordHighlighter) {
this._wordHighlighter.dispose();
this._wordHighlighter = null;
}
super.dispose();
}
@@ -321,6 +321,19 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider {
this._positionMarkerId.set([{ range, options: ModelDecorationOptions.EMPTY }]);
}
updatePositionAndHeight(rangeOrPos: IRange | IPosition, heightInLines?: number): void {
if (this._viewZone) {
rangeOrPos = Range.isIRange(rangeOrPos) ? Range.getStartPosition(rangeOrPos) : rangeOrPos;
this._viewZone.afterLineNumber = rangeOrPos.lineNumber;
this._viewZone.afterColumn = rangeOrPos.column;
this._viewZone.heightInLines = heightInLines ?? this._viewZone.heightInLines;
this.editor.changeViewZones(accessor => {
accessor.layoutZone(this._viewZone!.id);
});
}
}
hide(): void {
if (this._viewZone) {
this.editor.changeViewZones(accessor => {
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./standaloneQuickInput';
import { Event } from 'vs/base/common/event';
import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser';
import { EditorContributionInstantiation, registerEditorContribution } from 'vs/editor/browser/editorExtensions';
import { IEditorContribution } from 'vs/editor/common/editorCommon';
@@ -42,10 +43,14 @@ class EditorScopedQuickInputService extends QuickInputService {
get container() { return widget.getDomNode(); },
get containers() { return [widget.getDomNode()]; },
get activeContainer() { return widget.getDomNode(); },
get dimension() { return editor.getLayoutInfo(); },
get onDidLayout() { return editor.onDidLayoutChange; },
focus: () => editor.focus(),
offset: { top: 0, quickPickTop: 0 }
get mainContainerDimension() { return editor.getLayoutInfo(); },
get activeContainerDimension() { return editor.getLayoutInfo(); },
get onDidLayoutMainContainer() { return editor.onDidLayoutChange; },
get onDidLayoutActiveContainer() { return editor.onDidLayoutChange; },
get onDidChangeActiveContainer() { return Event.None; },
get mainContainerOffset() { return { top: 0, quickPickTop: 0 }; },
get activeContainerOffset() { return { top: 0, quickPickTop: 0 }; },
focus: () => editor.focus()
};
} else {
this.host = undefined;
@@ -13,10 +13,12 @@ import { coalesce } from 'vs/base/common/arrays';
class StandaloneLayoutService implements ILayoutService {
declare readonly _serviceBrand: undefined;
public onDidLayout = Event.None;
readonly onDidLayoutMainContainer = Event.None;
readonly onDidLayoutActiveContainer = Event.None;
readonly onDidChangeActiveContainer = Event.None;
private _dimension?: dom.IDimension;
get dimension(): dom.IDimension {
get mainContainerDimension(): dom.IDimension {
if (!this._dimension) {
this._dimension = dom.getClientArea(window.document.body);
}
@@ -24,6 +26,11 @@ class StandaloneLayoutService implements ILayoutService {
return this._dimension;
}
get activeContainerDimension() { return this.mainContainerDimension; }
readonly mainContainerOffset: ILayoutOffsetInfo = { top: 0, quickPickTop: 0 };
readonly activeContainerOffset: ILayoutOffsetInfo = { top: 0, quickPickTop: 0 };
get hasContainer(): boolean {
return false;
}
@@ -51,8 +58,6 @@ class StandaloneLayoutService implements ILayoutService {
this._codeEditorService.getFocusedCodeEditor()?.focus();
}
readonly offset: ILayoutOffsetInfo = { top: 0, quickPickTop: 0 };
constructor(
@ICodeEditorService private _codeEditorService: ICodeEditorService
) { }
@@ -36,8 +36,8 @@ export class TestGlobalStyleSheet extends GlobalStyleSheet {
super(null!);
}
public override insertRule(rule: string, index?: number): void {
this.rules.unshift(rule);
public override insertRule(selector: string, rule: string): void {
this.rules.unshift(`${selector} {${rule}}`);
}
public override removeRulesContainingSelector(ruleName: string): void {
+86 -68
View File
@@ -3531,6 +3531,11 @@ declare namespace monaco.editor {
* Defaults to true.
*/
occurrencesHighlight?: boolean;
/**
* Enable semantic occurrences highlight.
* Defaults to true.
*/
multiDocumentOccurrencesHighlight?: boolean;
/**
* Show code lens
* Defaults to true.
@@ -4786,74 +4791,75 @@ declare namespace monaco.editor {
multiCursorModifier = 77,
multiCursorPaste = 78,
multiCursorLimit = 79,
occurrencesHighlight = 80,
overviewRulerBorder = 81,
overviewRulerLanes = 82,
padding = 83,
pasteAs = 84,
parameterHints = 85,
peekWidgetDefaultFocus = 86,
definitionLinkOpensInPeek = 87,
quickSuggestions = 88,
quickSuggestionsDelay = 89,
readOnly = 90,
readOnlyMessage = 91,
renameOnType = 92,
renderControlCharacters = 93,
renderFinalNewline = 94,
renderLineHighlight = 95,
renderLineHighlightOnlyWhenFocus = 96,
renderValidationDecorations = 97,
renderWhitespace = 98,
revealHorizontalRightPadding = 99,
roundedSelection = 100,
rulers = 101,
scrollbar = 102,
scrollBeyondLastColumn = 103,
scrollBeyondLastLine = 104,
scrollPredominantAxis = 105,
selectionClipboard = 106,
selectionHighlight = 107,
selectOnLineNumbers = 108,
showFoldingControls = 109,
showUnused = 110,
snippetSuggestions = 111,
smartSelect = 112,
smoothScrolling = 113,
stickyScroll = 114,
stickyTabStops = 115,
stopRenderingLineAfter = 116,
suggest = 117,
suggestFontSize = 118,
suggestLineHeight = 119,
suggestOnTriggerCharacters = 120,
suggestSelection = 121,
tabCompletion = 122,
tabIndex = 123,
unicodeHighlighting = 124,
unusualLineTerminators = 125,
useShadowDOM = 126,
useTabStops = 127,
wordBreak = 128,
wordSeparators = 129,
wordWrap = 130,
wordWrapBreakAfterCharacters = 131,
wordWrapBreakBeforeCharacters = 132,
wordWrapColumn = 133,
wordWrapOverride1 = 134,
wordWrapOverride2 = 135,
wrappingIndent = 136,
wrappingStrategy = 137,
showDeprecated = 138,
inlayHints = 139,
editorClassName = 140,
pixelRatio = 141,
tabFocusMode = 142,
layoutInfo = 143,
wrappingInfo = 144,
defaultColorDecorators = 145,
colorDecoratorsActivatedOn = 146,
inlineCompletionsAccessibilityVerbose = 147
multiDocumentOccurrencesHighlight = 80,
occurrencesHighlight = 81,
overviewRulerBorder = 82,
overviewRulerLanes = 83,
padding = 84,
pasteAs = 85,
parameterHints = 86,
peekWidgetDefaultFocus = 87,
definitionLinkOpensInPeek = 88,
quickSuggestions = 89,
quickSuggestionsDelay = 90,
readOnly = 91,
readOnlyMessage = 92,
renameOnType = 93,
renderControlCharacters = 94,
renderFinalNewline = 95,
renderLineHighlight = 96,
renderLineHighlightOnlyWhenFocus = 97,
renderValidationDecorations = 98,
renderWhitespace = 99,
revealHorizontalRightPadding = 100,
roundedSelection = 101,
rulers = 102,
scrollbar = 103,
scrollBeyondLastColumn = 104,
scrollBeyondLastLine = 105,
scrollPredominantAxis = 106,
selectionClipboard = 107,
selectionHighlight = 108,
selectOnLineNumbers = 109,
showFoldingControls = 110,
showUnused = 111,
snippetSuggestions = 112,
smartSelect = 113,
smoothScrolling = 114,
stickyScroll = 115,
stickyTabStops = 116,
stopRenderingLineAfter = 117,
suggest = 118,
suggestFontSize = 119,
suggestLineHeight = 120,
suggestOnTriggerCharacters = 121,
suggestSelection = 122,
tabCompletion = 123,
tabIndex = 124,
unicodeHighlighting = 125,
unusualLineTerminators = 126,
useShadowDOM = 127,
useTabStops = 128,
wordBreak = 129,
wordSeparators = 130,
wordWrap = 131,
wordWrapBreakAfterCharacters = 132,
wordWrapBreakBeforeCharacters = 133,
wordWrapColumn = 134,
wordWrapOverride1 = 135,
wordWrapOverride2 = 136,
wrappingIndent = 137,
wrappingStrategy = 138,
showDeprecated = 139,
inlayHints = 140,
editorClassName = 141,
pixelRatio = 142,
tabFocusMode = 143,
layoutInfo = 144,
wrappingInfo = 145,
defaultColorDecorators = 146,
colorDecoratorsActivatedOn = 147,
inlineCompletionsAccessibilityVerbose = 148
}
export const EditorOptions: {
@@ -4940,6 +4946,7 @@ declare namespace monaco.editor {
multiCursorPaste: IEditorOption<EditorOption.multiCursorPaste, 'spread' | 'full'>;
multiCursorLimit: IEditorOption<EditorOption.multiCursorLimit, number>;
occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, boolean>;
multiDocumentOccurrencesHighlight: IEditorOption<EditorOption.multiDocumentOccurrencesHighlight, boolean>;
overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>;
overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>;
padding: IEditorOption<EditorOption.padding, Readonly<Required<IEditorPaddingOptions>>>;
@@ -7146,6 +7153,17 @@ declare namespace monaco.languages {
provideDocumentHighlights(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<DocumentHighlight[]>;
}
export interface MultiDocumentHighlightProvider {
/**
* Provide a Map of Uri --> document highlights, like all occurrences of a variable or
* all exit-points of a function.
*
* Used in cases such as split view, notebooks, etc. where there can be multiple documents
* with shared symbols.
*/
provideMultiDocumentHighlights(primaryModel: editor.ITextModel, position: Position, otherModels: editor.ITextModel[], token: CancellationToken): ProviderResult<Map<Uri, DocumentHighlight[]>>;
}
/**
* The linked editing range provider interface defines the contract between extensions and
* the linked editing feature.
@@ -30,11 +30,7 @@ export class AuxiliaryWindow extends BaseWindow implements IAuxiliaryWindow {
private _win: BrowserWindow | null = null;
get win() {
if (!this._win) {
const window = BrowserWindow.fromWebContents(this.contents);
if (window) {
this._win = window;
this.registerWindowListeners(window);
}
this.tryClaimWindow();
}
return this._win;
@@ -62,6 +58,30 @@ export class AuxiliaryWindow extends BaseWindow implements IAuxiliaryWindow {
if (this.environmentMainService.args['open-devtools'] === true) {
this.contents.openDevTools({ mode: 'bottom' });
}
// Try to claim now
this.tryClaimWindow();
}
tryClaimWindow(): void {
if (this._win) {
return; // already claimed
}
if (this._store.isDisposed || this.contents.isDestroyed()) {
return; // already disposed
}
const window = BrowserWindow.fromWebContents(this.contents);
if (window) {
this._win = window;
// Disable Menu
window.setMenu(null);
// Listeners
this.registerWindowListeners(window);
}
}
private registerWindowListeners(window: BrowserWindow): void {
@@ -20,4 +20,6 @@ export interface IAuxiliaryWindowsMainService {
getFocusedWindow(): IAuxiliaryWindow | undefined;
getLastActiveWindow(): IAuxiliaryWindow | undefined;
getWindows(): readonly IAuxiliaryWindow[];
}
@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { BrowserWindow, BrowserWindowConstructorOptions, WebContents } from 'electron';
import { BrowserWindow, BrowserWindowConstructorOptions, WebContents, app } from 'electron';
import { Event } from 'vs/base/common/event';
import { FileAccess } from 'vs/base/common/network';
import { AuxiliaryWindow, IAuxiliaryWindow } from 'vs/platform/auxiliaryWindow/electron-main/auxiliaryWindow';
@@ -15,16 +15,34 @@ export class AuxiliaryWindowsMainService implements IAuxiliaryWindowsMainService
declare readonly _serviceBrand: undefined;
private readonly windows = new Map<number, IAuxiliaryWindow>();
private readonly windows = new Map<number, AuxiliaryWindow>();
constructor(
@IInstantiationService private readonly instantiationService: IInstantiationService
) { }
) {
this.registerListeners();
}
private registerListeners(): void {
// We have to ensure that an auxiliary window gets to know its
// parent `BrowserWindow` so that it can apply listeners to it
// Unfortunately we cannot rely on static `BrowserWindow` methods
// because we might call the methods too early before the window
// is created.
app.on('browser-window-created', (_event, browserWindow) => {
const auxiliaryWindow = this.getWindowById(browserWindow.id);
if (auxiliaryWindow) {
auxiliaryWindow.tryClaimWindow();
}
});
}
createWindow(): BrowserWindowConstructorOptions {
return this.instantiationService.invokeFunction(defaultBrowserWindowOptions, undefined, {
webPreferences: {
preload: FileAccess.asFileUri('vs/base/parts/sandbox/electron-sandbox/preload-slim.js').fsPath
preload: FileAccess.asFileUri('vs/base/parts/sandbox/electron-sandbox/preload-aux.js').fsPath
}
});
}
@@ -36,7 +54,7 @@ export class AuxiliaryWindowsMainService implements IAuxiliaryWindowsMainService
Event.once(auxiliaryWindow.onDidClose)(() => this.windows.delete(auxiliaryWindow.id));
}
getWindowById(windowId: number): IAuxiliaryWindow | undefined {
getWindowById(windowId: number): AuxiliaryWindow | undefined {
return this.windows.get(windowId);
}
@@ -52,4 +70,8 @@ export class AuxiliaryWindowsMainService implements IAuxiliaryWindowsMainService
getLastActiveWindow(): IAuxiliaryWindow | undefined {
return getLastFocused(Array.from(this.windows.values()));
}
getWindows(): readonly IAuxiliaryWindow[] {
return Array.from(this.windows.values());
}
}
@@ -25,7 +25,7 @@ export class ContextViewService extends Disposable implements IContextViewServic
this.contextView = this._register(new ContextView(this.container, ContextViewDOMPosition.ABSOLUTE));
this.layout();
this._register(layoutService.onDidLayout(() => this.layout()));
this._register(layoutService.onDidLayoutMainContainer(() => this.layout()));
}
// ContextView
@@ -78,6 +78,21 @@ export class ExtensionHostStarter implements IDisposable, IExtensionHostStarter
extHost.dispose();
this._extHosts.delete(id);
});
// See https://github.com/microsoft/vscode/issues/194477
// We have observed that sometimes the process sends an exit
// event, but does not really exit and is stuck in an endless
// loop. In these cases we kill the process forcefully after
// a certain timeout.
setTimeout(() => {
try {
process.kill(pid, 0); // will throw if the process doesn't exist anymore.
this._logService.error(`Extension host with pid ${pid} still exists, forcefully killing it...`);
process.kill(pid);
} catch (er) {
// ignore, as the process is already gone
}
}, 1000);
});
return { id };
}
+5
View File
@@ -53,7 +53,10 @@ export interface IssueReporterExtensionData {
displayName: string | undefined;
repositoryUrl: string | undefined;
bugsUrl: string | undefined;
extensionData?: string;
extensionTemplate?: string;
hasIssueUriRequestHandler?: boolean;
hasIssueDataProviders?: boolean;
}
export interface IssueReporterData extends WindowData {
@@ -128,5 +131,7 @@ export interface IIssueMainService {
$showConfirmCloseDialog(): Promise<void>;
$showClipboardDialog(): Promise<boolean>;
$getIssueReporterUri(extensionId: string): Promise<URI>;
$getIssueReporterData(extensionId: string): Promise<string>;
$getIssueReporterTemplate(extensionId: string): Promise<string>;
$closeReporter(): Promise<void>;
}
@@ -4,12 +4,16 @@
*--------------------------------------------------------------------------------------------*/
import { BrowserWindow, BrowserWindowConstructorOptions, contentTracing, Display, IpcMainEvent, screen } from 'electron';
import { validatedIpcMain } from 'vs/base/parts/ipc/electron-main/ipcMain';
import { arch, release, type } from 'os';
import { Promises, timeout } from 'vs/base/common/async';
import { CancellationTokenSource } from 'vs/base/common/cancellation';
import { randomPath } from 'vs/base/common/extpath';
import { DisposableStore } from 'vs/base/common/lifecycle';
import { FileAccess } from 'vs/base/common/network';
import { IProcessEnvironment, isMacintosh } from 'vs/base/common/platform';
import { URI } from 'vs/base/common/uri';
import { listProcesses } from 'vs/base/node/ps';
import { validatedIpcMain } from 'vs/base/parts/ipc/electron-main/ipcMain';
import { localize } from 'vs/nls';
import { IDiagnosticsService, isRemoteDiagnosticError, PerformanceInfo, SystemInfo } from 'vs/platform/diagnostics/common/diagnostics';
import { IDiagnosticsMainService } from 'vs/platform/diagnostics/electron-main/diagnosticsMainService';
@@ -21,15 +25,11 @@ import { INativeHostMainService } from 'vs/platform/native/electron-main/nativeH
import product from 'vs/platform/product/common/product';
import { IProductService } from 'vs/platform/product/common/productService';
import { IIPCObjectUrl, IProtocolMainService } from 'vs/platform/protocol/electron-main/protocol';
import { zoomLevelToZoomFactor } from 'vs/platform/window/common/window';
import { IWindowState } from 'vs/platform/window/electron-main/window';
import { randomPath } from 'vs/base/common/extpath';
import { IStateService } from 'vs/platform/state/node/state';
import { UtilityProcess } from 'vs/platform/utilityProcess/electron-main/utilityProcess';
import { CancellationTokenSource } from 'vs/base/common/cancellation';
import { URI } from 'vs/base/common/uri';
import { zoomLevelToZoomFactor } from 'vs/platform/window/common/window';
import { ICodeWindow, IWindowState } from 'vs/platform/window/electron-main/window';
import { IWindowsMainService } from 'vs/platform/windows/electron-main/windows';
import { Promises, timeout } from 'vs/base/common/async';
const processExplorerWindowState = 'issue.processExplorerWindowState';
@@ -365,7 +365,7 @@ export class IssueMainService implements IIssueMainService {
return false;
}
async $getIssueReporterUri(extensionId: string): Promise<URI> {
issueReporterWindowCheck(): ICodeWindow {
if (!this.issueReporterParentWindow) {
throw new Error('Issue reporter window not available');
}
@@ -373,6 +373,11 @@ export class IssueMainService implements IIssueMainService {
if (!window) {
throw new Error('Window not found');
}
return window;
}
async $getIssueReporterUri(extensionId: string): Promise<URI> {
const window = this.issueReporterWindowCheck();
const replyChannel = `vscode:triggerIssueUriRequestHandlerResponse${window.id}`;
return Promises.withAsyncBody<URI>(async (resolve, reject) => {
@@ -393,6 +398,50 @@ export class IssueMainService implements IIssueMainService {
});
}
async $getIssueReporterData(extensionId: string): Promise<string> {
const window = this.issueReporterWindowCheck();
const replyChannel = `vscode:triggerIssueDataProviderResponse${window.id}`;
return Promises.withAsyncBody<string>(async (resolve) => {
const cts = new CancellationTokenSource();
window.sendWhenReady('vscode:triggerIssueDataProvider', cts.token, { replyChannel, extensionId });
validatedIpcMain.once(replyChannel, (_: unknown, data: string) => {
resolve(data);
});
try {
await timeout(5000);
cts.cancel();
resolve('Error: Extension timed out waiting for issue reporter data');
} finally {
validatedIpcMain.removeHandler(replyChannel);
}
});
}
async $getIssueReporterTemplate(extensionId: string): Promise<string> {
const window = this.issueReporterWindowCheck();
const replyChannel = `vscode:triggerIssueDataTemplateResponse${window.id}`;
return Promises.withAsyncBody<string>(async (resolve) => {
const cts = new CancellationTokenSource();
window.sendWhenReady('vscode:triggerIssueDataTemplate', cts.token, { replyChannel, extensionId });
validatedIpcMain.once(replyChannel, (_: unknown, data: string) => {
resolve(data);
});
try {
await timeout(5000);
cts.cancel();
resolve('Error: Extension timed out waiting for issue reporter template');
} finally {
validatedIpcMain.removeHandler(replyChannel);
}
});
}
async $closeReporter(): Promise<void> {
this.issueReporterWindow?.close();
}
@@ -10,10 +10,12 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
export const ILayoutService = createDecorator<ILayoutService>('layoutService');
export interface ILayoutOffsetInfo {
/**
* Generic top offset
*/
readonly top: number;
/**
* Quick pick specific top offset.
*/
@@ -25,9 +27,29 @@ export interface ILayoutService {
readonly _serviceBrand: undefined;
/**
* The dimensions of the container.
* An event that is emitted when the main container is layed out.
*/
readonly dimension: IDimension;
readonly onDidLayoutMainContainer: Event<IDimension>;
/**
* An event that is emitted when the active container is layed out.
*/
readonly onDidLayoutActiveContainer: Event<IDimension>;
/**
* An event that is emitted when the active container changes.
*/
readonly onDidChangeActiveContainer: Event<void>;
/**
* The dimensions of the main container.
*/
readonly mainContainerDimension: IDimension;
/**
* The dimensions of the active container.
*/
readonly activeContainerDimension: IDimension;
/**
* Does the application have a single container?
@@ -35,7 +57,7 @@ export interface ILayoutService {
readonly hasContainer: boolean;
/**
* Container of the application.
* Main container of the application.
*
* **NOTE**: In the standalone editor case, multiple editors can be created on a page.
* Therefore, in the standalone editor case, there are multiple containers, not just
@@ -60,15 +82,14 @@ export interface ILayoutService {
readonly containers: Iterable<HTMLElement>;
/**
* An offset to use for positioning elements inside the container.
* An offset to use for positioning elements inside the main container.
*/
readonly offset: ILayoutOffsetInfo;
readonly mainContainerOffset: ILayoutOffsetInfo;
/**
* An event that is emitted when the container is layed out. The
* event carries the dimensions of the container as part of it.
* An offset to use for positioning elements inside the container.
*/
readonly onDidLayout: Event<IDimension>;
readonly activeContainerOffset: ILayoutOffsetInfo;
/**
* Focus the primary component of the container.
@@ -11,6 +11,7 @@ import { mnemonicMenuLabel } from 'vs/base/common/labels';
import { isMacintosh, language } from 'vs/base/common/platform';
import { URI } from 'vs/base/common/uri';
import * as nls from 'vs/nls';
import { IAuxiliaryWindowsMainService } from 'vs/platform/auxiliaryWindow/electron-main/auxiliaryWindows';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IEnvironmentMainService } from 'vs/platform/environment/electron-main/environmentMainService';
import { ILifecycleMainService } from 'vs/platform/lifecycle/electron-main/lifecycleMainService';
@@ -74,7 +75,8 @@ export class Menubar {
@ILifecycleMainService private readonly lifecycleMainService: ILifecycleMainService,
@ILogService private readonly logService: ILogService,
@INativeHostMainService private readonly nativeHostMainService: INativeHostMainService,
@IProductService private readonly productService: IProductService
@IProductService private readonly productService: IProductService,
@IAuxiliaryWindowsMainService private readonly auxiliaryWindowsMainService: IAuxiliaryWindowsMainService
) {
this.menuUpdater = new RunOnceScheduler(() => this.doUpdateMenu(), 0);
@@ -255,7 +257,7 @@ export class Menubar {
// If we don't have a menu yet, set it to null to avoid the electron menu.
// This should only happen on the first launch ever
if (Object.keys(this.menubarMenus).length === 0) {
Menu.setApplicationMenu(isMacintosh ? new Menu() : null);
this.doSetApplicationMenu(isMacintosh ? new Menu() : null);
return;
}
@@ -358,15 +360,28 @@ export class Menubar {
}
if (menubar.items && menubar.items.length > 0) {
Menu.setApplicationMenu(menubar);
this.doSetApplicationMenu(menubar);
} else {
Menu.setApplicationMenu(null);
this.doSetApplicationMenu(null);
}
// Dispose of older menus after some time
this.menuGC.schedule();
}
private doSetApplicationMenu(menu: (Menu) | (null)): void {
// Setting the application menu sets it to all opened windows,
// but we currently do not support a menu in auxiliary windows,
// so we need to unset it there.
Menu.setApplicationMenu(menu);
for (const window of this.auxiliaryWindowsMainService.getWindows()) {
window.win?.setMenu(null);
}
}
private setMacApplicationMenu(macApplicationMenu: Menu): void {
const about = this.createMenuItem(nls.localize('mAbout', "About {0}", this.productService.nameLong), 'workbench.action.showAboutDialog');
const checkForUpdates = this.getUpdateMenuItems();
@@ -150,11 +150,6 @@
position: relative;
}
.quick-input-progress.monaco-progress-container,
.quick-input-progress.monaco-progress-container .progress-bit {
height: 2px;
}
.quick-input-list {
line-height: 22px;
}
@@ -58,7 +58,7 @@ export class QuickInputController extends Disposable {
this.idPrefix = options.idPrefix;
this.parentElement = options.container;
this.styles = options.styles;
this._register(Event.runAndSubscribe(dom.onDidRegisterWindow, ({ window, disposableStore }) => this.registerKeyModsListeners(window, disposableStore), { window, disposableStore: this._store }));
this._register(Event.runAndSubscribe(dom.onDidRegisterWindow, ({ window, disposables }) => this.registerKeyModsListeners(window, disposables), { window, disposables: this._store }));
this._register(dom.onWillUnregisterWindow(window => {
if (this.ui && dom.getWindow(this.ui.container) === window) {
// The window this quick input is contained in is about to
@@ -81,12 +81,14 @@ export class QuickInputController extends Disposable {
}
}
private getUI() {
private getUI(showInActiveContainer?: boolean) {
if (this.ui) {
// In order to support aux windows, re-parent the controller
// if the original event is from a different document
if (this.parentElement.ownerDocument !== this.layoutService.activeContainer.ownerDocument) {
this.reparentUI(this.layoutService.activeContainer);
if (showInActiveContainer) {
if (this.parentElement.ownerDocument !== this.layoutService.activeContainer.ownerDocument) {
this.reparentUI(this.layoutService.activeContainer);
}
}
return this.ui;
@@ -506,22 +508,22 @@ export class QuickInputController extends Disposable {
backButton = backButton;
createQuickPick<T extends IQuickPickItem>(): IQuickPick<T> {
const ui = this.getUI();
const ui = this.getUI(true);
return new QuickPick<T>(ui);
}
createInputBox(): IInputBox {
const ui = this.getUI();
const ui = this.getUI(true);
return new InputBox(ui);
}
createQuickWidget(): IQuickWidget {
const ui = this.getUI();
const ui = this.getUI(true);
return new QuickWidget(ui);
}
private show(controller: IQuickInput) {
const ui = this.getUI();
const ui = this.getUI(true);
this.onShowEmitter.fire();
const oldController = this.controller;
this.controller = controller;
@@ -559,6 +561,10 @@ export class QuickInputController extends Disposable {
ui.inputBox.setFocus();
}
isVisible(): boolean {
return !!this.ui && this.ui.container.style.display !== 'none';
}
private setVisibilities(visibilities: Visibilities) {
const ui = this.getUI();
ui.title.style.display = visibilities.title ? '' : 'none';
@@ -605,7 +611,9 @@ export class QuickInputController extends Disposable {
const focusChanged = container && !dom.isAncestorOfActiveElement(container);
this.controller = null;
this.onHideEmitter.fire();
this.getUI().container.style.display = 'none';
if (container) {
container.style.display = 'none';
}
if (!focusChanged) {
let currentElement = this.previousFocusElement;
while (currentElement && !currentElement.offsetParent) {
@@ -622,7 +630,7 @@ export class QuickInputController extends Disposable {
}
focus() {
if (this.isDisplayed()) {
if (this.isVisible()) {
const ui = this.getUI();
if (ui.inputBox.enabled) {
ui.inputBox.setFocus();
@@ -633,13 +641,13 @@ export class QuickInputController extends Disposable {
}
toggle() {
if (this.isDisplayed() && this.controller instanceof QuickPick && this.controller.canSelectMany) {
if (this.isVisible() && this.controller instanceof QuickPick && this.controller.canSelectMany) {
this.getUI().list.toggleCheckbox();
}
}
navigate(next: boolean, quickNavigate?: IQuickNavigateConfiguration) {
if (this.isDisplayed() && this.getUI().list.isDisplayed()) {
if (this.isVisible() && this.getUI().list.isDisplayed()) {
this.getUI().list.focus(next ? QuickInputListFocus.Next : QuickInputListFocus.Previous);
if (quickNavigate && this.controller instanceof QuickPick) {
this.controller.quickNavigate = quickNavigate;
@@ -673,7 +681,7 @@ export class QuickInputController extends Disposable {
}
private updateLayout() {
if (this.ui && this.isDisplayed()) {
if (this.ui && this.isVisible()) {
this.ui.container.style.top = `${this.titleBarOffset}px`;
const style = this.ui.container.style;
@@ -745,10 +753,6 @@ export class QuickInputController extends Disposable {
}
}
}
private isDisplayed() {
return this.ui && this.ui.container.style.display !== 'none';
}
}
export interface IQuickInputControllerHost extends ILayoutService { }
@@ -67,7 +67,7 @@ export class QuickInputService extends Themable implements IQuickInputService {
protected createController(host: IQuickInputControllerHost = this.layoutService, options?: Partial<IQuickInputOptions>): QuickInputController {
const defaultOptions: IQuickInputOptions = {
idPrefix: 'quickInput_',
container: host.container,
container: host.activeContainer,
ignoreFocusOut: () => false,
backKeybindingLabel: () => undefined,
setContextKey: (id?: string) => this.setContextKey(id),
@@ -94,12 +94,20 @@ export class QuickInputService extends Themable implements IQuickInputService {
...options
},
this.themeService,
this.layoutService));
this.layoutService
));
controller.layout(host.dimension, host.offset.quickPickTop);
controller.layout(host.activeContainerDimension, host.activeContainerOffset.quickPickTop);
// Layout changes
this._register(host.onDidLayout(dimension => controller.layout(dimension, host.offset.quickPickTop)));
this._register(host.onDidLayoutActiveContainer(dimension => controller.layout(dimension, host.activeContainerOffset.quickPickTop)));
this._register(host.onDidChangeActiveContainer(() => {
if (controller.isVisible()) {
return;
}
controller.layout(host.activeContainerDimension, host.activeContainerOffset.quickPickTop);
}));
// Context keys
this._register(controller.onShow(() => {
@@ -5,7 +5,7 @@
import { getZoomLevel, setZoomFactor, setZoomLevel } from 'vs/base/browser/browser';
import { getWindows } from 'vs/base/browser/dom';
import { getGlobals } from 'vs/base/parts/sandbox/electron-sandbox/globals';
import { ISandboxGlobals, ipcRenderer, webFrame } from 'vs/base/parts/sandbox/electron-sandbox/globals';
import { zoomLevelToZoomFactor } from 'vs/platform/window/common/window';
/**
@@ -20,6 +20,21 @@ export function applyZoom(zoomLevel: number): void {
setZoomLevel(zoomLevel);
}
function getGlobals(win: Window): ISandboxGlobals | undefined {
if (win === window) {
// main window
return { ipcRenderer, webFrame };
} else {
// auxiliary window
const auxiliaryWindow = win as unknown as { vscode: ISandboxGlobals };
if (auxiliaryWindow?.vscode?.ipcRenderer && auxiliaryWindow?.vscode?.webFrame) {
return auxiliaryWindow.vscode;
}
}
return undefined;
}
export function zoomIn(): void {
applyZoom(getZoomLevel() + 1);
}
@@ -374,10 +374,7 @@ export class CodeWindow extends BaseWindow implements ICodeWindow {
this._win.maximize();
if (this.windowState.mode === WindowMode.Fullscreen) {
this.logConditionally('WindowMode.Fullscreen');
this.setFullScreen(true);
} else {
this.logConditionally('WindowMode.Maximized');
}
// to reduce flicker from the default window size
@@ -405,13 +402,6 @@ export class CodeWindow extends BaseWindow implements ICodeWindow {
this.registerListeners();
}
private logConditionally(msg: string): void {
// TODO@bpasero remove me eventually
if (this.configurationService.getValue('window.logFullScreenTransitions')) {
this.logService.info(`window-fullscreen-bug: ${msg})`);
}
}
setRepresentedFilename(filename: string): void {
if (isMacintosh) {
this._win.setRepresentedFilename(filename);
@@ -550,7 +540,6 @@ export class CodeWindow extends BaseWindow implements ICodeWindow {
this._win.on('enter-full-screen', () => {
this.sendWhenReady('vscode:enterFullScreen', CancellationToken.None);
this.logConditionally(`enter-full-screen: ${Date.now()}`);
this.joinNativeFullScreenTransition?.complete();
this.joinNativeFullScreenTransition = undefined;
});
@@ -558,7 +547,6 @@ export class CodeWindow extends BaseWindow implements ICodeWindow {
this._win.on('leave-full-screen', () => {
this.sendWhenReady('vscode:leaveFullScreen', CancellationToken.None);
this.logConditionally(`leave-full-screen: ${Date.now()}`);
this.joinNativeFullScreenTransition?.complete();
this.joinNativeFullScreenTransition = undefined;
});
@@ -1288,19 +1276,13 @@ export class CodeWindow extends BaseWindow implements ICodeWindow {
}
get isFullScreen(): boolean {
this.logConditionally(`isFullScreen(): begin at ${Date.now()}`);
if (isMacintosh && typeof this.transientIsNativeFullScreen === 'boolean') {
this.logConditionally(`isFullScreen(): returning transientIsNativeFullScreen = ${this.transientIsNativeFullScreen}`);
return this.transientIsNativeFullScreen;
}
const isFullScreen = this._win.isFullScreen();
const isSimpleFullScreen = this._win.isSimpleFullScreen();
this.logConditionally(`isFullScreen(): returning natively, isFullScreen = ${isFullScreen}, isSimpleFullScreen = ${isSimpleFullScreen}`);
return isFullScreen || isSimpleFullScreen;
}
@@ -1314,16 +1296,18 @@ export class CodeWindow extends BaseWindow implements ICodeWindow {
private doSetNativeFullScreen(fullscreen: boolean): void {
if (isMacintosh) {
this.logConditionally(`doSetNativeFullScreen(${fullscreen}): begin at ${Date.now()}`);
this.transientIsNativeFullScreen = fullscreen;
this.joinNativeFullScreenTransition = new DeferredPromise<void>();
Promise.race([
this.joinNativeFullScreenTransition.p,
timeout(1000) // still timeout after some time in case we miss the event
// still timeout after some time in case the transition is unusually slow
// this can easily happen for an OS update where macOS tries to reopen
// previous applications and that can take multiple seconds, probably due
// to security checks. its worth noting that if this takes more than
// 10 seconds, users would see a window that is not-fullscreen but without
// custom titlebar...
timeout(10000)
]).finally(() => {
this.logConditionally(`doSetNativeFullScreen(${fullscreen}): finish at ${Date.now()}`);
this.transientIsNativeFullScreen = undefined;
});
}
@@ -70,9 +70,8 @@ export class MainThreadChat extends Disposable implements MainThreadChatShape {
return undefined;
}
const responderAvatarIconUri = session.responderAvatarIconUri ?
URI.revive(session.responderAvatarIconUri) :
registration.extensionIcon;
const responderAvatarIconUri = session.responderAvatarIconUri &&
URI.revive(session.responderAvatarIconUri);
const emitter = new Emitter<any>();
this._stateEmitters.set(session.id, emitter);
@@ -212,9 +212,8 @@ export class MainThreadFileSystemEventService implements MainThreadFileSystemEve
this._listener.add(workingCopyFileService.onDidRunWorkingCopyFileOperation(e => this._proxy.$onDidRunFileOperation(e.operation, e.files)));
}
async $watch(extensionId: string, session: number, resource: UriComponents, unvalidatedOpts: IWatchOptions): Promise<void> {
async $watch(extensionId: string, session: number, resource: UriComponents, unvalidatedOpts: IWatchOptions, correlate: boolean): Promise<void> {
const uri = URI.revive(resource);
const correlate = Array.isArray(unvalidatedOpts?.excludes) && unvalidatedOpts.excludes.length > 0; // TODO@bpasero for now only correlate proposed new file system watcher API with excludes
const opts: IWatchOptions = {
...unvalidatedOpts
@@ -8,7 +8,7 @@ import { Disposable, DisposableMap } from 'vs/base/common/lifecycle';
import { URI } from 'vs/base/common/uri';
import { ExtHostContext, ExtHostIssueReporterShape, MainContext, MainThreadIssueReporterShape } from 'vs/workbench/api/common/extHost.protocol';
import { IExtHostContext, extHostNamedCustomer } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { IIssueUriRequestHandler, IWorkbenchIssueService } from 'vs/workbench/services/issue/common/issue';
import { IIssueDataProvider, IIssueUriRequestHandler, IWorkbenchIssueService } from 'vs/workbench/services/issue/common/issue';
@extHostNamedCustomer(MainContext.MainThreadIssueReporter)
export class MainThreadIssueReporter extends Disposable implements MainThreadIssueReporterShape {
@@ -36,4 +36,22 @@ export class MainThreadIssueReporter extends Disposable implements MainThreadIss
$unregisterIssueUriRequestHandler(extensionId: string): void {
this._registrations.deleteAndDispose(extensionId);
}
$registerIssueDataProvider(extensionId: string): void {
const provider: IIssueDataProvider = {
provideIssueExtensionData: async (token: CancellationToken) => {
const parts = await this._proxy.$getIssueReporterData(extensionId, token);
return parts;
},
provideIssueExtensionTemplate: async (token: CancellationToken) => {
const parts = await this._proxy.$getIssueReporterTemplate(extensionId, token);
return parts;
}
};
this._registrations.set(extensionId, this._issueService.registerIssueDataProvider(extensionId, provider));
}
$unregisterIssueDataProvider(extensionId: string): void {
this._registrations.deleteAndDispose(extensionId);
}
}
@@ -33,6 +33,7 @@ import * as search from 'vs/workbench/contrib/search/common/search';
import * as typeh from 'vs/workbench/contrib/typeHierarchy/common/typeHierarchy';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { ExtHostContext, ExtHostLanguageFeaturesShape, ICallHierarchyItemDto, ICodeActionDto, ICodeActionProviderMetadataDto, IdentifiableInlineCompletion, IdentifiableInlineCompletions, IDocumentDropEditProviderMetadata, IDocumentFilterDto, IIndentationRuleDto, IInlayHintDto, ILanguageConfigurationDto, ILanguageWordDefinitionDto, ILinkDto, ILocationDto, ILocationLinkDto, IOnEnterRuleDto, IPasteEditProviderMetadataDto, IRegExpDto, ISignatureHelpProviderMetadataDto, ISuggestDataDto, ISuggestDataDtoField, ISuggestResultDtoField, ITypeHierarchyItemDto, IWorkspaceSymbolDto, MainContext, MainThreadLanguageFeaturesShape } from '../common/extHost.protocol';
import { USUAL_WORD_SEPARATORS } from 'vs/editor/common/core/wordHelper';
@extHostNamedCustomer(MainContext.MainThreadLanguageFeatures)
export class MainThreadLanguageFeatures extends Disposable implements MainThreadLanguageFeaturesShape {
@@ -293,11 +294,51 @@ export class MainThreadLanguageFeatures extends Disposable implements MainThread
// --- occurrences
$registerDocumentHighlightProvider(handle: number, selector: IDocumentFilterDto[]): void {
this._registrations.set(handle, this._languageFeaturesService.documentHighlightProvider.register(selector, <languages.DocumentHighlightProvider>{
provideDocumentHighlights: (model: ITextModel, position: EditorPosition, token: CancellationToken): Promise<languages.DocumentHighlight[] | undefined> => {
return this._proxy.$provideDocumentHighlights(handle, model.uri, position, token);
}
}));
this._registrations.set(handle, combinedDisposable(
this._languageFeaturesService.documentHighlightProvider.register(selector, <languages.DocumentHighlightProvider>{
provideDocumentHighlights: (model: ITextModel, position: EditorPosition, token: CancellationToken): Promise<languages.DocumentHighlight[] | undefined> => {
return this._proxy.$provideDocumentHighlights(handle, model.uri, position, token);
}
}),
this._languageFeaturesService.multiDocumentHighlightProvider.register(selector, <languages.MultiDocumentHighlightProvider>{
provideMultiDocumentHighlights: (model: ITextModel, position: EditorPosition, otherModels: ITextModel[], token: CancellationToken): Promise<Map<URI, languages.DocumentHighlight[]>> => {
const res = this._proxy.$provideDocumentHighlights(handle, model.uri, position, token);
if (!res) {
return Promise.resolve(new Map<URI, languages.DocumentHighlight[]>());
}
return res.then(data => {
const result = new Map<URI, languages.DocumentHighlight[]>();
if (data) {
result.set(model.uri, data);
}
const word = model.getWordAtPosition({
lineNumber: position.lineNumber,
column: position.column
});
if (!word) {
return new Map<URI, languages.DocumentHighlight[]>();
}
for (const otherModel of otherModels) {
const matches = otherModel.findMatches(word.word, true, false, true, USUAL_WORD_SEPARATORS, false);
const highlights = matches.map(m => ({
range: m.range,
kind: languages.DocumentHighlightKind.Text
}));
if (highlights) {
result.set(otherModel.uri, highlights);
}
}
return result;
});
}
})
));
}
// --- linked editing
@@ -28,7 +28,7 @@ import { ExtHostDocuments } from 'vs/workbench/api/common/extHostDocuments';
import { IExtHostDocumentsAndEditors } from 'vs/workbench/api/common/extHostDocumentsAndEditors';
import { Extension, IExtHostExtensionService } from 'vs/workbench/api/common/extHostExtensionService';
import { ExtHostFileSystem } from 'vs/workbench/api/common/extHostFileSystem';
import { ExtHostFileSystemEventService } from 'vs/workbench/api/common/extHostFileSystemEventService';
import { ExtHostFileSystemEventService, FileSystemWatcherCreateOptions } from 'vs/workbench/api/common/extHostFileSystemEventService';
import { ExtHostLanguageFeatures } from 'vs/workbench/api/common/extHostLanguageFeatures';
import { ExtHostLanguages } from 'vs/workbench/api/common/extHostLanguages';
import { ExtHostMessageService } from 'vs/workbench/api/common/extHostMessageService';
@@ -411,6 +411,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
checkProposedApiEnabled(extension, 'handleIssueUri');
return extHostIssueReporter.registerIssueUriRequestHandler(extension, handler);
},
registerIssueDataProvider(handler: vscode.IssueDataProvider) {
checkProposedApiEnabled(extension, 'handleIssueUri');
return extHostIssueReporter.registerIssueDataProvider(extension, handler);
},
get appQuality(): string | undefined {
checkProposedApiEnabled(extension, 'resolvers');
return initData.quality;
@@ -943,17 +947,21 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
return extHostBulkEdits.applyWorkspaceEdit(edit, extension, metadata);
},
createFileSystemWatcher: (pattern, optionsOrIgnoreCreate, ignoreChange?, ignoreDelete?): vscode.FileSystemWatcher => {
let options: vscode.FileSystemWatcherOptions | undefined = undefined;
let options: FileSystemWatcherCreateOptions | undefined = undefined;
if (typeof optionsOrIgnoreCreate === 'boolean') {
options = {
ignoreCreateEvents: Boolean(optionsOrIgnoreCreate),
ignoreChangeEvents: Boolean(ignoreChange),
ignoreDeleteEvents: Boolean(ignoreDelete)
ignoreDeleteEvents: Boolean(ignoreDelete),
correlate: false
};
} else if (optionsOrIgnoreCreate) {
checkProposedApiEnabled(extension, 'createFileSystemWatcher');
options = optionsOrIgnoreCreate;
options = {
...optionsOrIgnoreCreate,
correlate: true
};
}
return extHostFileSystemEvent.createFileSystemWatcher(extHostWorkspace, extension, pattern, options);
@@ -1351,7 +1351,7 @@ export interface MainThreadFileSystemShape extends IDisposable {
}
export interface MainThreadFileSystemEventServiceShape extends IDisposable {
$watch(extensionId: string, session: number, resource: UriComponents, opts: files.IWatchOptions): void;
$watch(extensionId: string, session: number, resource: UriComponents, opts: files.IWatchOptions, correlate: boolean): void;
$unwatch(session: number): void;
}
@@ -2568,11 +2568,15 @@ export interface MainThreadLocalizationShape extends IDisposable {
export interface ExtHostIssueReporterShape {
$getIssueReporterUri(extensionId: string, token: CancellationToken): Promise<UriComponents>;
$getIssueReporterData(extensionId: string, token: CancellationToken): Promise<string>;
$getIssueReporterTemplate(extensionId: string, token: CancellationToken): Promise<string>;
}
export interface MainThreadIssueReporterShape extends IDisposable {
$registerIssueUriRequestHandler(extensionId: string): void;
$unregisterIssueUriRequestHandler(extensionId: string): void;
$registerIssueDataProvider(extensionId: string): void;
$unregisterIssueDataProvider(extensionId: string): void;
}
export interface TunnelDto {
@@ -259,7 +259,7 @@ class ExtHostChatAgent {
return [];
}
this._lastSlashCommands = result;
return result.map(c => ({ name: c.name, description: c.description }));
return result.map(c => ({ name: c.name, description: c.description, followupPlaceholder: c.followupPlaceholder, shouldRepopulate: c.shouldRepopulate }));
}
async provideFollowups(result: vscode.ChatAgentResult2, token: CancellationToken): Promise<IChatFollowup[]> {

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