Search in sources :

Example 11 with IIncrementallyUpdateable

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

the class Unknown_Start_Statement method updateSyntax.

@Override
public /**
 * {@inheritDoc}
 */
void updateSyntax(final TTCN3ReparseUpdater reparser, final boolean isDamaged) throws ReParseException {
    if (isDamaged) {
        throw new ReParseException();
    }
    if (reference != null) {
        reference.updateSyntax(reparser, false);
        reparser.updateLocation(reference.getLocation());
    }
    if (value instanceof IIncrementallyUpdateable) {
        ((IIncrementallyUpdateable) value).updateSyntax(reparser, false);
        reparser.updateLocation(value.getLocation());
    } else if (value != null) {
        throw new ReParseException();
    }
}
Also used : IIncrementallyUpdateable(org.eclipse.titan.designer.AST.TTCN3.IIncrementallyUpdateable) ReParseException(org.eclipse.titan.designer.parsers.ttcn3parser.ReParseException)

Example 12 with IIncrementallyUpdateable

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

the class Value_Range_Template method updateSyntax.

@Override
public /**
 * {@inheritDoc}
 */
void updateSyntax(final TTCN3ReparseUpdater reparser, final boolean isDamaged) throws ReParseException {
    if (isDamaged) {
        throw new ReParseException();
    }
    if (lengthRestriction != null) {
        lengthRestriction.updateSyntax(reparser, false);
        reparser.updateLocation(lengthRestriction.getLocation());
    }
    if (baseTemplate instanceof IIncrementallyUpdateable) {
        ((IIncrementallyUpdateable) baseTemplate).updateSyntax(reparser, false);
        reparser.updateLocation(baseTemplate.getLocation());
    } else if (baseTemplate != null) {
        throw new ReParseException();
    }
    if (valueRange != null) {
        valueRange.updateSyntax(reparser, false);
    }
}
Also used : IIncrementallyUpdateable(org.eclipse.titan.designer.AST.TTCN3.IIncrementallyUpdateable) ReParseException(org.eclipse.titan.designer.parsers.ttcn3parser.ReParseException)

Example 13 with IIncrementallyUpdateable

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

the class AbstractOfType method updateSyntax.

@Override
public /**
 * {@inheritDoc}
 */
void updateSyntax(final TTCN3ReparseUpdater reparser, final boolean isDamaged) throws ReParseException {
    if (isDamaged) {
        lastTimeChecked = null;
        boolean handled = false;
        if (ofType instanceof IIncrementallyUpdateable && reparser.envelopsDamage(ofType.getLocation())) {
            ((IIncrementallyUpdateable) ofType).updateSyntax(reparser, true);
            reparser.updateLocation(ofType.getLocation());
            handled = true;
        }
        if (subType != null) {
            subType.updateSyntax(reparser, false);
            handled = true;
        }
        if (handled) {
            return;
        }
        throw new ReParseException();
    }
    if (ofType instanceof IIncrementallyUpdateable) {
        ((IIncrementallyUpdateable) ofType).updateSyntax(reparser, false);
        reparser.updateLocation(ofType.getLocation());
    } else if (ofType != null) {
        throw new ReParseException();
    }
    if (subType != null) {
        subType.updateSyntax(reparser, false);
    }
    if (withAttributesPath != null) {
        withAttributesPath.updateSyntax(reparser, false);
        reparser.updateLocation(withAttributesPath.getLocation());
    }
}
Also used : IIncrementallyUpdateable(org.eclipse.titan.designer.AST.TTCN3.IIncrementallyUpdateable) ReParseException(org.eclipse.titan.designer.parsers.ttcn3parser.ReParseException)

Example 14 with IIncrementallyUpdateable

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

the class PortTypeBody method updateSyntax.

@Override
public /**
 * {@inheritDoc}
 */
void updateSyntax(final TTCN3ReparseUpdater reparser, final boolean isDamaged) throws ReParseException {
    if (isDamaged) {
        throw new ReParseException();
    }
    IType type;
    if (inTypes != null) {
        for (int i = 0, size = inTypes.size(); i < size; i++) {
            type = inTypes.get(i);
            if (type instanceof IIncrementallyUpdateable) {
                ((IIncrementallyUpdateable) type).updateSyntax(reparser, false);
                reparser.updateLocation(type.getLocation());
            } else {
                throw new ReParseException();
            }
        }
    }
    if (outTypes != null) {
        for (int i = 0, size = outTypes.size(); i < size; i++) {
            type = outTypes.get(i);
            if (type instanceof IIncrementallyUpdateable) {
                ((IIncrementallyUpdateable) type).updateSyntax(reparser, false);
                reparser.updateLocation(type.getLocation());
            } else {
                throw new ReParseException();
            }
        }
    }
    if (inoutTypes != null) {
        for (int i = 0, size = inoutTypes.size(); i < size; i++) {
            type = inoutTypes.get(i);
            if (type instanceof IIncrementallyUpdateable) {
                ((IIncrementallyUpdateable) type).updateSyntax(reparser, false);
                reparser.updateLocation(type.getLocation());
            } else {
                throw new ReParseException();
            }
        }
    }
}
Also used : IIncrementallyUpdateable(org.eclipse.titan.designer.AST.TTCN3.IIncrementallyUpdateable) ReParseException(org.eclipse.titan.designer.parsers.ttcn3parser.ReParseException) IType(org.eclipse.titan.designer.AST.IType)

Example 15 with IIncrementallyUpdateable

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

the class SpecificValue_Template method updateSyntax.

@Override
public /**
 * {@inheritDoc}
 */
void updateSyntax(final TTCN3ReparseUpdater reparser, final boolean isDamaged) throws ReParseException {
    if (isDamaged) {
        throw new ReParseException();
    }
    if (lengthRestriction != null) {
        lengthRestriction.updateSyntax(reparser, false);
        reparser.updateLocation(lengthRestriction.getLocation());
    }
    if (baseTemplate instanceof IIncrementallyUpdateable) {
        ((IIncrementallyUpdateable) baseTemplate).updateSyntax(reparser, false);
        reparser.updateLocation(baseTemplate.getLocation());
    } else if (baseTemplate != null) {
        throw new ReParseException();
    }
    if (specificValue instanceof IIncrementallyUpdateable) {
        ((IIncrementallyUpdateable) specificValue).updateSyntax(reparser, false);
        reparser.updateLocation(specificValue.getLocation());
    } else if (specificValue != null) {
        throw new ReParseException();
    }
}
Also used : IIncrementallyUpdateable(org.eclipse.titan.designer.AST.TTCN3.IIncrementallyUpdateable) ReParseException(org.eclipse.titan.designer.parsers.ttcn3parser.ReParseException)

Aggregations

IIncrementallyUpdateable (org.eclipse.titan.designer.AST.TTCN3.IIncrementallyUpdateable)21 ReParseException (org.eclipse.titan.designer.parsers.ttcn3parser.ReParseException)21 IType (org.eclipse.titan.designer.AST.IType)1 IValue (org.eclipse.titan.designer.AST.IValue)1