Search in sources :

Example 1 with Object_Definition

use of org.eclipse.titan.designer.AST.ASN1.Object.Object_Definition in project titan.EclipsePlug-ins by eclipse.

the class ReferencedObject method check.

@Override
public /**
 * {@inheritDoc}
 */
void check(final CompilationTimeStamp timestamp) {
    if (null != lastTimeChecked && !lastTimeChecked.isLess(timestamp)) {
        return;
    }
    lastTimeChecked = timestamp;
    if (null == myGovernor) {
        return;
    }
    final ObjectClass myClass = myGovernor.getRefdLast(timestamp, null);
    final ObjectClass refdClass = getRefdLast(timestamp, null).getMyGovernor().getRefdLast(timestamp, null);
    if (myClass != refdClass) {
        location.reportSemanticError(MessageFormat.format(Referenced_ObjectSet.MISMATCH, myClass.getFullName(), refdClass.getFullName()));
        objectReferenced = new Object_Definition(null);
        objectReferenced.setIsErroneous(true);
        objectReferenced.setMyGovernor(myGovernor);
    }
}
Also used : ObjectClass(org.eclipse.titan.designer.AST.ASN1.ObjectClass)

Example 2 with Object_Definition

use of org.eclipse.titan.designer.AST.ASN1.Object.Object_Definition in project titan.EclipsePlug-ins by eclipse.

the class InformationFromObj method getRefdSetting.

@Override
public /**
 * {@inheritDoc}
 */
ISetting getRefdSetting(final CompilationTimeStamp timestamp) {
    setIsErroneous(false);
    ISetting temporalSetting = reference.getRefdSetting(timestamp);
    if (null == temporalSetting) {
        setIsErroneous(true);
        return new Error_Setting();
    }
    SettingDetectionState currentState;
    ObjectClass_Definition objectClass = null;
    ObjectSet_definition objectSet = null;
    Object_Definition object = null;
    object = new Object_Definition(null);
    ObjectSet_definition fromObjectSet = newObjectSetDefinitionInstance();
    /* the first part */
    switch(temporalSetting.getSettingtype()) {
        case S_OS:
            currentState = SettingDetectionState.ObjectSet;
            objectSet = ((ObjectSet) temporalSetting).getRefdLast(timestamp, null);
            objectClass = objectSet.getMyGovernor().getRefdLast(timestamp, null);
            final ObjectSetElementVisitor_objectCollector objectCollector = new ObjectSetElementVisitor_objectCollector(objectSet.getLocation(), objectClass, timestamp);
            objectCollector.visitObjectSet(objectSet, false);
            fromObjectSet = newObjectSetDefinitionInstance(objectCollector.giveObjects());
            fromObjectSet.setMyGovernor(objectClass);
            break;
        case S_O:
            currentState = SettingDetectionState.Object;
            object = ((ASN1Object) temporalSetting).getRefdLast(timestamp, null);
            objectClass = object.getMyGovernor().getRefdLast(timestamp, null);
            break;
        case S_OC:
            currentState = SettingDetectionState.ObjectClass;
            objectClass = ((ObjectClass) temporalSetting).getRefdLast(timestamp, null);
            break;
        case S_ERROR:
            setIsErroneous(true);
            return new Error_Setting();
        default:
            location.reportSemanticError(MessageFormat.format(INVALIDREFERENCE, getDisplayName()));
            setIsErroneous(true);
            return new Error_Setting();
    }
    final int nofFields = fieldName.getNofFields();
    /* the middle part */
    Identifier currentFieldName;
    FieldSpecification currentFieldSpecification;
    for (int i = 0; i < nofFields - 1; i++) {
        currentFieldName = fieldName.getFieldByIndex(i);
        currentFieldSpecification = objectClass.getFieldSpecifications().getFieldSpecificationByIdentifier(currentFieldName).getLast();
        if (Fieldspecification_types.FS_ERROR.equals(currentFieldSpecification.getFieldSpecificationType())) {
            setIsErroneous(true);
            return new Error_Setting();
        }
        switch(currentState) {
            case ObjectClass:
                switch(currentFieldSpecification.getFieldSpecificationType()) {
                    case FS_O:
                        {
                            final Object_FieldSpecification temporalFieldspec = (Object_FieldSpecification) currentFieldSpecification;
                            objectClass = temporalFieldspec.getObjectClass().getRefdLast(timestamp, null);
                        }
                        break;
                    case FS_OS:
                        {
                            final ObjectSet_FieldSpecification temporalFieldspec = (ObjectSet_FieldSpecification) currentFieldSpecification;
                            objectClass = temporalFieldspec.getObjectClass().getRefdLast(timestamp, null);
                        }
                        break;
                    case FS_ERROR:
                        setIsErroneous(true);
                        return new Error_Setting();
                    default:
                        location.reportSemanticError(INVALIDNOTATION1);
                        setIsErroneous(true);
                        return new Error_Setting();
                }
                break;
            case ObjectSet:
                switch(currentFieldSpecification.getFieldSpecificationType()) {
                    case FS_O:
                        {
                            final Object_FieldSpecification temporalFieldspec = (Object_FieldSpecification) currentFieldSpecification;
                            objectClass = temporalFieldspec.getObjectClass().getRefdLast(timestamp, null);
                            final ObjectSetElementVisitor_objectCollector objectCollector = new ObjectSetElementVisitor_objectCollector(location, objectClass, timestamp);
                            final ASN1Objects temporalObjects = fromObjectSet.getObjs();
                            temporalObjects.trimToSize();
                            for (int j = 0; j < temporalObjects.getNofObjects(); j++) {
                                object = temporalObjects.getObjectByIndex(j).getRefdLast(timestamp, null);
                                if (!object.hasFieldSettingWithNameDefault(currentFieldName)) {
                                    continue;
                                }
                                temporalSetting = object.getSettingByNameDefault(currentFieldName);
                                object = ((Object_Definition) temporalSetting).getRefdLast(timestamp, null);
                                objectCollector.visitObject(object);
                            }
                            fromObjectSet = newObjectSetDefinitionInstance(objectCollector.giveObjects());
                            fromObjectSet.setLocation(location);
                            fromObjectSet.setMyGovernor(objectClass);
                        }
                        break;
                    case FS_OS:
                        {
                            final ObjectSet_FieldSpecification temporalFieldspec = (ObjectSet_FieldSpecification) currentFieldSpecification;
                            objectClass = temporalFieldspec.getObjectClass().getRefdLast(timestamp, null);
                            final ObjectSetElementVisitor_objectCollector objectCollector2 = new ObjectSetElementVisitor_objectCollector(location, objectClass, timestamp);
                            final ASN1Objects temporalObjects = fromObjectSet.getObjs();
                            for (int j = 0; j < temporalObjects.getNofObjects(); j++) {
                                object = temporalObjects.getObjectByIndex(j).getRefdLast(timestamp, null);
                                if (!object.hasFieldSettingWithNameDefault(currentFieldName)) {
                                    continue;
                                }
                                temporalSetting = object.getSettingByNameDefault(currentFieldName);
                                objectSet = ((ObjectSet_definition) temporalSetting).getRefdLast(timestamp, null);
                                objectCollector2.visitObjectSet(objectSet, false);
                            }
                            fromObjectSet = newObjectSetDefinitionInstance(objectCollector2.giveObjects());
                            fromObjectSet.setLocation(location);
                            fromObjectSet.setMyGovernor(objectClass);
                        }
                        break;
                    case FS_ERROR:
                        setIsErroneous(true);
                        return new Error_Setting();
                    default:
                        location.reportSemanticError(INVALIDNOTATION1);
                        setIsErroneous(true);
                        return new Error_Setting();
                }
                break;
            case Object:
                switch(currentFieldSpecification.getFieldSpecificationType()) {
                    case FS_O:
                        {
                            final Object_FieldSpecification temporalFieldspec = (Object_FieldSpecification) currentFieldSpecification;
                            objectClass = temporalFieldspec.getObjectClass().getRefdLast(timestamp, null);
                            temporalSetting = object.getSettingByNameDefault(currentFieldName);
                            object = ((Object_Definition) temporalSetting).getRefdLast(timestamp, null);
                        }
                        break;
                    case FS_OS:
                        {
                            currentState = SettingDetectionState.ObjectSet;
                            final ObjectSet_FieldSpecification temporalFieldspec = (ObjectSet_FieldSpecification) currentFieldSpecification;
                            objectClass = temporalFieldspec.getObjectClass().getRefdLast(timestamp, null);
                            final ObjectSetElementVisitor_objectCollector objectCollector = new ObjectSetElementVisitor_objectCollector(fromObjectSet, timestamp);
                            final ASN1Objects temporalObjects = fromObjectSet.getObjs();
                            for (int j = 0; j < temporalObjects.getNofObjects(); j++) {
                                object = temporalObjects.getObjectByIndex(j).getRefdLast(timestamp, null);
                                if (!object.hasFieldSettingWithNameDefault(currentFieldName)) {
                                    continue;
                                }
                                temporalSetting = object.getSettingByNameDefault(currentFieldName);
                                objectSet = ((ObjectSet_definition) temporalSetting).getRefdLast(timestamp, null);
                                objectCollector.visitObjectSet(objectSet, false);
                            }
                            fromObjectSet = newObjectSetDefinitionInstance(objectCollector.giveObjects());
                            fromObjectSet.setLocation(location);
                            fromObjectSet.setMyGovernor(objectClass);
                        }
                        break;
                    case FS_ERROR:
                        setIsErroneous(true);
                        return new Error_Setting();
                    default:
                        location.reportSemanticError(INVALIDNOTATION1);
                        setIsErroneous(true);
                        return new Error_Setting();
                }
                break;
            default:
                // if this could happen it would be FATAL ERROR
                break;
        }
    }
    /* and the last part... */
    currentFieldName = fieldName.getFieldByIndex(nofFields - 1);
    currentFieldSpecification = objectClass.getFieldSpecifications().getFieldSpecificationByIdentifier(currentFieldName).getLast();
    temporalSetting = null;
    switch(currentState) {
        case ObjectClass:
            switch(currentFieldSpecification.getFieldSpecificationType()) {
                case FS_T:
                    {
                        final Open_Type type = new Open_Type(objectClass, currentFieldName);
                        type.setLocation(location);
                        type.setMyScope(myScope);
                        temporalSetting = type;
                    }
                    break;
                case FS_V_FT:
                    {
                        final FixedTypeValue_FieldSpecification temporalFielspecification = (FixedTypeValue_FieldSpecification) currentFieldSpecification;
                        final ObjectClassField_Type type = new ObjectClassField_Type(temporalFielspecification.getType(), objectClass, currentFieldName);
                        type.setLocation(location);
                        temporalSetting = type;
                    }
                    break;
                case FS_V_VT:
                case FS_VS_FT:
                case FS_VS_VT:
                    location.reportSemanticError(UNSUPPORTEDCONSTRUCT);
                    setIsErroneous(true);
                    break;
                case FS_O:
                case FS_OS:
                    location.reportSemanticError(INVALIDNOTATION2);
                    setIsErroneous(true);
                    break;
                default:
                    setIsErroneous(true);
                    break;
            }
            break;
        case ObjectSet:
            switch(currentFieldSpecification.getFieldSpecificationType()) {
                case FS_O:
                    {
                        final Object_FieldSpecification temporalFieldspec = (Object_FieldSpecification) currentFieldSpecification;
                        objectClass = temporalFieldspec.getObjectClass().getRefdLast(timestamp, null);
                        final ObjectSetElementVisitor_objectCollector objectCollector = new ObjectSetElementVisitor_objectCollector(location, objectClass, timestamp);
                        final ASN1Objects temporalObjects = fromObjectSet.getObjs();
                        for (int j = 0; j < temporalObjects.getNofObjects(); j++) {
                            object = temporalObjects.getObjectByIndex(j).getRefdLast(timestamp, null);
                            if (!object.hasFieldSettingWithNameDefault(currentFieldName)) {
                                continue;
                            }
                            temporalSetting = object.getSettingByNameDefault(currentFieldName);
                            object = ((Object_Definition) temporalSetting).getRefdLast(timestamp, null);
                            objectCollector.visitObject(object);
                        }
                        fromObjectSet = newObjectSetDefinitionInstance(objectCollector.giveObjects());
                        fromObjectSet.setLocation(location);
                        fromObjectSet.setMyGovernor(objectClass);
                        fromObjectSet.setMyScope(myScope);
                        temporalSetting = fromObjectSet;
                    }
                    break;
                case FS_OS:
                    {
                        final ObjectSet_FieldSpecification temporalFieldspec = (ObjectSet_FieldSpecification) currentFieldSpecification;
                        objectClass = temporalFieldspec.getObjectClass().getRefdLast(timestamp, null);
                        final ObjectSetElementVisitor_objectCollector objectCollector2 = new ObjectSetElementVisitor_objectCollector(location, objectClass, timestamp);
                        final ASN1Objects temporalObjects = fromObjectSet.getObjs();
                        for (int j = 0; j < temporalObjects.getNofObjects(); j++) {
                            object = temporalObjects.getObjectByIndex(j).getRefdLast(timestamp, null);
                            if (!object.hasFieldSettingWithNameDefault(currentFieldName)) {
                                continue;
                            }
                            temporalSetting = object.getSettingByNameDefault(currentFieldName);
                            objectSet = ((ObjectSet_definition) temporalSetting).getRefdLast(timestamp, null);
                            objectCollector2.visitObjectSet(objectSet, false);
                        }
                        fromObjectSet = newObjectSetDefinitionInstance(objectCollector2.giveObjects());
                        fromObjectSet.setLocation(location);
                        fromObjectSet.setMyGovernor(objectClass);
                        fromObjectSet.setMyScope(myScope);
                        temporalSetting = fromObjectSet;
                    }
                    break;
                case FS_V_FT:
                case FS_VS_FT:
                    location.reportSemanticError(VALUESETFROMOBJECTS_NOT_SUPPORTED);
                    setIsErroneous(true);
                    break;
                case FS_ERROR:
                    setIsErroneous(true);
                    break;
                default:
                    location.reportSemanticError(INVALIDNOTATION3);
                    setIsErroneous(true);
                    break;
            }
            break;
        case Object:
            temporalSetting = object.getSettingByNameDefault(currentFieldName);
            break;
        default:
            setIsErroneous(true);
            break;
    }
    return temporalSetting;
}
Also used : ObjectSet_FieldSpecification(org.eclipse.titan.designer.AST.ASN1.Object.ObjectSet_FieldSpecification) Open_Type(org.eclipse.titan.designer.AST.ASN1.types.Open_Type) ObjectClass_Definition(org.eclipse.titan.designer.AST.ASN1.Object.ObjectClass_Definition) ObjectSet_definition(org.eclipse.titan.designer.AST.ASN1.Object.ObjectSet_definition) Error_Setting(org.eclipse.titan.designer.AST.Error_Setting) ObjectClassField_Type(org.eclipse.titan.designer.AST.ASN1.types.ObjectClassField_Type) ISetting(org.eclipse.titan.designer.AST.ISetting) ObjectSet_FieldSpecification(org.eclipse.titan.designer.AST.ASN1.Object.ObjectSet_FieldSpecification) Object_FieldSpecification(org.eclipse.titan.designer.AST.ASN1.Object.Object_FieldSpecification) FieldSpecification(org.eclipse.titan.designer.AST.ASN1.Object.FieldSpecification) FixedTypeValue_FieldSpecification(org.eclipse.titan.designer.AST.ASN1.Object.FixedTypeValue_FieldSpecification) FixedTypeValue_FieldSpecification(org.eclipse.titan.designer.AST.ASN1.Object.FixedTypeValue_FieldSpecification) Object_Definition(org.eclipse.titan.designer.AST.ASN1.Object.Object_Definition) Identifier(org.eclipse.titan.designer.AST.Identifier) Object_FieldSpecification(org.eclipse.titan.designer.AST.ASN1.Object.Object_FieldSpecification) ObjectSetElementVisitor_objectCollector(org.eclipse.titan.designer.AST.ASN1.Object.ObjectSetElementVisitor_objectCollector) ASN1Objects(org.eclipse.titan.designer.AST.ASN1.Object.ASN1Objects)

Example 3 with Object_Definition

use of org.eclipse.titan.designer.AST.ASN1.Object.Object_Definition in project titan.EclipsePlug-ins by eclipse.

the class FieldSetting_Object method check.

@Override
public /**
 * {@inheritDoc}
 */
void check(final CompilationTimeStamp timestamp, final FieldSpecification fieldSpecification) {
    if (null != lastTimeChecked && !lastTimeChecked.isLess(timestamp)) {
        return;
    }
    if (!Fieldspecification_types.FS_O.equals(fieldSpecification.getFieldSpecificationType())) {
        location.reportSemanticError(OBJECTEXPECTED);
        object = new Object_Definition(null);
        object.setFullNameParent(this);
    }
    final Object_FieldSpecification fs = (Object_FieldSpecification) fieldSpecification;
    final ObjectClass oc = fs.getObjectClass();
    object.setMyGovernor(oc);
    lastTimeChecked = timestamp;
    object.check(timestamp);
}
Also used : ObjectClass(org.eclipse.titan.designer.AST.ASN1.ObjectClass)

Example 4 with Object_Definition

use of org.eclipse.titan.designer.AST.ASN1.Object.Object_Definition in project titan.EclipsePlug-ins by eclipse.

the class TableConstraint method collectTypesOfOpenType.

private void collectTypesOfOpenType(final CompilationTimeStamp aTimestamp, ObjectSet aObjectSet, final Open_Type aOpenType, final Identifier aObjectSetId) {
    if (aObjectSet instanceof Referenced_ObjectSet) {
        if (((Referenced_ObjectSet) aObjectSet).isReferencedDefinedReference()) {
            aObjectSet = aObjectSet.getRefdLast(aTimestamp, null);
        } else if (((Referenced_ObjectSet) aObjectSet).isReferencedInformationFromObj()) {
            // TODO: How to handle this?
            return;
        } else {
            // impossible, try it
            return;
        }
    }
    // now aObjectSet is instanceof ObjectSet_definition:
    List<IObjectSet_Element> oses = ((ObjectSet_definition) aObjectSet).getObjectSetElements();
    for (IObjectSet_Element ose : oses) {
        if (ose instanceof ReferencedObject) {
            // fspec
            ose = ((ReferencedObject) ose).getRefdLast(aTimestamp);
        }
        if (ose instanceof Object_Definition) {
            final Object_Definition od = (Object_Definition) ose;
            FieldSetting fs = od.getFieldSettingWithNameDefault(objectClassFieldname, false);
            if (fs != null) {
                // TODO: handle FieldSetting options: FieldSetting_Type, FieldSetting_ObjectSet, FieldSetting_Value
                if (fs instanceof FieldSetting_Type) {
                    final FieldSetting_Type fst = (FieldSetting_Type) fs;
                    final IASN1Type type = fst.getSetting();
                    final AtomicBoolean isStrange = new AtomicBoolean();
                    Identifier id = getOpenTypeAlternativeName(aTimestamp, (Type) type, isStrange);
                    if (!aOpenType.hasComponentWithName(id)) {
                        aOpenType.addComponent(new CompField(id, (Type) type, false, null));
                        if (isStrange.get()) {
                            aOpenType.getLocation().reportSemanticWarning(MessageFormat.format("Strange alternative name (`{0}') was added to open type `{1}'", id.getDisplayName(), aOpenType.getFullName()));
                        }
                    }
                } else {
                    // TODO: is it possible FieldSetting_ObjectSet, FieldSetting_Value ??
                    continue;
                }
            } else {
                fs = od.getFieldSettingWithNameDefault(aObjectSetId, false);
                if (fs == null) {
                    continue;
                }
                if (fs instanceof FieldSetting_ObjectSet) {
                    final ISetting objectSet1 = fs.getSetting();
                    ObjectSet objectSet2;
                    if (objectSet1 instanceof ObjectSet) {
                        objectSet2 = (ObjectSet) objectSet1;
                    } else {
                        // unexpected case
                        continue;
                    }
                    if (objectSet2 == aObjectSet) {
                        // to prevent infinite loop
                        continue;
                    }
                    collectTypesOfOpenType(aTimestamp, objectSet2, aOpenType, aObjectSetId);
                } else {
                    // TODO: is it possible??
                    continue;
                }
            }
        }
    }
    // for
    aOpenType.check(aTimestamp);
}
Also used : FieldSetting_Type(org.eclipse.titan.designer.AST.ASN1.Object.FieldSetting_Type) ObjectSet_definition(org.eclipse.titan.designer.AST.ASN1.Object.ObjectSet_definition) FieldSetting_ObjectSet(org.eclipse.titan.designer.AST.ASN1.Object.FieldSetting_ObjectSet) ISetting(org.eclipse.titan.designer.AST.ISetting) Referenced_ObjectSet(org.eclipse.titan.designer.AST.ASN1.Object.Referenced_ObjectSet) FieldSetting_ObjectSet(org.eclipse.titan.designer.AST.ASN1.Object.FieldSetting_ObjectSet) FieldSetting(org.eclipse.titan.designer.AST.ASN1.Object.FieldSetting) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) IReferencingType(org.eclipse.titan.designer.AST.IReferencingType) TTCN3_Set_Type(org.eclipse.titan.designer.AST.TTCN3.types.TTCN3_Set_Type) ASN1_Sequence_Type(org.eclipse.titan.designer.AST.ASN1.types.ASN1_Sequence_Type) TTCN3_Choice_Type(org.eclipse.titan.designer.AST.TTCN3.types.TTCN3_Choice_Type) Open_Type(org.eclipse.titan.designer.AST.ASN1.types.Open_Type) ASN1_Set_Type(org.eclipse.titan.designer.AST.ASN1.types.ASN1_Set_Type) FieldSetting_Type(org.eclipse.titan.designer.AST.ASN1.Object.FieldSetting_Type) Referenced_Type(org.eclipse.titan.designer.AST.TTCN3.types.Referenced_Type) ObjectClassField_Type(org.eclipse.titan.designer.AST.ASN1.types.ObjectClassField_Type) TTCN3_Sequence_Type(org.eclipse.titan.designer.AST.TTCN3.types.TTCN3_Sequence_Type) Type(org.eclipse.titan.designer.AST.Type) ASN1_Choice_Type(org.eclipse.titan.designer.AST.ASN1.types.ASN1_Choice_Type) IType(org.eclipse.titan.designer.AST.IType) Object_Definition(org.eclipse.titan.designer.AST.ASN1.Object.Object_Definition) Identifier(org.eclipse.titan.designer.AST.Identifier) CompField(org.eclipse.titan.designer.AST.TTCN3.types.CompField) ReferencedObject(org.eclipse.titan.designer.AST.ASN1.Object.ReferencedObject) Referenced_ObjectSet(org.eclipse.titan.designer.AST.ASN1.Object.Referenced_ObjectSet)

Example 5 with Object_Definition

use of org.eclipse.titan.designer.AST.ASN1.Object.Object_Definition in project titan.EclipsePlug-ins by eclipse.

the class Undefined_Assignment_O_or_V method classifyAssignment.

@Override
protected void classifyAssignment(final CompilationTimeStamp timestamp, final IReferenceChain referenceChain) {
    final boolean newChain = null == referenceChain;
    IReferenceChain temporalReferenceChain;
    if (newChain) {
        temporalReferenceChain = ReferenceChain.getInstance(CIRCULARASSIGNMENTCHAIN, true);
    } else {
        temporalReferenceChain = referenceChain;
        temporalReferenceChain.markState();
    }
    realAssignment = null;
    if (temporalReferenceChain.add(this)) {
        if (null != reference && !reference.refersToSettingType(timestamp, Setting_type.S_ERROR, temporalReferenceChain)) {
            reference.setMyScope(myScope);
            if (null != objectReference) {
                objectReference.setMyScope(rightScope);
            }
            if (identifier.isvalidAsnObjectReference() && reference.refersToSettingType(timestamp, Setting_type.S_OC, temporalReferenceChain)) {
                final ObjectClass_refd oc = new ObjectClass_refd(reference);
                oc.setLocation(reference.getLocation());
                if (null != mBlock) {
                    final Object_Definition obj = new Object_Definition(mBlock);
                    // obj.setLocation(right1);
                    realAssignment = new Object_Assignment(identifier, assPard, oc, obj);
                } else if (null != objectReference) {
                    final ReferencedObject obj = new ReferencedObject(objectReference);
                    obj.setLocation(objectReference.getLocation());
                    realAssignment = new Object_Assignment(identifier, assPard, oc, obj);
                }
            } else if (identifier.isvalidAsnValueReference() && (reference.refersToSettingType(timestamp, Setting_type.S_T, temporalReferenceChain) || reference.refersToSettingType(timestamp, Setting_type.S_VS, temporalReferenceChain))) {
                final Referenced_Type type = new Referenced_Type(reference);
                if (null != mBlock) {
                    final Value value = new Undefined_Block_Value(mBlock);
                    value.setLocation(mBlock.getLocation());
                    realAssignment = new Value_Assignment(identifier, assPard, type, value);
                } else if (null != objectReference) {
                    final Value value = new Undefined_LowerIdentifier_Value(objectReference.getId().newInstance());
                    value.setLocation(objectReference.getLocation());
                    realAssignment = new Value_Assignment(identifier, assPard, type, value);
                }
            }
        }
    }
    if (null == realAssignment) {
        location.reportSemanticError(UNRECOGNISABLEASSIGNMENT);
        isErroneous = true;
    } else {
        realAssignment.setLocation(location);
        realAssignment.setMyScope(myScope);
        realAssignment.setRightScope(rightScope);
        realAssignment.setFullNameParent(this);
    }
    if (newChain) {
        temporalReferenceChain.release();
    } else {
        temporalReferenceChain.previousState();
    }
}
Also used : Object_Definition(org.eclipse.titan.designer.AST.ASN1.Object.Object_Definition) IReferenceChain(org.eclipse.titan.designer.AST.IReferenceChain) ObjectClass_refd(org.eclipse.titan.designer.AST.ASN1.Object.ObjectClass_refd) ReferencedObject(org.eclipse.titan.designer.AST.ASN1.Object.ReferencedObject) Undefined_LowerIdentifier_Value(org.eclipse.titan.designer.AST.TTCN3.values.Undefined_LowerIdentifier_Value) Value(org.eclipse.titan.designer.AST.Value) Undefined_Block_Value(org.eclipse.titan.designer.AST.ASN1.values.Undefined_Block_Value) Undefined_Block_Value(org.eclipse.titan.designer.AST.ASN1.values.Undefined_Block_Value) Referenced_Type(org.eclipse.titan.designer.AST.TTCN3.types.Referenced_Type) Undefined_LowerIdentifier_Value(org.eclipse.titan.designer.AST.TTCN3.values.Undefined_LowerIdentifier_Value)

Aggregations

Object_Definition (org.eclipse.titan.designer.AST.ASN1.Object.Object_Definition)3 ObjectClass (org.eclipse.titan.designer.AST.ASN1.ObjectClass)3 IReferenceChain (org.eclipse.titan.designer.AST.IReferenceChain)3 Referenced_Type (org.eclipse.titan.designer.AST.TTCN3.types.Referenced_Type)3 ASN1Object (org.eclipse.titan.designer.AST.ASN1.ASN1Object)2 ObjectSet_definition (org.eclipse.titan.designer.AST.ASN1.Object.ObjectSet_definition)2 ReferencedObject (org.eclipse.titan.designer.AST.ASN1.Object.ReferencedObject)2 ObjectClassField_Type (org.eclipse.titan.designer.AST.ASN1.types.ObjectClassField_Type)2 Open_Type (org.eclipse.titan.designer.AST.ASN1.types.Open_Type)2 Undefined_Block_Value (org.eclipse.titan.designer.AST.ASN1.values.Undefined_Block_Value)2 ISetting (org.eclipse.titan.designer.AST.ISetting)2 Identifier (org.eclipse.titan.designer.AST.Identifier)2 Undefined_LowerIdentifier_Value (org.eclipse.titan.designer.AST.TTCN3.values.Undefined_LowerIdentifier_Value)2 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 Defined_Reference (org.eclipse.titan.designer.AST.ASN1.Defined_Reference)1 ASN1Objects (org.eclipse.titan.designer.AST.ASN1.Object.ASN1Objects)1 FieldSetting (org.eclipse.titan.designer.AST.ASN1.Object.FieldSetting)1 FieldSetting_ObjectSet (org.eclipse.titan.designer.AST.ASN1.Object.FieldSetting_ObjectSet)1 FieldSetting_Type (org.eclipse.titan.designer.AST.ASN1.Object.FieldSetting_Type)1 FieldSpecification (org.eclipse.titan.designer.AST.ASN1.Object.FieldSpecification)1