-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* String escape for modelica * Better template definition highlighting * MOS scripting highlighting improved - MOS script snippets - MOS script API functions highlighting
- Loading branch information
1 parent
60b9621
commit cc8278b
Showing
7 changed files
with
899 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
{ | ||
"API function getErrorString": { | ||
"prefix": "getErrorString", | ||
"body": "getErrorString();", | ||
"scope": "source.openmodelica-script" | ||
}, | ||
|
||
"Minimal Working Example": { | ||
"prefix": "loadModel", | ||
"body": [ | ||
"loadModel(Modelica, {\"4.0\"}); getErrorString();", | ||
"loadString(\"", | ||
" model M", | ||
" $1", | ||
" end M;", | ||
"\"); getErrorString();", | ||
"simulate(M); getErrorString();" | ||
], | ||
"scope": "source.openmodelica-script" | ||
}, | ||
|
||
"API function simulate (full)": { | ||
"prefix": "simulate", | ||
"body": [ | ||
"simulate($1,", | ||
" startTime = 0.0,", | ||
" stopTime = 1.0,", | ||
" numberOfIntervals = 500", | ||
" tolerance = 1e-6", | ||
" method = \"dassl\"", | ||
" fileNamePrefix = \"<default>\"", | ||
" options = \"\"", | ||
" outputFormat = \"mat\"", | ||
" variableFilter = \".*\"", | ||
" cflags = \"\"", | ||
" simflags = \"<default>\");", | ||
"getErrorString();" | ||
], | ||
"scope": "source.openmodelica-script" | ||
}, | ||
|
||
"API function simulate": { | ||
"prefix": "simulate", | ||
"body": [ | ||
"simulate($1);", | ||
"getErrorString();" | ||
], | ||
"scope": "source.openmodelica-script" | ||
}, | ||
|
||
"API function buildModel (full)": { | ||
"prefix": "buildModel", | ||
"body": [ | ||
"buildModel($1,", | ||
" startTime = \"<default>\",", | ||
" stopTime = 1.0,", | ||
" numberOfIntervals = 500,", | ||
" tolerance = 1e-6,", | ||
" method = \"dassl\",", | ||
" fileNamePrefix = \"<default>\",", | ||
" options = \"<default>\",", | ||
" outputFormat = \"mat\",", | ||
" variableFilter = \".*\",", | ||
" cflags = \"<default>\",", | ||
" simflags = \"<default>\");", | ||
"getErrorString();" | ||
], | ||
"scope": "source.openmodelica-script" | ||
}, | ||
|
||
"API function buildModel": { | ||
"prefix": "buildModel", | ||
"body": [ | ||
"buildModel($1);", | ||
"getErrorString();" | ||
], | ||
"scope": "source.openmodelica-script" | ||
}, | ||
|
||
"API function buildModelFMU (full)": { | ||
"prefix": "buildModelFMU", | ||
"body": [ | ||
"buildModelFMU($1", | ||
" version = \"2.0\",", | ||
" fmuType = \"me\"", | ||
" fileNamePrefix = \"<default>\",", | ||
" platforms = {\"static\"},", | ||
" includeResources = false);", | ||
"getErrorString();" | ||
], | ||
"scope": "source.openmodelica-script" | ||
}, | ||
|
||
"API function buildModelFMU": { | ||
"prefix": "buildModelFMU", | ||
"body": [ | ||
"buildModelFMU($1);", | ||
"getErrorString();" | ||
], | ||
"scope": "source.openmodelica-script" | ||
}, | ||
|
||
"API function loadFile": { | ||
"prefix": "loadFile", | ||
"body": [ | ||
"loadFile(\"$1\");", | ||
"getErrorString();" | ||
], | ||
"scope": "source.openmodelica-script" | ||
}, | ||
|
||
"API function loadModel (full)": { | ||
"prefix": "loadModel", | ||
"body": [ | ||
"loadModel($1,", | ||
" priorityVersion = {\"default\"});", | ||
"getErrorString();" | ||
], | ||
"scope": "source.openmodelica-script" | ||
}, | ||
|
||
"API function loadModel": { | ||
"prefix": "loadModel", | ||
"body": [ | ||
"loadModel($1, {\"$2\"});", | ||
"getErrorString();" | ||
], | ||
"scope": "source.openmodelica-script" | ||
}, | ||
|
||
"API function setCommandLineOptions": { | ||
"prefix": "setCommandLineOptions", | ||
"body": [ | ||
"setCommandLineOptions(\"$1\");", | ||
"getErrorString();" | ||
], | ||
"scope": "source.openmodelica-script" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.