IDEA-57838 Different breakpoint icon for conditional breakpoints

This commit is contained in:
Egor.Ushakov
2016-09-23 19:25:59 +03:00
parent fddfc04823
commit 4bbce0a276
7 changed files with 18 additions and 7 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

@@ -277,6 +277,7 @@ public class AllIcons {
public static final Icon KillProcess = IconLoader.getIcon("/debugger/killProcess.png"); // 16x16
public static final Icon MuteBreakpoints = IconLoader.getIcon("/debugger/muteBreakpoints.png"); // 16x16
public static final Icon NewWatch = IconLoader.getIcon("/debugger/newWatch.png"); // 16x16
public static final Icon Question_badge = IconLoader.getIcon("/debugger/question_badge.png"); // 6x9
public static final Icon RestoreLayout = IconLoader.getIcon("/debugger/restoreLayout.png"); // 16x16
public static final Icon ShowCurrentFrame = IconLoader.getIcon("/debugger/showCurrentFrame.png"); // 16x16
public static final Icon SmartStepInto = IconLoader.getIcon("/debugger/smartStepInto.png"); // 16x16
@@ -15,6 +15,7 @@
*/
package com.intellij.xdebugger.impl.breakpoints;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.actionSystem.ActionGroup;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.components.ComponentSerializationUtil;
@@ -29,6 +30,7 @@ import com.intellij.openapi.util.text.StringUtil;
import com.intellij.pom.Navigatable;
import com.intellij.ui.ColorUtil;
import com.intellij.ui.JBColor;
import com.intellij.ui.LayeredIcon;
import com.intellij.util.StringBuilderSpinAllocator;
import com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters;
import com.intellij.util.xmlb.XmlSerializer;
@@ -43,6 +45,7 @@ import com.intellij.xdebugger.breakpoints.XBreakpointType;
import com.intellij.xdebugger.impl.DebuggerSupport;
import com.intellij.xdebugger.impl.XDebugSessionImpl;
import com.intellij.xdebugger.impl.XDebuggerSupport;
import com.intellij.xdebugger.impl.XDebuggerUtilImpl;
import com.intellij.xdebugger.impl.actions.EditBreakpointAction;
import com.intellij.xml.CommonXmlStrings;
import com.intellij.xml.util.XmlStringUtil;
@@ -393,11 +396,19 @@ public class XBreakpointBase<Self extends XBreakpoint<P>, P extends XBreakpointP
protected void updateIcon() {
final Icon icon = calculateSpecialIcon();
myIcon = icon != null ? icon : getType().getEnabledIcon();
setIcon(icon != null ? icon : getType().getEnabledIcon());
}
protected void setIcon(Icon icon) {
myIcon = icon;
if (!XDebuggerUtilImpl.isEmptyExpression(getConditionExpression())) {
LayeredIcon newIcon = new LayeredIcon(2);
newIcon.setIcon(icon, 0);
newIcon.setIcon(AllIcons.Debugger.Question_badge, 1, 10, 6);
myIcon = newIcon;
}
else {
myIcon = icon;
}
}
@Nullable
@@ -293,12 +293,11 @@ public class XLineBreakpointImpl<P extends XBreakpointProperties> extends XBreak
@Override
protected void updateIcon() {
final Icon icon = calculateSpecialIcon();
if (icon != null) {
setIcon(icon);
return;
Icon icon = calculateSpecialIcon();
if (icon == null) {
icon = isTemporary() ? myType.getTemporaryIcon() : myType.getEnabledIcon();
}
setIcon(isTemporary() ? myType.getTemporaryIcon() : myType.getEnabledIcon());
setIcon(icon);
}
@Override