diff --git a/README.md b/README.md index 9f18420..df5a281 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://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. 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/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); } diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index a59e814..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 -

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:

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 @@ -37,6 +34,11 @@ ]]> +

]]>