use of org.eclipse.titan.designer.AST.AtNotations in project titan.EclipsePlug-ins by eclipse.
the class TableConstraint method parseBlocks.
private void parseBlocks() {
if (mObjectSetBlock == null) {
return;
}
objectSet = null;
atNotationList = null;
if (null != mObjectSetBlock) {
if (mAtNotationsBlock == null) {
// SimpleTableConstraint
Asn1Parser parser = BlockLevelTokenStreamTracker.getASN1ParserForBlock(mObjectSetBlock, 0);
if (parser != null) {
objectSet = parser.pr_special_ObjectSetSpec().definition;
List<SyntacticErrorStorage> errors = parser.getErrorStorage();
if (null != errors && !errors.isEmpty()) {
objectSet = null;
for (int i = 0; i < errors.size(); i++) {
ParserMarkerSupport.createOnTheFlyMixedMarker((IFile) mObjectSetBlock.getLocation().getFile(), errors.get(i), IMarker.SEVERITY_ERROR);
}
}
}
} else {
// ComponentRelationConstraint
Asn1Parser parser = BlockLevelTokenStreamTracker.getASN1ParserForBlock(mObjectSetBlock, 0);
if (parser != null) {
objectSet = parser.pr_DefinedObjectSetBlock().objectSet;
List<SyntacticErrorStorage> errors = parser.getErrorStorage();
if (null != errors && !errors.isEmpty()) {
objectSet = null;
for (int i = 0; i < errors.size(); i++) {
ParserMarkerSupport.createOnTheFlySyntacticMarker((IFile) mObjectSetBlock.getLocation().getFile(), errors.get(i), IMarker.SEVERITY_ERROR);
}
}
}
parser = BlockLevelTokenStreamTracker.getASN1ParserForBlock(mAtNotationsBlock, 0);
if (parser != null) {
atNotationList = parser.pr_AtNotationList().notationList;
List<SyntacticErrorStorage> errors = parser.getErrorStorage();
if (null != errors && !errors.isEmpty()) {
objectSet = null;
for (int i = 0; i < errors.size(); i++) {
ParserMarkerSupport.createOnTheFlySyntacticMarker((IFile) mAtNotationsBlock.getLocation().getFile(), errors.get(i), IMarker.SEVERITY_ERROR);
}
}
}
if (atNotationList == null) {
atNotationList = new AtNotations();
}
}
}
if (objectSet == null) {
objectSet = new ObjectSet_definition();
}
}
Aggregations