Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mingun/kaitai_struct_model
Swing tree model for exploring https://kaitai.io generated structs
https://github.com/mingun/kaitai_struct_model
kaitai-struct swing visualizer
Last synced: about 1 month ago
JSON representation
Swing tree model for exploring https://kaitai.io generated structs
- Host: GitHub
- URL: https://github.com/mingun/kaitai_struct_model
- Owner: Mingun
- License: mit
- Created: 2020-01-08T19:50:05.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-28T00:59:55.000Z (almost 2 years ago)
- Last Synced: 2024-10-15T09:11:15.268Z (3 months ago)
- Topics: kaitai-struct, swing, visualizer
- Language: Java
- Size: 41 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![JitPack](https://img.shields.io/jitpack/v/github/Mingun/kaitai_struct_model)](https://jitpack.io/#Mingun/kaitai_struct_model)
[![license](https://img.shields.io/badge/license-mit-blue.svg)](https://opensource.org/licenses/MIT)# kaitai_struct_model
A simple Swing `TreeModel` and `TreeNode` implementations for exploring classes, generated by
[KaitaiStruct](https://kaitai.io) java generator in debug mode.How customized [Viewer](https://github.com/kaitai-io/kaitai_struct_gui) could look
(in [FlatLaf](https://github.com/JFormDesigner/FlatLaf) Dark theme):
![kaitai_struct_gui](https://user-images.githubusercontent.com/450131/172424984-bdbc1ed8-30f5-48f3-8506-e978c17fd227.png)Example file
```yaml
meta:
id: offsets
seq:
- id: padding
type: u1
- id: unsized
type: type
- id: sized
type: type
size: 10
instances:
parse:
pos: 5
size: 5
value_scalar:
value: 42
value_list:
value: '["42"]'
types:
type:
seq:
- id: padding
type: u1
- id: unsized_simple
type: u1
- id: sized_simple
size: 1
- id: unsized_array
type: elem
repeat: expr
repeat-expr: 2
- id: sized_array
type: elem
size: 3
repeat: expr
repeat-expr: 1
elem:
seq:
- id: padding
type: u1
- id: value
type: u1
```## Class diagram of nodes
`ParamNode` is unused because it is impossible to distinguish between
parameters and instances without [kaitai_struct_compiler#191].```mermaid
classDiagram
TreeNode <|.. ValueNode
ValueNode <|-- ChunkNode
ChunkNode <|-- SimpleNode
ChunkNode <|-- StructNode
ChunkNode <|-- ListNode
ValueNode <|-- ParamNodeclass TreeNode {
<>
}
class ValueNode {
<>
+getValue()* Object
}
class ChunkNode {
<>
+getSpan() Span
+isSequential() boolean
}
class SimpleNode {
+getValue() Object
+getValueClass() Class
}
class StructNode {
+getValue() KaitaiStruct
}
class ListNode {
+getValue() List
+getElementClass() Class
}
```[kaitai_struct_compiler#191]: https://github.com/kaitai-io/kaitai_struct_compiler/pull/191