@opensumi/ide-debug 2.12.1-next-079c1930
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/assets/breakpoint-conditional-disabled.svg +4 -0
- package/lib/browser/assets/breakpoint-conditional-unverified.svg +4 -0
- package/lib/browser/assets/breakpoint-conditional.svg +4 -0
- package/lib/browser/assets/breakpoint-disabled.svg +4 -0
- package/lib/browser/assets/breakpoint-hint.svg +4 -0
- package/lib/browser/assets/breakpoint-log-disabled.svg +4 -0
- package/lib/browser/assets/breakpoint-log-unverified.svg +4 -0
- package/lib/browser/assets/breakpoint-log.svg +4 -0
- package/lib/browser/assets/breakpoint-unsupported.svg +4 -0
- package/lib/browser/assets/breakpoint-unverified.svg +4 -0
- package/lib/browser/assets/breakpoint.svg +4 -0
- package/lib/browser/assets/breakpoints-activate-inverse.svg +4 -0
- package/lib/browser/assets/breakpoints-activate.svg +4 -0
- package/lib/browser/assets/configure-inverse.svg +4 -0
- package/lib/browser/assets/configure.svg +4 -0
- package/lib/browser/assets/continue-inverse.svg +4 -0
- package/lib/browser/assets/current-and-breakpoint.svg +4 -0
- package/lib/browser/assets/current-arrow.svg +4 -0
- package/lib/browser/assets/remove-all-inverse.svg +4 -0
- package/lib/browser/assets/remove-all.svg +4 -0
- package/lib/browser/assets/repl-inverse.svg +4 -0
- package/lib/browser/assets/repl.svg +4 -0
- package/lib/browser/assets/restart-inverse.svg +4 -0
- package/lib/browser/assets/stackframe-and-breakpoint.svg +4 -0
- package/lib/browser/assets/stackframe-arrow.svg +4 -0
- package/lib/browser/assets/start-inverse.svg +4 -0
- package/lib/browser/breakpoint/breakpoint-decoration.d.ts +12 -0
- package/lib/browser/breakpoint/breakpoint-decoration.d.ts.map +1 -0
- package/lib/browser/breakpoint/breakpoint-decoration.js +53 -0
- package/lib/browser/breakpoint/breakpoint-decoration.js.map +1 -0
- package/lib/browser/breakpoint/breakpoint-manager.d.ts +87 -0
- package/lib/browser/breakpoint/breakpoint-manager.d.ts.map +1 -0
- package/lib/browser/breakpoint/breakpoint-manager.js +287 -0
- package/lib/browser/breakpoint/breakpoint-manager.js.map +1 -0
- package/lib/browser/breakpoint/breakpoint-marker.d.ts +37 -0
- package/lib/browser/breakpoint/breakpoint-marker.d.ts.map +1 -0
- package/lib/browser/breakpoint/breakpoint-marker.js +46 -0
- package/lib/browser/breakpoint/breakpoint-marker.js.map +1 -0
- package/lib/browser/breakpoint/index.d.ts +4 -0
- package/lib/browser/breakpoint/index.d.ts.map +1 -0
- package/lib/browser/breakpoint/index.js +7 -0
- package/lib/browser/breakpoint/index.js.map +1 -0
- package/lib/browser/components/debug-action/index.d.ts +11 -0
- package/lib/browser/components/debug-action/index.d.ts.map +1 -0
- package/lib/browser/components/debug-action/index.js +15 -0
- package/lib/browser/components/debug-action/index.js.map +1 -0
- package/lib/browser/components/debug-action/index.module.less +73 -0
- package/lib/browser/components/floating-click-widget/index.d.ts +3 -0
- package/lib/browser/components/floating-click-widget/index.d.ts.map +1 -0
- package/lib/browser/components/floating-click-widget/index.js +17 -0
- package/lib/browser/components/floating-click-widget/index.js.map +1 -0
- package/lib/browser/components/floating-click-widget/index.module.less +5 -0
- package/lib/browser/components/index.d.ts +2 -0
- package/lib/browser/components/index.d.ts.map +1 -0
- package/lib/browser/components/index.js +5 -0
- package/lib/browser/components/index.js.map +1 -0
- package/lib/browser/contextkeys/debug-call-stack-item-type-key.d.ts +4 -0
- package/lib/browser/contextkeys/debug-call-stack-item-type-key.d.ts.map +1 -0
- package/lib/browser/contextkeys/debug-call-stack-item-type-key.js +5 -0
- package/lib/browser/contextkeys/debug-call-stack-item-type-key.js.map +1 -0
- package/lib/browser/contextkeys/debug-contextkey.service.d.ts +16 -0
- package/lib/browser/contextkeys/debug-contextkey.service.d.ts.map +1 -0
- package/lib/browser/contextkeys/debug-contextkey.service.js +33 -0
- package/lib/browser/contextkeys/debug-contextkey.service.js.map +1 -0
- package/lib/browser/contextkeys/index.d.ts +2 -0
- package/lib/browser/contextkeys/index.d.ts.map +1 -0
- package/lib/browser/contextkeys/index.js +5 -0
- package/lib/browser/contextkeys/index.js.map +1 -0
- package/lib/browser/debug-configuration-manager.d.ts +86 -0
- package/lib/browser/debug-configuration-manager.d.ts.map +1 -0
- package/lib/browser/debug-configuration-manager.js +456 -0
- package/lib/browser/debug-configuration-manager.js.map +1 -0
- package/lib/browser/debug-configuration-model.d.ts +24 -0
- package/lib/browser/debug-configuration-model.d.ts.map +1 -0
- package/lib/browser/debug-configuration-model.js +55 -0
- package/lib/browser/debug-configuration-model.js.map +1 -0
- package/lib/browser/debug-contribution.d.ts +207 -0
- package/lib/browser/debug-contribution.d.ts.map +1 -0
- package/lib/browser/debug-contribution.js +764 -0
- package/lib/browser/debug-contribution.js.map +1 -0
- package/lib/browser/debug-link-detector.d.ts +13 -0
- package/lib/browser/debug-link-detector.d.ts.map +1 -0
- package/lib/browser/debug-link-detector.js +196 -0
- package/lib/browser/debug-link-detector.js.map +1 -0
- package/lib/browser/debug-preferences.d.ts +15 -0
- package/lib/browser/debug-preferences.d.ts.map +1 -0
- package/lib/browser/debug-preferences.js +57 -0
- package/lib/browser/debug-preferences.js.map +1 -0
- package/lib/browser/debug-progress.service.d.ts +13 -0
- package/lib/browser/debug-progress.service.d.ts.map +1 -0
- package/lib/browser/debug-progress.service.js +97 -0
- package/lib/browser/debug-progress.service.js.map +1 -0
- package/lib/browser/debug-schema-updater.d.ts +10 -0
- package/lib/browser/debug-schema-updater.d.ts.map +1 -0
- package/lib/browser/debug-schema-updater.js +74 -0
- package/lib/browser/debug-schema-updater.js.map +1 -0
- package/lib/browser/debug-service.d.ts +11 -0
- package/lib/browser/debug-service.d.ts.map +1 -0
- package/lib/browser/debug-service.js +43 -0
- package/lib/browser/debug-service.js.map +1 -0
- package/lib/browser/debug-session-connection.d.ts +107 -0
- package/lib/browser/debug-session-connection.d.ts.map +1 -0
- package/lib/browser/debug-session-connection.js +267 -0
- package/lib/browser/debug-session-connection.js.map +1 -0
- package/lib/browser/debug-session-contribution.d.ts +61 -0
- package/lib/browser/debug-session-contribution.d.ts.map +1 -0
- package/lib/browser/debug-session-contribution.js +116 -0
- package/lib/browser/debug-session-contribution.js.map +1 -0
- package/lib/browser/debug-session-manager.d.ts +130 -0
- package/lib/browser/debug-session-manager.d.ts.map +1 -0
- package/lib/browser/debug-session-manager.js +488 -0
- package/lib/browser/debug-session-manager.js.map +1 -0
- package/lib/browser/debug-session.d.ts +181 -0
- package/lib/browser/debug-session.d.ts.map +1 -0
- package/lib/browser/debug-session.js +898 -0
- package/lib/browser/debug-session.js.map +1 -0
- package/lib/browser/debug-style.less +125 -0
- package/lib/browser/debugUtils.d.ts +18 -0
- package/lib/browser/debugUtils.d.ts.map +1 -0
- package/lib/browser/debugUtils.js +91 -0
- package/lib/browser/debugUtils.js.map +1 -0
- package/lib/browser/editor/debug-breakpoint-widget.d.ts +29 -0
- package/lib/browser/editor/debug-breakpoint-widget.d.ts.map +1 -0
- package/lib/browser/editor/debug-breakpoint-widget.js +82 -0
- package/lib/browser/editor/debug-breakpoint-widget.js.map +1 -0
- package/lib/browser/editor/debug-breakpoint-zone-widget.d.ts +60 -0
- package/lib/browser/editor/debug-breakpoint-zone-widget.d.ts.map +1 -0
- package/lib/browser/editor/debug-breakpoint-zone-widget.js +198 -0
- package/lib/browser/editor/debug-breakpoint-zone-widget.js.map +1 -0
- package/lib/browser/editor/debug-breakpoint.module.less +29 -0
- package/lib/browser/editor/debug-editor-contribution.d.ts +27 -0
- package/lib/browser/editor/debug-editor-contribution.d.ts.map +1 -0
- package/lib/browser/editor/debug-editor-contribution.js +354 -0
- package/lib/browser/editor/debug-editor-contribution.js.map +1 -0
- package/lib/browser/editor/debug-expression-provider.d.ts +12 -0
- package/lib/browser/editor/debug-expression-provider.d.ts.map +1 -0
- package/lib/browser/editor/debug-expression-provider.js +88 -0
- package/lib/browser/editor/debug-expression-provider.js.map +1 -0
- package/lib/browser/editor/debug-hover-model.d.ts +12 -0
- package/lib/browser/editor/debug-hover-model.d.ts.map +1 -0
- package/lib/browser/editor/debug-hover-model.js +43 -0
- package/lib/browser/editor/debug-hover-model.js.map +1 -0
- package/lib/browser/editor/debug-hover-source.d.ts +18 -0
- package/lib/browser/editor/debug-hover-source.d.ts.map +1 -0
- package/lib/browser/editor/debug-hover-source.js +94 -0
- package/lib/browser/editor/debug-hover-source.js.map +1 -0
- package/lib/browser/editor/debug-hover-tree.model.service.d.ts +62 -0
- package/lib/browser/editor/debug-hover-tree.model.service.d.ts.map +1 -0
- package/lib/browser/editor/debug-hover-tree.model.service.js +284 -0
- package/lib/browser/editor/debug-hover-tree.model.service.js.map +1 -0
- package/lib/browser/editor/debug-hover-widget.d.ts +58 -0
- package/lib/browser/editor/debug-hover-widget.d.ts.map +1 -0
- package/lib/browser/editor/debug-hover-widget.js +152 -0
- package/lib/browser/editor/debug-hover-widget.js.map +1 -0
- package/lib/browser/editor/debug-hover.module.less +30 -0
- package/lib/browser/editor/debug-hover.view.d.ts +3 -0
- package/lib/browser/editor/debug-hover.view.d.ts.map +1 -0
- package/lib/browser/editor/debug-hover.view.js +86 -0
- package/lib/browser/editor/debug-hover.view.js.map +1 -0
- package/lib/browser/editor/debug-model-manager.d.ts +41 -0
- package/lib/browser/editor/debug-model-manager.d.ts.map +1 -0
- package/lib/browser/editor/debug-model-manager.js +191 -0
- package/lib/browser/editor/debug-model-manager.js.map +1 -0
- package/lib/browser/editor/debug-model.d.ts +181 -0
- package/lib/browser/editor/debug-model.d.ts.map +1 -0
- package/lib/browser/editor/debug-model.js +673 -0
- package/lib/browser/editor/debug-model.js.map +1 -0
- package/lib/browser/editor/debug-run-to-cursor.service.d.ts +19 -0
- package/lib/browser/editor/debug-run-to-cursor.service.d.ts.map +1 -0
- package/lib/browser/editor/debug-run-to-cursor.service.js +145 -0
- package/lib/browser/editor/debug-run-to-cursor.service.js.map +1 -0
- package/lib/browser/editor/debug-styles.d.ts +13 -0
- package/lib/browser/editor/debug-styles.d.ts.map +1 -0
- package/lib/browser/editor/debug-styles.js +60 -0
- package/lib/browser/editor/debug-styles.js.map +1 -0
- package/lib/browser/editor/evaluatable-expression.d.ts +22 -0
- package/lib/browser/editor/evaluatable-expression.d.ts.map +1 -0
- package/lib/browser/editor/evaluatable-expression.js +24 -0
- package/lib/browser/editor/evaluatable-expression.js.map +1 -0
- package/lib/browser/editor/index.d.ts +7 -0
- package/lib/browser/editor/index.d.ts.map +1 -0
- package/lib/browser/editor/index.js +10 -0
- package/lib/browser/editor/index.js.map +1 -0
- package/lib/browser/editor/inline-values.d.ts +4 -0
- package/lib/browser/editor/inline-values.d.ts.map +1 -0
- package/lib/browser/editor/inline-values.js +6 -0
- package/lib/browser/editor/inline-values.js.map +1 -0
- package/lib/browser/index.d.ts +27 -0
- package/lib/browser/index.d.ts.map +1 -0
- package/lib/browser/index.js +135 -0
- package/lib/browser/index.js.map +1 -0
- package/lib/browser/markers/index.d.ts +3 -0
- package/lib/browser/markers/index.d.ts.map +1 -0
- package/lib/browser/markers/index.js +6 -0
- package/lib/browser/markers/index.js.map +1 -0
- package/lib/browser/markers/marker-manager.d.ts +62 -0
- package/lib/browser/markers/marker-manager.d.ts.map +1 -0
- package/lib/browser/markers/marker-manager.js +175 -0
- package/lib/browser/markers/marker-manager.js.map +1 -0
- package/lib/browser/markers/marker.d.ts +13 -0
- package/lib/browser/markers/marker.d.ts.map +1 -0
- package/lib/browser/markers/marker.js +3 -0
- package/lib/browser/markers/marker.js.map +1 -0
- package/lib/browser/model/debug-source.d.ts +46 -0
- package/lib/browser/model/debug-source.d.ts.map +1 -0
- package/lib/browser/model/debug-source.js +113 -0
- package/lib/browser/model/debug-source.js.map +1 -0
- package/lib/browser/model/debug-stack-frame.d.ts +30 -0
- package/lib/browser/model/debug-stack-frame.d.ts.map +1 -0
- package/lib/browser/model/debug-stack-frame.js +85 -0
- package/lib/browser/model/debug-stack-frame.js.map +1 -0
- package/lib/browser/model/debug-thread.d.ts +46 -0
- package/lib/browser/model/debug-thread.d.ts.map +1 -0
- package/lib/browser/model/debug-thread.js +140 -0
- package/lib/browser/model/debug-thread.js.map +1 -0
- package/lib/browser/model/debug-watch.d.ts +39 -0
- package/lib/browser/model/debug-watch.d.ts.map +1 -0
- package/lib/browser/model/debug-watch.js +97 -0
- package/lib/browser/model/debug-watch.js.map +1 -0
- package/lib/browser/model/index.d.ts +5 -0
- package/lib/browser/model/index.d.ts.map +1 -0
- package/lib/browser/model/index.js +8 -0
- package/lib/browser/model/index.js.map +1 -0
- package/lib/browser/preferences/launch-folder-preference-provider.d.ts +6 -0
- package/lib/browser/preferences/launch-folder-preference-provider.d.ts.map +1 -0
- package/lib/browser/preferences/launch-folder-preference-provider.js +29 -0
- package/lib/browser/preferences/launch-folder-preference-provider.js.map +1 -0
- package/lib/browser/preferences/launch-preferences-contribution.d.ts +6 -0
- package/lib/browser/preferences/launch-preferences-contribution.d.ts.map +1 -0
- package/lib/browser/preferences/launch-preferences-contribution.js +17 -0
- package/lib/browser/preferences/launch-preferences-contribution.js.map +1 -0
- package/lib/browser/preferences/launch-preferences.d.ts +3 -0
- package/lib/browser/preferences/launch-preferences.d.ts.map +1 -0
- package/lib/browser/preferences/launch-preferences.js +16 -0
- package/lib/browser/preferences/launch-preferences.js.map +1 -0
- package/lib/browser/tree/debug-console-tree-node.define.d.ts +29 -0
- package/lib/browser/tree/debug-console-tree-node.define.d.ts.map +1 -0
- package/lib/browser/tree/debug-console-tree-node.define.js +68 -0
- package/lib/browser/tree/debug-console-tree-node.define.js.map +1 -0
- package/lib/browser/tree/debug-tree-node.define.d.ts +199 -0
- package/lib/browser/tree/debug-tree-node.define.d.ts.map +1 -0
- package/lib/browser/tree/debug-tree-node.define.js +583 -0
- package/lib/browser/tree/debug-tree-node.define.js.map +1 -0
- package/lib/browser/tree/index.d.ts +3 -0
- package/lib/browser/tree/index.d.ts.map +1 -0
- package/lib/browser/tree/index.js +6 -0
- package/lib/browser/tree/index.js.map +1 -0
- package/lib/browser/view/breakpoints/debug-breakpoints.module.less +71 -0
- package/lib/browser/view/breakpoints/debug-breakpoints.service.d.ts +42 -0
- package/lib/browser/view/breakpoints/debug-breakpoints.service.d.ts.map +1 -0
- package/lib/browser/view/breakpoints/debug-breakpoints.service.js +228 -0
- package/lib/browser/view/breakpoints/debug-breakpoints.service.js.map +1 -0
- package/lib/browser/view/breakpoints/debug-breakpoints.view.d.ts +19 -0
- package/lib/browser/view/breakpoints/debug-breakpoints.view.d.ts.map +1 -0
- package/lib/browser/view/breakpoints/debug-breakpoints.view.js +108 -0
- package/lib/browser/view/breakpoints/debug-breakpoints.view.js.map +1 -0
- package/lib/browser/view/configuration/debug-configuration.module.less +101 -0
- package/lib/browser/view/configuration/debug-configuration.service.d.ts +36 -0
- package/lib/browser/view/configuration/debug-configuration.service.d.ts.map +1 -0
- package/lib/browser/view/configuration/debug-configuration.service.js +186 -0
- package/lib/browser/view/configuration/debug-configuration.service.js.map +1 -0
- package/lib/browser/view/configuration/debug-configuration.view.d.ts +3 -0
- package/lib/browser/view/configuration/debug-configuration.view.d.ts.map +1 -0
- package/lib/browser/view/configuration/debug-configuration.view.js +106 -0
- package/lib/browser/view/configuration/debug-configuration.view.js.map +1 -0
- package/lib/browser/view/configuration/debug-toolbar.service.d.ts +30 -0
- package/lib/browser/view/configuration/debug-toolbar.service.d.ts.map +1 -0
- package/lib/browser/view/configuration/debug-toolbar.service.js +173 -0
- package/lib/browser/view/configuration/debug-toolbar.service.js.map +1 -0
- package/lib/browser/view/configuration/debug-toolbar.view.d.ts +7 -0
- package/lib/browser/view/configuration/debug-toolbar.view.d.ts.map +1 -0
- package/lib/browser/view/configuration/debug-toolbar.view.js +171 -0
- package/lib/browser/view/configuration/debug-toolbar.view.js.map +1 -0
- package/lib/browser/view/console/debug-console-filter.model.d.ts +8 -0
- package/lib/browser/view/console/debug-console-filter.model.d.ts.map +1 -0
- package/lib/browser/view/console/debug-console-filter.model.js +53 -0
- package/lib/browser/view/console/debug-console-filter.model.js.map +1 -0
- package/lib/browser/view/console/debug-console-filter.service.d.ts +23 -0
- package/lib/browser/view/console/debug-console-filter.service.d.ts.map +1 -0
- package/lib/browser/view/console/debug-console-filter.service.js +66 -0
- package/lib/browser/view/console/debug-console-filter.service.js.map +1 -0
- package/lib/browser/view/console/debug-console-filter.view.d.ts +6 -0
- package/lib/browser/view/console/debug-console-filter.view.d.ts.map +1 -0
- package/lib/browser/view/console/debug-console-filter.view.js +63 -0
- package/lib/browser/view/console/debug-console-filter.view.js.map +1 -0
- package/lib/browser/view/console/debug-console-model.d.ts +18 -0
- package/lib/browser/view/console/debug-console-model.d.ts.map +1 -0
- package/lib/browser/view/console/debug-console-model.js +52 -0
- package/lib/browser/view/console/debug-console-model.js.map +1 -0
- package/lib/browser/view/console/debug-console-session.d.ts +32 -0
- package/lib/browser/view/console/debug-console-session.d.ts.map +1 -0
- package/lib/browser/view/console/debug-console-session.js +113 -0
- package/lib/browser/view/console/debug-console-session.js.map +1 -0
- package/lib/browser/view/console/debug-console-toolbar.view.d.ts +3 -0
- package/lib/browser/view/console/debug-console-toolbar.view.d.ts.map +1 -0
- package/lib/browser/view/console/debug-console-toolbar.view.js +20 -0
- package/lib/browser/view/console/debug-console-toolbar.view.js.map +1 -0
- package/lib/browser/view/console/debug-console-tree.model.service.d.ts +90 -0
- package/lib/browser/view/console/debug-console-tree.model.service.d.ts.map +1 -0
- package/lib/browser/view/console/debug-console-tree.model.service.js +460 -0
- package/lib/browser/view/console/debug-console-tree.model.service.js.map +1 -0
- package/lib/browser/view/console/debug-console.contribution.d.ts +20 -0
- package/lib/browser/view/console/debug-console.contribution.d.ts.map +1 -0
- package/lib/browser/view/console/debug-console.contribution.js +164 -0
- package/lib/browser/view/console/debug-console.contribution.js.map +1 -0
- package/lib/browser/view/console/debug-console.module.less +321 -0
- package/lib/browser/view/console/debug-console.service.d.ts +67 -0
- package/lib/browser/view/console/debug-console.service.d.ts.map +1 -0
- package/lib/browser/view/console/debug-console.service.js +397 -0
- package/lib/browser/view/console/debug-console.service.js.map +1 -0
- package/lib/browser/view/console/debug-console.view.d.ts +25 -0
- package/lib/browser/view/console/debug-console.view.d.ts.map +1 -0
- package/lib/browser/view/console/debug-console.view.js +299 -0
- package/lib/browser/view/console/debug-console.view.js.map +1 -0
- package/lib/browser/view/debug-view-model.d.ts +54 -0
- package/lib/browser/view/debug-view-model.d.ts.map +1 -0
- package/lib/browser/view/debug-view-model.js +161 -0
- package/lib/browser/view/debug-view-model.js.map +1 -0
- package/lib/browser/view/frames/debug-call-stack-frame.view.d.ts +14 -0
- package/lib/browser/view/frames/debug-call-stack-frame.view.d.ts.map +1 -0
- package/lib/browser/view/frames/debug-call-stack-frame.view.js +143 -0
- package/lib/browser/view/frames/debug-call-stack-frame.view.js.map +1 -0
- package/lib/browser/view/frames/debug-call-stack-session.view.d.ts +10 -0
- package/lib/browser/view/frames/debug-call-stack-session.view.d.ts.map +1 -0
- package/lib/browser/view/frames/debug-call-stack-session.view.js +148 -0
- package/lib/browser/view/frames/debug-call-stack-session.view.js.map +1 -0
- package/lib/browser/view/frames/debug-call-stack-thread.view.d.ts +12 -0
- package/lib/browser/view/frames/debug-call-stack-thread.view.d.ts.map +1 -0
- package/lib/browser/view/frames/debug-call-stack-thread.view.js +52 -0
- package/lib/browser/view/frames/debug-call-stack-thread.view.js.map +1 -0
- package/lib/browser/view/frames/debug-call-stack.contribution.d.ts +10 -0
- package/lib/browser/view/frames/debug-call-stack.contribution.d.ts.map +1 -0
- package/lib/browser/view/frames/debug-call-stack.contribution.js +81 -0
- package/lib/browser/view/frames/debug-call-stack.contribution.js.map +1 -0
- package/lib/browser/view/frames/debug-call-stack.module.less +195 -0
- package/lib/browser/view/frames/debug-call-stack.operation.d.ts +9 -0
- package/lib/browser/view/frames/debug-call-stack.operation.d.ts.map +1 -0
- package/lib/browser/view/frames/debug-call-stack.operation.js +43 -0
- package/lib/browser/view/frames/debug-call-stack.operation.js.map +1 -0
- package/lib/browser/view/frames/debug-call-stack.service.d.ts +12 -0
- package/lib/browser/view/frames/debug-call-stack.service.d.ts.map +1 -0
- package/lib/browser/view/frames/debug-call-stack.service.js +94 -0
- package/lib/browser/view/frames/debug-call-stack.service.js.map +1 -0
- package/lib/browser/view/frames/debug-call-stack.view.d.ts +6 -0
- package/lib/browser/view/frames/debug-call-stack.view.d.ts.map +1 -0
- package/lib/browser/view/frames/debug-call-stack.view.js +32 -0
- package/lib/browser/view/frames/debug-call-stack.view.js.map +1 -0
- package/lib/browser/view/variables/debug-variables-model.d.ts +12 -0
- package/lib/browser/view/variables/debug-variables-model.d.ts.map +1 -0
- package/lib/browser/view/variables/debug-variables-model.js +43 -0
- package/lib/browser/view/variables/debug-variables-model.js.map +1 -0
- package/lib/browser/view/variables/debug-variables-tree.model.service.d.ts +65 -0
- package/lib/browser/view/variables/debug-variables-tree.model.service.d.ts.map +1 -0
- package/lib/browser/view/variables/debug-variables-tree.model.service.js +376 -0
- package/lib/browser/view/variables/debug-variables-tree.model.service.js.map +1 -0
- package/lib/browser/view/variables/debug-variables.contribution.d.ts +14 -0
- package/lib/browser/view/variables/debug-variables.contribution.d.ts.map +1 -0
- package/lib/browser/view/variables/debug-variables.contribution.js +155 -0
- package/lib/browser/view/variables/debug-variables.contribution.js.map +1 -0
- package/lib/browser/view/variables/debug-variables.module.less +176 -0
- package/lib/browser/view/variables/debug-variables.view.d.ts +21 -0
- package/lib/browser/view/variables/debug-variables.view.d.ts.map +1 -0
- package/lib/browser/view/variables/debug-variables.view.js +151 -0
- package/lib/browser/view/variables/debug-variables.view.js.map +1 -0
- package/lib/browser/view/watch/debug-watch-model.d.ts +12 -0
- package/lib/browser/view/watch/debug-watch-model.d.ts.map +1 -0
- package/lib/browser/view/watch/debug-watch-model.js +43 -0
- package/lib/browser/view/watch/debug-watch-model.js.map +1 -0
- package/lib/browser/view/watch/debug-watch-tree.model.service.d.ts +91 -0
- package/lib/browser/view/watch/debug-watch-tree.model.service.d.ts.map +1 -0
- package/lib/browser/view/watch/debug-watch-tree.model.service.js +480 -0
- package/lib/browser/view/watch/debug-watch-tree.model.service.js.map +1 -0
- package/lib/browser/view/watch/debug-watch.contribution.d.ts +12 -0
- package/lib/browser/view/watch/debug-watch.contribution.d.ts.map +1 -0
- package/lib/browser/view/watch/debug-watch.contribution.js +143 -0
- package/lib/browser/view/watch/debug-watch.contribution.js.map +1 -0
- package/lib/browser/view/watch/debug-watch.module.less +214 -0
- package/lib/browser/view/watch/debug-watch.view.d.ts +21 -0
- package/lib/browser/view/watch/debug-watch.view.d.ts.map +1 -0
- package/lib/browser/view/watch/debug-watch.view.js +194 -0
- package/lib/browser/view/watch/debug-watch.view.js.map +1 -0
- package/lib/common/constants.d.ts +57 -0
- package/lib/common/constants.d.ts.map +1 -0
- package/lib/common/constants.js +61 -0
- package/lib/common/constants.js.map +1 -0
- package/lib/common/debug-configuration.d.ts +56 -0
- package/lib/common/debug-configuration.d.ts.map +1 -0
- package/lib/common/debug-configuration.js +15 -0
- package/lib/common/debug-configuration.js.map +1 -0
- package/lib/common/debug-editor.d.ts +4 -0
- package/lib/common/debug-editor.d.ts.map +1 -0
- package/lib/common/debug-editor.js +5 -0
- package/lib/common/debug-editor.js.map +1 -0
- package/lib/common/debug-model.d.ts +104 -0
- package/lib/common/debug-model.d.ts.map +1 -0
- package/lib/common/debug-model.js +10 -0
- package/lib/common/debug-model.js.map +1 -0
- package/lib/common/debug-progress.d.ts +7 -0
- package/lib/common/debug-progress.d.ts.map +1 -0
- package/lib/common/debug-progress.js +5 -0
- package/lib/common/debug-progress.js.map +1 -0
- package/lib/common/debug-schema-updater.d.ts +2 -0
- package/lib/common/debug-schema-updater.d.ts.map +1 -0
- package/lib/common/debug-schema-updater.js +5 -0
- package/lib/common/debug-schema-updater.js.map +1 -0
- package/lib/common/debug-service.d.ts +76 -0
- package/lib/common/debug-service.d.ts.map +1 -0
- package/lib/common/debug-service.js +16 -0
- package/lib/common/debug-service.js.map +1 -0
- package/lib/common/debug-session-options.d.ts +14 -0
- package/lib/common/debug-session-options.d.ts.map +1 -0
- package/lib/common/debug-session-options.js +11 -0
- package/lib/common/debug-session-options.js.map +1 -0
- package/lib/common/debug-session.d.ts +81 -0
- package/lib/common/debug-session.d.ts.map +1 -0
- package/lib/common/debug-session.js +19 -0
- package/lib/common/debug-session.js.map +1 -0
- package/lib/common/evaluatable-expression.d.ts +38 -0
- package/lib/common/evaluatable-expression.d.ts.map +1 -0
- package/lib/common/evaluatable-expression.js +3 -0
- package/lib/common/evaluatable-expression.js.map +1 -0
- package/lib/common/index.d.ts +12 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +15 -0
- package/lib/common/index.js.map +1 -0
- package/lib/common/inline-values.d.ts +65 -0
- package/lib/common/inline-values.d.ts.map +1 -0
- package/lib/common/inline-values.js +4 -0
- package/lib/common/inline-values.js.map +1 -0
- package/lib/common/types.d.ts +80 -0
- package/lib/common/types.d.ts.map +1 -0
- package/lib/common/types.js +51 -0
- package/lib/common/types.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as monaco from '@opensumi/monaco-editor-core/esm/vs/editor/editor.api';
|
|
2
|
+
import { ITextModel } from '@opensumi/ide-monaco/lib/browser/monaco-api/types';
|
|
3
|
+
import { IEvaluatableExpressionService } from './evaluatable-expression';
|
|
4
|
+
export declare class DebugExpressionProvider {
|
|
5
|
+
protected readonly evaluatableExpressionService: IEvaluatableExpressionService;
|
|
6
|
+
get(model: ITextModel, selection: monaco.IRange): Promise<string | undefined>;
|
|
7
|
+
protected getExactExpressionStartAndEnd(lineContent: string, looseStart: number, looseEnd: number): {
|
|
8
|
+
start: number;
|
|
9
|
+
end: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=debug-expression-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-expression-provider.d.ts","sourceRoot":"","sources":["../../../src/browser/editor/debug-expression-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uDAAuD,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,mDAAmD,CAAC;AAE/E,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAGzE,qBACa,uBAAuB;IAGlC,SAAS,CAAC,QAAQ,CAAC,4BAA4B,EAAE,6BAA6B,CAAC;IAEzE,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAyCnF,SAAS,CAAC,6BAA6B,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;CA2CnI"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DebugExpressionProvider = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const monaco = (0, tslib_1.__importStar)(require("@opensumi/monaco-editor-core/esm/vs/editor/editor.api"));
|
|
6
|
+
const di_1 = require("@opensumi/di");
|
|
7
|
+
const evaluatable_expression_1 = require("./evaluatable-expression");
|
|
8
|
+
const ide_core_common_1 = require("@opensumi/ide-core-common");
|
|
9
|
+
let DebugExpressionProvider = class DebugExpressionProvider {
|
|
10
|
+
async get(model, selection) {
|
|
11
|
+
let matchingExpression;
|
|
12
|
+
let rng;
|
|
13
|
+
if (this.evaluatableExpressionService.hasEvaluatableExpressProvider(model)) {
|
|
14
|
+
const cancellationSource = new ide_core_common_1.CancellationTokenSource();
|
|
15
|
+
const supports = this.evaluatableExpressionService.getSupportedEvaluatableExpressionProvider(model);
|
|
16
|
+
const pos = new monaco.Position(selection.startLineNumber, selection.startColumn);
|
|
17
|
+
const promises = supports.map((support) => {
|
|
18
|
+
return Promise.resolve(support.provideEvaluatableExpression(model, pos, cancellationSource.token)).then((expression) => {
|
|
19
|
+
return expression;
|
|
20
|
+
}, () => {
|
|
21
|
+
return undefined;
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
const results = await Promise.all(promises).then(ide_core_common_1.coalesce);
|
|
25
|
+
if (results.length > 0) {
|
|
26
|
+
matchingExpression = results[0].expression;
|
|
27
|
+
rng = results[0].range;
|
|
28
|
+
if (!matchingExpression) {
|
|
29
|
+
const lineContent = model.getLineContent(pos.lineNumber);
|
|
30
|
+
matchingExpression = lineContent.substring(rng.startColumn - 1, rng.endColumn - 1);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
const lineContent = model.getLineContent(selection.startLineNumber);
|
|
36
|
+
const { start, end } = this.getExactExpressionStartAndEnd(lineContent, selection.startColumn, selection.endColumn);
|
|
37
|
+
matchingExpression = lineContent.substring(start - 1, end);
|
|
38
|
+
}
|
|
39
|
+
return matchingExpression;
|
|
40
|
+
}
|
|
41
|
+
getExactExpressionStartAndEnd(lineContent, looseStart, looseEnd) {
|
|
42
|
+
let matchingExpression;
|
|
43
|
+
let startOffset = 0;
|
|
44
|
+
// Some example supported expressions: myVar.prop, a.b.c.d, myVar?.prop, myVar->prop, MyClass::StaticProp, *myVar
|
|
45
|
+
// Match any character except a set of characters which often break interesting sub-expressions
|
|
46
|
+
const expression = /([^()\[\]{}<>\s+\-/%~#^;=|,`!]|\->)+/g;
|
|
47
|
+
// tslint:disable-next-line
|
|
48
|
+
let result = null;
|
|
49
|
+
// First find the full expression under the cursor
|
|
50
|
+
while (result = expression.exec(lineContent)) {
|
|
51
|
+
const start = result.index + 1;
|
|
52
|
+
const end = start + result[0].length;
|
|
53
|
+
if (start <= looseStart && end >= looseEnd) {
|
|
54
|
+
matchingExpression = result[0];
|
|
55
|
+
startOffset = start;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// If there are non-word characters after the cursor, we want to truncate the expression then.
|
|
60
|
+
// For example in expression 'a.b.c.d', if the focus was under 'b', 'a.b' would be evaluated.
|
|
61
|
+
if (matchingExpression) {
|
|
62
|
+
const subExpression = /\w+/g;
|
|
63
|
+
// tslint:disable-next-line
|
|
64
|
+
let subExpressionResult = null;
|
|
65
|
+
while (subExpressionResult = subExpression.exec(matchingExpression)) {
|
|
66
|
+
const subEnd = subExpressionResult.index + 1 + startOffset + subExpressionResult[0].length;
|
|
67
|
+
if (subEnd >= looseEnd) {
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (subExpressionResult) {
|
|
72
|
+
matchingExpression = matchingExpression.substring(0, subExpression.lastIndex);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return matchingExpression ?
|
|
76
|
+
{ start: startOffset, end: startOffset + matchingExpression.length - 1 } :
|
|
77
|
+
{ start: 0, end: 0 };
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
(0, tslib_1.__decorate)([
|
|
81
|
+
(0, di_1.Autowired)(evaluatable_expression_1.IEvaluatableExpressionService),
|
|
82
|
+
(0, tslib_1.__metadata)("design:type", Object)
|
|
83
|
+
], DebugExpressionProvider.prototype, "evaluatableExpressionService", void 0);
|
|
84
|
+
DebugExpressionProvider = (0, tslib_1.__decorate)([
|
|
85
|
+
(0, di_1.Injectable)()
|
|
86
|
+
], DebugExpressionProvider);
|
|
87
|
+
exports.DebugExpressionProvider = DebugExpressionProvider;
|
|
88
|
+
//# sourceMappingURL=debug-expression-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-expression-provider.js","sourceRoot":"","sources":["../../../src/browser/editor/debug-expression-provider.ts"],"names":[],"mappings":";;;;AAAA,2GAAgF;AAEhF,qCAAqD;AACr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AAW,MAAM,CAAC;YACrC,2BAA2B;YAC3B,IAAI,mBAAmB,GAA2B,IAAI,CAAC;YACvD,OAAO,mBAAmB,GAAG,aAAa,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE;gBACnE,MAAM,MAAM,GAAG,mBAAmB,CAAC,KAAK,GAAG,CAAC,GAAG,WAAW,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;gBAC3F,IAAI,MAAM,IAAI,QAAQ,EAAE;oBACtB,MAAM;iBACP;aACF;YAED,IAAI,mBAAmB,EAAE;gBACvB,kBAAkB,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;aAC/E;SACF;QACD,OAAO,kBAAkB,CAAC,CAAC;YACzB,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,WAAW,GAAG,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC;YAC1E,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;IACzB,CAAC;CACF,CAAA;AAtFC;IADC,IAAA,cAAS,EAAC,sDAA6B,CAAC;;6EACsC;AAHpE,uBAAuB;IADnC,IAAA,eAAU,GAAE;GACA,uBAAuB,CAyFnC;AAzFY,0DAAuB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TreeModel, CompositeTreeNode } from '@opensumi/ide-components';
|
|
2
|
+
import { Event } from '@opensumi/ide-core-browser';
|
|
3
|
+
import { ExpressionContainer } from '../tree/debug-tree-node.define';
|
|
4
|
+
export declare class DebugHoverModel extends TreeModel {
|
|
5
|
+
static DEFAULT_FLUSH_DELAY: number;
|
|
6
|
+
private flushDispatchChangeDelayer;
|
|
7
|
+
private onWillUpdateEmitter;
|
|
8
|
+
constructor(root: ExpressionContainer);
|
|
9
|
+
get onWillUpdate(): Event<void>;
|
|
10
|
+
init(root: CompositeTreeNode): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=debug-hover-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-hover-model.d.ts","sourceRoot":"","sources":["../../../src/browser/editor/debug-hover-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAiB,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAEvF,OAAO,EAA8B,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,qBACa,eAAgB,SAAQ,SAAS;IAE5C,MAAM,CAAC,mBAAmB,SAAO;IAEjC,OAAO,CAAC,0BAA0B,CAAoE;IACtG,OAAO,CAAC,mBAAmB,CAAgC;gBAEnC,IAAI,EAAE,mBAAmB;IAKjD,IAAI,YAAY,IAAI,KAAK,CAAC,IAAI,CAAC,CAE9B;IAED,IAAI,CAAC,IAAI,EAAE,iBAAiB;CAe7B"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var DebugHoverModel_1;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.DebugHoverModel = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const ide_components_1 = require("@opensumi/ide-components");
|
|
7
|
+
const di_1 = require("@opensumi/di");
|
|
8
|
+
const ide_core_browser_1 = require("@opensumi/ide-core-browser");
|
|
9
|
+
const debug_tree_node_define_1 = require("../tree/debug-tree-node.define");
|
|
10
|
+
let DebugHoverModel = DebugHoverModel_1 = class DebugHoverModel extends ide_components_1.TreeModel {
|
|
11
|
+
constructor(root) {
|
|
12
|
+
super();
|
|
13
|
+
this.flushDispatchChangeDelayer = new ide_core_browser_1.ThrottledDelayer(DebugHoverModel_1.DEFAULT_FLUSH_DELAY);
|
|
14
|
+
this.onWillUpdateEmitter = new ide_core_browser_1.Emitter();
|
|
15
|
+
this.init(root);
|
|
16
|
+
}
|
|
17
|
+
get onWillUpdate() {
|
|
18
|
+
return this.onWillUpdateEmitter.event;
|
|
19
|
+
}
|
|
20
|
+
init(root) {
|
|
21
|
+
this.root = root;
|
|
22
|
+
// 分支更新时通知树刷新, 不是立即更新,而是延迟更新,待树稳定后再更新
|
|
23
|
+
// 100ms的延迟并不能保证树稳定,特别是在node_modules展开的情况下
|
|
24
|
+
// 但在普通使用上已经足够可用,即不会有渲染闪烁问题
|
|
25
|
+
this.root.watcher.on(ide_components_1.TreeNodeEvent.BranchDidUpdate, () => {
|
|
26
|
+
if (!this.flushDispatchChangeDelayer.isTriggered()) {
|
|
27
|
+
this.flushDispatchChangeDelayer.cancel();
|
|
28
|
+
}
|
|
29
|
+
this.flushDispatchChangeDelayer.trigger(async () => {
|
|
30
|
+
await this.onWillUpdateEmitter.fireAndAwait();
|
|
31
|
+
this.dispatchChange();
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
DebugHoverModel.DEFAULT_FLUSH_DELAY = 100;
|
|
37
|
+
DebugHoverModel = DebugHoverModel_1 = (0, tslib_1.__decorate)([
|
|
38
|
+
(0, di_1.Injectable)({ multiple: true }),
|
|
39
|
+
(0, tslib_1.__param)(0, (0, di_1.Optional)()),
|
|
40
|
+
(0, tslib_1.__metadata)("design:paramtypes", [debug_tree_node_define_1.ExpressionContainer])
|
|
41
|
+
], DebugHoverModel);
|
|
42
|
+
exports.DebugHoverModel = DebugHoverModel;
|
|
43
|
+
//# sourceMappingURL=debug-hover-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-hover-model.js","sourceRoot":"","sources":["../../../src/browser/editor/debug-hover-model.ts"],"names":[],"mappings":";;;;;AAAA,6DAAuF;AACvF,qCAAoD;AACpD,iEAA+E;AAC/E,2EAAqE;AAGrE,IAAa,eAAe,uBAA5B,MAAa,eAAgB,SAAQ,0BAAS;IAO5C,YAAwB,IAAyB;QAC/C,KAAK,EAAE,CAAC;QAJF,+BAA0B,GAAI,IAAI,mCAAgB,CAAO,iBAAe,CAAC,mBAAmB,CAAC,CAAC;QAC9F,wBAAmB,GAAkB,IAAI,0BAAO,EAAE,CAAC;QAIzD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClB,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC;IACxC,CAAC;IAED,IAAI,CAAC,IAAuB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,qCAAqC;QACrC,0CAA0C;QAC1C,2BAA2B;QAC3B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,8BAAa,CAAC,eAAe,EAAE,GAAG,EAAE;YACvD,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,WAAW,EAAE,EAAE;gBAClD,IAAI,CAAC,0BAA0B,CAAC,MAAM,EAAE,CAAC;aAC1C;YACD,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE;gBACjD,MAAM,IAAI,CAAC,mBAAmB,CAAC,YAAY,EAAE,CAAC;gBAC9C,IAAI,CAAC,cAAc,EAAE,CAAC;YACxB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA7BQ,mCAAmB,GAAG,GAAG,CAAC;AAFtB,eAAe;IAD3B,IAAA,eAAU,EAAC,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;IAQd,wBAAA,IAAA,aAAQ,GAAE,CAAA;kDAAO,4CAAmB;GAPtC,eAAe,CA+B3B;AA/BY,0CAAe"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DebugSessionManager } from '../debug-session-manager';
|
|
2
|
+
import { DebugVariable, DebugScope, DebugVariableContainer, DebugHoverVariableRoot } from '../tree/debug-tree-node.define';
|
|
3
|
+
import { Event } from '@opensumi/ide-core-browser';
|
|
4
|
+
export declare type ExpressionVariable = DebugHoverVariableRoot | DebugVariable | DebugVariableContainer | undefined;
|
|
5
|
+
export declare class DebugHoverSource {
|
|
6
|
+
protected readonly sessions: DebugSessionManager;
|
|
7
|
+
private onDidChangeEmitter;
|
|
8
|
+
onDidChange: Event<ExpressionVariable>;
|
|
9
|
+
dispose(): void;
|
|
10
|
+
protected _expression: ExpressionVariable;
|
|
11
|
+
get expression(): ExpressionVariable;
|
|
12
|
+
clearEvaluate(): void;
|
|
13
|
+
evaluate(expression: string): Promise<ExpressionVariable>;
|
|
14
|
+
protected doEvaluate(expression: string): Promise<ExpressionVariable>;
|
|
15
|
+
protected findVariable(namesToFind: string[]): Promise<DebugVariable | DebugVariableContainer | undefined>;
|
|
16
|
+
protected doFindVariable(owner: DebugScope | DebugVariableContainer, namesToFind: string[]): Promise<DebugVariable | undefined>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=debug-hover-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-hover-source.d.ts","sourceRoot":"","sources":["../../../src/browser/editor/debug-hover-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAG3H,OAAO,EAAE,KAAK,EAAW,MAAM,4BAA4B,CAAC;AAE5D,oBAAY,kBAAkB,GAAG,sBAAsB,GAAG,aAAa,GAAG,sBAAsB,GAAG,SAAS,CAAC;AAE7G,qBACa,gBAAgB;IAG3B,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IAEjD,OAAO,CAAC,kBAAkB,CAA8C;IACxE,WAAW,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAiC;IAEvE,OAAO,IAAI,IAAI;IAIf,SAAS,CAAC,WAAW,EAAE,kBAAkB,CAAC;IAC1C,IAAI,UAAU,IAAI,kBAAkB,CAEnC;IAEM,aAAa,IAAI,IAAI;IAItB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;cAO/C,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;cAa3D,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,GAAG,sBAAsB,GAAG,SAAS,CAAC;cAmBhG,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,sBAAsB,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;CAwBtI"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DebugHoverSource = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const debug_session_manager_1 = require("../debug-session-manager");
|
|
6
|
+
const debug_tree_node_define_1 = require("../tree/debug-tree-node.define");
|
|
7
|
+
const di_1 = require("@opensumi/di");
|
|
8
|
+
const common_1 = require("../../common");
|
|
9
|
+
const ide_core_browser_1 = require("@opensumi/ide-core-browser");
|
|
10
|
+
let DebugHoverSource = class DebugHoverSource {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.onDidChangeEmitter = new ide_core_browser_1.Emitter();
|
|
13
|
+
this.onDidChange = this.onDidChangeEmitter.event;
|
|
14
|
+
}
|
|
15
|
+
dispose() {
|
|
16
|
+
this._expression = undefined;
|
|
17
|
+
}
|
|
18
|
+
get expression() {
|
|
19
|
+
return this._expression;
|
|
20
|
+
}
|
|
21
|
+
clearEvaluate() {
|
|
22
|
+
this.onDidChangeEmitter.fire(undefined);
|
|
23
|
+
}
|
|
24
|
+
async evaluate(expression) {
|
|
25
|
+
const evaluated = await this.doEvaluate(expression);
|
|
26
|
+
this._expression = evaluated;
|
|
27
|
+
this.onDidChangeEmitter.fire(evaluated);
|
|
28
|
+
return evaluated;
|
|
29
|
+
}
|
|
30
|
+
async doEvaluate(expression) {
|
|
31
|
+
const { currentSession } = this.sessions;
|
|
32
|
+
if (!currentSession) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
if (currentSession.capabilities.supportsEvaluateForHovers) {
|
|
36
|
+
const item = new debug_tree_node_define_1.DebugHoverVariableRoot(expression, currentSession);
|
|
37
|
+
await item.evaluate('hover');
|
|
38
|
+
return item.available && item || undefined;
|
|
39
|
+
}
|
|
40
|
+
return this.findVariable(expression.split('.').map((word) => word.trim()).filter((word) => !!word));
|
|
41
|
+
}
|
|
42
|
+
async findVariable(namesToFind) {
|
|
43
|
+
const { currentFrame } = this.sessions;
|
|
44
|
+
if (!currentFrame) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
let variable;
|
|
48
|
+
const scopes = await currentFrame.getScopes();
|
|
49
|
+
for (const scope of scopes) {
|
|
50
|
+
const found = await this.doFindVariable(scope, namesToFind);
|
|
51
|
+
if (!variable) {
|
|
52
|
+
variable = found;
|
|
53
|
+
}
|
|
54
|
+
else if (found && found.value !== variable.value) {
|
|
55
|
+
// 仅显示找到的所有表达式是否具有相同的值
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return variable;
|
|
60
|
+
}
|
|
61
|
+
async doFindVariable(owner, namesToFind) {
|
|
62
|
+
await owner.ensureLoaded();
|
|
63
|
+
const elements = owner.children;
|
|
64
|
+
const variables = [];
|
|
65
|
+
if (!elements) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
for (const element of elements) {
|
|
69
|
+
if (element instanceof debug_tree_node_define_1.DebugVariableContainer || element instanceof debug_tree_node_define_1.DebugVariable) {
|
|
70
|
+
if (element.name === namesToFind[0]) {
|
|
71
|
+
variables.push(element);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (variables.length !== 1) {
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
if (namesToFind.length === 1) {
|
|
79
|
+
return variables[0];
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
return this.doFindVariable(variables[0], namesToFind.slice(1));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
(0, tslib_1.__decorate)([
|
|
87
|
+
(0, di_1.Autowired)(common_1.IDebugSessionManager),
|
|
88
|
+
(0, tslib_1.__metadata)("design:type", debug_session_manager_1.DebugSessionManager)
|
|
89
|
+
], DebugHoverSource.prototype, "sessions", void 0);
|
|
90
|
+
DebugHoverSource = (0, tslib_1.__decorate)([
|
|
91
|
+
(0, di_1.Injectable)()
|
|
92
|
+
], DebugHoverSource);
|
|
93
|
+
exports.DebugHoverSource = DebugHoverSource;
|
|
94
|
+
//# sourceMappingURL=debug-hover-source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-hover-source.js","sourceRoot":"","sources":["../../../src/browser/editor/debug-hover-source.ts"],"names":[],"mappings":";;;;AAAA,oEAA+D;AAC/D,2EAA2H;AAC3H,qCAAqD;AACrD,yCAAoD;AACpD,iEAA4D;AAK5D,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IAA7B;QAKU,uBAAkB,GAAgC,IAAI,0BAAO,EAAE,CAAC;QACxE,gBAAW,GAA8B,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC;IA8EzE,CAAC;IA5EC,OAAO;QACL,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;IAC/B,CAAC;IAGD,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAEM,aAAa;QAClB,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,UAAkB;QAC/B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,UA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ensumi/ide-core-browser';
|
|
3
|
+
import { DebugHoverModel } from './debug-hover-model';
|
|
4
|
+
import { DebugVariable, ExpressionContainer, ExpressionNode } from '../tree/debug-tree-node.define';
|
|
5
|
+
import { ExpressionVariable } from './debug-hover-source';
|
|
6
|
+
export interface IDebugVariablesHandle extends IRecycleTreeHandle {
|
|
7
|
+
hasDirectFocus: () => boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface IDebugHoverUpdateData {
|
|
10
|
+
treeModel?: DebugHoverModel;
|
|
11
|
+
variable?: DebugVariable;
|
|
12
|
+
}
|
|
13
|
+
export declare class DebugHoverTreeModelService {
|
|
14
|
+
private static DEFAULT_FLUSH_FILE_EVENT_DELAY;
|
|
15
|
+
private readonly injector;
|
|
16
|
+
private readonly debugHoverSource;
|
|
17
|
+
private _treeModel;
|
|
18
|
+
private _whenReady;
|
|
19
|
+
private _decorations;
|
|
20
|
+
private _debugHoverTreeHandle;
|
|
21
|
+
flushEventQueueDeferred: Deferred<void> | null;
|
|
22
|
+
private _eventFlushTimeout;
|
|
23
|
+
private _changeEventDispatchQueue;
|
|
24
|
+
private selectedDecoration;
|
|
25
|
+
private focusedDecoration;
|
|
26
|
+
private loadingDecoration;
|
|
27
|
+
private _focusedNode;
|
|
28
|
+
private _selectedNodes;
|
|
29
|
+
private preContextMenuFocusedNode;
|
|
30
|
+
private onDidRefreshedEmitter;
|
|
31
|
+
private onDidUpdateTreeModelOrVariableEmitter;
|
|
32
|
+
private disposableCollection;
|
|
33
|
+
constructor();
|
|
34
|
+
get onDidRefreshed(): Event<void>;
|
|
35
|
+
get onDidUpdateTreeModelOrVariable(): Event<IDebugHoverUpdateData | void>;
|
|
36
|
+
get flushEventQueuePromise(): Promise<void> | null;
|
|
37
|
+
get treeHandle(): IDebugVariablesHandle;
|
|
38
|
+
get decorations(): DecorationsManager;
|
|
39
|
+
get treeModel(): DebugHoverModel;
|
|
40
|
+
get whenReady(): Promise<void>;
|
|
41
|
+
get focusedNode(): ExpressionContainer | ExpressionNode | undefined;
|
|
42
|
+
get selectedNodes(): (ExpressionContainer | ExpressionNode)[];
|
|
43
|
+
dispose(): void;
|
|
44
|
+
listenTreeViewChange(): void;
|
|
45
|
+
initTreeModel(root: ExpressionVariable): Promise<DebugHoverModel | undefined>;
|
|
46
|
+
initDecorations(root: any): void;
|
|
47
|
+
activeNodeDecoration: (target: ExpressionContainer | ExpressionNode, dispatchChange?: boolean) => void;
|
|
48
|
+
activeNodeFocusedDecoration: (target: ExpressionContainer | ExpressionNode, removePreFocusedDecoration?: boolean) => void;
|
|
49
|
+
enactiveNodeDecoration: () => void;
|
|
50
|
+
removeNodeDecoration(): void;
|
|
51
|
+
handleTreeHandler(handle: IDebugVariablesHandle): void;
|
|
52
|
+
handleTreeBlur: () => void;
|
|
53
|
+
handleTwistierClick: (item: ExpressionContainer | ExpressionNode) => void;
|
|
54
|
+
toggleDirectory: (item: ExpressionContainer) => Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* 刷新指定下的所有子节点
|
|
57
|
+
*/
|
|
58
|
+
refresh(node?: ExpressionContainer): Promise<void>;
|
|
59
|
+
private queueChangeEvent;
|
|
60
|
+
flushEventQueue: () => Promise<any> | undefined;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=debug-hover-tree.model.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-hover-tree.model.service.d.ts","sourceRoot":"","sources":["../../../src/browser/editor/debug-hover-tree.model.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAc,kBAAkB,EAA6B,MAAM,0BAA0B,CAAC;AACzH,OAAO,EAAW,QAAQ,EAAE,KAAK,EAAwB,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACpG,OAAO,EAAE,kBAAkB,EA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AAI,aAAa,6CAEhB;IAED,OAAO;IAMP,oBAAoB;IAkBd,aAAa,CAAC,IAAI,EAAE,kBAAkB;IAW5C,eAAe,CAAC,IAAI,KAAA;IAQpB,oBAAoB,WAAY,mBAAmB,GAAG,cAAc,mBAAkB,OAAO,UA2B5F;IAID,2BAA2B,WAAY,mBAAmB,GAAG,cAAc,+BAA8B,OAAO,UAyB/G;IAGD,sBAAsB,aAMrB;IAED,oBAAoB;IAQpB,iBAAiB,CAAC,MAAM,EAAE,qBAAqB;IAI/C,cAAc,aAGb;IAED,mBAAmB,SAAU,mBAAmB,GAAG,cAAc,UAQhE;IAED,eAAe,SAAgB,mBAAmB,mBAMjD;IAED;;OAEG;IACG,OAAO,CAAC,IAAI,GAAE,mBAAgE;IAYpF,OAAO,CAAC,gBAAgB;IAgBjB,eAAe,iCA4BrB;CAEF"}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var DebugHoverTreeModelService_1;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.DebugHoverTreeModelService = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const di_1 = require("@opensumi/di");
|
|
7
|
+
const ide_components_1 = require("@opensumi/ide-components");
|
|
8
|
+
const ide_core_browser_1 = require("@opensumi/ide-core-browser");
|
|
9
|
+
const debug_hover_model_1 = require("./debug-hover-model");
|
|
10
|
+
const path_1 = require("@opensumi/ide-core-common/lib/path");
|
|
11
|
+
const pSeries = require("p-series");
|
|
12
|
+
const debug_tree_node_define_1 = require("../tree/debug-tree-node.define");
|
|
13
|
+
const debug_hover_source_1 = require("./debug-hover-source");
|
|
14
|
+
const debug_variables_module_less_1 = (0, tslib_1.__importDefault)(require("../view/variables/debug-variables.module.less"));
|
|
15
|
+
let DebugHoverTreeModelService = DebugHoverTreeModelService_1 = class DebugHoverTreeModelService {
|
|
16
|
+
constructor() {
|
|
17
|
+
this._changeEventDispatchQueue = [];
|
|
18
|
+
// 装饰器
|
|
19
|
+
this.selectedDecoration = new ide_components_1.Decoration(debug_variables_module_less_1.default.mod_selected); // 选中态
|
|
20
|
+
this.focusedDecoration = new ide_components_1.Decoration(debug_variables_module_less_1.default.mod_focused); // 焦点态
|
|
21
|
+
this.loadingDecoration = new ide_components_1.Decoration(debug_variables_module_less_1.default.mod_loading); // 加载态
|
|
22
|
+
// 选中态的节点
|
|
23
|
+
this._selectedNodes = [];
|
|
24
|
+
this.onDidRefreshedEmitter = new ide_core_browser_1.Emitter();
|
|
25
|
+
this.onDidUpdateTreeModelOrVariableEmitter = new ide_core_browser_1.Emitter();
|
|
26
|
+
this.disposableCollection = new ide_core_browser_1.DisposableCollection();
|
|
27
|
+
// 清空其他选中/焦点态节点,更新当前焦点节点
|
|
28
|
+
this.activeNodeDecoration = (target, dispatchChange = true) => {
|
|
29
|
+
if (this.preContextMenuFocusedNode) {
|
|
30
|
+
this.focusedDecoration.removeTarget(this.preContextMenuFocusedNode);
|
|
31
|
+
this.selectedDecoration.removeTarget(this.preContextMenuFocusedNode);
|
|
32
|
+
this.preContextMenuFocusedNode = null;
|
|
33
|
+
}
|
|
34
|
+
if (target) {
|
|
35
|
+
if (this.selectedNodes.length > 0) {
|
|
36
|
+
// 因为选择装饰器可能通过其他方式添加而不能及时在selectedNodes上更新
|
|
37
|
+
// 故这里遍历所有选中装饰器的节点进行一次统一清理
|
|
38
|
+
for (const target of this.selectedDecoration.appliedTargets.keys()) {
|
|
39
|
+
this.selectedDecoration.removeTarget(target);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (this.focusedNode) {
|
|
43
|
+
this.focusedDecoration.removeTarget(this.focusedNode);
|
|
44
|
+
}
|
|
45
|
+
this.selectedDecoration.addTarget(target);
|
|
46
|
+
this.focusedDecoration.addTarget(target);
|
|
47
|
+
this._focusedNode = target;
|
|
48
|
+
this._selectedNodes = [target];
|
|
49
|
+
if (dispatchChange) {
|
|
50
|
+
// 通知视图更新
|
|
51
|
+
this.treeModel.dispatchChange();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
// 清空其他焦点态节点,更新当前焦点节点,
|
|
56
|
+
// removePreFocusedDecoration 表示更新焦点节点时如果此前已存在焦点节点,之前的节点装饰器将会被移除
|
|
57
|
+
this.activeNodeFocusedDecoration = (target, removePreFocusedDecoration = false) => {
|
|
58
|
+
if (this.focusedNode !== target) {
|
|
59
|
+
if (removePreFocusedDecoration) {
|
|
60
|
+
// 当存在上一次右键菜单激活的文件时,需要把焦点态的文件节点的装饰器全部移除
|
|
61
|
+
if (this.preContextMenuFocusedNode) {
|
|
62
|
+
this.focusedDecoration.removeTarget(this.preContextMenuFocusedNode);
|
|
63
|
+
this.selectedDecoration.removeTarget(this.preContextMenuFocusedNode);
|
|
64
|
+
}
|
|
65
|
+
else if (!!this.focusedNode) {
|
|
66
|
+
// 多选情况下第一次切换焦点文件
|
|
67
|
+
this.focusedDecoration.removeTarget(this.focusedNode);
|
|
68
|
+
}
|
|
69
|
+
this.preContextMenuFocusedNode = target;
|
|
70
|
+
}
|
|
71
|
+
else if (!!this.focusedNode) {
|
|
72
|
+
this.preContextMenuFocusedNode = null;
|
|
73
|
+
this.focusedDecoration.removeTarget(this.focusedNode);
|
|
74
|
+
}
|
|
75
|
+
if (target) {
|
|
76
|
+
this.selectedDecoration.addTarget(target);
|
|
77
|
+
this.focusedDecoration.addTarget(target);
|
|
78
|
+
this._focusedNode = target;
|
|
79
|
+
this._selectedNodes.push(target);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// 通知视图更新
|
|
83
|
+
this.treeModel.dispatchChange();
|
|
84
|
+
};
|
|
85
|
+
// 取消选中节点焦点
|
|
86
|
+
this.enactiveNodeDecoration = () => {
|
|
87
|
+
if (this.focusedNode) {
|
|
88
|
+
this.focusedDecoration.removeTarget(this.focusedNode);
|
|
89
|
+
this.treeModel.dispatchChange();
|
|
90
|
+
}
|
|
91
|
+
this._focusedNode = undefined;
|
|
92
|
+
};
|
|
93
|
+
this.handleTreeBlur = () => {
|
|
94
|
+
// 清空焦点状态
|
|
95
|
+
this.enactiveNodeDecoration();
|
|
96
|
+
};
|
|
97
|
+
this.handleTwistierClick = (item) => {
|
|
98
|
+
// 单选操作默认先更新选中状态
|
|
99
|
+
if (!debug_tree_node_define_1.ExpressionContainer.is(item)) {
|
|
100
|
+
this.activeNodeDecoration(item);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
this.activeNodeDecoration(item, false);
|
|
104
|
+
this.toggleDirectory(item);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
this.toggleDirectory = async (item) => {
|
|
108
|
+
if (item.expanded) {
|
|
109
|
+
this.treeHandle.collapseNode(item);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
this.treeHandle.expandNode(item);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
this.flushEventQueue = () => {
|
|
116
|
+
let promise;
|
|
117
|
+
if (!this._changeEventDispatchQueue || this._changeEventDispatchQueue.length === 0) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
this._changeEventDispatchQueue.sort((pathA, pathB) => {
|
|
121
|
+
const pathADepth = path_1.Path.pathDepth(pathA);
|
|
122
|
+
const pathBDepth = path_1.Path.pathDepth(pathB);
|
|
123
|
+
return pathADepth - pathBDepth;
|
|
124
|
+
});
|
|
125
|
+
const roots = [this._changeEventDispatchQueue[0]];
|
|
126
|
+
for (const path of this._changeEventDispatchQueue) {
|
|
127
|
+
if (roots.some((root) => path.indexOf(root) === 0)) {
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
roots.push(path);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
promise = pSeries(roots.map((path) => async () => {
|
|
135
|
+
var _a;
|
|
136
|
+
const watcher = (_a = this.treeModel.root) === null || _a === void 0 ? void 0 : _a.watchEvents.get(path);
|
|
137
|
+
if (watcher && typeof watcher.callback === 'function') {
|
|
138
|
+
await watcher.callback({ type: ide_components_1.WatchEvent.Changed, path });
|
|
139
|
+
}
|
|
140
|
+
return null;
|
|
141
|
+
}));
|
|
142
|
+
// 重置更新队列
|
|
143
|
+
this._changeEventDispatchQueue = [];
|
|
144
|
+
return promise;
|
|
145
|
+
};
|
|
146
|
+
this.debugHoverSource.onDidChange(async (expression) => {
|
|
147
|
+
if (!expression) {
|
|
148
|
+
this.onDidUpdateTreeModelOrVariableEmitter.fire({ treeModel: undefined, variable: undefined });
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (expression instanceof debug_tree_node_define_1.DebugVariable) {
|
|
152
|
+
this.dispose();
|
|
153
|
+
this.onDidUpdateTreeModelOrVariableEmitter.fire({ variable: expression });
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
await this.initTreeModel(expression);
|
|
157
|
+
this.onDidUpdateTreeModelOrVariableEmitter.fire({ treeModel: this.treeModel });
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
get onDidRefreshed() {
|
|
162
|
+
return this.onDidRefreshedEmitter.event;
|
|
163
|
+
}
|
|
164
|
+
get onDidUpdateTreeModelOrVariable() {
|
|
165
|
+
return this.onDidUpdateTreeModelOrVariableEmitter.event;
|
|
166
|
+
}
|
|
167
|
+
get flushEventQueuePromise() {
|
|
168
|
+
return this.flushEventQueueDeferred && this.flushEventQueueDeferred.promise;
|
|
169
|
+
}
|
|
170
|
+
get treeHandle() {
|
|
171
|
+
return this._debugHoverTreeHandle;
|
|
172
|
+
}
|
|
173
|
+
get decorations() {
|
|
174
|
+
return this._decorations;
|
|
175
|
+
}
|
|
176
|
+
get treeModel() {
|
|
177
|
+
return this._treeModel;
|
|
178
|
+
}
|
|
179
|
+
get whenReady() {
|
|
180
|
+
return this._whenReady;
|
|
181
|
+
}
|
|
182
|
+
// 既是选中态,也是焦点态节点
|
|
183
|
+
get focusedNode() {
|
|
184
|
+
return this._focusedNode;
|
|
185
|
+
}
|
|
186
|
+
// 是选中态,非焦点态节点
|
|
187
|
+
get selectedNodes() {
|
|
188
|
+
return this._selectedNodes;
|
|
189
|
+
}
|
|
190
|
+
dispose() {
|
|
191
|
+
if (!this.disposableCollection.disposed) {
|
|
192
|
+
this.disposableCollection.dispose();
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
listenTreeViewChange() {
|
|
196
|
+
var _a, _b;
|
|
197
|
+
this.dispose();
|
|
198
|
+
this.disposableCollection.push((_a = this.treeModel) === null || _a === void 0 ? void 0 : _a.root.watcher.on(ide_components_1.TreeNodeEvent.WillResolveChildren, (target) => {
|
|
199
|
+
this.loadingDecoration.addTarget(target);
|
|
200
|
+
}));
|
|
201
|
+
this.disposableCollection.push((_b = this.treeModel) === null || _b === void 0 ? void 0 : _b.root.watcher.on(ide_components_1.TreeNodeEvent.DidResolveChildren, (target) => {
|
|
202
|
+
this.loadingDecoration.removeTarget(target);
|
|
203
|
+
}));
|
|
204
|
+
this.disposableCollection.push(this.treeModel.onWillUpdate(() => {
|
|
205
|
+
var _a;
|
|
206
|
+
// 更新树前更新下选中节点
|
|
207
|
+
if (this.selectedNodes.length !== 0) {
|
|
208
|
+
// 仅处理一下单选情况
|
|
209
|
+
const node = (_a = this.treeModel) === null || _a === void 0 ? void 0 : _a.root.getTreeNodeByPath(this.selectedNodes[0].path);
|
|
210
|
+
this.selectedDecoration.addTarget(node);
|
|
211
|
+
}
|
|
212
|
+
}));
|
|
213
|
+
}
|
|
214
|
+
async initTreeModel(root) {
|
|
215
|
+
if (!root) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
this._treeModel = this.injector.get(debug_hover_model_1.DebugHoverModel, [root]);
|
|
219
|
+
this.initDecorations(root);
|
|
220
|
+
this.listenTreeViewChange();
|
|
221
|
+
return this._treeModel;
|
|
222
|
+
}
|
|
223
|
+
initDecorations(root) {
|
|
224
|
+
this._decorations = new ide_components_1.DecorationsManager(root);
|
|
225
|
+
this._decorations.addDecoration(this.selectedDecoration);
|
|
226
|
+
this._decorations.addDecoration(this.focusedDecoration);
|
|
227
|
+
this._decorations.addDecoration(this.loadingDecoration);
|
|
228
|
+
}
|
|
229
|
+
removeNodeDecoration() {
|
|
230
|
+
if (!this.decorations) {
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
this.decorations.removeDecoration(this.selectedDecoration);
|
|
234
|
+
this.decorations.removeDecoration(this.focusedDecoration);
|
|
235
|
+
}
|
|
236
|
+
handleTreeHandler(handle) {
|
|
237
|
+
this._debugHoverTreeHandle = handle;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* 刷新指定下的所有子节点
|
|
241
|
+
*/
|
|
242
|
+
async refresh(node = this.treeModel.root) {
|
|
243
|
+
if (!debug_tree_node_define_1.ExpressionContainer.is(node) && node.parent) {
|
|
244
|
+
node = node.parent;
|
|
245
|
+
}
|
|
246
|
+
// 这里也可以直接调用node.refresh,但由于文件树刷新事件可能会较多
|
|
247
|
+
// 队列化刷新动作减少更新成本
|
|
248
|
+
this.queueChangeEvent(node.path, () => {
|
|
249
|
+
this.onDidRefreshedEmitter.fire();
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
// 队列化Changed事件
|
|
253
|
+
queueChangeEvent(path, callback) {
|
|
254
|
+
if (!this.flushEventQueueDeferred) {
|
|
255
|
+
this.flushEventQueueDeferred = new ide_core_browser_1.Deferred();
|
|
256
|
+
clearTimeout(this._eventFlushTimeout);
|
|
257
|
+
this._eventFlushTimeout = setTimeout(async () => {
|
|
258
|
+
var _a;
|
|
259
|
+
await this.flushEventQueue();
|
|
260
|
+
(_a = this.flushEventQueueDeferred) === null || _a === void 0 ? void 0 : _a.resolve();
|
|
261
|
+
this.flushEventQueueDeferred = null;
|
|
262
|
+
callback();
|
|
263
|
+
}, DebugHoverTreeModelService_1.DEFAULT_FLUSH_FILE_EVENT_DELAY);
|
|
264
|
+
}
|
|
265
|
+
if (this._changeEventDispatchQueue.indexOf(path) === -1) {
|
|
266
|
+
this._changeEventDispatchQueue.push(path);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
DebugHoverTreeModelService.DEFAULT_FLUSH_FILE_EVENT_DELAY = 100;
|
|
271
|
+
(0, tslib_1.__decorate)([
|
|
272
|
+
(0, di_1.Autowired)(di_1.INJECTOR_TOKEN),
|
|
273
|
+
(0, tslib_1.__metadata)("design:type", di_1.Injector)
|
|
274
|
+
], DebugHoverTreeModelService.prototype, "injector", void 0);
|
|
275
|
+
(0, tslib_1.__decorate)([
|
|
276
|
+
(0, di_1.Autowired)(debug_hover_source_1.DebugHoverSource),
|
|
277
|
+
(0, tslib_1.__metadata)("design:type", debug_hover_source_1.DebugHoverSource)
|
|
278
|
+
], DebugHoverTreeModelService.prototype, "debugHoverSource", void 0);
|
|
279
|
+
DebugHoverTreeModelService = DebugHoverTreeModelService_1 = (0, tslib_1.__decorate)([
|
|
280
|
+
(0, di_1.Injectable)(),
|
|
281
|
+
(0, tslib_1.__metadata)("design:paramtypes", [])
|
|
282
|
+
], DebugHoverTreeModelService);
|
|
283
|
+
exports.DebugHoverTreeModelService = DebugHoverTreeModelService;
|
|
284
|
+
//# sourceMappingURL=debug-hover-tree.model.service.js.map
|