Giter VIP home page Giter VIP logo

Comments (4)

zspitz avatar zspitz commented on June 15, 2024

Initially, I see the following workflow:

On visualizer start:

  1. Create a new settings object (TODO we can check if the file exists and read from the file if it does)
  2. pass the settings object to the debuggee side using TransferObject
  3. get back VisualizerData with the settings object
  4. (TODO we can save the current settings to the file at this point)

When the settings popup is opened:

  • Clone the settings object -- dedicated Clone method, stores the original as a private field
  • Set the datacontext of the popup to the cloned object
  • IsChanged property compares current values to original values, in original object
  • On poup close, if IsChanged, then reload data context using TransferObject

This has one limitation -- settings cannot be modified on the VisualizerData itself; there has to be some step that says "I've finished modifying the settings, now reload." In this case, it's the popup close.

But this makes sense for changes to settings that require the debuggee side (e.g. parser class name, to specify the rule name instead of the rule class type).

And for changes to settings which don't require the debuggee side, we can implement INPC on the settings object itself for those settings and listen for those changes and/or use two-way databinding from WPF.

from antlr4parsetreevisualizer.

zspitz avatar zspitz commented on June 15, 2024

Some settings require a round-trip to the debuggee side (parser class). Others do not (maximum window height/width).

Settings which require a round-trip need to be checked in the ShouldTriggerReload property. Closing the popup checks this property, and if it returns true, the config is sent to the debuggee side again.

Settings which don't require a round-trip should simply trigger an NPC event.

from antlr4parsetreevisualizer.

zspitz avatar zspitz commented on June 15, 2024

The underlying work is done; only the specific settings described here need to be implemented.

But I'm leaving this pinned, because we haven't tested the global settings yet.

from antlr4parsetreevisualizer.

zspitz avatar zspitz commented on June 15, 2024

I'm closing this; none of the settings here really justify keeping it open.

from antlr4parsetreevisualizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.