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

Feature: add importers and exporters #37

Merged
merged 45 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
c0d8c0d
fix: try connecting up to 10 times
sillydan1 Jan 13, 2024
0f450d2
fix: dont spew debug level stuff from io.grpc
sillydan1 Jan 13, 2024
9a493ba
fix: interrupt and destroy the lsp process properly
sillydan1 Jan 13, 2024
a71feae
fix: trace grpc lsp stdout and log errors, also add shutdownhook to d…
sillydan1 Jan 14, 2024
4cfcb94
feat: diff for opnening files
sillydan1 Jan 18, 2024
4038b29
cleanup: some slightly prettier and and more correct code
sillydan1 Jan 19, 2024
3ab9893
dep: update yalazy dependency to v1.1.0
sillydan1 Jan 19, 2024
50754b9
chore: update version number
sillydan1 Jan 19, 2024
f23408d
chore: update readme
sillydan1 Jan 19, 2024
1ff8362
feat: add id to vertex and edge protobuf messages
sillydan1 Jan 19, 2024
e76fbfb
feat: add project and file interaction
sillydan1 Jan 20, 2024
b554833
feat: add capability_project and implemented on project open
sillydan1 Jan 20, 2024
1fe2129
fix: start the program thread immediately
sillydan1 Jan 23, 2024
c0bbd04
chore: update progress.md
sillydan1 Jan 23, 2024
1826259
feat: add model metadata and declarations property inspector
sillydan1 Jan 27, 2024
59ff80f
docs: update readme
sillydan1 Jan 27, 2024
abd6b69
chore: cleanup
sillydan1 Jan 27, 2024
aa4492e
fix: remove position x and y editors
sillydan1 Jan 27, 2024
f4b62a0
docs: update progress
sillydan1 Jan 28, 2024
8297864
feat: add some more file/folder picker options to editoractions
sillydan1 Jan 29, 2024
f489509
wip: importers / exporters
sillydan1 Jan 29, 2024
f04ed01
feat: add tapaal file importer
sillydan1 Jan 30, 2024
a60a703
feat: enable multiple files import
sillydan1 Jan 31, 2024
854cf45
nit: javadocs
sillydan1 Feb 1, 2024
3d63dd1
chore: update progress.md
sillydan1 Feb 1, 2024
86d2522
fix: require gradle 8.x
sillydan1 Feb 2, 2024
01ac743
nit: remove extra newline on some files
sillydan1 Feb 2, 2024
22c9f9f
feat: add tapaal exporter
sillydan1 Feb 3, 2024
874c2cf
feat: integrated exporters as menu items
sillydan1 Feb 3, 2024
8f9af98
fix: tapaal exporter is now actually compatible with tapaal
sillydan1 Feb 6, 2024
f07da41
feat: add export button in file explorer
sillydan1 Feb 10, 2024
35dc7c0
chore: update version
sillydan1 Feb 11, 2024
bcea50b
fix: remove the gradle version check and update readme
sillydan1 Feb 11, 2024
e01437c
fix: add missing ctor to import exception
sillydan1 Feb 11, 2024
d787c5e
fix: tabbing in grpc language server
sillydan1 Feb 11, 2024
e13e7fe
fix: renamed openFile(s) to openJsonFile(s)
sillydan1 Feb 11, 2024
b956115
chore: update progress.md
sillydan1 Feb 11, 2024
1927a4e
fix: todo about also starting LSPs when editing a tmp project
sillydan1 Feb 11, 2024
f1a6f70
fix: use yalibs.tarjan
sillydan1 Feb 18, 2024
1a3e09f
fix: solve todo
sillydan1 Feb 18, 2024
26d08e1
fix: remove solved todo
sillydan1 Feb 18, 2024
1cfe837
fix: solve investigation todos
sillydan1 Feb 18, 2024
90a6b82
fix: solve todo by documentation
sillydan1 Feb 18, 2024
eb5c0f2
chore: add issue data to todo
sillydan1 Feb 18, 2024
5db98d6
docs: add missing javadocs
sillydan1 Feb 18, 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: 0 additions & 1 deletion .github/resources/example-project/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
[]
]
}

1 change: 0 additions & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ jobs:
gradle-version: current
- name: build
run: gradle build

1 change: 0 additions & 1 deletion .github/workflows/build-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,3 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ metadata

# never commit this file
donotcommit.txt

1 change: 0 additions & 1 deletion CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ Generally, try to follow the style that is already present and try to reuse exis

### Documentation
Ideally, any `public` thing should have a javadoc comment.

1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ FROM nginx:alpine
COPY nginx.conf /etc/nginx/nginx.conf
COPY core/build/docs/javadoc /usr/share/nginx/html
EXPOSE 80

1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,3 @@ nvimclean: # useful when adding new subprojects, or when the java plugin gets co
rm -rf ${WRP}
rm -rf .project
rm -rf .classpath

63 changes: 40 additions & 23 deletions PROGRESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@
- [x] flatpak
- [x] GNOME store?
- [x] javadoc
- [ ] CD (needs a pre-release for prototyping purposes)
- [ ] flathub (needs an actual binary release)
- [x] gitignored Project cache, such as what files did you have open last etc.
- [x] windows menubar not showing
- [x] Migraters
Expand All @@ -110,7 +108,7 @@
- [x] Additions (new syntactic elements), Deletions (B does not have some syntactic element), Edits (Some syntactic element's properties has been changed)
- [x] Cut / Copy / Paste support
- [x] Lint layer
- [ ] Lint protobuf specification
- [x] Lint protobuf specification
- [x] Implement `ILint` / `ILinter` interfaces
- [x] Release core as a library on ossrh
- [x] Additional Syntaxes
Expand All @@ -120,24 +118,43 @@
- [x] Plugin Manager
- [x] Fix TODOs
- [x] Polish
- [x] Release `v1.2.0
- [ ] Third party language plugins
- [ ] TIOA
- [ ] NTTA
- [ ] HAWK
- [ ] expr richtextfx.CodeArea implementation
- [ ] Trace-traverser & specification
- [ ] Plan for git integration
- [ ] Diff view?
- [x] Add plugin API and
- [x] LSP like specification (use docusaurus, or github wiki)
- [ ] Protobuf specification (that way, you are language agnostic)
- [x] Implement `ILsp` / `ILspEngine` interfaces
- [ ] Release `v1.3.0`
- [ ] Planarity Embedding
- [ ] DAP like specification
- [ ] Protobuf specification (that way, you are language agnostic)
- [ ] Implement `IDap` / `IDapEngine` interfaces
- [x] Release `v1.3.0
- [x] Third party language plugins
- [x] NTTA
- [x] HAWK
- [x] Model metadata editor
- [x] Add plugin API and
- [x] LSP like specification (use docusaurus, or github wiki)
- [x] Protobuf specification (that way, you are language agnostic)
- [x] Implement `ILsp` / `ILspEngine` interfaces
- [ ] Release `v1.4.0`
- [ ] Example lua plugin [LuaJava](https://github.com/gudzpoz/luajava/tree/main).
- [ ] Release `v2.0.0`
- [ ] HAWK / nttals usability exploration fixes
- [ ] Importer / Exporter interfaces
- [x] importer interface & tapaal example
- [ ] exporter interface & tapaal example
- [ ] Fix TODOs
- [ ] Javadocs
- [ ] Release `v1.5.0`
- [ ] Purge github issues
- [ ] CodeArea tree highlighter implementation
- [ ] Trace-traverser & specification
- [ ] Release `v1.6.0`
- [ ] Plan for git integration
- [ ] Diff view?
- [ ] Release `v1.7.0`
- [ ] Planarity Embedding
- [ ] Release `v1.8.0`
- [ ] DAP like specification
- [ ] Protobuf specification
- [ ] Implement `IDap` / `IDapEngine` interfaces
- [ ] Release `v1.9.0`
- [ ] Clean up `DI` usage
Create some analysis tools, maybe a dependency graph from where things are added and where they are retrived again.
- [ ] Lua bindings [LuaJava](https://github.com/gudzpoz/luajava/tree/main).
- [ ] Release `v1.11.0`

## Not abandoned, but not planned
- [ ] TIOA syntax
- [ ] TA syntax
- [ ] CD (needs a pre-release for prototyping purposes)
- [ ] flathub
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</p>

<p align="center">
Graphedit is an application for visualising, creating, editing and debugging graph-based syntaxes
Graphedit is an application for visualising, creating, editing and debugging graph-based languages
</p>

------
Expand All @@ -19,7 +19,7 @@
</div>

## Build 💾
The project is compiled using `gradle`:
The project is compiled using `gradle` (version 7+):
```shell
# Just build the app
gradle build
Expand Down Expand Up @@ -67,7 +67,7 @@ Simply [Download the .msi](https://github.com/sillydan1/graphedit/releases/lates

## Architecture 🏛️
Graphedit is designed from the ground up to be easy to extend with an opinionated, but easy to understand and efficient architecture.
Note that at the time of writing a plugin-system is planned, but not implemented yet. So extensions must be done via PRs at the moment.
You can extend the editor using plugins. Take a look at the [plugin github template](https://github.com/sillydan1/graphedit-plugin-template) to get started on writing your own plugin.

### Model View Viewmodel
This project is strongly influenced by the [MVVM (Model View ViewModel)](https://en.wikipedia.org/wiki/Model–view–viewmodel) design pattern and the classes and packages are named appropriately so.
Expand Down
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def gitHeadName = { ->
}

def getVersion = { ->
def version = '1.3.0';
def version = '1.4.0';
def headName = gitHeadName();
if(headName.equals('v'+version))
return version;
Expand Down Expand Up @@ -123,7 +123,7 @@ subprojects {
implementation group: 'dk.yalibs', name: 'yastreamgobbler', version: '1.0.0';
implementation group: 'dk.yalibs', name: 'yaundo', version: '1.0.0';
implementation group: 'dk.yalibs', name: 'yafunc', version: '1.0.0';
implementation group: 'dk.yalibs', name: 'yalazy', version: '1.0.0';
implementation group: 'dk.yalibs', name: 'yalazy', version: '1.1.0';
implementation group: 'io.github.mkpaz', name: 'atlantafx-base', version: '2.0.1';
implementation group: 'org.apache.tika', name: 'tika-core', version: '2.9.0'
implementation group: 'org.fxmisc.richtext', name: 'richtextfx', version: '0.11.0'
Expand All @@ -146,6 +146,7 @@ subprojects {
}

javadoc {
exclude 'dk/gtz/graphedit/proto/**'
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package dk.gtz.graphedit.exceptions;

/**
* An error occurred during exporting to a non-graphedit format.
*/
public class ExportException extends RuntimeException {
/**
* Construct a new instance with a message
* @param message The detail message
*/
public ExportException(String message) {
super(message);
}

/**
* Construct a new instance with a message and a cause
* @param cause The cause
*/
public ExportException(Throwable cause) {
super(cause);
}

/**
* Construct a new instance with a message and a cause
* @param message The detail message
* @param cause The cause
*/
public ExportException(String message, Throwable cause) {
super(message, cause);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package dk.gtz.graphedit.exceptions;

/**
* An error occurred during importing from a non-graphedit format.
*/
public class ImportException extends RuntimeException {
/**
* Construct a new instance with a message
* @param message The detail message
*/
public ImportException(String message) {
super(message);
}

/**
* Construct a new instance with a cause
* @param cause The cause
*/
public ImportException(Throwable cause) {
super(cause);
}

/**
* Construct a new instance with a message and a cause
* @param message The detail message
* @param cause The cause
*/
public ImportException(String message, Throwable cause) {
super(message, cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,10 @@ public interface IModelSerializer {
* @param loader The additional loader to use when resolving classes
*/
void addClassLoader(ClassLoader loader);

/**
* Get the preferred file extension for this serializer. e.g. ".json"
* @return A string representing the preferred file extension
*/
String getPreferedFileExtension();
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ private ObjectMapper getMapper() {
return om;
}

@Override
public String getPreferedFileExtension() {
return ".json";
}

@Override
public void addClassLoader(ClassLoader loader) {
for(var p : loader.getDefinedPackages()) {
Expand Down
Loading
Loading