Search in sources :

Example 1 with FrameInfoProducer

use of com.jetbrains.actionscript.profiler.base.FrameInfoProducer in project intellij-plugins by JetBrains.

the class FrameInfoCellRenderer method customizeCellRenderer.

@Override
protected void customizeCellRenderer(Object value, boolean selected) {
    if (value instanceof DefaultMutableTreeNode) {
        value = ((DefaultMutableTreeNode) value).getUserObject();
    }
    if (!(value instanceof FrameInfoProducer) && !(value instanceof FrameInfo)) {
        if (value != null && value.toString() != null) {
            append(value.toString());
        }
        return;
    }
    FrameInfo frameInfo;
    if (value instanceof FrameInfoProducer) {
        frameInfo = ((FrameInfoProducer) value).getFrameInfo();
    } else {
        frameInfo = (FrameInfo) value;
    }
    appendFrameInfo(frameInfo, selected);
    boolean inScope;
    if (frameInfo.getFilePath() != null) {
        final VirtualFile vf = VirtualFileManager.getInstance().findFileByUrl(VfsUtil.pathToUrl(frameInfo.getFilePath()));
        inScope = vf != null && scope.accept(vf);
    } else {
        inScope = ResolveUtil.containsInScope(frameInfo.getQName(), scope);
    }
    setIcon(inScope ? scopeIcon : nonScopeIcon);
}
Also used : FrameInfoProducer(com.jetbrains.actionscript.profiler.base.FrameInfoProducer) FrameInfo(com.jetbrains.actionscript.profiler.sampler.FrameInfo) VirtualFile(com.intellij.openapi.vfs.VirtualFile) DefaultMutableTreeNode(javax.swing.tree.DefaultMutableTreeNode)

Aggregations

VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 FrameInfoProducer (com.jetbrains.actionscript.profiler.base.FrameInfoProducer)1 FrameInfo (com.jetbrains.actionscript.profiler.sampler.FrameInfo)1 DefaultMutableTreeNode (javax.swing.tree.DefaultMutableTreeNode)1