com.intellij.packageDependencies.ui.PackageDependenciesNode Java Examples

The following examples show how to use com.intellij.packageDependencies.ui.PackageDependenciesNode. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BlazeCoverageProjectViewClassDecorator.java    From intellij with Apache License 2.0 6 votes vote down vote up
@Override
public void decorate(PackageDependenciesNode node, ColoredTreeCellRenderer cellRenderer) {
  PsiFile file = getPsiFileForJavaClass(node.getPsiElement());
  if (file == null) {
    return;
  }
  CoverageDataManager manager = getCoverageDataManager();
  CoverageSuitesBundle currentSuite = manager.getCurrentSuitesBundle();
  Project project = file.getProject();
  BlazeCoverageAnnotator annotator = getAnnotator(project, currentSuite);
  if (annotator == null) {
    return;
  }
  String string = annotator.getFileCoverageInformationString(file, currentSuite, manager);
  if (string != null) {
    appendCoverageInfo(cellRenderer, string);
  }
}
 
Example #2
Source File: CoverageProjectViewDirectoryNodeDecorator.java    From consulo with Apache License 2.0 6 votes vote down vote up
@Override
public void decorate(PackageDependenciesNode node, ColoredTreeCellRenderer cellRenderer) {
  final PsiElement element = node.getPsiElement();
  if (element == null || !element.isValid()) {
    return;
  }

  final CoverageDataManager manager = getCoverageDataManager();
  final CoverageSuitesBundle currentSuite = manager.getCurrentSuitesBundle();
  final CoverageAnnotator coverageAnnotator = currentSuite != null ? currentSuite.getAnnotator(element.getProject()) : null;
  if (coverageAnnotator == null) {
    // N/A
    return;
  }

  if (element instanceof PsiDirectory) {
    final String informationString = coverageAnnotator.getDirCoverageInformationString((PsiDirectory) element, currentSuite, manager);
    if (informationString != null) {
      appendCoverageInfo(cellRenderer, informationString);
    }
  }
}
 
Example #3
Source File: ScopeViewPane.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
protected Object exhumeElementFromNode(final DefaultMutableTreeNode node) {
  if (node instanceof PackageDependenciesNode) {
    return ((PackageDependenciesNode)node).getPsiElement();
  }
  return super.exhumeElementFromNode(node);
}
 
Example #4
Source File: SyncStatusNodeDecorator.java    From intellij with Apache License 2.0 4 votes vote down vote up
@Override
public void decorate(PackageDependenciesNode node, ColoredTreeCellRenderer cellRenderer) {}
 
Example #5
Source File: Unity3dProjectViewNodeDecorator.java    From consulo-unity3d with Apache License 2.0 4 votes vote down vote up
@Override
public void decorate(PackageDependenciesNode node, ColoredTreeCellRenderer cellRenderer)
{

}
 
Example #6
Source File: ProjectViewDecorator.java    From GitToolBox with Apache License 2.0 4 votes vote down vote up
@Override
public void decorate(PackageDependenciesNode packageDependenciesNode,
                     ColoredTreeCellRenderer coloredTreeCellRenderer) {
  log.debug("Decorate package dependencies");
}
 
Example #7
Source File: SvnProjectViewNodeDecorator.java    From SVNToolBox with Apache License 2.0 4 votes vote down vote up
@Override
public void decorate(PackageDependenciesNode node, ColoredTreeCellRenderer cellRenderer) {
    if (LOG.isDebugEnabled()) {
        LOG.debug("Decorate package dependencies");
    }
}
 
Example #8
Source File: IgnoreViewNodeDecorator.java    From idea-gitignore with MIT License 2 votes vote down vote up
/**
 * Modifies the presentation of a package dependencies view node.
 *
 * @param node         the node to modify.
 * @param cellRenderer the current renderer for the node, which you can modify as necessary.
 */
@Override
public void decorate(PackageDependenciesNode node, ColoredTreeCellRenderer cellRenderer) {
}
 
Example #9
Source File: ProjectViewNodeDecorator.java    From consulo with Apache License 2.0 votes vote down vote up
void decorate(PackageDependenciesNode node, ColoredTreeCellRenderer cellRenderer);