Search in sources :

Example 41 with Identifier

use of org.eclipse.titan.designer.AST.Identifier in project titan.EclipsePlug-ins by eclipse.

the class TableConstraint method getOpenTypeAlternativeName.

// Original titan.core version: t_type->get_otaltname(is_strange);
private Identifier getOpenTypeAlternativeName(final CompilationTimeStamp timestamp, final Type type, final AtomicBoolean isStrange) {
    StringBuffer sb = new StringBuffer();
    // TODO:  if (is_tagged() || is_constrained() || hasRawAttrs()) {
    if (!type.getIsErroneous(timestamp) && type.isConstrained()) {
        sb.append(type.getGenNameOwn());
        isStrange.set(true);
    } else if (!type.getIsErroneous(timestamp) && type instanceof Referenced_Type) {
        Reference t_ref = ((Referenced_Type) type).getReference();
        if (t_ref != null) {
            final Identifier id = t_ref.getId();
            final String dn = id.getDisplayName();
            int i = dn.indexOf('.');
            if (i >= 0 && i < dn.length()) {
                // id is not regular because t_ref is a parameterized reference
                sb.append(id.getName());
                isStrange.set(true);
            } else {
                Assignment as = t_ref.getRefdAssignment(timestamp, true);
                if (as == null) {
                    return null;
                }
                Scope assScope = as.getMyScope();
                if (assScope.getParentScope() == assScope.getModuleScope()) {
                    sb.append(id.getName());
                    isStrange.set(false);
                } else {
                    // t_ref is a dummy reference in a parameterized assignment
                    // (i.e. it points to a parameter assignment of an instantiation)
                    // perform the same examination recursively on the referenced type
                    // (which is the actual parameter)
                    IReferenceChain chain = ReferenceChain.getInstance(IReferenceChain.CIRCULARREFERENCE, true);
                    IType referencedType = ((Referenced_Type) type).getTypeRefd(timestamp, chain);
                    chain.release();
                    return getOpenTypeAlternativeName(timestamp, (Type) referencedType, isStrange);
                }
            }
        } else {
            // the type comes from an information object [class]
            // examine the referenced type recursively
            IReferenceChain chain = ReferenceChain.getInstance(IReferenceChain.CIRCULARREFERENCE, true);
            IType referencedType = ((Referenced_Type) type).getTypeRefd(timestamp, chain);
            chain.release();
            return getOpenTypeAlternativeName(timestamp, (Type) referencedType, isStrange);
        }
    } else {
        Identifier tmpId1 = new Identifier(Identifier_type.ID_NAME, type.getFullName());
        String s = tmpId1.getDisplayName();
        // module name will be cut off:
        if (s.startsWith("@") && s.indexOf('.') > 0) {
            s = s.substring(s.indexOf('.') + 1);
        }
        Identifier tmpId2 = new Identifier(Identifier_type.ID_ASN, s);
        sb.append(tmpId2.getTtcnName());
    }
    // conversion to lower case initial:
    sb.replace(0, 1, sb.substring(0, 1).toLowerCase());
    // trick:
    Identifier tmpId = new Identifier(Identifier_type.ID_NAME, sb.toString());
    return new Identifier(Identifier_type.ID_ASN, tmpId.getAsnName());
}
Also used : Assignment(org.eclipse.titan.designer.AST.Assignment) 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) Identifier(org.eclipse.titan.designer.AST.Identifier) Scope(org.eclipse.titan.designer.AST.Scope) Reference(org.eclipse.titan.designer.AST.Reference) IReferenceChain(org.eclipse.titan.designer.AST.IReferenceChain) Referenced_Type(org.eclipse.titan.designer.AST.TTCN3.types.Referenced_Type) IType(org.eclipse.titan.designer.AST.IType)

Example 42 with Identifier

use of org.eclipse.titan.designer.AST.Identifier in project titan.EclipsePlug-ins by eclipse.

the class ASN1Module method addDeclaration.

@Override
public /**
 * {@inheritDoc}
 */
void addDeclaration(final DeclarationCollector declarationCollector) {
    final Identifier moduleId = declarationCollector.getReference().getModuleIdentifier();
    if (null == moduleId) {
        final List<ISubReference> subrefs = declarationCollector.getReference().getSubreferences();
        if (1 == subrefs.size() && null != identifier && identifier.getName().equals(subrefs.get(0).getId().getName())) {
            declarationCollector.addDeclaration(name, identifier.getLocation(), this);
        }
        imports.addDeclaration(declarationCollector);
    } else if (null != identifier && moduleId.getName().equals(identifier.getName())) {
        for (int i = 0; i < assignments.getNofAssignments(); i++) {
            assignments.getAssignmentByIndex(i).addDeclaration(declarationCollector, 0);
        }
    } else {
        if (imports.hasImportedModuleWithId(moduleId)) {
            final ImportModule importation = imports.getImportedModuleById(moduleId);
            if (null != importation) {
                importation.addDeclaration(declarationCollector, identifier);
            }
        }
    }
    super.addDeclaration(declarationCollector);
}
Also used : ISubReference(org.eclipse.titan.designer.AST.ISubReference) Identifier(org.eclipse.titan.designer.AST.Identifier)

Example 43 with Identifier

use of org.eclipse.titan.designer.AST.Identifier in project titan.EclipsePlug-ins by eclipse.

the class ObjectClass_Definition method addDeclaration.

@Override
public /**
 * {@inheritDoc}
 */
void addDeclaration(final DeclarationCollector declarationCollector, final int i) {
    final List<ISubReference> subreferences = declarationCollector.getReference().getSubreferences();
    if (subreferences.size() <= i) {
        return;
    }
    final ISubReference subreference = subreferences.get(i);
    if (Subreference_type.fieldSubReference.equals(subreference.getReferenceType())) {
        if (subreferences.size() > i + 1) {
            // the reference might go on
            final Identifier identifier = subreference.getId();
            final FieldSpecification fieldSpecification = fieldSpecifications.getFieldSpecificationByIdentifier(identifier);
            if (null == fieldSpecification) {
                return;
            }
            fieldSpecification.addDeclaration(declarationCollector, i + 1);
        } else {
            // final part of the reference
            final String name = subreference.getId().getName();
            final List<FieldSpecification> fieldSpecs = fieldSpecifications.getFieldSpecificationsWithPrefix(name);
            for (final FieldSpecification field : fieldSpecs) {
                declarationCollector.addDeclaration(field.getIdentifier().getDisplayName(), field.getLocation(), this);
            }
        }
    }
}
Also used : ISubReference(org.eclipse.titan.designer.AST.ISubReference) Identifier(org.eclipse.titan.designer.AST.Identifier)

Example 44 with Identifier

use of org.eclipse.titan.designer.AST.Identifier 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 45 with Identifier

use of org.eclipse.titan.designer.AST.Identifier in project titan.EclipsePlug-ins by eclipse.

the class Export_Debug_AST_Action method exportDebugAST.

private void exportDebugAST(final ZipOutputStream out, final Module module) throws Exception {
    out.putNextEntry(new ZipEntry("DebugAST_for_" + module.getIdentifier().getName() + ".txt"));
    out.write("*************************".getBytes());
    out.write(lineend);
    out.write(("Printing DEBUG information for module `" + module.getName() + "':").getBytes());
    out.write(lineend);
    out.write("*************************".getBytes());
    out.write(lineend);
    module.accept(new ASTVisitor() {

        private int padding = 0;

        @Override
        public int visit(IVisitableNode node) {
            if (node instanceof Assignment) {
                Assignment assignment = (Assignment) node;
                printInfoln(out, padding, assignment.getAssignmentName(), assignment.getFullName(), assignment.getLastTimeChecked(), assignment.getLocation());
            } else if (node instanceof Identifier) {
                printInfoln(out, padding, "identifier", ((Identifier) node).getDisplayName(), null, ((Identifier) node).getLocation());
            } else if (node instanceof Statement) {
                Statement statement = (Statement) node;
                printInfoln(out, padding, "statement", statement.getFullName(), statement.getLastTimeChecked(), statement.getLocation());
            } else if (node instanceof Reference) {
                Reference ref = (Reference) node;
                printInfoln(out, padding, "reference", ref.getFullName(), ref.getLastTimeChecked(), ref.getLocation());
                Assignment old = ref.getAssOld();
                if (old != null) {
                    printInfoln(out, padding + 1, "This reference was last pointing to " + old.getFullName() + " analyzed at " + old.getLastTimeChecked());
                }
            } else if (node instanceof ComponentTypeBody) {
                ComponentTypeBody body = (ComponentTypeBody) node;
                Map<String, Definition> map = body.getDefinitionMap();
                printInfoln(out, padding + 1, " contains definitions:");
                if (map != null) {
                    for (Map.Entry<String, Definition> entry : map.entrySet()) {
                        printInfoln(out, padding + 2, entry.getKey() + " was last checked at " + entry.getValue().getLastTimeChecked());
                    }
                }
            }
            if (node instanceof StatementBlock || node instanceof Definition) {
                padding++;
            }
            return super.visit(node);
        }

        @Override
        public int leave(IVisitableNode node) {
            if (node instanceof StatementBlock || node instanceof Definition) {
                padding--;
            }
            return super.leave(node);
        }
    });
    out.write("*************************".getBytes());
    out.write(lineend);
    out.write(("Printing DEBUG information for module `" + module.getName() + "' finished").getBytes());
    out.write(lineend);
    out.write("*************************".getBytes());
    out.write(lineend);
    out.closeEntry();
}
Also used : ComponentTypeBody(org.eclipse.titan.designer.AST.TTCN3.types.ComponentTypeBody) Statement(org.eclipse.titan.designer.AST.TTCN3.statements.Statement) Reference(org.eclipse.titan.designer.AST.Reference) ZipEntry(java.util.zip.ZipEntry) Definition(org.eclipse.titan.designer.AST.TTCN3.definitions.Definition) ASTVisitor(org.eclipse.titan.designer.AST.ASTVisitor) IVisitableNode(org.eclipse.titan.designer.AST.IVisitableNode) Assignment(org.eclipse.titan.designer.AST.Assignment) ZipEntry(java.util.zip.ZipEntry) Identifier(org.eclipse.titan.designer.AST.Identifier) Map(java.util.Map) StatementBlock(org.eclipse.titan.designer.AST.TTCN3.statements.StatementBlock)

Aggregations

Identifier (org.eclipse.titan.designer.AST.Identifier)176 IType (org.eclipse.titan.designer.AST.IType)75 ISubReference (org.eclipse.titan.designer.AST.ISubReference)57 IValue (org.eclipse.titan.designer.AST.IValue)39 FieldSubReference (org.eclipse.titan.designer.AST.FieldSubReference)38 Type (org.eclipse.titan.designer.AST.Type)35 CompField (org.eclipse.titan.designer.AST.TTCN3.types.CompField)33 Assignment (org.eclipse.titan.designer.AST.Assignment)25 ArrayList (java.util.ArrayList)24 Location (org.eclipse.titan.designer.AST.Location)24 Reference (org.eclipse.titan.designer.AST.Reference)22 Module (org.eclipse.titan.designer.AST.Module)21 HashMap (java.util.HashMap)16 IReferenceChain (org.eclipse.titan.designer.AST.IReferenceChain)15 ASN1_Choice_Type (org.eclipse.titan.designer.AST.ASN1.types.ASN1_Choice_Type)12 Value (org.eclipse.titan.designer.AST.Value)12 ProjectSourceParser (org.eclipse.titan.designer.parsers.ProjectSourceParser)11 IASN1Type (org.eclipse.titan.designer.AST.ASN1.IASN1Type)10 ASN1_Sequence_Type (org.eclipse.titan.designer.AST.ASN1.types.ASN1_Sequence_Type)10 ITTCN3Template (org.eclipse.titan.designer.AST.TTCN3.templates.ITTCN3Template)10