blob: 0389396287aa52edbb24fdda1e54da14e74305c0 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="idioms" nsURI="http://www.eclipse.org/ocl/2020/Idioms" nsPrefix="idioms">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The Idioms configure the Declarative XSerializer/Formatter for Xtext."/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/OCL/Import">
<details key="ecore" value="http://www.eclipse.org/emf/2002/Ecore"/>
</eAnnotations>
<eClassifiers xsi:type="ecore:EClass" name="AnyAssignmentLocator" eSuperTypes="#//Locator">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="An AnyAssignmentLocator identifies all assignment around which a&#xA;SubIdiom wraps appropriate spacing."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AnyElementLocator" eSuperTypes="#//Locator">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="An AnyElementLocator identifies all grammar elements around which a&#xA;SubIdiom wraps appropriate spacing."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AssignmentLocator" eSuperTypes="#//Locator">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="An AssignmentLocator identifies an assignment around which a&#xA;SubIdiom wraps appropriate spacing. A half-new line before and after&#xA;an assignment usefully gives blank lines between similar 'paragraphs'&#xA;without blank lines before or after."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="ePackage" lowerBound="1"
eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="eClass" lowerBound="1"
eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="eStructuralFeature" lowerBound="1"
eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="CustomSegment" eSuperTypes="#//Segment">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A CustomSegment enables a user defined class to contribute segments to the&#xA;overall output. This is most useful for implementing the appropriate code&#xA;to locate comment text that may be hidden irregularly. The user class should&#xA;derive from at least CustomSegmentSupport and may inherit some useful&#xA;functionality by deriving from CommentSegmentSupport."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="supportClassName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="EPackageImport" eSuperTypes="#//IdiomsElement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="An EPackageImport supports import of an EPackage so that its EClasses and EStructuralFeatures can be referenced."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="as" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ePackage" lowerBound="1"
eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="FinalLocator" eSuperTypes="#//Locator">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The FinalLocator identifies the default leaf contributions around which a&#xA;typical final Idiom wraps soft spaces."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="HalfNewLineSegment" eSuperTypes="#//Segment">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A HalfNewLineSegment is a variant of soft new-line that can accumulate, one actual new line&#xA;per two soft or haldf new-lines. Apair of half new lines wrapping an assignment provides&#xA;for blank lines between 'parapgraph's.."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Idiom" eSuperTypes="#//IdiomsElement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="An Idiom defines a formatting policy comprising one or more SubIdioms each of which&#xA;identifies a grammar term at which formatting is to be applied. Thus a dual SubIdiom,&#xA;may locate an opening brace in first SubIdiom and a closing brace in a second and impose&#xA;new-lines as desired. The idiom can be constrained to a particular&#xA;returned EClass or its derivation, or rules whose name matches a regex.&#xA;&#xA;The serialization variant of each grammar rule is analyzed to determine which Idioms&#xA;configure the formatting of each term in the rule. Each Idiom has one or more SubIdioms&#xA;whose locator may or may not match a term. Where all SubIdioms match, the corresponding&#xA;segemnts format the matching term. Idioms can match recursively and sequentially. Partial&#xA;Idiom matches are ignored."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="forEPackage" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EPackage">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="An optional scope restriction on the matching of the string. If specified matches are&#xA;only discovered in rules that produce the EClass or a derivation thereof."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="forEClass" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="An optional scope restriction on the matching of the string. If specified matches are&#xA;only discovered in rules that produce the EClass or a derivation thereof."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="inRuleRegex" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="mixin" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
defaultValueLiteral="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedSubIdioms" upperBound="-1"
eType="#//SubIdiom" containment="true" eOpposite="#//SubIdiom/owningIdiom">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The SubIdioms, each of which must match for the Idiom to match."/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="IdiomsElement" abstract="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="An IdiomsElement is inherited by all IdiomsModel elements."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="IdiomsImport" eSuperTypes="#//IdiomsElement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="An IdiomsImport supports import of an (inherited) IdiomsModel so that its so that its Locators and Segments can be referenced."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="as" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="idiomsModel" lowerBound="1"
eType="#//IdiomsModel"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="IdiomsModel" eSuperTypes="#//IdiomsElement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The IdiomModel prpvodes the root of the Idiom Model configuring an Xtext grammar and importing&#xA;IdiomModels for other used Xtext grammars. Locators and Segemnts are shared by the Idioms."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
changeable="false" derived="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A convenience name for the IdiomModel."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="names" lowerBound="1" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A convenience name for the IdiomModel."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedIdioms" upperBound="-1"
eType="#//Idiom" containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The Idioms to be applied in lowest priority first order; an earlier matching idiom&#xA;inhibits the formatting of a later/imported SubIdiom's non-empty segements."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedImports" upperBound="-1"
eType="#//EPackageImport" containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The IdiomModels for extended grammars."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedLocatorDeclarations"
upperBound="-1" eType="#//LocatorDeclaration" containment="true" eOpposite="#//LocatorDeclaration/owningIdiomsModel">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The locators that SubIdioms use to anchor themselves to grammar terms."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedSegmentDeclarations"
upperBound="-1" eType="#//SegmentDeclaration" containment="true" eOpposite="#//SegmentDeclaration/owningIdiomsModel">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The segments that a SubIdiom may use to format an inner value as its outer value.&#xA;BEWARE due to an EMF bug, the same segment cannot be used more than once per SubIdiom;&#xA;it may therefore be neccessary to format an inner value as SoftSpaceA+Value+SoftSpaceB&#xA;rather than SoftSpace+Value+SoftSpace."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedWiths" upperBound="-1"
eType="#//IdiomsImport" containment="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The IdiomModels for extended grammars."/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="KeywordLocator" eSuperTypes="#//Locator">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A KeywordLocator identifies a keyword, or more generally letter sequence, around which a&#xA;SubIdiom wraps appropriate spacing."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="string" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The letter-sequence to match a keyword/punctuation in the grammar."/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Locator" abstract="true" eSuperTypes="#//IdiomsElement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A Locator identifies where a SubIdiom applies Segment formatting."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="LocatorDeclaration" eSuperTypes="#//IdiomsElement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A LocatorDeclaration makes a Locator available for re-use by a ReferredLocator."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedLocator" lowerBound="1"
eType="#//Locator" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="owningIdiomsModel" lowerBound="1"
eType="#//IdiomsModel" eOpposite="#//IdiomsModel/ownedLocatorDeclarations"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="NewLineSegment" eSuperTypes="#//Segment">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A NewLineSegment contributes a new line to the overall output."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="NoSpaceSegment" eSuperTypes="#//Segment">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A NoSpaceSegment inhibits the conversion of preceding of following soft spaces to&#xA;an actual space. A no-space is useful to prevent a space before for instance a semi-colon."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PopSegment" eSuperTypes="#//Segment">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A PopSegment terminates the additional indentation level started by a PushSegment."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PostCommentSegment" eSuperTypes="#//Segment">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A PostCommentSegment supports serialization of the standard Xtext postfix comments."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PreCommentSegment" eSuperTypes="#//Segment">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A PreCommentSegment supports serialization of the standard Xtext prefix comments."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ReferredLocator" eSuperTypes="#//Locator">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A ReferredLocator references a LocatorDefinition in an optionally distinct IdiomsModel."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="idiomsModel" eType="#//IdiomsModel"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="locatorDeclaration" lowerBound="1"
eType="#//LocatorDeclaration"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ReferredSegment" eSuperTypes="#//Segment">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A ReferredSegment references a SegmentDefinition in an optionally distinct IdiomsModel."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="idiomsModel" eType="#//IdiomsModel"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="segmentDeclaration" lowerBound="1"
eType="#//SegmentDeclaration"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ReturnsLocator" eSuperTypes="#//Locator">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A ReturnsLocator identifies a rule that returns a specified EClass&#xA;or derivation thereof. A custom segment may precede the inner value to output&#xA;a comment.."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="ePackage" lowerBound="1"
eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="eClass" lowerBound="1"
eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PushSegment" eSuperTypes="#//Segment">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A PushSegment configures an additional indentation level for all subsequent&#xA;start of linne text. THe additional indention persists until a PopSegment."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Segment" abstract="true" eSuperTypes="#//IdiomsElement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A Segment is a string or virtual string that may be concatenated to form the overall output.&#xA;Each SubIdiom provides s sequence of SEfment to wrap the inner value as a formatted output value,"/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="SegmentDeclaration" eSuperTypes="#//IdiomsElement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A SegmentDeclaration makes a Segment available for re-use by a ReferredSegment."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedSegment" lowerBound="1"
eType="#//Segment" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="owningIdiomsModel" lowerBound="1"
eType="#//IdiomsModel" eOpposite="#//IdiomsModel/ownedSegmentDeclarations"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="SoftNewLineSegment" eSuperTypes="#//Segment"/>
<eClassifiers xsi:type="ecore:EClass" name="SoftSpaceSegment" eSuperTypes="#//Segment">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A SoftSpaceSegment contributes a soft space to the outer value of a SubIdiom.&#xA;Multiple softspaces are merged to at most one space between hard text, and to nothing&#xA;at new lines."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="StringSegment" eSuperTypes="#//Segment">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A StringSegment contributes an explicit character sequence to the outer value of a SubIdiom."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="printable" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="string" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="SubIdiom" eSuperTypes="#//IdiomsElement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A SubIdiom defines the fomattimg to be applied at some position inthe Xtext grammar.&#xA;A Locator matches the grammar location, then a sequence of virtual text strings may&#xA;form an outer value that wraps the inner value of the location with virtual segments&#xA;such as soft-spaces or indentation pushes."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="all" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
defaultValueLiteral="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Whether the segments apply once to serialization of all located elements, or repeatedly to each occurrence."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedLocator" eType="#//Locator"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedSegments" upperBound="-1"
eType="#//Segment" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="owningIdiom" lowerBound="1"
eType="#//Idiom" eOpposite="#//Idiom/ownedSubIdioms"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ValueSegment" eSuperTypes="#//Segment">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="A ValueSegment is the virtual string that makes the inner value of a grammar element available for&#xA;embedding in the outer value."/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="WrapAnchorSegment" eSuperTypes="#//Segment"/>
<eClassifiers xsi:type="ecore:EClass" name="WrapBeginSomeSegment" eSuperTypes="#//Segment"/>
<eClassifiers xsi:type="ecore:EClass" name="WrapBeginAllSegment" eSuperTypes="#//Segment"/>
<eClassifiers xsi:type="ecore:EClass" name="WrapEndSegment" eSuperTypes="#//Segment"/>
<eClassifiers xsi:type="ecore:EClass" name="WrapHereSegment" eSuperTypes="#//Segment"/>
</ecore:EPackage>