use of org.dartlang.analysis.server.protocol.OverriddenMember in project intellij-plugins by JetBrains.
the class DartServerOverrideMarkerProvider method createOverrideMarker.
@Nullable
private static LineMarkerInfo createOverrideMarker(DartComponentName componentName) {
final VirtualFile virtualFile = componentName.getContainingFile().getVirtualFile();
if (virtualFile == null || !virtualFile.isInLocalFileSystem()) {
return null;
}
final List<DartServerData.DartOverrideMember> overrideMembers = DartAnalysisServerService.getInstance(componentName.getProject()).getOverrideMembers(virtualFile);
final Project project = componentName.getProject();
final int nameOffset = componentName.getTextRange().getStartOffset();
DartComponent superclassComponent = null;
List<DartComponent> interfaceComponents = Lists.newArrayList();
for (DartServerData.DartOverrideMember overrideMember : overrideMembers) {
if (overrideMember.getOffset() == nameOffset) {
final OverriddenMember member = overrideMember.getSuperclassMember();
superclassComponent = member == null ? null : DartHierarchyUtil.findDartComponent(project, member.getElement().getLocation());
if (overrideMember.getInterfaceMembers() != null) {
for (OverriddenMember overriddenMember : overrideMember.getInterfaceMembers()) {
addDartComponent(interfaceComponents, project, overriddenMember);
}
}
}
}
return tryCreateOverrideMarker(componentName, superclassComponent, interfaceComponents);
}
Aggregations