use of org.eclipse.titan.designer.parsers.ttcn3parser.ReParseException in project titan.EclipsePlug-ins by eclipse.
the class Def_ExternalConst method updateSyntax.
@Override
public /**
* {@inheritDoc}
*/
void updateSyntax(final TTCN3ReparseUpdater reparser, final boolean isDamaged) throws ReParseException {
if (isDamaged) {
lastTimeChecked = null;
boolean enveloped = false;
final Location temporalIdentifier = identifier.getLocation();
if (reparser.envelopsDamage(temporalIdentifier) || reparser.isExtending(temporalIdentifier)) {
reparser.extendDamagedRegion(temporalIdentifier);
final IIdentifierReparser r = new IdentifierReparser(reparser);
final int result = r.parseAndSetNameChanged();
identifier = r.getIdentifier();
// damage handled
if (result == 0 && identifier != null) {
enveloped = true;
} else {
throw new ReParseException(result);
}
}
if (type != null) {
if (enveloped) {
type.updateSyntax(reparser, false);
reparser.updateLocation(type.getLocation());
} else if (reparser.envelopsDamage(type.getLocation())) {
type.updateSyntax(reparser, true);
enveloped = true;
reparser.updateLocation(type.getLocation());
}
}
if (withAttributesPath != null) {
if (enveloped) {
withAttributesPath.updateSyntax(reparser, false);
reparser.updateLocation(withAttributesPath.getLocation());
} else if (reparser.envelopsDamage(withAttributesPath.getLocation())) {
withAttributesPath.updateSyntax(reparser, true);
enveloped = true;
reparser.updateLocation(withAttributesPath.getLocation());
}
}
if (!enveloped) {
throw new ReParseException();
}
return;
}
reparser.updateLocation(identifier.getLocation());
if (type != null) {
type.updateSyntax(reparser, false);
reparser.updateLocation(type.getLocation());
}
if (withAttributesPath != null) {
withAttributesPath.updateSyntax(reparser, false);
reparser.updateLocation(withAttributesPath.getLocation());
}
}
use of org.eclipse.titan.designer.parsers.ttcn3parser.ReParseException in project titan.EclipsePlug-ins by eclipse.
the class Invoke_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 (value != null) {
value.updateSyntax(reparser, false);
reparser.updateLocation(value.getLocation());
}
if (actualParameterList != null) {
actualParameterList.updateSyntax(reparser, false);
reparser.updateLocation(actualParameterList.getLocation());
}
}
use of org.eclipse.titan.designer.parsers.ttcn3parser.ReParseException in project titan.EclipsePlug-ins by eclipse.
the class Named_Template_List 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();
}
namedTemplates.updateSyntax(reparser, false);
}
use of org.eclipse.titan.designer.parsers.ttcn3parser.ReParseException in project titan.EclipsePlug-ins by eclipse.
the class Referenced_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 (reference != null) {
reference.updateSyntax(reparser, false);
reparser.updateLocation(reference.getLocation());
}
}
use of org.eclipse.titan.designer.parsers.ttcn3parser.ReParseException in project titan.EclipsePlug-ins by eclipse.
the class Raise_Statement method updateSyntax.
@Override
public /**
* {@inheritDoc}
*/
void updateSyntax(final TTCN3ReparseUpdater reparser, final boolean isDamaged) throws ReParseException {
if (isDamaged) {
throw new ReParseException();
}
if (portReference != null) {
portReference.updateSyntax(reparser, false);
reparser.updateLocation(portReference.getLocation());
}
if (signatureReference != null) {
signatureReference.updateSyntax(reparser, false);
reparser.updateLocation(signatureReference.getLocation());
}
if (parameter != null) {
parameter.updateSyntax(reparser, false);
reparser.updateLocation(parameter.getLocation());
}
if (toClause instanceof IIncrementallyUpdateable) {
((IIncrementallyUpdateable) toClause).updateSyntax(reparser, false);
reparser.updateLocation(toClause.getLocation());
} else if (toClause != null) {
throw new ReParseException();
}
}
Aggregations