Fixed AIOOBE: some property names may not have description.

This commit is contained in:
Oleg Sukhodolsky
2013-02-09 15:10:28 +04:00
parent e74b321e79
commit f9c1dbfd67
@@ -39,10 +39,11 @@ public class RegExpDocumentationProvider extends AbstractDocumentationProvider {
final String elementName = node.getText();
for (String[] stringArray : RegExpPropertyImpl.PROPERTY_NAMES) {
if (stringArray[0].equals(elementName)) {
final String description = stringArray.length > 1 ? stringArray[1] : stringArray[0];
if (prop.isNegated()) {
return "Property block stands for characters not matching " + stringArray[1];
return "Property block stands for characters not matching " + description;
} else {
return "Property block stands for " + "" + stringArray[1];
return "Property block stands for " + description;
}
}
}