Package com.intellij.codeInsight.documentation

Examples of com.intellij.codeInsight.documentation.DocumentationComponent


        if (StringUtil.isEmpty(documentation)) return;
        ApplicationManager.getApplication().invokeLater(new Runnable() {
          @Override
          public void run() {
            DocumentationManager documentationManager = DocumentationManager.getInstance(project);
            DocumentationComponent component;
            JBPopup hint = documentationManager.getDocInfoHint();
            if (hint != null) {
              component = (DocumentationComponent)((AbstractPopup)hint).getComponent();
            }
            else if (documentationManager.hasActiveDockedDocWindow()) {
              ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(ToolWindowId.DOCUMENTATION);
              Content selectedContent = toolWindow == null? null : toolWindow.getContentManager().getSelectedContent();
              component = selectedContent == null ? null : (DocumentationComponent)selectedContent.getComponent();
            }
            else {
              component = null;
            }
            PsiElement docElement = component == null? null : ObjectUtils.chooseNotNull(component.getElement(), element);
            if (docElement == element) {
              component.setText(documentation, element, false);
            }
          }
        });
      }
    });
View Full Code Here

TOP

Related Classes of com.intellij.codeInsight.documentation.DocumentationComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.