opencaesar / oml-vision

A VS Code extension providing UI viewpoints for OML models
Other
4 stars 2 forks source link

Can't generate a subset of data from a table or tree into a diagram #39

Open pogi7 opened 6 months ago

pogi7 commented 6 months ago

Checklist before submitting a bug report

Context

I can't generate a subset of data from a table or tree into a diagram

Steps to reproduce the bug

  1. Open an OML model into OML Vision. For example https://github.com/pogi7/kepler16b-example
  2. Click the eye icon
  3. Run ./gradlew owlLoad (if you need to load and start the RDF triple store)
  4. Go to Connections
  5. Right click the Orbiter Spacecraft connection
  6. Click Create Reference Designators Diagram

Current result

An error in the lower right will popup called No diagram found for selected row(s).

Expected result

A new diagram view is generated that contains a subset of the selected data in the table or tree view.

Additional context

image

Possible fix

In controller/src/extension.ts there are VSCode context menu that are hard coded. It will be better to use the command api that is exposed by OML Vision.

// TODO: don't hard code the paths somehow D: unfortunately this is difficult because VS Code context menus can't be dynamically created.
  context.subscriptions.push(
    vscode.commands.registerCommand(
      "oml-vision.create-ref-des-diagram",
      async (vsCodeContext: Record<string, any>) => {
        createDiagram(vsCodeContext, "reference-designators-diagram");
      }
    )
  );

Technical data