Search in sources :

Example 1 with ToStringRenderer

use of com.intellij.debugger.ui.tree.render.ToStringRenderer in project intellij-community by JetBrains.

the class DebuggerDataViewsConfigurable method apply.

@Override
public void apply() {
    final ViewsGeneralSettings generalSettings = ViewsGeneralSettings.getInstance();
    final NodeRendererSettings rendererSettings = NodeRendererSettings.getInstance();
    generalSettings.AUTOSCROLL_TO_NEW_LOCALS = myCbAutoscroll.isSelected();
    rendererSettings.setAlternateCollectionViewsEnabled(myCbEnableAlternateViews.isSelected());
    generalSettings.HIDE_NULL_ARRAY_ELEMENTS = myCbHideNullArrayElements.isSelected();
    final ClassRenderer classRenderer = rendererSettings.getClassRenderer();
    classRenderer.SHOW_STATIC = myCbShowStatic.isSelected();
    classRenderer.SHOW_STATIC_FINAL = myCbShowStaticFinalFields.isSelectedWhenSelectable();
    classRenderer.SHOW_SYNTHETICS = myCbShowSyntheticFields.isSelected();
    classRenderer.SHOW_VAL_FIELDS_AS_LOCAL_VARIABLES = myCbShowValFieldsAsLocalVariables.isSelectedWhenSelectable();
    classRenderer.SHOW_DECLARED_TYPE = myCbShowDeclaredType.isSelected();
    classRenderer.SHOW_FQ_TYPE_NAMES = myCbShowFQNames.isSelected();
    classRenderer.SHOW_OBJECT_ID = myCbShowObjectId.isSelected();
    classRenderer.SHOW_STRINGS_TYPE = myCbShowStringsType.isSelected();
    final ToStringRenderer toStringRenderer = rendererSettings.getToStringRenderer();
    toStringRenderer.setEnabled(myCbEnableToString.isSelected());
    toStringRenderer.setUseClassFilters(myRbFromList.isSelected());
    toStringRenderer.setClassFilters(myToStringFilterEditor.getFilters());
    PrimitiveRenderer primitiveRenderer = rendererSettings.getPrimitiveRenderer();
    primitiveRenderer.setShowHexValue(myCbHexValue.isSelected());
    rendererSettings.fireRenderersChanged();
}
Also used : ClassRenderer(com.intellij.debugger.ui.tree.render.ClassRenderer) ToStringRenderer(com.intellij.debugger.ui.tree.render.ToStringRenderer) PrimitiveRenderer(com.intellij.debugger.ui.tree.render.PrimitiveRenderer)

Example 2 with ToStringRenderer

use of com.intellij.debugger.ui.tree.render.ToStringRenderer in project intellij-community by JetBrains.

the class DebuggerDataViewsConfigurable method areDefaultRenderersModified.

private boolean areDefaultRenderersModified() {
    //if (myArrayRendererConfigurable.isModified()) {
    //  return true;
    //}
    final NodeRendererSettings rendererSettings = NodeRendererSettings.getInstance();
    final ClassRenderer classRenderer = rendererSettings.getClassRenderer();
    final boolean isClassRendererModified = (classRenderer.SHOW_STATIC != myCbShowStatic.isSelected()) || (classRenderer.SHOW_STATIC_FINAL != myCbShowStaticFinalFields.isSelectedWhenSelectable()) || (classRenderer.SHOW_SYNTHETICS != myCbShowSyntheticFields.isSelected()) || (classRenderer.SHOW_VAL_FIELDS_AS_LOCAL_VARIABLES != myCbShowValFieldsAsLocalVariables.isSelectedWhenSelectable()) || (classRenderer.SHOW_DECLARED_TYPE != myCbShowDeclaredType.isSelected()) || (classRenderer.SHOW_FQ_TYPE_NAMES != myCbShowFQNames.isSelected()) || (classRenderer.SHOW_OBJECT_ID != myCbShowObjectId.isSelected()) || (classRenderer.SHOW_STRINGS_TYPE != myCbShowStringsType.isSelected());
    if (isClassRendererModified) {
        return true;
    }
    final ToStringRenderer toStringRenderer = rendererSettings.getToStringRenderer();
    final boolean isToStringRendererModified = (toStringRenderer.isEnabled() != myCbEnableToString.isSelected()) || (toStringRenderer.isUseClassFilters() != myRbFromList.isSelected()) || (!DebuggerUtilsEx.filterEquals(toStringRenderer.getClassFilters(), myToStringFilterEditor.getFilters()));
    if (isToStringRendererModified) {
        return true;
    }
    if (rendererSettings.areAlternateCollectionViewsEnabled() != myCbEnableAlternateViews.isSelected()) {
        return true;
    }
    PrimitiveRenderer primitiveRenderer = rendererSettings.getPrimitiveRenderer();
    if (primitiveRenderer.isShowHexValue() != myCbHexValue.isSelected()) {
        return true;
    }
    return false;
}
Also used : ClassRenderer(com.intellij.debugger.ui.tree.render.ClassRenderer) ToStringRenderer(com.intellij.debugger.ui.tree.render.ToStringRenderer) PrimitiveRenderer(com.intellij.debugger.ui.tree.render.PrimitiveRenderer)

Example 3 with ToStringRenderer

use of com.intellij.debugger.ui.tree.render.ToStringRenderer in project intellij-community by JetBrains.

the class DebuggerDataViewsConfigurable method reset.

@Override
public void reset() {
    final ViewsGeneralSettings generalSettings = ViewsGeneralSettings.getInstance();
    final NodeRendererSettings rendererSettings = NodeRendererSettings.getInstance();
    myCbAutoscroll.setSelected(generalSettings.AUTOSCROLL_TO_NEW_LOCALS);
    myCbHideNullArrayElements.setSelected(generalSettings.HIDE_NULL_ARRAY_ELEMENTS);
    myCbEnableAlternateViews.setSelected(rendererSettings.areAlternateCollectionViewsEnabled());
    ClassRenderer classRenderer = rendererSettings.getClassRenderer();
    myCbShowSyntheticFields.setSelected(classRenderer.SHOW_SYNTHETICS);
    myCbShowValFieldsAsLocalVariables.setSelected(classRenderer.SHOW_VAL_FIELDS_AS_LOCAL_VARIABLES);
    if (!classRenderer.SHOW_SYNTHETICS) {
        myCbShowValFieldsAsLocalVariables.makeUnselectable(false);
    }
    myCbShowStatic.setSelected(classRenderer.SHOW_STATIC);
    myCbShowStaticFinalFields.setSelected(classRenderer.SHOW_STATIC_FINAL);
    if (!classRenderer.SHOW_STATIC) {
        myCbShowStaticFinalFields.makeUnselectable(false);
    }
    myCbShowDeclaredType.setSelected(classRenderer.SHOW_DECLARED_TYPE);
    myCbShowFQNames.setSelected(classRenderer.SHOW_FQ_TYPE_NAMES);
    myCbShowObjectId.setSelected(classRenderer.SHOW_OBJECT_ID);
    myCbShowStringsType.setSelected(classRenderer.SHOW_STRINGS_TYPE);
    final ToStringRenderer toStringRenderer = rendererSettings.getToStringRenderer();
    final boolean toStringEnabled = toStringRenderer.isEnabled();
    final boolean useClassFilters = toStringRenderer.isUseClassFilters();
    myCbEnableToString.setSelected(toStringEnabled);
    myRbAllThatOverride.setSelected(!useClassFilters);
    myRbFromList.setSelected(useClassFilters);
    myToStringFilterEditor.setFilters(toStringRenderer.getClassFilters());
    myToStringFilterEditor.setEnabled(toStringEnabled && useClassFilters);
    myRbFromList.setEnabled(toStringEnabled);
    myRbAllThatOverride.setEnabled(toStringEnabled);
    PrimitiveRenderer primitiveRenderer = rendererSettings.getPrimitiveRenderer();
    myCbHexValue.setSelected(primitiveRenderer.isShowHexValue());
}
Also used : ClassRenderer(com.intellij.debugger.ui.tree.render.ClassRenderer) ToStringRenderer(com.intellij.debugger.ui.tree.render.ToStringRenderer) PrimitiveRenderer(com.intellij.debugger.ui.tree.render.PrimitiveRenderer)

Aggregations

ClassRenderer (com.intellij.debugger.ui.tree.render.ClassRenderer)3 PrimitiveRenderer (com.intellij.debugger.ui.tree.render.PrimitiveRenderer)3 ToStringRenderer (com.intellij.debugger.ui.tree.render.ToStringRenderer)3