Skip to content

IVariable.GetValueByKey should not be used for the groupList XML attribute #47

@FramePerfection

Description

@FramePerfection

Suggested Change
IVariable.GetValueByKey should not be used for the groupList XML attribute.
Instead, the variable panels should track multiple lists of variables or filter them in some other way (e.g. by decorating the class of which a list is currently being tracked with the attribute).

Rationale
The groupList XML attribute describes when a variable should be presented in a given variable panel, which is not a concern of the variable itself, but that of the variable panel.

This would also push #27.

Considerations
The information is currently retrieved via one or more code paths that pass through VariableCellFactory.ParseXml. The XML files hold both functional and presentational data, so they may need to be disambiguated or parsed multiple times for different contexts.

Affected Features and Concepts
A list of features and concepts touched upon by this change.
This list should be updated throughout the implementation phase of the change, especially to catch unexpectedly impacted parts of the program.

  • The VariableSpecialUtilities should create IVariable again (see fix special variables not respecting their 'groupList' XML attribute #46 ), not IVariable factories.
  • The VariablePanel needs to retrieve presentational information separately from the functional variable information, likely through another parsing process.
  • The XML for variables should maybe be split into functional and presentational files. This would also facilitate saving/loading "user defined tab layouts", which I believe exists in some broken form currently.

Metadata

Metadata

Labels

infrastructureThe code shall be refactored in some way

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions