File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #A part of NonVisual Desktop Access (NVDA)
2+ #Copyright (C) 2020 NV Access Limited, Leonard de Ruijter
3+ #This file is covered by the GNU General Public License.
4+ #See the file COPYING for more details.
5+
6+ """ App module for Visual Studio Code Insiders.
7+ This app module simply inherrits from the app module for the stable version of Code.
8+ """
9+
10+ from .code import *
Original file line number Diff line number Diff line change 1+ #A part of NonVisual Desktop Access (NVDA)
2+ #Copyright (C) 2020 NV Access Limited, Leonard de Ruijter
3+ #This file is covered by the GNU General Public License.
4+ #See the file COPYING for more details.
5+
6+ """ App module for Visual Studio Code.
7+ """
8+
9+ import appModuleHandler
10+ from NVDAObjects .IAccessible .chromium import Document
11+ from NVDAObjects import NVDAObject
12+
13+
14+ class VSCodeDocument (Document ):
15+ """The only content in the root document node of Visual Studio code is the application object.
16+ Creating a tree interceptor on this object causes a major slow down of Code.
17+ Therefore, forcefully block tree interceptor creation.
18+ """
19+ _get_treeInterceptorClass = NVDAObject ._get_treeInterceptorClass
20+
21+
22+ class AppModule (appModuleHandler .AppModule ):
23+
24+ def chooseNVDAObjectOverlayClasses (self , obj , clsList ):
25+ if Document in clsList and obj .IA2Attributes .get ("tag" ) == "#document" :
26+ clsList .insert (0 , VSCodeDocument )
You can’t perform that action at this time.
0 commit comments