properties: create block for bad elements (IDEA-153384)

This commit is contained in:
Dmitry Batkovich
2016-04-19 21:34:00 +03:00
parent 46e9be0524
commit 0a9bb9b764
@@ -62,12 +62,16 @@ public class PropertiesRootBlock extends AbstractBlock {
if (propertyNode.getElementType() instanceof PropertyStubElementType) {
collectPropertyBlock(propertyNode, result);
}
else if (PropertiesTokenTypes.END_OF_LINE_COMMENT.equals(propertyNode.getElementType())) {
else if (PropertiesTokenTypes.END_OF_LINE_COMMENT.equals(propertyNode.getElementType()) ||
PropertiesTokenTypes.BAD_CHARACTER.equals(propertyNode.getElementType())) {
result.add(new PropertyBlock(propertyNode, null));
}
propertyNode = propertyNode.getTreeNext();
}
}
else if (PropertiesTokenTypes.BAD_CHARACTER.equals(child.getElementType())) {
result.add(new PropertyBlock(child, null));
}
}
if (PropertiesTokenTypes.END_OF_LINE_COMMENT.equals(child.getElementType())) {
result.add(new PropertyBlock(child, null));