diff options
author | 2021-06-29 11:37:14 +0200 | |
---|---|---|
committer | 2021-06-29 11:37:14 +0200 | |
commit | 272c7c5dd04feb54806b92d88dc1a5029cddc397 (patch) | |
tree | decf6950c10782d124c5a3b6055a09d52f9e5791 /language-web/src/main/webapp | |
parent | Fix derived state computer idempotency (diff) | |
download | refinery-272c7c5dd04feb54806b92d88dc1a5029cddc397.tar.gz refinery-272c7c5dd04feb54806b92d88dc1a5029cddc397.tar.zst refinery-272c7c5dd04feb54806b92d88dc1a5029cddc397.zip |
Webpack build for frontend
Diffstat (limited to 'language-web/src/main/webapp')
-rw-r--r-- | language-web/src/main/webapp/index.html | 56 | ||||
-rw-r--r-- | language-web/src/main/webapp/script.js | 20 | ||||
-rw-r--r-- | language-web/src/main/webapp/style.css | 100 | ||||
-rw-r--r-- | language-web/src/main/webapp/xtext-resources/generated/mode-problem.js | 41 |
4 files changed, 0 insertions, 217 deletions
diff --git a/language-web/src/main/webapp/index.html b/language-web/src/main/webapp/index.html deleted file mode 100644 index 3e068f68..00000000 --- a/language-web/src/main/webapp/index.html +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
3 | <meta http-equiv="Content-Language" content="en-us"> | ||
4 | <title>Example Web Editor</title> | ||
5 | <link rel="stylesheet" type="text/css" href="webjars/codemirror/5.52.2/lib/codemirror.css" /> | ||
6 | <link rel="stylesheet" type="text/css" href="webjars/codemirror/5.52.2/addon/hint/show-hint.css" /> | ||
7 | <link rel="stylesheet" type="text/css" href="xtext/2.26.0.M1/xtext-codemirror.css" /> | ||
8 | <link rel="stylesheet" type="text/css" href="style.css" /> | ||
9 | <body> | ||
10 | <div class="container"> | ||
11 | <div class="header"> | ||
12 | <h1>Example Problem Web Editor</h1> | ||
13 | </div> | ||
14 | <div class="content"> | ||
15 | <div class="xtext-editor" | ||
16 | data-editor-xtext-lang="problem" | ||
17 | data-editor-enable-formatting-action="true" | ||
18 | data-editor-send-full-text="false" | ||
19 | ><pre>class Family { | ||
20 | contains Person[] members | ||
21 | } | ||
22 | |||
23 | class Person { | ||
24 | Person[] children opposite parent | ||
25 | Person[0..1] parent opposite children | ||
26 | int age | ||
27 | TaxStatus taxStatus | ||
28 | } | ||
29 | |||
30 | enum TaxStatus { | ||
31 | child, student, adult, retired | ||
32 | } | ||
33 | |||
34 | % A child cannot have any dependents. | ||
35 | error invalidTaxStatus(Person p) :- | ||
36 | taxStatus(p, child), children(p, _q). | ||
37 | |||
38 | Family('family'). | ||
39 | members('family', anne). | ||
40 | members('family', bob). | ||
41 | members('family', ciri). | ||
42 | children(anne, ciri). | ||
43 | ?children(bob, ciri). | ||
44 | taxStatus(anne, adult). | ||
45 | age(anne, 35). | ||
46 | bobAge: 27. | ||
47 | age(bob, bobAge). | ||
48 | !age(ciri, bobAge). | ||
49 | |||
50 | scope Family = 1, Person += 5..10. | ||
51 | </pre></div> | ||
52 | </div> | ||
53 | </div> | ||
54 | <script type="text/javascript" src="webjars/requirejs/2.3.6/require.min.js"></script> | ||
55 | <script type="text/javascript" src="script.js"></script> | ||
56 | </body> | ||
diff --git a/language-web/src/main/webapp/script.js b/language-web/src/main/webapp/script.js deleted file mode 100644 index 4b466fed..00000000 --- a/language-web/src/main/webapp/script.js +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | var baseUrl = window.location.pathname; | ||
2 | var fileIndex = baseUrl.indexOf("index.html"); | ||
3 | if (fileIndex > 0) | ||
4 | baseUrl = baseUrl.slice(0, fileIndex) | ||
5 | require.config({ | ||
6 | baseUrl: baseUrl, | ||
7 | paths: { | ||
8 | "text": "webjars/requirejs-text/2.26.0.M1/text", | ||
9 | "jquery": "webjars/jquery/3.6.0/jquery.min", | ||
10 | "xtext/xtext-codemirror": "xtext/2.26.0.M1/xtext-codemirror", | ||
11 | }, | ||
12 | packages: [{ | ||
13 | name: "codemirror", | ||
14 | location: "webjars/codemirror/5.52.2", | ||
15 | main: "lib/codemirror" | ||
16 | }] | ||
17 | }); | ||
18 | require(["xtext-resources/generated/mode-problem", "xtext/xtext-codemirror"], function(mode, xtext) { | ||
19 | xtext.createEditor({baseUrl: baseUrl, indentUnit: 2,}); | ||
20 | }); | ||
diff --git a/language-web/src/main/webapp/style.css b/language-web/src/main/webapp/style.css deleted file mode 100644 index f3a6b7f9..00000000 --- a/language-web/src/main/webapp/style.css +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | body { | ||
2 | width: 100%; | ||
3 | height: 100%; | ||
4 | overflow: hidden; | ||
5 | font: 16px Helvetica,sans-serif; | ||
6 | } | ||
7 | |||
8 | a { | ||
9 | color: #22a; | ||
10 | text-decoration: none; | ||
11 | } | ||
12 | |||
13 | a:hover { | ||
14 | text-decoration: underline; | ||
15 | } | ||
16 | |||
17 | .container { | ||
18 | display: block; | ||
19 | position: absolute; | ||
20 | top: 0; | ||
21 | bottom: 0; | ||
22 | left: 0; | ||
23 | right: 0; | ||
24 | margin: 24px 24px 36px 24px; | ||
25 | } | ||
26 | |||
27 | .header { | ||
28 | display: block; | ||
29 | position: absolute; | ||
30 | top: 0; | ||
31 | left: 0; | ||
32 | right: 0; | ||
33 | padding: 16px; | ||
34 | background: #dbdbdb; | ||
35 | border-radius: 16px; | ||
36 | color: #383838; | ||
37 | } | ||
38 | |||
39 | .header h1 { | ||
40 | font-size: 36px; | ||
41 | margin: 0; | ||
42 | } | ||
43 | |||
44 | .content { | ||
45 | display: block; | ||
46 | position: absolute; | ||
47 | top: 108px; | ||
48 | bottom: 0; | ||
49 | left: 0; | ||
50 | width: 100%; | ||
51 | box-shadow: 0 0 8px rgba(80, 10, 98, .25), 0 10px 24px rgba(80, 10, 98, .35); | ||
52 | border-radius: 16px; | ||
53 | } | ||
54 | |||
55 | .xtext-editor { | ||
56 | display: block; | ||
57 | position: absolute; | ||
58 | top: 16px; | ||
59 | bottom: 16px; | ||
60 | left: 16px; | ||
61 | right: 16px; | ||
62 | border: 1px solid #999; | ||
63 | } | ||
64 | |||
65 | .problem-class { | ||
66 | color: #005032; | ||
67 | } | ||
68 | |||
69 | .problem-abstract { | ||
70 | color: #8b8816; | ||
71 | } | ||
72 | |||
73 | .problem-enum { | ||
74 | color: #644632; | ||
75 | } | ||
76 | |||
77 | .problem-reference { | ||
78 | color: #0000c0; | ||
79 | } | ||
80 | |||
81 | .problem-containment { | ||
82 | font-weight: bold; | ||
83 | } | ||
84 | |||
85 | .CodeMirror .cm-quoted-name, .problem-enum-node { | ||
86 | color: #1a1a1a !important; | ||
87 | font-weight: bold; | ||
88 | } | ||
89 | |||
90 | .problem-new-node { | ||
91 | font-style: italic; | ||
92 | } | ||
93 | |||
94 | .problem-variable { | ||
95 | color: #6a3e3e; | ||
96 | } | ||
97 | |||
98 | .problem-singleton-variable { | ||
99 | color: #a1706f; | ||
100 | } | ||
diff --git a/language-web/src/main/webapp/xtext-resources/generated/mode-problem.js b/language-web/src/main/webapp/xtext-resources/generated/mode-problem.js deleted file mode 100644 index d962a0bb..00000000 --- a/language-web/src/main/webapp/xtext-resources/generated/mode-problem.js +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | define(["codemirror", "codemirror/addon/mode/simple"], function(CodeMirror, SimpleMode) { | ||
2 | var keywords = "abstract|class|contains|enum|error|extends|false|opposite|pred|problem|refers|scope|true|unknown"; | ||
3 | CodeMirror.defineSimpleMode("xtext/problem", { | ||
4 | start: [ | ||
5 | {token: "comment", regex: "\\/\\*", next : "comment"}, | ||
6 | {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'}, | ||
7 | {token: "quoted-name", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}, | ||
8 | {token: "number", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"}, | ||
9 | {token: "number", regex: "[*]"}, | ||
10 | {token: "comment", regex: "%.*$"}, | ||
11 | {token: "comment", regex: "\\/\\/.*$"}, | ||
12 | {token: "lparen", indent: true, regex: "[[({]"}, | ||
13 | {token: "rparen", dedent: true, regex: "[\\])}]"}, | ||
14 | {indent: true, push: "predicateBody", regex: ":-"}, | ||
15 | {token: "keyword", regex: "\\b(?:" + keywords + ")\\b"} | ||
16 | ], | ||
17 | comment: [ | ||
18 | {token: "comment", regex: ".*?\\*\\/", next : "start"}, | ||
19 | {token: "comment", regex: ".+"} | ||
20 | ], | ||
21 | meta: { | ||
22 | dontIndentStates: ["comment"], | ||
23 | lineComment: "%", | ||
24 | electricChars: "])];" | ||
25 | }, | ||
26 | predicateBody: [ | ||
27 | {token: "comment", regex: "\\/\\*", next : "comment"}, | ||
28 | {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'}, | ||
29 | {token: "quoted-name", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}, | ||
30 | {token: "number", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"}, | ||
31 | {token: "number", regex: "[*]"}, | ||
32 | {token: "comment", regex: "%.*$"}, | ||
33 | {token: "comment", regex: "\\/\\/.*$"}, | ||
34 | {token: "lparen", indent: true, regex: "[[({]"}, | ||
35 | {token: "rparen", dedent: true, regex: "[\\])}]"}, | ||
36 | {dedent: true, dedentIfLineStart: false, pop: true, regex: "\\.\\s*$"}, | ||
37 | {indent: true, dedent: true, regex: "[;]"}, | ||
38 | {token: "keyword", regex: "\\b(?:" + keywords + ")\\b"} | ||
39 | ] | ||
40 | }); | ||
41 | }); | ||