Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2016-12-05 22:12:03 +0000
committerTom Schindl2016-12-05 22:12:03 +0000
commitbfb4ef60c3ad2cbebb808c13a203660792d79a3a (patch)
tree2ee7f98fc1284ef141982fe7a511e32560de301e /bundles/code/org.eclipse.fx.code.editor.langs
parentb400e2b0f05518cecc864ae63428f57bf5c60aba (diff)
downloadorg.eclipse.efxclipse-bfb4ef60c3ad2cbebb808c13a203660792d79a3a.tar.gz
org.eclipse.efxclipse-bfb4ef60c3ad2cbebb808c13a203660792d79a3a.tar.xz
org.eclipse.efxclipse-bfb4ef60c3ad2cbebb808c13a203660792d79a3a.zip
add basic bash highlighting
Diffstat (limited to 'bundles/code/org.eclipse.fx.code.editor.langs')
-rw-r--r--bundles/code/org.eclipse.fx.code.editor.langs/src-gen/org/eclipse/fx/code/editor/ldef/langs/sh-swt-style.json34
-rw-r--r--bundles/code/org.eclipse.fx.code.editor.langs/src-gen/org/eclipse/fx/code/editor/ldef/langs/sh.css17
-rw-r--r--bundles/code/org.eclipse.fx.code.editor.langs/src-gen/org/eclipse/fx/code/editor/ldef/langs/sh.json100
-rw-r--r--bundles/code/org.eclipse.fx.code.editor.langs/src/org/eclipse/fx/code/editor/ldef/langs/bash.ldef44
4 files changed, 195 insertions, 0 deletions
diff --git a/bundles/code/org.eclipse.fx.code.editor.langs/src-gen/org/eclipse/fx/code/editor/ldef/langs/sh-swt-style.json b/bundles/code/org.eclipse.fx.code.editor.langs/src-gen/org/eclipse/fx/code/editor/ldef/langs/sh-swt-style.json
new file mode 100644
index 000000000..2bb7a911b
--- /dev/null
+++ b/bundles/code/org.eclipse.fx.code.editor.langs/src-gen/org/eclipse/fx/code/editor/ldef/langs/sh-swt-style.json
@@ -0,0 +1,34 @@
+{
+ "$gtype": "StylesheetDefinition",
+ "colorList": [],
+ "elementList": [
+ {
+ "$gtype": "StyleDefinition",
+ "bold": false,
+ "italic": false,
+ "name": "sh.sh_default",
+ "textRefColor": "-source-editor-code"
+ },
+ {
+ "$gtype": "StyleDefinition",
+ "bold": true,
+ "italic": false,
+ "name": "sh.sh_common_executables",
+ "textRefColor": "-source-editor-code"
+ },
+ {
+ "$gtype": "StyleDefinition",
+ "bold": false,
+ "italic": false,
+ "name": "sh.sh_doc_default",
+ "textRefColor": "-source-editor-doc"
+ },
+ {
+ "$gtype": "StyleDefinition",
+ "bold": false,
+ "italic": false,
+ "name": "sh.sh_string",
+ "textRefColor": "-source-editor-string"
+ }
+ ]
+}
diff --git a/bundles/code/org.eclipse.fx.code.editor.langs/src-gen/org/eclipse/fx/code/editor/ldef/langs/sh.css b/bundles/code/org.eclipse.fx.code.editor.langs/src-gen/org/eclipse/fx/code/editor/ldef/langs/sh.css
new file mode 100644
index 000000000..297815d0e
--- /dev/null
+++ b/bundles/code/org.eclipse.fx.code.editor.langs/src-gen/org/eclipse/fx/code/editor/ldef/langs/sh.css
@@ -0,0 +1,17 @@
+.styled-text-area .sh.sh_default {
+ -styled-text-color: -source-editor-code;
+}
+
+.styled-text-area .sh.sh_common_executables {
+ -styled-text-color: -source-editor-code;
+ -fx-font-weight: bold;
+}
+
+.styled-text-area .sh.sh_doc_default {
+ -styled-text-color: -source-editor-doc;
+}
+
+.styled-text-area .sh.sh_string {
+ -styled-text-color: -source-editor-string;
+}
+
diff --git a/bundles/code/org.eclipse.fx.code.editor.langs/src-gen/org/eclipse/fx/code/editor/ldef/langs/sh.json b/bundles/code/org.eclipse.fx.code.editor.langs/src-gen/org/eclipse/fx/code/editor/ldef/langs/sh.json
new file mode 100644
index 000000000..09c8a45c5
--- /dev/null
+++ b/bundles/code/org.eclipse.fx.code.editor.langs/src-gen/org/eclipse/fx/code/editor/ldef/langs/sh.json
@@ -0,0 +1,100 @@
+{
+ "$gtype": "LanguageDef",
+ "fileSuffix": "sh",
+ "partitionList": [
+ {
+ "$gtype": "Partition",
+ "name": "__dftl_partition_content_type",
+ "ruleList": [],
+ "tokenList": [
+ {
+ "$gtype": "Token",
+ "defaultToken": true,
+ "name": "sh_default",
+ "tokenScannerList": []
+ },
+ {
+ "$gtype": "Token",
+ "defaultToken": false,
+ "name": "sh_number",
+ "tokenScannerList": [
+ {
+ "$gtype": "TokenScanner_PatternRule",
+ "containmentPattern": "[\\d|\\.]",
+ "startLength": 0,
+ "startPattern": "\\d"
+ }
+ ]
+ },
+ {
+ "$gtype": "Token",
+ "defaultToken": false,
+ "name": "sh_common_executables",
+ "tokenScannerList": [
+ {
+ "$gtype": "TokenScanner_Keyword",
+ "keywordList": [
+ "rm",
+ "cd",
+ "rmdir",
+ "java",
+ "javac",
+ "echo",
+ "jlink"
+ ]
+ }
+ ]
+ }
+ ],
+ "whitespace": {
+ "$gtype": "PartitionWhiteSpace",
+ "characterList": [],
+ "javawhiteSpace": true
+ }
+ },
+ {
+ "$gtype": "Partition",
+ "name": "__sh_single_line_comment",
+ "ruleList": [
+ {
+ "$gtype": "PartitionRule_SingleLine",
+ "startSeq": "#"
+ }
+ ],
+ "tokenList": [
+ {
+ "$gtype": "Token",
+ "defaultToken": true,
+ "name": "sh_doc_default",
+ "tokenScannerList": []
+ }
+ ]
+ },
+ {
+ "$gtype": "Partition",
+ "name": "__sh_string",
+ "ruleList": [
+ {
+ "$gtype": "PartitionRule_SingleLine",
+ "endSeq": "\u0027",
+ "escapedBy": "\\",
+ "startSeq": "\u0027"
+ },
+ {
+ "$gtype": "PartitionRule_SingleLine",
+ "endSeq": "\"",
+ "escapedBy": "\\",
+ "startSeq": "\""
+ }
+ ],
+ "tokenList": [
+ {
+ "$gtype": "Token",
+ "defaultToken": true,
+ "name": "sh_string",
+ "tokenScannerList": []
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/bundles/code/org.eclipse.fx.code.editor.langs/src/org/eclipse/fx/code/editor/ldef/langs/bash.ldef b/bundles/code/org.eclipse.fx.code.editor.langs/src/org/eclipse/fx/code/editor/ldef/langs/bash.ldef
new file mode 100644
index 000000000..23acdb442
--- /dev/null
+++ b/bundles/code/org.eclipse.fx.code.editor.langs/src/org/eclipse/fx/code/editor/ldef/langs/bash.ldef
@@ -0,0 +1,44 @@
+package org.eclipse.fx.code.editor.ldef.langs
+
+sh {
+ partitioning {
+ partition __dftl_partition_content_type
+ partition __sh_single_line_comment
+ partition __sh_string
+ rule {
+ single_line __sh_single_line_comment "#"
+ single_line __sh_string "'" => "'" escaped by "\\"
+ single_line __sh_string '"' => '"' escaped by "\\"
+ }
+ }
+ lexical_highlighting {
+ rule __dftl_partition_content_type whitespace javawhitespace {
+ default sh_default
+ sh_number {
+ pattern "\\d" containing "[\\d|\\.]"
+ }
+ sh_common_executables {
+ keywords [ "rm", "cd", "rmdir", "java", "javac", "echo", "jlink" ]
+ }
+ }
+ rule __sh_single_line_comment {
+ default sh_doc_default
+ }
+ rule __sh_string {
+ default sh_string
+ }
+ token_def {
+ sh_default "-source-editor-code";
+ sh_common_executables "-source-editor-code" bold;
+ sh_doc_default "-source-editor-doc";
+ sh_string "-source-editor-string";
+ }
+ }
+// integration {
+// javafx {
+// java "org.eclipse.fx.code.editor.langs.codegen.fx.js" {
+// project : "org.eclipse.fx.code.editor.langs.codegen.fx"
+// }
+// }
+// }
+} \ No newline at end of file

Back to the top