Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a widget-based editor for YAML files #186

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
58c9daa
Add property page for csv resources
glguy Apr 28, 2023
4751c6e
Save automatic reformatting changes to DataPropertyPage.java
glguy May 24, 2023
1a23694
Mege from main and new work on property page
Feb 22, 2024
9e27589
Checkpoint
Feb 27, 2024
721ea69
Checkpoint
Feb 27, 2024
454b584
Make dropdown readonly
Feb 27, 2024
a24ab9f
Logic to write out files
Feb 29, 2024
5206a74
Everything reads and writes now
Mar 3, 2024
f1962b1
Implemented 'Discard changes'
Mar 3, 2024
2785c8a
Updated TODO list
Mar 3, 2024
1a5f23c
More work on validation
Mar 8, 2024
9670c29
More work on validation
Mar 12, 2024
5eb6479
Implemented remove functionality
Mar 12, 2024
b5f8c56
Cleaned up regressions for validation and new files
Mar 12, 2024
a347d8a
Checkpoint
Mar 12, 2024
a02a6c8
Added file browsers
Mar 13, 2024
08d0970
scrollbars for constraint dialog
Mar 13, 2024
fb1490c
Constraint text fields now expand
Mar 13, 2024
4f4d5a1
Constraint text fields now expand
Mar 13, 2024
2f9a993
Scrollbars working!
Mar 13, 2024
e47bd29
Merge branch 'main' of https://github.com/ge-high-assurance/RITE into…
Mar 14, 2024
0802850
updating comments
Mar 14, 2024
ef07aa0
Adding documentation and a file write-read check
Mar 14, 2024
c057e48
Documentation and tweaks to widget behavior
Mar 14, 2024
97b3f21
TIghtening vertical space in the steps and constraints lists
Mar 18, 2024
3c04399
General yaml editor
Mar 20, 2024
3cc5e52
Bug fixes
Mar 20, 2024
172733d
Bug fix
Mar 21, 2024
3328d9f
Implemented writing out files from general yaml editor
Mar 21, 2024
2b7f342
Fixed a scrollbar problem
Mar 22, 2024
3f3ab1d
More attempts to workaround scrollbar bug
Mar 22, 2024
2762ddf
Formatting changes
Mar 22, 2024
33af1fd
Fixed scrollbars; finished validation
Mar 22, 2024
2f225a2
Cleaned up some comments
Mar 22, 2024
048258c
Checkpoint
Mar 22, 2024
3fa9d0b
Added files
Mar 22, 2024
9af8374
Added comparison to schema
Mar 23, 2024
af7d70a
Added boolean data type; some better error checking
Mar 23, 2024
3f4ae13
Fixed merge
Mar 23, 2024
b2e0cc1
Adding validation by schema and various bug fixes
Mar 23, 2024
f46953a
Merge branch 'cok-schema' into data_yaml_editor
Mar 23, 2024
7d80583
Merge branch 'main' of https://github.com/ge-high-assurance/RITE into…
Mar 23, 2024
0e383d4
Auto-formatting changes
Mar 23, 2024
2a5a3dd
Merge branch 'main' into data_yaml_editor
Mar 25, 2024
857bc70
Repairing the result of a bad merge of plugin.xml
Mar 26, 2024
b6a8e6a
Fixed messages and some bugs
Mar 26, 2024
ee0b602
Merge branch 'main' into data_yaml_editor
Mar 28, 2024
fa9f42d
Formatting changes and fix to scrollbars
Mar 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tools/rack/rack.plugin/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Bundle-Name: rack.plugin
Bundle-Vendor: rack.plugin
Bundle-SymbolicName: rack.plugin;singleton:=true
Bundle-Version: 0.5.0.qualifier
Import-Package: org.eclipse.ui.part
Require-Bundle: com.ge.research.jena,
com.ge.research.sadl,
com.ge.research.sadl.applications,
Expand Down
45 changes: 45 additions & 0 deletions tools/rack/rack.plugin/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
<command categoryId="rackplugin.commands"
id="rackplugin.commands.ingestInstanceData" name="Manifest Import">
</command>

<command categoryId="rackplugin.commands"
id="rackplugin.commands.editorPropertyPage" name="Properties">
</command>

<command categoryId="rackplugin.commands"
id="rackplugin.commands.newYamlPropertyPage"
name="New Manifest Property Page">
</command>

<!-- <command categoryId="rackplugin.commands" id="rackplugin.commands.gsnCommand"
name="Load Assurance Case"> </command> -->
<command categoryId="rackplugin.commands"
Expand Down Expand Up @@ -149,6 +159,16 @@
</enabledWhen>
</handler>

<handler
class="com.ge.research.rack.properties.NewPropertyPageHandler"
commandId="rackplugin.commands.newYamlPropertyPage">
</handler>

<handler
class="com.ge.research.rack.properties.NewPropertyPageHandler$Editor"
commandId="rackplugin.commands.editorPropertyPage">
</handler>

<handler
class="com.ge.research.rack.ZipIngestionPackageHandler"
commandId="rackplugin.commands.zipIngestionPackage">
Expand Down Expand Up @@ -230,6 +250,11 @@
id="rackplugin.menus.ingestInstanceData" label="Manifest Import"
mnemonic="S">
</command>
<command commandId="rackplugin.commands.newYamlPropertyPage"
id="rackplugin.menus.newYamlPropertyPage" label="New yaml file"
mnemonic="N">
</command>

<command commandId="rackplugin.commands.clearAll"
id="rackplugin.menus.clearAll" label="Clear RACK" mnemonic="S">
</command>
Expand Down Expand Up @@ -356,6 +381,7 @@
value="1" /> <iterate> <adapt type="org.eclipse.core.resources.IFile" />
</iterate> </with> </visibleWhen> </command> </menuContribution> </extension> -->

<!-- OR locationURI="popup:org.eclipse.ui.popup.any" in the following -->
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=export">
Expand Down Expand Up @@ -524,4 +550,23 @@

</extension>

<extension point="org.eclipse.ui.propertyPages">
<page class="com.ge.research.rack.properties.DataPropertyPage"
id="com.ge.research.rack.properties.dataPropertyPage"
name="Data Settings" nameFilter="*.yaml">
<enabledWhen>
<instanceof value="org.eclipse.core.resources.IFile">
</instanceof>
</enabledWhen>
</page>
</extension>

<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:yamleditor.editors.YamlEditor.context?after=additions">
<command commandId="rackplugin.commands.editorPropertyPage">
</command>
</menuContribution>
</extension>

</plugin>
5 changes: 5 additions & 0 deletions tools/rack/rack.plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@
<groupId>org.webjars.npm</groupId>
<artifactId>viz.js-graphviz-java</artifactId>
</dependency>
<dependency>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator</artifactId>
<version>1.4.0</version>
</dependency>
</dependencies>

<build>
Expand Down
61 changes: 61 additions & 0 deletions tools/rack/rack.plugin/resources/schemas/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{

"type": "object",
"additionalProperties": false,
"required": ["ingestion-steps"],
"properties": {
"ingestion-steps": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": ["nodegroup", "csv"],
"properties": {
"nodegroup": {"type": "string"},
"csv": {"type": "string"}
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["owl"],
"properties": {"owl": {"type": "string"}}
},
{
"type": "object",
"additionalProperties": false,
"required": ["class", "csv"],
"properties": {
"class": {"type": "string"},
"csv": {"type": "string"}
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["name", "creator", "nodegroup_json"],
"properties": {
"name": {"type": "string"},
"creator": {"type": "string"},
"comment": {"type": "string"},
"nodegroup_json": {"type": "string"}
}
}
]
}
},
"model-graphs": {
"oneOf": [
{"type": "string"},
{"type": "array", "items": {"type": "string"}}
]
},
"data-graph": {"type": "string"},
"extra-data-graphs": {
"type": "array",
"contains": {"type": "string"}
}
}
}
78 changes: 78 additions & 0 deletions tools/rack/rack.plugin/resources/schemas/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"type": "object",
"additionalProperties": false,
"required": ["name"],
"properties": {
"name": {"type": "string"},
"description": {"type": "string"},

"copy-to-graph": {"type": "string"},
"perform-entity-resolution": {"type": "string"},

"footprint": {
"type": "object",
"additionalProperties": false,
"required": [],
"properties": {
"model-graphs": {"type": "array", "items": {"type": "string"}},
"data-graphs": {"type": "array", "items": {"type": "string"}},
"nodegroups": {"type": "array", "items": {"type": "string"}}
}
},
"steps": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": ["data"],
"properties": {
"data": {"type": "string"}
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["model"],
"properties": {
"model": {"type": "string"}
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["nodegroups"],
"properties": {
"nodegroups": {"type": "string"}
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["manifest"],
"properties": {
"manifest": {"type": "string"}
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["copygraph"],
"properties": {
"copygraph": {
"type": "object",
"additionalProperties": false,
"required": ["from-graph", "to-graph"],
"properties": {
"from-graph": {"type": "string"},
"to-graph": {"type": "string"}
}
}
}
}
]
}
}
}
}
17 changes: 17 additions & 0 deletions tools/rack/rack.plugin/resources/schemas/model.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{

"type" : "object",
"additionalProperties": false,
"required": ["files"],
"properties": {
"files": {
"type": "array",
"contains": {"type": "string"}},
"model-graphs": {
"oneOf": [
{"type": "string"},
{"type": "array", "items": {"type": "string"}}
]
}
}
}
Loading
Loading