From 4bbce0a276366bf72d49e11c6487ac9b91b7fa78 Mon Sep 17 00:00:00 2001 From: "Egor.Ushakov" Date: Fri, 23 Sep 2016 19:20:45 +0300 Subject: [PATCH] IDEA-57838 Different breakpoint icon for conditional breakpoints --- platform/icons/src/debugger/question_badge.png | Bin 0 -> 215 bytes .../icons/src/debugger/question_badge@2x.png | Bin 0 -> 445 bytes .../src/debugger/question_badge@2x_dark.png | Bin 0 -> 446 bytes .../icons/src/debugger/question_badge_dark.png | Bin 0 -> 215 bytes .../util/src/com/intellij/icons/AllIcons.java | 1 + .../impl/breakpoints/XBreakpointBase.java | 15 +++++++++++++-- .../impl/breakpoints/XLineBreakpointImpl.java | 9 ++++----- 7 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 platform/icons/src/debugger/question_badge.png create mode 100644 platform/icons/src/debugger/question_badge@2x.png create mode 100644 platform/icons/src/debugger/question_badge@2x_dark.png create mode 100644 platform/icons/src/debugger/question_badge_dark.png diff --git a/platform/icons/src/debugger/question_badge.png b/platform/icons/src/debugger/question_badge.png new file mode 100644 index 0000000000000000000000000000000000000000..f66e51ad598ff87dff253d0b4016365b8e68d2bd GIT binary patch literal 215 zcmV;|04V>7P)pSJ_ z?EC{L)(DbN0^+I%4<0P8tE=1N>+5?5$j@f5x3>pL&dSZrJ@4=De{ac>B|$*G8%(0v z!^7j<=g*%VfNWVH=7LG2?c2965=g6o_#h0E@Bq?4>c23$gdGs;0kJ$x0ssWEho~Q6 RSStVk002ovPDHLkV1itAUhn__ literal 0 HcmV?d00001 diff --git a/platform/icons/src/debugger/question_badge@2x.png b/platform/icons/src/debugger/question_badge@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..09442e4de70ae940417d9ad442ab0d4c9e939078 GIT binary patch literal 445 zcmV;u0Yd(XP)c{F0004mNklH2NqAf=X&mr?Z{Q z<;bg>Mj@ZgX74mjJ41Zj86%TQrLKwO^ZDM8%SJ&2>mUF|JM#*vsw$mVTF4`R0%#IkXf*cxe*XgzWLZ8(ZOJ4cmcV|oSWIJEFQgfpyJjSS)sg+8SWNfRzxzYCqj>cfD4tg^;g;8N<0r2yqL nBOmG|%zc{F0004nNkl)i;JrU$S#FCBd?*MVL3?C{{8!(0QphK8a#p61BhLLm=)w+AaGGo zP{;#mICJLAA0R&%t^uR~8G|$dakQVGUo}X>kt0W*1NlB!H2{G+5XbWJ^2Tr9zWp*t z!_1j8=K;lRFf;%`AP~nzMMc#BL+b%ZF)-wIa&mII0mWspX^393WXX15$oxBb^5n<< z{{9I-F()840b)jM8bW|U`wFP|gNB9%$ToW*R)xu9)8Kpj`0}1CnO}SXnG{2F_-tq zEFOh(jm+$Fb1e!VeO(#6JZ}5et-kDCN1Ii&OiWFsRa8|^tNG8{^Xt~u?E4K#jS8HB z3f~M33^XG4RD8Vj`T6;H=1+4a^X~28oaA$3Q|jq^o72z7, 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 diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XLineBreakpointImpl.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XLineBreakpointImpl.java index 0985daa20b6b..a848d77d8722 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XLineBreakpointImpl.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XLineBreakpointImpl.java @@ -293,12 +293,11 @@ public class XLineBreakpointImpl

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