From c82e9878a3f97f3758af8d681cb5d4f5d6031db5 Mon Sep 17 00:00:00 2001 From: "Vitaliy.Bibaev" Date: Mon, 15 May 2017 12:53:16 +0300 Subject: [PATCH 1/7] Fix a typo in the plugin description --- src/main/resources/META-INF/plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index a59e814..929bb2a 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -20,7 +20,7 @@ -

The Split Mode button in the left bottom corner lets you choose weather you want to see all operations at once or +

The Split Mode button in the left bottom corner lets you choose whether you want to see all operations at once or separately:

From fcf1b7def472e8b07586f4323c364611f54aa87a Mon Sep 17 00:00:00 2001 From: "Vitaliy.Bibaev" Date: Mon, 15 May 2017 12:57:22 +0300 Subject: [PATCH 2/7] Remove gif from the plugin description --- src/main/resources/META-INF/plugin.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 929bb2a..d7b5a05 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -26,9 +26,6 @@

In the latter mode, you can switch between operations manually using the tabs on top.

-

Watch the following short animation to see these features in action:

- -

The plugin is still under development, so expect a couple of glitches here and there, and, of course, we really appreciate your feedback, including error reports, and we have set up an From 5dcc1b8f3c1099a1585e76362c0a5d5615652b92 Mon Sep 17 00:00:00 2001 From: "Vitaliy.Bibaev" Date: Tue, 16 May 2017 10:25:10 +0300 Subject: [PATCH 3/7] Add release notes --- src/main/resources/META-INF/plugin.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index d7b5a05..7a84ed8 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -34,6 +34,11 @@ ]]> +

]]> From 12e334877b8a91588257e5f0587972aaa464b102 Mon Sep 17 00:00:00 2001 From: "Vitaliy.Bibaev" Date: Tue, 16 May 2017 10:25:46 +0300 Subject: [PATCH 4/7] Update version: 0.1.1 --- build.gradle | 2 +- src/main/resources/META-INF/plugin.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 0b51503..eca8ab5 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ apply plugin: 'java' apply plugin: "kotlin" group 'com.intellij.debugger.stream' -version '0.1.0' +version '0.1.1' intellij { type = 'IC' diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 7a84ed8..5608094 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -1,7 +1,7 @@ org.jetbrains.debugger.streams Java Stream Debugger - 0.1.0 + 0.1.1 JetBrains Date: Tue, 16 May 2017 10:27:07 +0300 Subject: [PATCH 5/7] Annotate utility methods with contract --- .../java/com/intellij/debugger/streams/psi/StreamApiUtil.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/intellij/debugger/streams/psi/StreamApiUtil.java b/src/main/java/com/intellij/debugger/streams/psi/StreamApiUtil.java index 6831219..a8a9d02 100644 --- a/src/main/java/com/intellij/debugger/streams/psi/StreamApiUtil.java +++ b/src/main/java/com/intellij/debugger/streams/psi/StreamApiUtil.java @@ -17,6 +17,7 @@ import com.intellij.psi.*; import com.intellij.psi.util.InheritanceUtil; +import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -57,10 +58,12 @@ private static boolean checkStreamCall(@NotNull PsiMethodCallExpression expressi return false; } + @Contract("null -> false") private static boolean isStreamType(@Nullable PsiType psiType) { return InheritanceUtil.isInheritor(psiType, CommonClassNames.JAVA_UTIL_STREAM_BASE_STREAM); } + @Contract("null -> false") private static boolean isStreamType(@Nullable PsiClass psiClass) { return InheritanceUtil.isInheritor(psiClass, CommonClassNames.JAVA_UTIL_STREAM_BASE_STREAM); } From 90733d5a2078fd1ad532051b5df08ce34375e9cd Mon Sep 17 00:00:00 2001 From: Vitaliy Bibaev Date: Tue, 16 May 2017 10:40:25 +0300 Subject: [PATCH 6/7] Update README.md --- README.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f18420..b302a50 100644 --- a/README.md +++ b/README.md @@ -1 +1,29 @@ -# stream-debugger-plugin \ No newline at end of file +# stream-debugger-plugin +In some ways, Stream API is better than traditional loop approach: it takes full advantage of modern multi-core architectures, +and lets you process data in a declarative way. What's also good is that this approach helps to avoid the state issues, and the +code written in it looks more elegant. But, there's a certain downside to it: the code sometimes is sure hard to read, understand, +and, of course, to debug. + +This plugin is here to amend that and offer solutions to the issues you might run into. It extends the Debugger +tool window by adding the *Trace Current Stream Chain* button, which becomes active when debugger stops inside of a +chain of Stream API calls. + + ![](https://blog.jetbrains.com/idea/files/2017/05/Screen-Shot-2017-05-11-at-15.06.58.png) + +After you click it, the current data stream is evaluated and you get a visualization of what exactly happens to each element +from the first call to last, with changes occurring gradually as it's passing thru all the steps: + +![](https://blog.jetbrains.com/idea/files/2017/05/Screen-Shot-2017-05-11-at-15.06.18.png) + +The *Split Mode button* in the left bottom corner lets you choose whether you want to see all operations at once or +separately: + +![](https://blog.jetbrains.com/idea/files/2017/05/Screen-Shot-2017-05-11-at-15.04.39.png) + +In the latter mode, you can switch between operations manually using the tabs on top. + +Watch the following short animation to see these features in action: +![](https://blog.jetbrains.com/idea/files/2017/05/Screen-Shot-2017-05-11-at-15.07.27.gif) + +The plugin is still under development, so expect a couple of glitches here and there, and, of course, we really appreciate your +feedback, including error reports, and we have set up an [issue tracker](https://youtrack.jetbrains.com/issues?q=Subsystem:%20%7BDebugger.%20Streams%7D) just for that. From 575190bc62e4f9e0fca851900e05cb3f808c38b9 Mon Sep 17 00:00:00 2001 From: Vitaliy Bibaev Date: Tue, 16 May 2017 11:07:16 +0300 Subject: [PATCH 7/7] Loop the gif with usage example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b302a50..df5a281 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ separately: In the latter mode, you can switch between operations manually using the tabs on top. Watch the following short animation to see these features in action: -![](https://blog.jetbrains.com/idea/files/2017/05/Screen-Shot-2017-05-11-at-15.07.27.gif) +![](https://raw.githubusercontent.com/Roenke/static/master/screen_shot_2017-05-11_at_15.07.27.gif) The plugin is still under development, so expect a couple of glitches here and there, and, of course, we really appreciate your feedback, including error reports, and we have set up an [issue tracker](https://youtrack.jetbrains.com/issues?q=Subsystem:%20%7BDebugger.%20Streams%7D) just for that.