Skip to content

QualityInformationFramework/QIFRulesEditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QIFRulesEditor app

The QIF Rules Editor is a C#-based application which provides the capability to create and edit metrology rules in the ISO QIF format.

For more information about QIF:

User Guide

The user guide for the QIF Rules Editor app can be found here.

What it does

Core Features

Currently the QIF Rules Editor supports the following operations:

  • Reading QIF documents and trasforming the Rules element to the internal Rules Language.
  • Writing Rules Languge into a QIF document. If a QIF document has other top-level elements other than Rules, those elements are preserved.
  • Reading/Writing into Rules Language file.
  • Checking Rules Language for errors.
  • Creating new documents.

Interface features

The user interface is built using C#, WPF, and AvalonEdit control. The UI currently supports:

  • Editing the Rules Language presentation of the document.
  • Syntax highlighting. Keywords are colored blue and constants are colored brown.
  • Undo/Redo.
  • Cut, Copy, Paste.
  • Opening a document by dragging a file into the text editor’s area.
  • Navigation to the error line in the text editor by clicking on the error in the Error Window.
  • Error underlining.

Currently, error checking is triggered manually by clicking on the "Compile" button.

Interface Overview

The UI consists of 4 main parts:

  1. Toolbar
  2. Text Editor
  3. Error list window
  4. Snippets panel

Architecture

The application architecture is divided into two parts: (1) rules processing and (2) user interface.

Rules processing

The figure below gives a brief overview of rules processing architecture.

Two possible workflows are illustrated:

  • from Rules Language to QIF, and
  • from QIF to Rules Language

The rules processing relies on the ANTLR framework. The framework provides a way of describing Rules Language syntax and building an abstract syntax tree (AST). This allows the creation of both an AST from the Rules Language and saving QIF from an AST.

The Rules Object Model is automatically generated by the QIF 3.0 schema and fully reflects the QIF object model.

User Interface

The user interface is based on the WPF framework using C#. AvalonEdit is used as a text editor control. The latter provides such features as syntax highlighting, error underlining, undo/redo, cut/copy/paste and other things that have not been integrated yet into the app.

How to build

The QIF Rules Editor is easy to build. All the dependencies are set up as NuGet packages, so all you have to do is load it in Visual Studio 2019 and build.

  1. Load the solution rules_editor.sln in Visual Studio 2019 (any edition)
  2. In the Solution Explorer, right click on the project rules_editor_wpf and select "Set as Startup Project"
  3. Build the solution
  4. Run

System requirements

  • Operating system: Windows 7 SP1, Windows 8.1, Windows 10
  • .NET Framework 4.7.2

Copyright

Copyright 2018-2020, Capvidia, Metrosage, and project contributors

https://www.capvidia.com/

Acknowledgements

This effort was developed with assitance from cooperative agreement 70NANB18H171 between the National Institute of Standards and Technology (NIST) and Metrosage, and with assistance from Capvidia.

License

See License

Other Libraries