final JSNamedElementProxy directive = getTagDirective(project, directiveName, AngularDirectivesDocIndex.INDEX_ID);
return directive == null ? getTagDirective(project, directiveName, AngularDirectivesIndex.INDEX_ID) : directive;
}
private static JSNamedElementProxy getTagDirective(Project project, String directiveName, final ID<String, Void> index) {
final JSNamedElementProxy directive = AngularIndexUtil.resolve(project, index, directiveName);
final String restrictions = directive != null ? directive.getIndexItem().getTypeString() : null;
if (restrictions != null) {
final String[] split = restrictions.split(";", -1);
final String restrict = AngularIndexUtil.convertRestrictions(project, split[0]);
if (!StringUtil.isEmpty(restrict) && StringUtil.containsIgnoreCase(restrict, "E")) {
return directive;