Search in sources :

Example 21 with Mixed

use of org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Mixed in project xtext-core by eclipse.

the class MixedImpl method basicSetEobj.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetEobj(Mixed newEobj, NotificationChain msgs) {
    Mixed oldEobj = eobj;
    eobj = newEobj;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RegionaccesstestlanguagePackage.MIXED__EOBJ, oldEobj, newEobj);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : Mixed(org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Mixed) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 22 with Mixed

use of org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Mixed in project xtext-core by eclipse.

the class RootImpl method basicSetMixed.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetMixed(Mixed newMixed, NotificationChain msgs) {
    Mixed oldMixed = mixed;
    mixed = newMixed;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RegionaccesstestlanguagePackage.ROOT__MIXED, oldMixed, newMixed);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : Mixed(org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Mixed) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 23 with Mixed

use of org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Mixed in project xtext-core by eclipse.

the class RegionAccessBuilderTest method testFragmentID.

@Test
public void testFragmentID() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("6 (fragment foo)");
    _builder.newLine();
    String _trim = _builder.toString().trim();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append(" ");
    _builder_1.append("0 0 H");
    _builder_1.newLine();
    _builder_1.append("     ");
    _builder_1.append("B Action     Root");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("0 1  S \"6\"        Root:\'6\'");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("1 1  H \" \"        Whitespace:TerminalRule\'WS\'");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("2 1  S \"(\"        Mixed:\'(\'");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("3 0  H");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("3 8  S \"fragment\" Mixed:\'fragment\'");
    _builder_1.newLine();
    _builder_1.append("11 1  H \" \"        Whitespace:TerminalRule\'WS\'");
    _builder_1.newLine();
    _builder_1.append("12 3  S \"foo\"      Fragment:fragName=ID");
    _builder_1.newLine();
    _builder_1.append("15 0  H");
    _builder_1.newLine();
    _builder_1.append("15 1  S \")\"        Mixed:\')\'");
    _builder_1.newLine();
    _builder_1.append("     ");
    _builder_1.append("E Action     Root");
    _builder_1.newLine();
    _builder_1.append("16 0 H");
    _builder_1.newLine();
    this.operator_tripleEquals(_trim, _builder_1);
}
Also used : StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) TextRegionAccessToString(org.eclipse.xtext.formatting2.debug.TextRegionAccessToString) Test(org.junit.Test)

Example 24 with Mixed

use of org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Mixed in project xtext-core by eclipse.

the class RegionAccessBuilderTest method testAssignmentChildDelegate2.

@Test
public void testAssignmentChildDelegate2() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("6 (child(((foo))))");
    _builder.newLine();
    String _trim = _builder.toString().trim();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append(" ");
    _builder_1.append("0 0 H");
    _builder_1.newLine();
    _builder_1.append("     ");
    _builder_1.append("B Mixed      Root");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("0 1  S \"6\"        Root:\'6\'");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("1 1  H \" \"        Whitespace:TerminalRule\'WS\'");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("2 1  S \"(\"        Mixed:\'(\'");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("3 0  H");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("3 5  S \"child\"    Mixed:\'child\'");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("8 0  H");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("B Mixed\'foo\' Mixed:eobj=Mixed path:Mixed/eobj");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("8 1   S \"(\"        Mixed:\'(\'");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("9 0   H");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("9 1   S \"(\"        Mixed:\'(\'");
    _builder_1.newLine();
    _builder_1.append("10 0   H");
    _builder_1.newLine();
    _builder_1.append("10 1   S \"(\"        Mixed:\'(\'");
    _builder_1.newLine();
    _builder_1.append("11 0   H");
    _builder_1.newLine();
    _builder_1.append("11 3   S \"foo\"      Mixed:name=ID");
    _builder_1.newLine();
    _builder_1.append("14 0   H");
    _builder_1.newLine();
    _builder_1.append("14 1   S \")\"        Mixed:\')\'");
    _builder_1.newLine();
    _builder_1.append("15 0   H");
    _builder_1.newLine();
    _builder_1.append("15 1   S \")\"        Mixed:\')\'");
    _builder_1.newLine();
    _builder_1.append("16 0   H");
    _builder_1.newLine();
    _builder_1.append("16 1   S \")\"        Mixed:\')\'");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("E Mixed\'foo\' Mixed:eobj=Mixed path:Mixed/eobj");
    _builder_1.newLine();
    _builder_1.append("17 0  H");
    _builder_1.newLine();
    _builder_1.append("17 1  S \")\"        Mixed:\')\'");
    _builder_1.newLine();
    _builder_1.append("     ");
    _builder_1.append("E Mixed      Root");
    _builder_1.newLine();
    _builder_1.append("18 0 H");
    _builder_1.newLine();
    this.operator_tripleEquals(_trim, _builder_1);
}
Also used : StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) TextRegionAccessToString(org.eclipse.xtext.formatting2.debug.TextRegionAccessToString) Test(org.junit.Test)

Example 25 with Mixed

use of org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Mixed in project xtext-core by eclipse.

the class RegionAccessBuilderTest method testAssignedDatatype.

@Test
public void testAssignedDatatype() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("6 (datatype foo)");
    _builder.newLine();
    String _trim = _builder.toString().trim();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append(" ");
    _builder_1.append("0  0 H");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("B Mixed      Root");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("0  1  S \"6\"        Root:\'6\'");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("1  1  H \" \"        Whitespace:TerminalRule\'WS\'");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("2  1  S \"(\"        Mixed:\'(\'");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("3  0  H");
    _builder_1.newLine();
    _builder_1.append(" ");
    _builder_1.append("3 12  S \"datat...\" Mixed:datatype=Datatype");
    _builder_1.newLine();
    _builder_1.append("15  0  H");
    _builder_1.newLine();
    _builder_1.append("15  1  S \")\"        Mixed:\')\'");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("E Mixed      Root");
    _builder_1.newLine();
    _builder_1.append("16  0 H");
    _builder_1.newLine();
    this.operator_tripleEquals(_trim, _builder_1);
}
Also used : StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) TextRegionAccessToString(org.eclipse.xtext.formatting2.debug.TextRegionAccessToString) Test(org.junit.Test)

Aggregations

StringConcatenation (org.eclipse.xtend2.lib.StringConcatenation)40 Test (org.junit.Test)40 TextRegionAccessToString (org.eclipse.xtext.formatting2.debug.TextRegionAccessToString)21 Mixed (org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Mixed)20 ISemanticRegionsFinder (org.eclipse.xtext.formatting2.regionaccess.ISemanticRegionsFinder)18 ISemanticRegion (org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion)16 AssignedAction (org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.AssignedAction)6 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)5 EPackage (org.eclipse.emf.ecore.EPackage)1 Action (org.eclipse.xtext.Action)1 Parameter (org.eclipse.xtext.Parameter)1 ParserRule (org.eclipse.xtext.ParserRule)1 IEObjectRegion (org.eclipse.xtext.formatting2.regionaccess.IEObjectRegion)1 Add (org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Add)1 Delegate (org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Delegate)1 Delegation (org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Delegation)1 Named (org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Named)1 PrefixedUnassigned (org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.PrefixedUnassigned)1 Root (org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Root)1 RootAction (org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.RootAction)1