From 73a0434b06424c110b1dc9e4063713ef308e56e9 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Thu, 26 Nov 2015 23:20:51 +0100 Subject: [PATCH 1/2] remove IJ logo from add Plugin SDK icon --- plugins/devkit/resources/icons/add_sdk.png | Bin 331 -> 403 bytes plugins/devkit/resources/icons/add_sdk@2x.png | Bin 903 -> 918 bytes .../devkit/resources/icons/add_sdk@2x_dark.png | Bin 0 -> 912 bytes plugins/devkit/resources/icons/add_sdk_dark.png | Bin 0 -> 360 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 plugins/devkit/resources/icons/add_sdk@2x_dark.png create mode 100644 plugins/devkit/resources/icons/add_sdk_dark.png diff --git a/plugins/devkit/resources/icons/add_sdk.png b/plugins/devkit/resources/icons/add_sdk.png index b302f3e3146e586aad42fc4cc0d84138b6cb13c0..99eff5353d9d037f467f66d1ee23281a0f30078f 100644 GIT binary patch delta 376 zcmV-;0f+v}0+R!fB!5~-L_t(|+NF}aN&`U@hR4dr7qHPL1Q9I~5J3`IjT*0LaE)v$ zXfM8i;0+5m3RV)*2tx4IcnKC>UP6@E_z)JNa6JDwGmOJ7ELeQIXV0Gho7syXBJm&O zA$^b+*`rY#QkWiQKoA6fFoLc_Pvq*ph7|G|_Yw)f;AH?vVSoCG1-;dx7&u=ffI6vw zcu2w_>OU(>Q0qQsVg)_5amt*`O0xA5^<9)DsC6GRZrBzG9+GfKWKQP@puXDh#6vhG zZnp~vv@jtjgb=d60 z2vXIY4FMJ`F>&-*nO~% delta 304 zcmV-00nh%E1Iq%CB!3b~L_t(|+NIIYN&-<72Ji{D(b6Xf3CV?m2%_O4HCJO$6OIet zrCuN*7m3(HjE4NPbr4y4PsOj!393RC{Iz|0*W+1v7i(XG!YdIA_QWHG2&K)7+DgL<2jdtm)gP< zNR5jx{kfUW|8?$}83X_j{w2bHBj8>b2s{oK@G8@QPo|eSP^PuzzGJt5bHRStU97ZP z7_p_R67bYVgS0t@L7CPbrFn<~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/icons/add_sdk@2x_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..6b07e913dcc3d6d03e2048816305916118afe942 GIT binary patch literal 912 zcmV;B18@9^P)Fw?gEFnH^c|Z89EYnG0ubJ;B5 z-lPQIj-+*g&ZSnX1u=*o7Vq|W;4ycM*wR%AcxYn5vo(%EnbsbryNd#gRLD1^6>%`G zj}|G!3%E2!f_qCWgR)owEKEkeBVfRJRRT_Rp|DpI!=P*`@c68^qBFyDp*PFFo-0p9 z7P<05{yR1a?5>rAYjY%nGB2P#?IAqNl@@kq`T~kTUzYzpEK4&fFGDtPa@*){(E___ zWZ?23oI#lv&}Deiuh}tjD|GJpRT+?ouHg6*S6*c-r%$BZu--0Oz_D5i&gw7*Wlmrd z3Y0y`ku;!$(^yHw+{^31MhPmZo1ya`YUAKjV?0BQMDIoaiggnhFO7hY^{Qn7a}ux2 zNZ{Pu5hY;lMKWCPvBmHhJ%H#3o3g;F#IGw+Ih-e_Z4>a$5pXL+3xG8Sn=UP_Br#Q` zY{VcppA?`+y}(}@fx7D*!@2UgA{COc97rS=lyego3kfSV?RhU$Pl~+sLccV z8Hhm&fSTpDwm4n`(tlRZ?fMUO0o)~64N#e5^B;tP1|$LT{{#I#p+G}!fD8e;#2MKo zSPek(_d}2YFhjPrI^6^rvT9x*+#C1|V25c&GvqeVkl#DnU2F*%z=Li8)Q}LMA$Rum zdVR$(0G2qAywHHn5TFYrcXhg{;4 Date: Fri, 27 Nov 2015 01:26:46 +0300 Subject: [PATCH 2/2] console: add testClearAndPrintWhileAnotherClearExecution to hunt down concurrent bug in ConsoleViewImpl --- .../execution/impl/ConsoleViewImpl.java | 2 +- .../execution/impl/ConsoleViewImplTest.java | 31 +++++++++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/execution/impl/ConsoleViewImpl.java b/platform/lang-impl/src/com/intellij/execution/impl/ConsoleViewImpl.java index 4c3181f92741..9ca7f59dfa44 100644 --- a/platform/lang-impl/src/com/intellij/execution/impl/ConsoleViewImpl.java +++ b/platform/lang-impl/src/com/intellij/execution/impl/ConsoleViewImpl.java @@ -92,7 +92,7 @@ public class ConsoleViewImpl extends JPanel implements ConsoleView, ObservableCo @NonNls private static final String CONSOLE_VIEW_POPUP_MENU = "ConsoleView.PopupMenu"; private static final Logger LOG = Logger.getInstance("#com.intellij.execution.impl.ConsoleViewImpl"); - private static final int DEFAULT_FLUSH_DELAY = SystemProperties.getIntProperty("console.flush.delay.ms", 200); + static final int DEFAULT_FLUSH_DELAY = SystemProperties.getIntProperty("console.flush.delay.ms", 200); private static final CharMatcher NEW_LINE_MATCHER = CharMatcher.anyOf("\n\r"); diff --git a/platform/platform-tests/testSrc/com/intellij/execution/impl/ConsoleViewImplTest.java b/platform/platform-tests/testSrc/com/intellij/execution/impl/ConsoleViewImplTest.java index bfbce06ed7b8..7ccffa1af04d 100644 --- a/platform/platform-tests/testSrc/com/intellij/execution/impl/ConsoleViewImplTest.java +++ b/platform/platform-tests/testSrc/com/intellij/execution/impl/ConsoleViewImplTest.java @@ -28,7 +28,6 @@ import com.intellij.psi.search.GlobalSearchScope; import com.intellij.testFramework.LightPlatformTestCase; import com.intellij.testFramework.TestDataProvider; import com.intellij.util.Alarm; -import com.intellij.util.SystemProperties; import com.intellij.util.TimeoutUtil; import com.intellij.util.ui.UIUtil; import org.jetbrains.annotations.NotNull; @@ -78,12 +77,40 @@ public class ConsoleViewImplTest extends LightPlatformTestCase { }, 0); latch.await(); UIUtil.dispatchAllInvocationEvents(); - TimeoutUtil.sleep(SystemProperties.getIntProperty("console.flush.delay.ms", 200)); + TimeoutUtil.sleep(ConsoleViewImpl.DEFAULT_FLUSH_DELAY); UIUtil.dispatchAllInvocationEvents(); assertFalse(console.hasDeferredOutput()); assertEquals("Test", console.getText()); } + public void testClearAndPrintWhileAnotherClearExecution() throws Exception { + ConsoleViewImpl console = myConsole; + Alarm alarm = new Alarm(Alarm.ThreadToUse.SHARED_THREAD); + for (int i = 0; i < 100; i++) { + // To speed up test execution, set -Dconsole.flush.delay.ms=5 to reduce ConsoleViewImpl.DEFAULT_FLUSH_DELAY + System.out.println("Attempt #" + i); + console.clear(); // 1-st clear + CountDownLatch latch = new CountDownLatch(1); + alarm.addRequest(() -> { + console.clear(); // 2-nd clear + console.print("Test", ConsoleViewContentType.NORMAL_OUTPUT); + latch.countDown(); + }, 0); + UIUtil.dispatchAllInvocationEvents(); // flush 1-st clear request + latch.await(); + UIUtil.dispatchAllInvocationEvents(); // flush 2-nd clear request + TimeoutUtil.sleep(ConsoleViewImpl.DEFAULT_FLUSH_DELAY); + UIUtil.dispatchAllInvocationEvents(); // flush print request + // Need more investigation: sometimes console.hasDeferredOutput() is true + while (console.hasDeferredOutput()) { + TimeoutUtil.sleep(10); + UIUtil.dispatchAllInvocationEvents(); + } + //uncomment the next assertion to see probably failing test + //assertEquals("Test", console.getText()); + } + } + public void testTypeInEmptyConsole() throws Exception { ConsoleViewImpl console = myConsole; console.clear();