use of org.eclipse.titan.designer.AST.TTCN3.IIncrementallyUpdateable in project titan.EclipsePlug-ins by eclipse.
the class TTCN3Template method updateSyntax.
/**
* Handles the incremental parsing of this template.
*
* @param reparser
* the parser doing the incremental parsing.
* @param isDamaged
* true if the location contains the damaged area, false
* if only its' location needs to be updated.
*/
@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();
}
}
use of org.eclipse.titan.designer.AST.TTCN3.IIncrementallyUpdateable in project titan.EclipsePlug-ins by eclipse.
the class Values method updateSyntax.
/**
* Handles the incremental parsing of this value list.
*
* @param reparser the parser doing the incremental parsing.
* @param isDamaged true if the location contains the damaged area, false if only its' location needs to be updated.
*/
@Override
public /**
* {@inheritDoc}
*/
void updateSyntax(final TTCN3ReparseUpdater reparser, final boolean isDamaged) throws ReParseException {
if (isDamaged) {
throw new ReParseException();
}
if (isIndexed) {
for (int i = 0, size = indexedValues.size(); i < size; i++) {
final IndexedValue indexedValue = indexedValues.get(i);
indexedValue.updateSyntax(reparser, false);
reparser.updateLocation(indexedValue.getLocation());
}
} else {
for (int i = 0, size = values.size(); i < size; i++) {
final IValue value = values.get(i);
if (value instanceof IIncrementallyUpdateable) {
((IIncrementallyUpdateable) value).updateSyntax(reparser, false);
reparser.updateLocation(value.getLocation());
} else {
throw new ReParseException();
}
}
}
}
use of org.eclipse.titan.designer.AST.TTCN3.IIncrementallyUpdateable in project titan.EclipsePlug-ins by eclipse.
the class ObjectIdentifierComponent method updateSyntax.
/**
* Handles the incremental parsing of this objid component.
*
* @param reparser the parser doing the incremental parsing.
* @param isDamaged true if the location contains the damaged area,
* false if only its' location needs to be updated.
* @return in case of processing error the minimum amount of semantic levels
* that must be destroyed to handle the syntactic changes, otherwise 0.
*/
@Override
public /**
* {@inheritDoc}
*/
void updateSyntax(final TTCN3ReparseUpdater reparser, final boolean isDamaged) throws ReParseException {
if (isDamaged) {
throw new ReParseException();
}
if (name != null) {
reparser.updateLocation(name.getLocation());
}
if (number instanceof IIncrementallyUpdateable) {
((IIncrementallyUpdateable) number).updateSyntax(reparser, false);
reparser.updateLocation(number.getLocation());
} else if (number != null) {
throw new ReParseException();
}
if (definedValue instanceof IIncrementallyUpdateable) {
((IIncrementallyUpdateable) definedValue).updateSyntax(reparser, false);
reparser.updateLocation(definedValue.getLocation());
} else if (definedValue != null) {
throw new ReParseException();
}
}
use of org.eclipse.titan.designer.AST.TTCN3.IIncrementallyUpdateable in project titan.EclipsePlug-ins by eclipse.
the class CompositeTemplate 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();
}
templates.updateSyntax(reparser, false);
}
use of org.eclipse.titan.designer.AST.TTCN3.IIncrementallyUpdateable in project titan.EclipsePlug-ins by eclipse.
the class Start_Timer_Statement method updateSyntax.
@Override
public /**
* {@inheritDoc}
*/
void updateSyntax(final TTCN3ReparseUpdater reparser, final boolean isDamaged) throws ReParseException {
if (isDamaged) {
throw new ReParseException();
}
if (timerReference != null) {
timerReference.updateSyntax(reparser, false);
reparser.updateLocation(timerReference.getLocation());
}
if (timerValue instanceof IIncrementallyUpdateable) {
((IIncrementallyUpdateable) timerValue).updateSyntax(reparser, false);
reparser.updateLocation(timerValue.getLocation());
} else if (timerValue != null) {
throw new ReParseException();
}
}
Aggregations