本文整理汇总了Java中com.intellij.packageDependencies.ui.PackageDependenciesNode类的典型用法代码示例。如果您正苦于以下问题:Java PackageDependenciesNode类的具体用法?Java PackageDependenciesNode怎么用?Java PackageDependenciesNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PackageDependenciesNode类属于com.intellij.packageDependencies.ui包,在下文中一共展示了PackageDependenciesNode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: decorate
import com.intellij.packageDependencies.ui.PackageDependenciesNode; //导入依赖的package包/类
public void decorate(PackageDependenciesNode node, ColoredTreeCellRenderer cellRenderer) {
final PsiElement element = node.getPsiElement();
if (element == null || !element.isValid()) {
return;
}
final CoverageDataManager dataManager = getCoverageDataManager();
final CoverageSuitesBundle currentSuite = dataManager.getCurrentSuitesBundle();
final Project project = element.getProject();
final JavaCoverageAnnotator javaCovAnnotator = getCovAnnotator(currentSuite, project);
// This decorator is applicable only to JavaCoverageAnnotator
if (javaCovAnnotator == null) {
return;
}
if (element instanceof PsiClass) {
final String qName = ((PsiClass)element).getQualifiedName();
if (qName != null) {
appendCoverageInfo(cellRenderer, javaCovAnnotator.getClassCoverageInformationString(qName, dataManager));
}
}
}
示例2: decorate
import com.intellij.packageDependencies.ui.PackageDependenciesNode; //导入依赖的package包/类
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;
}
String informationString = null;
if (element instanceof PsiDirectory) {
informationString = coverageAnnotator.getDirCoverageInformationString((PsiDirectory) element, currentSuite, manager);
}
else if (element instanceof PsiFile) {
informationString = coverageAnnotator.getFileCoverageInformationString((PsiFile)element, currentSuite, manager);
}
if (informationString != null) {
appendCoverageInfo(cellRenderer, informationString);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:CoverageProjectViewDirectoryNodeDecorator.java
示例3: decorate
import com.intellij.packageDependencies.ui.PackageDependenciesNode; //导入依赖的package包/类
@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);
}
}
示例4: decorate
import com.intellij.packageDependencies.ui.PackageDependenciesNode; //导入依赖的package包/类
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);
}
}
}
示例5: exhumeElementFromNode
import com.intellij.packageDependencies.ui.PackageDependenciesNode; //导入依赖的package包/类
@Override
protected Object exhumeElementFromNode(final DefaultMutableTreeNode node) {
if (node instanceof PackageDependenciesNode) {
return ((PackageDependenciesNode)node).getPsiElement();
}
return super.exhumeElementFromNode(node);
}
示例6: treeWillCollapse
import com.intellij.packageDependencies.ui.PackageDependenciesNode; //导入依赖的package包/类
public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException {
final TreePath path = event.getPath();
if (path == null) return;
final DefaultMutableTreeNode node = (PackageDependenciesNode)path.getLastPathComponent();
if (node instanceof DirectoryNode) {
Set<FileNode> fileNodes = null;
for (int i = node.getChildCount() - 1; i >= 0; i--) {
final TreeNode childNode = node.getChildAt(i);
if (childNode instanceof ClassNode) {
final ClassNode classNode = (ClassNode)childNode;
final PsiFile containingFile = classNode.getContainingFile();
if (containingFile != null && containingFile.isValid()) {
if (fileNodes == null) {
fileNodes = new HashSet<FileNode>();
}
fileNodes.add(new FileNode(containingFile.getVirtualFile(), myProject, true));
}
node.remove(classNode);
}
}
if (fileNodes != null) {
for (FileNode fileNode : fileNodes) {
node.add(fileNode);
}
}
TreeUtil.sort(node, getNodeComparator());
final Object source = event.getSource();
if (source instanceof JTree) {
((DefaultTreeModel)((JTree)source).getModel()).reload(node);
}
}
}
示例7: decorate
import com.intellij.packageDependencies.ui.PackageDependenciesNode; //导入依赖的package包/类
@Override
public void decorate(PackageDependenciesNode node, ColoredTreeCellRenderer cellRenderer) {
}
示例8: decorate
import com.intellij.packageDependencies.ui.PackageDependenciesNode; //导入依赖的package包/类
@Override
public void decorate(PackageDependenciesNode node, ColoredTreeCellRenderer cellRenderer) {}
示例9: decorate
import com.intellij.packageDependencies.ui.PackageDependenciesNode; //导入依赖的package包/类
@Override
public void decorate(PackageDependenciesNode node, ColoredTreeCellRenderer cellRenderer)
{
}
示例10: decorate
import com.intellij.packageDependencies.ui.PackageDependenciesNode; //导入依赖的package包/类
@Override
public void decorate(PackageDependenciesNode packageDependenciesNode,
ColoredTreeCellRenderer coloredTreeCellRenderer) {
log.debug("Decorate package dependencies");
}
示例11: decorate
import com.intellij.packageDependencies.ui.PackageDependenciesNode; //导入依赖的package包/类
@Override
public void decorate(PackageDependenciesNode node, ColoredTreeCellRenderer cellRenderer) {
if (LOG.isDebugEnabled()) {
LOG.debug("Decorate package dependencies");
}
}
示例12: decorate
import com.intellij.packageDependencies.ui.PackageDependenciesNode; //导入依赖的package包/类
/**
* 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.
*/
void decorate(PackageDependenciesNode node, ColoredTreeCellRenderer cellRenderer);
示例13: decorate
import com.intellij.packageDependencies.ui.PackageDependenciesNode; //导入依赖的package包/类
@Override
public void decorate(final PackageDependenciesNode node, final ColoredTreeCellRenderer cellRenderer) {
}
示例14: decorate
import com.intellij.packageDependencies.ui.PackageDependenciesNode; //导入依赖的package包/类
/**
* 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) {
}
示例15: decorate
import com.intellij.packageDependencies.ui.PackageDependenciesNode; //导入依赖的package包/类
void decorate(PackageDependenciesNode node, ColoredTreeCellRenderer cellRenderer);