diff options
Diffstat (limited to 'scripts/lib')
| -rw-r--r-- | scripts/lib/devtool/ide_plugins/ide_code.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/lib/devtool/ide_plugins/ide_code.py b/scripts/lib/devtool/ide_plugins/ide_code.py index b2193130d2..f44665ed87 100644 --- a/scripts/lib/devtool/ide_plugins/ide_code.py +++ b/scripts/lib/devtool/ide_plugins/ide_code.py | |||
| @@ -125,7 +125,7 @@ class IdeVSCode(IdeBase): | |||
| 125 | settings_dict["cmake.configureOnOpen"] = True | 125 | settings_dict["cmake.configureOnOpen"] = True |
| 126 | settings_dict["cmake.sourceDirectory"] = modified_recipe.real_srctree | 126 | settings_dict["cmake.sourceDirectory"] = modified_recipe.real_srctree |
| 127 | 127 | ||
| 128 | def vscode_settings(self, modified_recipe): | 128 | def vscode_settings(self, modified_recipe, image_recipe): |
| 129 | files_excludes = { | 129 | files_excludes = { |
| 130 | "**/.git/**": True, | 130 | "**/.git/**": True, |
| 131 | "**/oe-logs/**": True, | 131 | "**/oe-logs/**": True, |
| @@ -138,9 +138,16 @@ class IdeVSCode(IdeBase): | |||
| 138 | "**/oe-workdir/**", | 138 | "**/oe-workdir/**", |
| 139 | "**/source-date-epoch/**" | 139 | "**/source-date-epoch/**" |
| 140 | ] | 140 | ] |
| 141 | files_readonly = { | ||
| 142 | modified_recipe.recipe_sysroot + '/**': True, | ||
| 143 | modified_recipe.recipe_sysroot_native + '/**': True, | ||
| 144 | } | ||
| 145 | if image_recipe.rootfs_dbg is not None: | ||
| 146 | files_readonly[image_recipe.rootfs_dbg + '/**'] = True | ||
| 141 | settings_dict = { | 147 | settings_dict = { |
| 142 | "files.watcherExclude": files_excludes, | 148 | "files.watcherExclude": files_excludes, |
| 143 | "files.exclude": files_excludes, | 149 | "files.exclude": files_excludes, |
| 150 | "files.readonlyInclude": files_readonly, | ||
| 144 | "python.analysis.exclude": python_exclude | 151 | "python.analysis.exclude": python_exclude |
| 145 | } | 152 | } |
| 146 | self.__vscode_settings_cmake(settings_dict, modified_recipe) | 153 | self.__vscode_settings_cmake(settings_dict, modified_recipe) |
| @@ -424,7 +431,7 @@ class IdeVSCode(IdeBase): | |||
| 424 | self.vscode_tasks_fallback(args, modified_recipe) | 431 | self.vscode_tasks_fallback(args, modified_recipe) |
| 425 | 432 | ||
| 426 | def setup_modified_recipe(self, args, image_recipe, modified_recipe): | 433 | def setup_modified_recipe(self, args, image_recipe, modified_recipe): |
| 427 | self.vscode_settings(modified_recipe) | 434 | self.vscode_settings(modified_recipe, image_recipe) |
| 428 | self.vscode_extensions(modified_recipe) | 435 | self.vscode_extensions(modified_recipe) |
| 429 | self.vscode_c_cpp_properties(modified_recipe) | 436 | self.vscode_c_cpp_properties(modified_recipe) |
| 430 | if args.target: | 437 | if args.target: |
