concrete 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. data/CHANGELOG +32 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +87 -0
  4. data/concrete/basic_inline_editor.js +73 -0
  5. data/concrete/clipboard.js +72 -0
  6. data/concrete/concrete.js +58 -0
  7. data/concrete/constraint_checker.js +297 -0
  8. data/concrete/editor.js +964 -0
  9. data/concrete/element_extension.js +68 -0
  10. data/concrete/external_identifier_provider.js +112 -0
  11. data/concrete/helper.js +63 -0
  12. data/concrete/identifier_provider.js +168 -0
  13. data/concrete/inline_editor.js +55 -0
  14. data/concrete/metamodel_provider.js +171 -0
  15. data/concrete/model_interface.js +429 -0
  16. data/concrete/scroller.js +106 -0
  17. data/concrete/selector.js +302 -0
  18. data/concrete/template_provider.js +141 -0
  19. data/concrete/ui/abstract_dialog.js +80 -0
  20. data/concrete/ui/concrete_ui.js +28 -0
  21. data/concrete/ui/create_module_dialog.js +55 -0
  22. data/concrete/ui/images/close.png +0 -0
  23. data/concrete/ui/images/document-new.png +0 -0
  24. data/concrete/ui/images/document-save.png +0 -0
  25. data/concrete/ui/images/edit-find-replace.png +0 -0
  26. data/concrete/ui/images/emblem-symbolic-link.png +0 -0
  27. data/concrete/ui/images/help-browser.png +0 -0
  28. data/concrete/ui/images/minus_11px.png +0 -0
  29. data/concrete/ui/images/plus_11px.png +0 -0
  30. data/concrete/ui/images/preferences-system.png +0 -0
  31. data/concrete/ui/images/process-stop.png +0 -0
  32. data/concrete/ui/images/system-search.png +0 -0
  33. data/concrete/ui/layout_manager.js +54 -0
  34. data/concrete/ui/module_browser.js +88 -0
  35. data/concrete/ui/module_editor.js +217 -0
  36. data/concrete/ui/open_element_dialog.js +90 -0
  37. data/concrete/ui/preferences_dialog.js +75 -0
  38. data/concrete/ui/proceed_dialog.js +52 -0
  39. data/concrete/ui/search_replace_dialog.js +323 -0
  40. data/concrete/ui/style.css +296 -0
  41. data/concrete/ui/toolbar.js +74 -0
  42. data/concrete/ui/workbench.js +165 -0
  43. data/doc/concrete_developers_guide.html +1054 -0
  44. data/doc/concrete_developers_guide.txt +502 -0
  45. data/doc/concrete_users_guide.html +694 -0
  46. data/doc/concrete_users_guide.txt +223 -0
  47. data/example/formula_editor/example_data/example1.json +11 -0
  48. data/example/formula_editor/formula_editor.html +83 -0
  49. data/example/formula_editor/sqrt_horz.png +0 -0
  50. data/example/formula_editor/sqrt_vert.png +0 -0
  51. data/example/formula_editor/style.css +31 -0
  52. data/example/metamodel_editor/edit.rb +54 -0
  53. data/example/metamodel_editor/example_data/formula_metamodel.json +18 -0
  54. data/example/metamodel_editor/example_data/meta_metamodel.json +22 -0
  55. data/example/metamodel_editor/example_data/statemachine_metamodel.json +32 -0
  56. data/example/metamodel_editor/metamodel_editor.html +120 -0
  57. data/example/metamodel_editor/metamodel_editor2.html +135 -0
  58. data/example/metamodel_editor/metamodel_editor3.html +151 -0
  59. data/example/metamodel_editor/style.css +8 -0
  60. data/example/metamodel_editor/style2.css +19 -0
  61. data/example/metamodel_editor/style3.css +35 -0
  62. data/example/minimal_editor/minimal_editor.html +43 -0
  63. data/example/statemachine_editor/example_data/example1.json +11 -0
  64. data/example/statemachine_editor/state_background.png +0 -0
  65. data/example/statemachine_editor/statemachine_editor0.html +55 -0
  66. data/example/statemachine_editor/statemachine_editor1.html +62 -0
  67. data/example/statemachine_editor/statemachine_editor2.html +103 -0
  68. data/example/statemachine_editor/style0.css +8 -0
  69. data/example/statemachine_editor/style1.css +32 -0
  70. data/example/statemachine_editor/style2.css +43 -0
  71. data/example/themes/cobalt.css +176 -0
  72. data/example/themes/dialog-error.png +0 -0
  73. data/example/themes/dialog-information.png +0 -0
  74. data/example/themes/dialog-warning.png +0 -0
  75. data/example/themes/dots_12px.png +0 -0
  76. data/example/themes/fold_button_dots_when_hidden.css +18 -0
  77. data/example/themes/fold_button_plus_minus.css +21 -0
  78. data/example/themes/fold_button_plus_when_hidden.css +18 -0
  79. data/example/themes/light_blue.css +177 -0
  80. data/example/themes/minus_11px.png +0 -0
  81. data/example/themes/minus_13px.png +0 -0
  82. data/example/themes/minus_9px.png +0 -0
  83. data/example/themes/plus_11px.png +0 -0
  84. data/example/themes/plus_13px.png +0 -0
  85. data/example/themes/plus_9px.png +0 -0
  86. data/example/themes/white.css +177 -0
  87. data/lib/concrete/concrete_syntax_provider.rb +63 -0
  88. data/lib/concrete/config.rb +36 -0
  89. data/lib/concrete/file_cache_map.rb +88 -0
  90. data/lib/concrete/index_builder.rb +108 -0
  91. data/lib/concrete/metamodel/concrete_mmm.rb +45 -0
  92. data/lib/concrete/metamodel/ecore_to_concrete.rb +80 -0
  93. data/lib/concrete/server.rb +92 -0
  94. data/lib/concrete/util/logger.rb +24 -0
  95. data/lib/concrete/util/string_writer.rb +17 -0
  96. data/lib/concrete/working_set.rb +41 -0
  97. data/rakefile +33 -0
  98. data/redist/prototype.js +4320 -0
  99. data/redist/scriptaculous/builder.js +136 -0
  100. data/redist/scriptaculous/controls.js +991 -0
  101. data/redist/scriptaculous/dragdrop.js +975 -0
  102. data/redist/scriptaculous/effects.js +1130 -0
  103. data/redist/scriptaculous/scriptaculous.js +60 -0
  104. data/redist/scriptaculous/slider.js +275 -0
  105. data/redist/scriptaculous/sound.js +55 -0
  106. data/redist/scriptaculous/unittest.js +568 -0
  107. data/test/concrete_test.rb +5 -0
  108. data/test/file_cache_map_test.rb +90 -0
  109. data/test/file_cache_map_test/testdir/fileA +1 -0
  110. data/test/index_builder_test.rb +68 -0
  111. data/test/index_builder_test/ecore_index.js +85 -0
  112. data/test/index_builder_test/ecore_index_expected.js +85 -0
  113. data/test/integration/external_elements_test.html +114 -0
  114. data/test/metamodel_test.rb +40 -0
  115. data/test/metamodel_test/concrete_mmm_expected.js +19 -0
  116. data/test/metamodel_test/concrete_mmm_generated.js +19 -0
  117. data/test/metamodel_test/concrete_mmm_regenerated.js +19 -0
  118. data/test/unit/external_identifier_provider_test.html +138 -0
  119. data/test/unit/identifier_provider_test.html +269 -0
  120. data/test/unit/metamodel_provider_test.html +318 -0
  121. data/test/unit/model_interface_test.html +257 -0
  122. data/test/unit/template_provider_test.html +171 -0
  123. data/test/unit/test.css +90 -0
  124. data/test/working_set_test.rb +54 -0
  125. data/test/working_set_test/file1.txt +0 -0
  126. data/test/working_set_test/file2 +0 -0
  127. data/test/working_set_test/subdir/file3.xml +0 -0
  128. metadata +201 -0
@@ -0,0 +1,694 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
+ <meta name="generator" content="AsciiDoc 8.4.5" />
7
+ <title>Concrete Users Guide</title>
8
+ <style type="text/css">
9
+ /* Debug borders */
10
+ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
11
+ /*
12
+ border: 1px solid red;
13
+ */
14
+ }
15
+
16
+ body {
17
+ margin: 1em 5% 1em 5%;
18
+ }
19
+
20
+ a {
21
+ color: blue;
22
+ text-decoration: underline;
23
+ }
24
+ a:visited {
25
+ color: fuchsia;
26
+ }
27
+
28
+ em {
29
+ font-style: italic;
30
+ color: navy;
31
+ }
32
+
33
+ strong {
34
+ font-weight: bold;
35
+ color: #083194;
36
+ }
37
+
38
+ tt {
39
+ color: navy;
40
+ }
41
+
42
+ h1, h2, h3, h4, h5, h6 {
43
+ color: #527bbd;
44
+ font-family: sans-serif;
45
+ margin-top: 1.2em;
46
+ margin-bottom: 0.5em;
47
+ line-height: 1.3;
48
+ }
49
+
50
+ h1, h2, h3 {
51
+ border-bottom: 2px solid silver;
52
+ }
53
+ h2 {
54
+ padding-top: 0.5em;
55
+ }
56
+ h3 {
57
+ float: left;
58
+ }
59
+ h3 + * {
60
+ clear: left;
61
+ }
62
+
63
+ div.sectionbody {
64
+ font-family: serif;
65
+ margin-left: 0;
66
+ }
67
+
68
+ hr {
69
+ border: 1px solid silver;
70
+ }
71
+
72
+ p {
73
+ margin-top: 0.5em;
74
+ margin-bottom: 0.5em;
75
+ }
76
+
77
+ ul, ol, li > p {
78
+ margin-top: 0;
79
+ }
80
+
81
+ pre {
82
+ padding: 0;
83
+ margin: 0;
84
+ }
85
+
86
+ span#author {
87
+ color: #527bbd;
88
+ font-family: sans-serif;
89
+ font-weight: bold;
90
+ font-size: 1.1em;
91
+ }
92
+ span#email {
93
+ }
94
+ span#revnumber, span#revdate, span#revremark {
95
+ font-family: sans-serif;
96
+ }
97
+
98
+ div#footer {
99
+ font-family: sans-serif;
100
+ font-size: small;
101
+ border-top: 2px solid silver;
102
+ padding-top: 0.5em;
103
+ margin-top: 4.0em;
104
+ }
105
+ div#footer-text {
106
+ float: left;
107
+ padding-bottom: 0.5em;
108
+ }
109
+ div#footer-badges {
110
+ float: right;
111
+ padding-bottom: 0.5em;
112
+ }
113
+
114
+ div#preamble {
115
+ margin-top: 1.5em;
116
+ margin-bottom: 1.5em;
117
+ }
118
+ div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
119
+ div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
120
+ div.admonitionblock {
121
+ margin-top: 1.5em;
122
+ margin-bottom: 1.5em;
123
+ }
124
+ div.admonitionblock {
125
+ margin-top: 2.5em;
126
+ margin-bottom: 2.5em;
127
+ }
128
+
129
+ div.content { /* Block element content. */
130
+ padding: 0;
131
+ }
132
+
133
+ /* Block element titles. */
134
+ div.title, caption.title {
135
+ color: #527bbd;
136
+ font-family: sans-serif;
137
+ font-weight: bold;
138
+ text-align: left;
139
+ margin-top: 1.0em;
140
+ margin-bottom: 0.5em;
141
+ }
142
+ div.title + * {
143
+ margin-top: 0;
144
+ }
145
+
146
+ td div.title:first-child {
147
+ margin-top: 0.0em;
148
+ }
149
+ div.content div.title:first-child {
150
+ margin-top: 0.0em;
151
+ }
152
+ div.content + div.title {
153
+ margin-top: 0.0em;
154
+ }
155
+
156
+ div.sidebarblock > div.content {
157
+ background: #ffffee;
158
+ border: 1px solid silver;
159
+ padding: 0.5em;
160
+ }
161
+
162
+ div.listingblock > div.content {
163
+ border: 1px solid silver;
164
+ background: #f4f4f4;
165
+ padding: 0.5em;
166
+ }
167
+
168
+ div.quoteblock {
169
+ padding-left: 2.0em;
170
+ margin-right: 10%;
171
+ }
172
+ div.quoteblock > div.attribution {
173
+ padding-top: 0.5em;
174
+ text-align: right;
175
+ }
176
+
177
+ div.verseblock {
178
+ padding-left: 2.0em;
179
+ margin-right: 10%;
180
+ }
181
+ div.verseblock > div.content {
182
+ white-space: pre;
183
+ }
184
+ div.verseblock > div.attribution {
185
+ padding-top: 0.75em;
186
+ text-align: left;
187
+ }
188
+ /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
189
+ div.verseblock + div.attribution {
190
+ text-align: left;
191
+ }
192
+
193
+ div.admonitionblock .icon {
194
+ vertical-align: top;
195
+ font-size: 1.1em;
196
+ font-weight: bold;
197
+ text-decoration: underline;
198
+ color: #527bbd;
199
+ padding-right: 0.5em;
200
+ }
201
+ div.admonitionblock td.content {
202
+ padding-left: 0.5em;
203
+ border-left: 2px solid silver;
204
+ }
205
+
206
+ div.exampleblock > div.content {
207
+ border-left: 2px solid silver;
208
+ padding: 0.5em;
209
+ }
210
+
211
+ div.imageblock div.content { padding-left: 0; }
212
+ span.image img { border-style: none; }
213
+ a.image:visited { color: white; }
214
+
215
+ dl {
216
+ margin-top: 0.8em;
217
+ margin-bottom: 0.8em;
218
+ }
219
+ dt {
220
+ margin-top: 0.5em;
221
+ margin-bottom: 0;
222
+ font-style: normal;
223
+ color: navy;
224
+ }
225
+ dd > *:first-child {
226
+ margin-top: 0.1em;
227
+ }
228
+
229
+ ul, ol {
230
+ list-style-position: outside;
231
+ }
232
+ ol.arabic {
233
+ list-style-type: decimal;
234
+ }
235
+ ol.loweralpha {
236
+ list-style-type: lower-alpha;
237
+ }
238
+ ol.upperalpha {
239
+ list-style-type: upper-alpha;
240
+ }
241
+ ol.lowerroman {
242
+ list-style-type: lower-roman;
243
+ }
244
+ ol.upperroman {
245
+ list-style-type: upper-roman;
246
+ }
247
+
248
+ div.compact ul, div.compact ol,
249
+ div.compact p, div.compact p,
250
+ div.compact div, div.compact div {
251
+ margin-top: 0.1em;
252
+ margin-bottom: 0.1em;
253
+ }
254
+
255
+ div.tableblock > table {
256
+ border: 3px solid #527bbd;
257
+ }
258
+ thead {
259
+ font-family: sans-serif;
260
+ font-weight: bold;
261
+ }
262
+ tfoot {
263
+ font-weight: bold;
264
+ }
265
+ td > div.verse {
266
+ white-space: pre;
267
+ }
268
+ p.table {
269
+ margin-top: 0;
270
+ }
271
+ /* Because the table frame attribute is overriden by CSS in most browsers. */
272
+ div.tableblock > table[frame="void"] {
273
+ border-style: none;
274
+ }
275
+ div.tableblock > table[frame="hsides"] {
276
+ border-left-style: none;
277
+ border-right-style: none;
278
+ }
279
+ div.tableblock > table[frame="vsides"] {
280
+ border-top-style: none;
281
+ border-bottom-style: none;
282
+ }
283
+
284
+
285
+ div.hdlist {
286
+ margin-top: 0.8em;
287
+ margin-bottom: 0.8em;
288
+ }
289
+ div.hdlist tr {
290
+ padding-bottom: 15px;
291
+ }
292
+ dt.hdlist1.strong, td.hdlist1.strong {
293
+ font-weight: bold;
294
+ }
295
+ td.hdlist1 {
296
+ vertical-align: top;
297
+ font-style: normal;
298
+ padding-right: 0.8em;
299
+ color: navy;
300
+ }
301
+ td.hdlist2 {
302
+ vertical-align: top;
303
+ }
304
+ div.hdlist.compact tr {
305
+ margin: 0;
306
+ padding-bottom: 0;
307
+ }
308
+
309
+ .comment {
310
+ background: yellow;
311
+ }
312
+
313
+ @media print {
314
+ div#footer-badges { display: none; }
315
+ }
316
+
317
+ div#toctitle {
318
+ color: #527bbd;
319
+ font-family: sans-serif;
320
+ font-size: 1.1em;
321
+ font-weight: bold;
322
+ margin-top: 1.0em;
323
+ margin-bottom: 0.1em;
324
+ }
325
+
326
+ div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
327
+ margin-top: 0;
328
+ margin-bottom: 0;
329
+ }
330
+ div.toclevel2 {
331
+ margin-left: 2em;
332
+ font-size: 0.9em;
333
+ }
334
+ div.toclevel3 {
335
+ margin-left: 4em;
336
+ font-size: 0.9em;
337
+ }
338
+ div.toclevel4 {
339
+ margin-left: 6em;
340
+ font-size: 0.9em;
341
+ }
342
+ /* Workarounds for IE6's broken and incomplete CSS2. */
343
+
344
+ div.sidebar-content {
345
+ background: #ffffee;
346
+ border: 1px solid silver;
347
+ padding: 0.5em;
348
+ }
349
+ div.sidebar-title, div.image-title {
350
+ color: #527bbd;
351
+ font-family: sans-serif;
352
+ font-weight: bold;
353
+ margin-top: 0.0em;
354
+ margin-bottom: 0.5em;
355
+ }
356
+
357
+ div.listingblock div.content {
358
+ border: 1px solid silver;
359
+ background: #f4f4f4;
360
+ padding: 0.5em;
361
+ }
362
+
363
+ div.quoteblock-attribution {
364
+ padding-top: 0.5em;
365
+ text-align: right;
366
+ }
367
+
368
+ div.verseblock-content {
369
+ white-space: pre;
370
+ }
371
+ div.verseblock-attribution {
372
+ padding-top: 0.75em;
373
+ text-align: left;
374
+ }
375
+
376
+ div.exampleblock-content {
377
+ border-left: 2px solid silver;
378
+ padding-left: 0.5em;
379
+ }
380
+
381
+ /* IE6 sets dynamically generated links as visited. */
382
+ div#toc a:visited { color: blue; }
383
+ </style>
384
+ </head>
385
+ <body>
386
+ <div id="header">
387
+ <h1>Concrete Users Guide</h1>
388
+ </div>
389
+ <div id="preamble">
390
+ <div class="sectionbody">
391
+ <div class="paragraph"><p><em>Concrete</em> is a generic model editor which can be configured for different
392
+ domain specific languages (DSLs). When you use it, you use it for a predefined DSL.
393
+ The DSL describes what the model may look like, both from a content and a visual point of view.
394
+ See the Developers Guide if you want to setup your own DSL.</p></div>
395
+ <div class="paragraph"><p>This document describes the usage of the editor, independant of any specific DSL.</p></div>
396
+ </div>
397
+ </div>
398
+ <h2 id="_models">Models</h2>
399
+ <div class="sectionbody">
400
+ <div class="paragraph"><p>Models consist of <tt>elements</tt> which may have attributes, references to other elements and may contain other elements.</p></div>
401
+ <div class="paragraph"><p><tt>Attributes</tt> can take one or more primitive values. Currently
402
+ primitive values are of type <tt>String</tt>, <tt>Integer</tt>, <tt>Float</tt>, <tt>Boolean</tt>, or custom defined <tt>Enum</tt> datatypes. <tt>Enum</tt> types have
403
+ a name and consist of a set of string literals, each of which is a valid instance of the type.</p></div>
404
+ <div class="paragraph"><p><tt>References</tt> point to one or more other elements. References can not point to or take primitive values.</p></div>
405
+ <div class="paragraph"><p><tt>Containment</tt> relationships are references with the difference that the contained element is part of the parent element,
406
+ whereas the referenced element normally is not (there may be exceptions). When the parent element is deleted, the contained
407
+ elements are also deleted. When the parent element is collapsed the contained elements are hidden.</p></div>
408
+ <div class="paragraph"><p>Attributes, reference and containmend relationships are called <em>features</em> of an element. Features have names,
409
+ although they may not be visible.</p></div>
410
+ <div class="paragraph"><p>Attributes and references contain <em>values</em> whereas containment relationships contain <em>elements</em>.</p></div>
411
+ </div>
412
+ <h2 id="_navigation_and_selection">Navigation and Selection</h2>
413
+ <div class="sectionbody">
414
+ <h3 id="_selecting_elements_values">Selecting Elements/Values</h3><div style="clear:left"></div>
415
+ <div class="paragraph"><p>For all editing commands described below, at least one element or attribute/reference value needs to be selected.
416
+ Selection can be done with the arrow keys (<tt>Left</tt>, <tt>Right</tt>, <tt>Up</tt>, <tt>Down</tt>), with <tt>Tab</tt> and <tt>Shift-Tab</tt> or with the mouse.</p></div>
417
+ <div class="paragraph"><p>Selection with the mouse is straightforward, just click the element.</p></div>
418
+ <div class="paragraph"><p>Using the key <tt>Tab</tt> and <tt>Shift-Tab</tt>, the next/previous element/value can be selected with respect to the logical order
419
+ (instead of the graphical order on the screen). If an element has other elements or values inside, <tt>Tab</tt> will select
420
+ the first child, and so on.</p></div>
421
+ <div class="paragraph"><p>In contrast to the tab keys, the arrow keys select with respect to the graphical position on the screen.
422
+ Press one of <tt>Left</tt>, <tt>Right</tt>, <tt>Up</tt>, <tt>Down</tt>, to move the selection in the respective direction.
423
+ When an element has other elements or values inside, the next selected element may be one of these elements.
424
+ In order to know if the next selected element is inside or outside of the current element, you need to be aware of
425
+ the current <em>cursor</em> position. The <em>cursor</em> is a little dot on the border of the selected element/value.
426
+ If the cursor is on the left border and you press <tt>Right</tt>, the next selected element will be inside of the
427
+ current element (given that it has child elements). Otherwise, if you press <tt>Left</tt>, the next selected element
428
+ will be outside, left of the current element (given that there are elements on the left). The same is true for the
429
+ other directions, of course. If the next element would be outside but there are no elements in this direction, the
430
+ parent element will be selected.</p></div>
431
+ <div class="paragraph"><p>Hold <tt>Shift</tt> down shift while moving the selection with any of the methods described above to extend to selection (<em>multi select</em>).</p></div>
432
+ <h3 id="_navigating_references">Navigating References</h3><div style="clear:left"></div>
433
+ <div class="paragraph"><p>When you move the mouse over a valid reference value while prssing <tt>Ctrl</tt>, the reference target will be highlighted.
434
+ However, you might not see the target if it is outside of the visible area on the screen.</p></div>
435
+ <div class="paragraph"><p>You can click the left mouse button on a valid reference value while pressing <tt>Ctrl</tt> to select the reference target.
436
+ This will automatically scroll to make the target visible.</p></div>
437
+ <div class="paragraph"><p>References can also be followed by pressing <tt>Alt-Right</tt> while a valid reference value is selected. This will select
438
+ the target element and scroll to make it visible. By pressing <tt>Alt-Left</tt> you can go back the references in reverse order.</p></div>
439
+ <h3 id="_folding">Folding</h3><div style="clear:left"></div>
440
+ <div class="paragraph"><p>Elements with containment relationships can be collapsed using <tt>Ctrl-Left</tt>. This will hide the containment relationships
441
+ including the contained elements. In order to expand the element again, press <tt>Ctrl-Right</tt>.</p></div>
442
+ <div class="paragraph"><p>You can collapse and expand elements recursively using <tt>Ctrl-Shift-Left</tt> and <tt>Ctrl-Shift-Right</tt>. This will also
443
+ collapse/expand child elements.</p></div>
444
+ <div class="paragraph"><p>In addition to this, empty features may collapse depending on the DSL configuration. This happens when you leave
445
+ the currently selected element (i.e. select another element which is not a child). You can show all hidden featurs
446
+ be pressing <tt>Shift-Return</tt>. This command also expands the current element.</p></div>
447
+ <div class="paragraph"><p>All collapsing commands also work with multiple elements selected.</p></div>
448
+ <div class="paragraph"><p>Depending on the DSL, folding may also be triggered by clicking on the fold button (e.g. a plus or minus sign).</p></div>
449
+ </div>
450
+ <h2 id="_editing">Editing</h2>
451
+ <div class="sectionbody">
452
+ <h3 id="_edit_mode">Edit Mode</h3><div style="clear:left"></div>
453
+ <div class="paragraph"><p>Whenever you want to actually edit text (e.g. to edit an attribute value or choose an element&#8217;s type) you need to be in <em>edit mode</em>.
454
+ The easiest way to enter edit mode is by just typing text while an element/value is selected. More explicitly you may also
455
+ click the element or value while it is already selected or press <tt>F2</tt> or <tt>Ctrl-Space</tt>.</p></div>
456
+ <div class="paragraph"><p>You can leave edit mode and cancel your edit by pressing <tt>Esc</tt> or click the mouse somewhere outside of the current edit box.</p></div>
457
+ <div class="paragraph"><p>In order to leaave edit mode and actually use your changes, press <tt>Return</tt>, <tt>Tab</tt> or <tt>Shift-Tab</tt>.
458
+ If an error is detected with your input (e.g. because you entered letters for an Integer value),
459
+ you can not successfully leave edit mode. In this case, either correct your input or cancel edit mode.</p></div>
460
+ <div class="paragraph"><p>If a set of completion options is available for the current element/value, a dropdown box will be shown in edit mode
461
+ when you start typing. You can bring up the dropdown box without typing by pressing one of the arrow keys.</p></div>
462
+ <h3 id="_creating_elements">Creating Elements</h3><div style="clear:left"></div>
463
+ <div class="paragraph"><p>Elements can be created on toplevel or as children in a containment relationship. If in either place, there are no
464
+ other elements yet, an empty placeholder element will be shown.
465
+ In this case, select the placeholder, enter edit mode and type the name of the element class to be created.
466
+ Once in edit mode, a dropdown box appears showing possible completion options.</p></div>
467
+ <div class="paragraph"><p>If an element should be added to a set of existing elements, select one of the existing ones and press <tt>Return</tt>.
468
+ This will insert a placeholder after the selected element and immediately enter edit mode.</p></div>
469
+ <div class="paragraph"><p>When an element is created, all features are shown although they are empty. Depending on the configuration of the
470
+ editor, empty features may be hidden when you select a different element which is not a child. In oder to
471
+ show the hidden features again, press <tt>Shift-Return</tt>.</p></div>
472
+ <h3 id="_changing_the_element_type">Changing the Element Type</h3><div style="clear:left"></div>
473
+ <div class="paragraph"><p>When you enter edit mode while an element is selected, the element&#8217;s type can be changed. When the type changes,
474
+ feature values will be preserved for features which also exist in the new type.</p></div>
475
+ <h3 id="_deleting_elements">Deleting Elements</h3><div style="clear:left"></div>
476
+ <div class="paragraph"><p>Elements can be deleted by pressing <tt>Del</tt>. This also works if multiple elements are selected.</p></div>
477
+ <h3 id="_editing_attribute_values">Editing Attribute Values</h3><div style="clear:left"></div>
478
+ <div class="paragraph"><p>In a newly created element, no attribute values exist. You can create an attribute value by entering edit mode on
479
+ an empty value placeholder. As with elements, pressing <tt>Return</tt> on a value will insert another value, pressing <tt>Del</tt> removes the value.
480
+ In case the attribute to be edited is hidden, press <tt>Shift-Return</tt> to show it.</p></div>
481
+ <h3 id="_editing_reference_values">Editing Reference Values</h3><div style="clear:left"></div>
482
+ <div class="paragraph"><p>Reference values can be edited in the same way as attribute values. The content of a reference value is the identifier
483
+ of the referenced element. Use the dropdown box in edit mode to choose one of the possible target elements.
484
+ Note, that only elements with an identifier can be referenced.</p></div>
485
+ <h3 id="_copy_and_paste">Copy and Paste</h3><div style="clear:left"></div>
486
+ <div class="paragraph"><p>Both element and values can be cut, copied and pasted with <tt>Ctrl-X</tt>, <tt>Ctrl-C</tt> and <tt>Ctrl-V</tt> respectively. This also works
487
+ with multiples elements selected. Note however, that you can not paste an attribute or reference value where an element
488
+ is expected and vice versa.</p></div>
489
+ </div>
490
+ <h2 id="_hover_information">Hover Information</h2>
491
+ <div class="sectionbody">
492
+ <div class="paragraph"><p>Some information is show only when moving the mouse over a model element or value. Make sure to focus the editor first,
493
+ otherwise the hovers will not appear.</p></div>
494
+ <h3 id="_errors">Errors</h3><div style="clear:left"></div>
495
+ <div class="paragraph"><p>The DSL defines constraints on possible models. For example, for some attributes only a single value might be
496
+ allowed, whereas for other attributes you may provide more than one value.
497
+ If a constraint is violated for an element or feature, the element/feature will be marked as erroneous.
498
+ Move the mouse over such an element in order to show the error message in a popup window.</p></div>
499
+ <h3 id="_model_information">Model Information</h3><div style="clear:left"></div>
500
+ <div class="paragraph"><p>Depending on the concrete syntax, the feature names might be hidden. When moving the mouse over a model value, the name of the
501
+ feature that value belongs to will be shown. Also for references, the full identifier will be shown.</p></div>
502
+ </div>
503
+ <h2 id="_workbench">Workbench</h2>
504
+ <div class="sectionbody">
505
+ <div class="paragraph"><p>Some editors might use the "workbench" functionality which comes with <em>Concrete</em>. The workbench features:</p></div>
506
+ <div class="ulist"><ul>
507
+ <li>
508
+ <p>
509
+ a module index view
510
+ </p>
511
+ </li>
512
+ <li>
513
+ <p>
514
+ a module editor view
515
+ </p>
516
+ </li>
517
+ <li>
518
+ <p>
519
+ following references across modules
520
+ </p>
521
+ </li>
522
+ <li>
523
+ <p>
524
+ finding elements based on a index ("open element")
525
+ </p>
526
+ </li>
527
+ <li>
528
+ <p>
529
+ search/replace functionality
530
+ </p>
531
+ </li>
532
+ <li>
533
+ <p>
534
+ switchable layouts via the preferences dialog
535
+ </p>
536
+ </li>
537
+ </ul></div>
538
+ <div class="paragraph"><p>Using the workbench should be pretty much self-explanatory. Some of the commands can be invoked using hotkeys which are described
539
+ in the command reference below.</p></div>
540
+ </div>
541
+ <h2 id="_command_reference">Command Reference</h2>
542
+ <div class="sectionbody">
543
+ <div class="tableblock">
544
+ <table rules="none"
545
+ width="100%"
546
+ frame="hsides"
547
+ cellspacing="0" cellpadding="4">
548
+ <caption class="title">Keyboard</caption>
549
+ <col width="50%" />
550
+ <col width="50%" />
551
+ <tbody>
552
+ <tr>
553
+ <td align="left" valign="top"><p class="table">Left, Right, Up, Down</p></td>
554
+ <td align="left" valign="top"><p class="table">move selection</p></td>
555
+ </tr>
556
+ <tr>
557
+ <td align="left" valign="top"><p class="table">Tab, Shift-Tab</p></td>
558
+ <td align="left" valign="top"><p class="table">move selection in sequential order, select first child if available, stop editing when in edit mode</p></td>
559
+ </tr>
560
+ <tr>
561
+ <td align="left" valign="top"><p class="table">Shift-Left, Shift-Right, Shift-Up, Shift-Down</p></td>
562
+ <td align="left" valign="top"><p class="table">extend selection (multi select)</p></td>
563
+ </tr>
564
+ <tr>
565
+ <td align="left" valign="top"><p class="table">Ctrl-A</p></td>
566
+ <td align="left" valign="top"><p class="table">select all</p></td>
567
+ </tr>
568
+ <tr>
569
+ <td align="left" valign="top"><p class="table">Return</p></td>
570
+ <td align="left" valign="top"><p class="table">insert new element/value after current element/value, stop editing when in edit mode</p></td>
571
+ </tr>
572
+ <tr>
573
+ <td align="left" valign="top"><p class="table">Del</p></td>
574
+ <td align="left" valign="top"><p class="table">delete selected element/value(s)</p></td>
575
+ </tr>
576
+ <tr>
577
+ <td align="left" valign="top"><p class="table">start typing, F2, Ctrl-Space</p></td>
578
+ <td align="left" valign="top"><p class="table">edit selected element/value (enter edit mode)</p></td>
579
+ </tr>
580
+ <tr>
581
+ <td align="left" valign="top"><p class="table">Esc</p></td>
582
+ <td align="left" valign="top"><p class="table">stop editing when in edit mode</p></td>
583
+ </tr>
584
+ <tr>
585
+ <td align="left" valign="top"><p class="table">Ctrl-C</p></td>
586
+ <td align="left" valign="top"><p class="table">copy selection to clipboard</p></td>
587
+ </tr>
588
+ <tr>
589
+ <td align="left" valign="top"><p class="table">Ctrl-X</p></td>
590
+ <td align="left" valign="top"><p class="table">cut selection to clipboard</p></td>
591
+ </tr>
592
+ <tr>
593
+ <td align="left" valign="top"><p class="table">Ctrl-V</p></td>
594
+ <td align="left" valign="top"><p class="table">insert from clipboard after selected element/value</p></td>
595
+ </tr>
596
+ <tr>
597
+ <td align="left" valign="top"><p class="table">Ctrl-Left</p></td>
598
+ <td align="left" valign="top"><p class="table">collapse element</p></td>
599
+ </tr>
600
+ <tr>
601
+ <td align="left" valign="top"><p class="table">Ctrl-Shift-Left</p></td>
602
+ <td align="left" valign="top"><p class="table">collapse element and all child elements</p></td>
603
+ </tr>
604
+ <tr>
605
+ <td align="left" valign="top"><p class="table">Ctrl-Right</p></td>
606
+ <td align="left" valign="top"><p class="table">expand element</p></td>
607
+ </tr>
608
+ <tr>
609
+ <td align="left" valign="top"><p class="table">Ctrl-Shift-Right</p></td>
610
+ <td align="left" valign="top"><p class="table">expand element and all child elements</p></td>
611
+ </tr>
612
+ <tr>
613
+ <td align="left" valign="top"><p class="table">Shift-Return</p></td>
614
+ <td align="left" valign="top"><p class="table">show hidden features (auto-hide features will hide again when selection leaves the element)</p></td>
615
+ </tr>
616
+ <tr>
617
+ <td align="left" valign="top"><p class="table">Alt-Right</p></td>
618
+ <td align="left" valign="top"><p class="table">select reference target (jump to reference target) if a reference is selected</p></td>
619
+ </tr>
620
+ <tr>
621
+ <td align="left" valign="top"><p class="table">Alt-Left</p></td>
622
+ <td align="left" valign="top"><p class="table">jump back references in reverse order</p></td>
623
+ </tr>
624
+ </tbody>
625
+ </table>
626
+ </div>
627
+ <div class="tableblock">
628
+ <table rules="none"
629
+ width="100%"
630
+ frame="hsides"
631
+ cellspacing="0" cellpadding="4">
632
+ <caption class="title">Mouse</caption>
633
+ <col width="50%" />
634
+ <col width="50%" />
635
+ <tbody>
636
+ <tr>
637
+ <td align="left" valign="top"><p class="table">Left Click</p></td>
638
+ <td align="left" valign="top"><p class="table">move selection, stop editing when in edit mode</p></td>
639
+ </tr>
640
+ <tr>
641
+ <td align="left" valign="top"><p class="table">Shift-Left Click</p></td>
642
+ <td align="left" valign="top"><p class="table">extend selection (multi select)</p></td>
643
+ </tr>
644
+ <tr>
645
+ <td align="left" valign="top"><p class="table">Left click already selected element/value</p></td>
646
+ <td align="left" valign="top"><p class="table">edit selected element/value (enter edit mode)</p></td>
647
+ </tr>
648
+ <tr>
649
+ <td align="left" valign="top"><p class="table">Hover over element/value</p></td>
650
+ <td align="left" valign="top"><p class="table">show errors if present</p></td>
651
+ </tr>
652
+ <tr>
653
+ <td align="left" valign="top"><p class="table">Ctrl-Hover over reference</p></td>
654
+ <td align="left" valign="top"><p class="table">highlight reference target</p></td>
655
+ </tr>
656
+ <tr>
657
+ <td align="left" valign="top"><p class="table">Ctrl-Left Click</p></td>
658
+ <td align="left" valign="top"><p class="table">select reference target (jump to reference target)</p></td>
659
+ </tr>
660
+ </tbody>
661
+ </table>
662
+ </div>
663
+ <div class="tableblock">
664
+ <table rules="none"
665
+ width="100%"
666
+ frame="hsides"
667
+ cellspacing="0" cellpadding="4">
668
+ <caption class="title">Workbench Commands</caption>
669
+ <col width="50%" />
670
+ <col width="50%" />
671
+ <tbody>
672
+ <tr>
673
+ <td align="left" valign="top"><p class="table">Ctrl-Shift-S</p></td>
674
+ <td align="left" valign="top"><p class="table">save model</p></td>
675
+ </tr>
676
+ <tr>
677
+ <td align="left" valign="top"><p class="table">Ctrl-Shift-F</p></td>
678
+ <td align="left" valign="top"><p class="table">open search/replace dialog</p></td>
679
+ </tr>
680
+ <tr>
681
+ <td align="left" valign="top"><p class="table">Ctrl-Shift-E</p></td>
682
+ <td align="left" valign="top"><p class="table">open "open element" dialog</p></td>
683
+ </tr>
684
+ </tbody>
685
+ </table>
686
+ </div>
687
+ </div>
688
+ <div id="footer">
689
+ <div id="footer-text">
690
+ Last updated 2010-06-13 23:51:34 WEDT
691
+ </div>
692
+ </div>
693
+ </body>
694
+ </html>