Search in sources :

Example 1 with SizeInfoNode

use of com.jetbrains.actionscript.profiler.livetable.SizeInfoNode in project intellij-plugins by JetBrains.

the class LiveObjectsView method setupUI.

private void setupUI() {
    liveObjectsTreeTable.getTree().setRootVisible(false);
    setColumnWidth(liveObjectsTreeTable.getColumnModel().getColumn(1), MS_COLUMN_WIDTH);
    setColumnWidth(liveObjectsTreeTable.getColumnModel().getColumn(2), MS_COLUMN_WIDTH);
    new TreeTableSpeedSearch(liveObjectsTreeTable).setComparator(new SpeedSearchComparator(false));
    PopupHandler.installPopupHandler(liveObjectsTreeTable, PROFILER_VIEW_GROUP_ID, ActionPlaces.UNKNOWN);
    liveObjectsTreeTable.getEmptyText().setText(ProfilerBundle.message("live.objects.loading"));
    liveObjectsTreeTable.getTree().setCellRenderer(new SizeInfoCellRenderer() {

        @Override
        public void customizeCellRenderer(Object value, boolean selected) {
            Icon icon = AllIcons.General.Information;
            if (value instanceof SizeInfoNode) {
                icon = ((SizeInfoNode) value).isMethod() ? AllIcons.Nodes.Method : AllIcons.Nodes.Class;
            }
            setPaintFocusBorder(false);
            setIcon(icon);
            super.customizeCellRenderer(value, selected);
        }
    });
    final ComboBoxModel model = filterScope.getComboBox().getModel();
    if (model instanceof DefaultComboBoxModel) {
        ((DefaultComboBoxModel) model).insertElementAt(new ScopeDescriptor(new AllSearchScope(getProject())), 0);
    }
}
Also used : TreeTableSpeedSearch(com.intellij.ui.TreeTableSpeedSearch) ScopeDescriptor(com.intellij.ide.util.scopeChooser.ScopeDescriptor) SizeInfoCellRenderer(com.jetbrains.actionscript.profiler.render.SizeInfoCellRenderer) AllSearchScope(com.jetbrains.actionscript.profiler.util.AllSearchScope) SizeInfoNode(com.jetbrains.actionscript.profiler.livetable.SizeInfoNode) SpeedSearchComparator(com.intellij.ui.SpeedSearchComparator)

Example 2 with SizeInfoNode

use of com.jetbrains.actionscript.profiler.livetable.SizeInfoNode in project intellij-plugins by JetBrains.

the class SizeInfoCellRenderer method customizeCellRenderer.

@Override
protected void customizeCellRenderer(Object value, boolean selected) {
    if (!(value instanceof SizeInfoNode)) {
        if (value != null && value.toString() != null) {
            append(value.toString());
        }
        return;
    }
    final SizeInfoNode sizeInfoNode = (SizeInfoNode) value;
    if (sizeInfoNode.isMethod()) {
        appendFrameInfo(sizeInfoNode.getFrameInfo(), selected);
        return;
    }
    appendQName(sizeInfoNode);
}
Also used : SizeInfoNode(com.jetbrains.actionscript.profiler.livetable.SizeInfoNode)

Aggregations

SizeInfoNode (com.jetbrains.actionscript.profiler.livetable.SizeInfoNode)2 ScopeDescriptor (com.intellij.ide.util.scopeChooser.ScopeDescriptor)1 SpeedSearchComparator (com.intellij.ui.SpeedSearchComparator)1 TreeTableSpeedSearch (com.intellij.ui.TreeTableSpeedSearch)1 SizeInfoCellRenderer (com.jetbrains.actionscript.profiler.render.SizeInfoCellRenderer)1 AllSearchScope (com.jetbrains.actionscript.profiler.util.AllSearchScope)1