Closed AliKarpuzoglu closed 7 years ago
@nilols Do you remember why we decided to split by semicolons?
I think it's due to the model parser, the core module doesn't care if it's only one statement or more, the Action
class only see it as a script. But the parser needs to know when a action stops and something else starts, so to get this working with yEd the parser needs to be updated to support this.
One workaround is to have the code in java and then just call the java method from JavaScript, or create the JavaScript function in the context from Java and then just call the function from JavaScript.
When it comes to model parsing, that should be fixed by the new web editor
What is stopping you from executing the entire javascript section in a single eval function call?
Nothing. The challenge is parsing the javascript part from the graphml file created by yEd. We're using Antlr4 for the parsing part. The test part of an edge and vertex holds quite a few data that needs to be extracted. That makes it a bit complicated.
@AliKarpuzoglu should be fixed now
Hi, This is a follow up on a bug reported by @sisso19 here https://github.com/KristianKarl/GraphWalker/issues/23 After using graphwalker and the built in javascript functionality for a while, I have found some Issues when using functions, specifically when using semicolon in them(e.g. when using multiple statements). It seems as if the semicolon are used as a split for the different actions in the graphwalker, which makes for-loops apparently impossible. A function with more than one line is also not usable because of this Here are two examples for those errors.