Skip to content

Commit c21a20f

Browse files
committed
Initial functionality of Markdown resource
1 parent a35bb6e commit c21a20f

11 files changed

Lines changed: 468 additions & 17 deletions

File tree

model/model/markdown.xcore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ class Attribute {
7171
/**
7272
* Raw attribute value string (may be empty for bare class/id short-hands).
7373
*/
74-
String value
74+
String value
75+
7576
}
7677

7778
/**
@@ -82,6 +83,11 @@ interface Attributable {
8283
* All attributes parsed from the { ... } block that follows this node.
8384
*/
8485
contains Attribute[] attributes
86+
87+
int attributesStartOffset
88+
89+
int attributesEndOffset
90+
8591
}
8692

8793
// ─────────────────────────────────────────────────────────────────────────────

model/src-gen/org/nasdanika/models/markdown/Attributable.java

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
* </p>
2222
* <ul>
2323
* <li>{@link org.nasdanika.models.markdown.Attributable#getAttributes <em>Attributes</em>}</li>
24+
* <li>{@link org.nasdanika.models.markdown.Attributable#getAttributesStartOffset <em>Attributes Start Offset</em>}</li>
25+
* <li>{@link org.nasdanika.models.markdown.Attributable#getAttributesEndOffset <em>Attributes End Offset</em>}</li>
2426
* </ul>
2527
*
2628
* @see org.nasdanika.models.markdown.MarkdownPackage#getAttributable()
@@ -44,4 +46,48 @@ public interface Attributable extends EObject {
4446
*/
4547
EList<Attribute> getAttributes();
4648

49+
/**
50+
* Returns the value of the '<em><b>Attributes Start Offset</b></em>' attribute.
51+
* <!-- begin-user-doc -->
52+
* <!-- end-user-doc -->
53+
* @return the value of the '<em>Attributes Start Offset</em>' attribute.
54+
* @see #setAttributesStartOffset(int)
55+
* @see org.nasdanika.models.markdown.MarkdownPackage#getAttributable_AttributesStartOffset()
56+
* @model unique="false"
57+
* @generated
58+
*/
59+
int getAttributesStartOffset();
60+
61+
/**
62+
* Sets the value of the '{@link org.nasdanika.models.markdown.Attributable#getAttributesStartOffset <em>Attributes Start Offset</em>}' attribute.
63+
* <!-- begin-user-doc -->
64+
* <!-- end-user-doc -->
65+
* @param value the new value of the '<em>Attributes Start Offset</em>' attribute.
66+
* @see #getAttributesStartOffset()
67+
* @generated
68+
*/
69+
void setAttributesStartOffset(int value);
70+
71+
/**
72+
* Returns the value of the '<em><b>Attributes End Offset</b></em>' attribute.
73+
* <!-- begin-user-doc -->
74+
* <!-- end-user-doc -->
75+
* @return the value of the '<em>Attributes End Offset</em>' attribute.
76+
* @see #setAttributesEndOffset(int)
77+
* @see org.nasdanika.models.markdown.MarkdownPackage#getAttributable_AttributesEndOffset()
78+
* @model unique="false"
79+
* @generated
80+
*/
81+
int getAttributesEndOffset();
82+
83+
/**
84+
* Sets the value of the '{@link org.nasdanika.models.markdown.Attributable#getAttributesEndOffset <em>Attributes End Offset</em>}' attribute.
85+
* <!-- begin-user-doc -->
86+
* <!-- end-user-doc -->
87+
* @param value the new value of the '<em>Attributes End Offset</em>' attribute.
88+
* @see #getAttributesEndOffset()
89+
* @generated
90+
*/
91+
void setAttributesEndOffset(int value);
92+
4793
} // Attributable

model/src-gen/org/nasdanika/models/markdown/MarkdownPackage.java

Lines changed: 148 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,14 +324,32 @@ public interface MarkdownPackage extends EPackage {
324324
*/
325325
int ATTRIBUTABLE__ATTRIBUTES = 0;
326326

327+
/**
328+
* The feature id for the '<em><b>Attributes Start Offset</b></em>' attribute.
329+
* <!-- begin-user-doc -->
330+
* <!-- end-user-doc -->
331+
* @generated
332+
* @ordered
333+
*/
334+
int ATTRIBUTABLE__ATTRIBUTES_START_OFFSET = 1;
335+
336+
/**
337+
* The feature id for the '<em><b>Attributes End Offset</b></em>' attribute.
338+
* <!-- begin-user-doc -->
339+
* <!-- end-user-doc -->
340+
* @generated
341+
* @ordered
342+
*/
343+
int ATTRIBUTABLE__ATTRIBUTES_END_OFFSET = 2;
344+
327345
/**
328346
* The number of structural features of the '<em>Attributable</em>' class.
329347
* <!-- begin-user-doc -->
330348
* <!-- end-user-doc -->
331349
* @generated
332350
* @ordered
333351
*/
334-
int ATTRIBUTABLE_FEATURE_COUNT = 1;
352+
int ATTRIBUTABLE_FEATURE_COUNT = 3;
335353

336354
/**
337355
* The number of operations of the '<em>Attributable</em>' class.
@@ -433,14 +451,32 @@ public interface MarkdownPackage extends EPackage {
433451
*/
434452
int BLOCK__ATTRIBUTES = CONTENT_NODE_FEATURE_COUNT + 0;
435453

454+
/**
455+
* The feature id for the '<em><b>Attributes Start Offset</b></em>' attribute.
456+
* <!-- begin-user-doc -->
457+
* <!-- end-user-doc -->
458+
* @generated
459+
* @ordered
460+
*/
461+
int BLOCK__ATTRIBUTES_START_OFFSET = CONTENT_NODE_FEATURE_COUNT + 1;
462+
463+
/**
464+
* The feature id for the '<em><b>Attributes End Offset</b></em>' attribute.
465+
* <!-- begin-user-doc -->
466+
* <!-- end-user-doc -->
467+
* @generated
468+
* @ordered
469+
*/
470+
int BLOCK__ATTRIBUTES_END_OFFSET = CONTENT_NODE_FEATURE_COUNT + 2;
471+
436472
/**
437473
* The number of structural features of the '<em>Block</em>' class.
438474
* <!-- begin-user-doc -->
439475
* <!-- end-user-doc -->
440476
* @generated
441477
* @ordered
442478
*/
443-
int BLOCK_FEATURE_COUNT = CONTENT_NODE_FEATURE_COUNT + 1;
479+
int BLOCK_FEATURE_COUNT = CONTENT_NODE_FEATURE_COUNT + 3;
444480

445481
/**
446482
* The number of operations of the '<em>Block</em>' class.
@@ -542,6 +578,24 @@ public interface MarkdownPackage extends EPackage {
542578
*/
543579
int HEADING__ATTRIBUTES = BLOCK__ATTRIBUTES;
544580

581+
/**
582+
* The feature id for the '<em><b>Attributes Start Offset</b></em>' attribute.
583+
* <!-- begin-user-doc -->
584+
* <!-- end-user-doc -->
585+
* @generated
586+
* @ordered
587+
*/
588+
int HEADING__ATTRIBUTES_START_OFFSET = BLOCK__ATTRIBUTES_START_OFFSET;
589+
590+
/**
591+
* The feature id for the '<em><b>Attributes End Offset</b></em>' attribute.
592+
* <!-- begin-user-doc -->
593+
* <!-- end-user-doc -->
594+
* @generated
595+
* @ordered
596+
*/
597+
int HEADING__ATTRIBUTES_END_OFFSET = BLOCK__ATTRIBUTES_END_OFFSET;
598+
545599
/**
546600
* The feature id for the '<em><b>Level</b></em>' attribute.
547601
* <!-- begin-user-doc -->
@@ -669,6 +723,24 @@ public interface MarkdownPackage extends EPackage {
669723
*/
670724
int PARAGRAPH__ATTRIBUTES = BLOCK__ATTRIBUTES;
671725

726+
/**
727+
* The feature id for the '<em><b>Attributes Start Offset</b></em>' attribute.
728+
* <!-- begin-user-doc -->
729+
* <!-- end-user-doc -->
730+
* @generated
731+
* @ordered
732+
*/
733+
int PARAGRAPH__ATTRIBUTES_START_OFFSET = BLOCK__ATTRIBUTES_START_OFFSET;
734+
735+
/**
736+
* The feature id for the '<em><b>Attributes End Offset</b></em>' attribute.
737+
* <!-- begin-user-doc -->
738+
* <!-- end-user-doc -->
739+
* @generated
740+
* @ordered
741+
*/
742+
int PARAGRAPH__ATTRIBUTES_END_OFFSET = BLOCK__ATTRIBUTES_END_OFFSET;
743+
672744
/**
673745
* The number of structural features of the '<em>Paragraph</em>' class.
674746
* <!-- begin-user-doc -->
@@ -778,6 +850,24 @@ public interface MarkdownPackage extends EPackage {
778850
*/
779851
int CODE_BLOCK__ATTRIBUTES = BLOCK__ATTRIBUTES;
780852

853+
/**
854+
* The feature id for the '<em><b>Attributes Start Offset</b></em>' attribute.
855+
* <!-- begin-user-doc -->
856+
* <!-- end-user-doc -->
857+
* @generated
858+
* @ordered
859+
*/
860+
int CODE_BLOCK__ATTRIBUTES_START_OFFSET = BLOCK__ATTRIBUTES_START_OFFSET;
861+
862+
/**
863+
* The feature id for the '<em><b>Attributes End Offset</b></em>' attribute.
864+
* <!-- begin-user-doc -->
865+
* <!-- end-user-doc -->
866+
* @generated
867+
* @ordered
868+
*/
869+
int CODE_BLOCK__ATTRIBUTES_END_OFFSET = BLOCK__ATTRIBUTES_END_OFFSET;
870+
781871
/**
782872
* The number of structural features of the '<em>Code Block</em>' class.
783873
* <!-- begin-user-doc -->
@@ -887,6 +977,24 @@ public interface MarkdownPackage extends EPackage {
887977
*/
888978
int DOCUMENT__ATTRIBUTES = BLOCK__ATTRIBUTES;
889979

980+
/**
981+
* The feature id for the '<em><b>Attributes Start Offset</b></em>' attribute.
982+
* <!-- begin-user-doc -->
983+
* <!-- end-user-doc -->
984+
* @generated
985+
* @ordered
986+
*/
987+
int DOCUMENT__ATTRIBUTES_START_OFFSET = BLOCK__ATTRIBUTES_START_OFFSET;
988+
989+
/**
990+
* The feature id for the '<em><b>Attributes End Offset</b></em>' attribute.
991+
* <!-- begin-user-doc -->
992+
* <!-- end-user-doc -->
993+
* @generated
994+
* @ordered
995+
*/
996+
int DOCUMENT__ATTRIBUTES_END_OFFSET = BLOCK__ATTRIBUTES_END_OFFSET;
997+
890998
/**
891999
* The feature id for the '<em><b>Source Uri</b></em>' attribute.
8921000
* <!-- begin-user-doc -->
@@ -1086,6 +1194,28 @@ public interface MarkdownPackage extends EPackage {
10861194
*/
10871195
EReference getAttributable_Attributes();
10881196

1197+
/**
1198+
* Returns the meta object for the attribute '{@link org.nasdanika.models.markdown.Attributable#getAttributesStartOffset <em>Attributes Start Offset</em>}'.
1199+
* <!-- begin-user-doc -->
1200+
* <!-- end-user-doc -->
1201+
* @return the meta object for the attribute '<em>Attributes Start Offset</em>'.
1202+
* @see org.nasdanika.models.markdown.Attributable#getAttributesStartOffset()
1203+
* @see #getAttributable()
1204+
* @generated
1205+
*/
1206+
EAttribute getAttributable_AttributesStartOffset();
1207+
1208+
/**
1209+
* Returns the meta object for the attribute '{@link org.nasdanika.models.markdown.Attributable#getAttributesEndOffset <em>Attributes End Offset</em>}'.
1210+
* <!-- begin-user-doc -->
1211+
* <!-- end-user-doc -->
1212+
* @return the meta object for the attribute '<em>Attributes End Offset</em>'.
1213+
* @see org.nasdanika.models.markdown.Attributable#getAttributesEndOffset()
1214+
* @see #getAttributable()
1215+
* @generated
1216+
*/
1217+
EAttribute getAttributable_AttributesEndOffset();
1218+
10891219
/**
10901220
* Returns the meta object for class '{@link org.nasdanika.models.markdown.Block <em>Block</em>}'.
10911221
* <!-- begin-user-doc -->
@@ -1330,6 +1460,22 @@ interface Literals {
13301460
*/
13311461
EReference ATTRIBUTABLE__ATTRIBUTES = eINSTANCE.getAttributable_Attributes();
13321462

1463+
/**
1464+
* The meta object literal for the '<em><b>Attributes Start Offset</b></em>' attribute feature.
1465+
* <!-- begin-user-doc -->
1466+
* <!-- end-user-doc -->
1467+
* @generated
1468+
*/
1469+
EAttribute ATTRIBUTABLE__ATTRIBUTES_START_OFFSET = eINSTANCE.getAttributable_AttributesStartOffset();
1470+
1471+
/**
1472+
* The meta object literal for the '<em><b>Attributes End Offset</b></em>' attribute feature.
1473+
* <!-- begin-user-doc -->
1474+
* <!-- end-user-doc -->
1475+
* @generated
1476+
*/
1477+
EAttribute ATTRIBUTABLE__ATTRIBUTES_END_OFFSET = eINSTANCE.getAttributable_AttributesEndOffset();
1478+
13331479
/**
13341480
* The meta object literal for the '{@link org.nasdanika.models.markdown.impl.BlockImpl <em>Block</em>}' class.
13351481
* <!-- begin-user-doc -->

0 commit comments

Comments
 (0)