opencaesar / oml-vision

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

Loading Viewpoints when saving any viewpoints definition defined in the viewpoints directory #46

Open pogi7 opened 3 months ago

pogi7 commented 3 months ago

Checklist before submitting a bug report

Context

I want to be able to load new viewpoints when saving any viewpoint definition that is defined in the viewpoints file of a OML model like https://github.com/pogi7/kepler16b-example

Steps to reproduce the bug

  1. Go into the any OML model like https://github.com/pogi7/kepler16b-example
  2. Change the line to in this file to
    "label": "Test",
  3. Save the file
  4. Verify that the new change does not appear in the Property Sheet

Current result

The new viewpoint is not rendered when saving the viewpoint definition file.

Expected result

The new viewpoint should render when saving the viewpoint definition file.

Additional context

[Any additional context. If applicable, you may provide screenshots and/or error logs.]

Possible fix

The bug is in controller/src/utilities/loaders/loadViewpointFiles.ts in the method

TreeDataProvider.getInstance().updateViewpoints(content);

that method should be called in the following methods

loadTableFiles
loadTreeFiles
loadDiagramFiles
loadPropertyFiles

Technical data