Search in sources :

Example 1 with P1

use of org.eclipse.xtext.testlanguages.actionLang3.P1 in project ceylon by eclipse.

the class CMain method test.

void test() {
    P1 p1 = new P1();
    // These are NOT errors, and should NOT be detected, as observed.
    /*------------------------------------*
        Baz.Quux z = null;
        Baz.Quux.Quem y = null;
        *------------------------------------*/
    // ERROR - 'P1.Foo' not accessible
    P1.Foo.Bar x = null;
    // ERROR - Type of 'a' not accessible
    int i = p1.a.length;
    // The type of the expression from which a component
    // is selected must be accessible.
    // ERROR - Type of 'p1.p2' not accessible.
    p1.p2.privatei = 3;
    // ERROR - Type of 'p1.p2' not accessible.
    System.out.println(p1.p2.privatei);
}
Also used : P1(pack1.P1)

Example 2 with P1

use of org.eclipse.xtext.testlanguages.actionLang3.P1 in project xtext-core by eclipse.

the class ActionTestLanguage3SemanticSequencer method sequence.

@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
    EPackage epackage = semanticObject.eClass().getEPackage();
    ParserRule rule = context.getParserRule();
    Action action = context.getAssignedAction();
    Set<Parameter> parameters = context.getEnabledBooleanParameters();
    if (epackage == ActionLang3Package.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case ActionLang3Package.ENTRY:
                sequence_ProductionRule2(context, (Entry) semanticObject);
                return;
            case ActionLang3Package.P1:
                sequence_ProductionRule1_P2_2(context, (P1) semanticObject);
                return;
            case ActionLang3Package.P2:
                sequence_ProductionRule1_P3_4(context, (P2) semanticObject);
                return;
            case ActionLang3Package.P3:
                sequence_ProductionRule1(context, (P3) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) P1(org.eclipse.xtext.testlanguages.actionLang3.P1) Action(org.eclipse.xtext.Action) Entry(org.eclipse.xtext.testlanguages.actionLang3.Entry) P2(org.eclipse.xtext.testlanguages.actionLang3.P2) P3(org.eclipse.xtext.testlanguages.actionLang3.P3) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Example 3 with P1

use of org.eclipse.xtext.testlanguages.actionLang3.P1 in project xtext-core by eclipse.

the class P2Impl method basicSetP.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetP(P1 newP, NotificationChain msgs) {
    P1 oldP = p;
    p = newP;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ActionLang3Package.P2__P, oldP, newP);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : P1(org.eclipse.xtext.testlanguages.actionLang3.P1) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 4 with P1

use of org.eclipse.xtext.testlanguages.actionLang3.P1 in project ceylon by eclipse.

the class QualifiedAccess_1 method test1.

void test1() {
    // Inaccessible types in local variable declarations.
    // These exercise 'FieldExpression.checkCommon'.
    // 
    // Fields 'P3' and 'P5' are inaccessible.
    P1 foo = null;
    // ERROR
    P1.P3 bar = null;
    // ERROR
    P1.P3.P4 baz = null;
    // ERROR
    P1.P3.P4.P5 quux = null;
}
Also used : P1(pack1.P1)

Example 5 with P1

use of org.eclipse.xtext.testlanguages.actionLang3.P1 in project ceylon-compiler by ceylon.

the class QualifiedAccess_1 method test1.

void test1() {
    // Inaccessible types in local variable declarations.
    // These exercise 'FieldExpression.checkCommon'.
    // 
    // Fields 'P3' and 'P5' are inaccessible.
    P1 foo = null;
    // ERROR
    P1.P3 bar = null;
    // ERROR
    P1.P3.P4 baz = null;
    // ERROR
    P1.P3.P4.P5 quux = null;
}
Also used : P1(pack1.P1)

Aggregations

P1 (pack1.P1)4 P1 (org.eclipse.xtext.testlanguages.actionLang3.P1)2 EPackage (org.eclipse.emf.ecore.EPackage)1 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 Action (org.eclipse.xtext.Action)1 Parameter (org.eclipse.xtext.Parameter)1 ParserRule (org.eclipse.xtext.ParserRule)1 Entry (org.eclipse.xtext.testlanguages.actionLang3.Entry)1 P2 (org.eclipse.xtext.testlanguages.actionLang3.P2)1 P3 (org.eclipse.xtext.testlanguages.actionLang3.P3)1