Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C cbl-gdb-vsextension
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 12
    • Issues 12
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • COBOLworx
  • cbl-gdb-vsextension
  • Issues
  • #19

Closed
Open
Created Apr 27, 2021 by Simon Sobisch@ssobischReporter

missing display on hover

Currently this is explicit disabled at

mibase.ts with the note

Hover is too hard for the moment. 2020-08-06 RJDUBNER
Showing a variable on hover is much-requested, and I understand why. However, theVSC library routines that provide the expression to be evaluated interpret dash as a separator. So, hovering over "custmas-ctr" will show up here as "custmas" or "ctr". I haven't been able to figure out how to determine that the contiguous characters behind either of them are "custmas-ctr". So, we are out of luck on hovering.

I now took the time and check where this comes from and how this can be worked around:

vscode debug browser ui used to split words by the following:

		// Match any character except a set of characters which often break interesting sub-expressions
		let expression: RegExp = /([^()\[\]{}<>\s+\-/%~#^;=|,`!]|\->)+/g;

But since vscode 1.43 there is a new Debug hover API to let language providers - or debugging extensions - have something to say about what is an actual word that is (likely to be) resolved as an expression.

For the extension I'd normally suggest to use I've also created a PR to provide the valid COBOL naming scheme to vscode.

In general I'd say: the current disabling here should be removed - just query the data (with a limit of 1!) of what is passed to evaluateRequest - if in your example only one match exists for "ctr" then the correct content will be shown - if there are multiple matches (are actually none) nothing is shown, but that's not up to this extension to handle other than to "not explode".

Theoretically this extension could also handle this by implementing the EvaluatableExpressionProvider by using the known variables in the current file.

Edited Apr 27, 2021 by Simon Sobisch
Assignee
Assign to
Time tracking