use of org.jetbrains.plugins.ruby.motion.symbols.MotionSymbol in project intellij-plugins by JetBrains.
the class RubyMotionUtilImpl method getMotionDoc.
@Nullable
public String getMotionDoc(PsiElement targetElement, @Nullable Symbol targetSymbol) {
String descriptionText;
final MotionSymbol motionSymbol = (MotionSymbol) targetSymbol;
CocoaDocumentationManagerImpl.DocTokenType type = motionSymbol.getInfoType();
CocoaDocumentationManagerImpl manager = (CocoaDocumentationManagerImpl) CocoaDocumentationManager.getInstance(targetSymbol.getProject());
final Symbol parent = targetSymbol.getParentSymbol();
final String parentName = parent != null ? parent.getName() : null;
final CocoaDocumentationManagerImpl.DocumentationBean info = manager.getTokenInfo(targetElement, motionSymbol.getInfoName(), Collections.singletonList(Pair.create(parentName, type)));
descriptionText = info != null ? patchObjCDoc(info.html, motionSymbol) : null;
return descriptionText;
}
Aggregations