How to create filtered ConsoleView?

Hello,

Is it possible to create ConsoleView like 'IDEA: Log' Tab in Run/Debug ToolWindow? Then i'm pressed filter icon console Log is filtered and some lines removed, then i'm untoggle icon, lines put back.

Can some one give recomendations how to implement this behaviour of text viewer?

Thanks!

9 comments

Hello,

This api is closed.
What exactly do you want to do?

Thank you.

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

Hello,

Is it possible to create ConsoleView like 'IDEA: Log' Tab in Run/Debug
ToolWindow? Then i'm pressed filter icon console Log is filtered and
some lines removed, then i'm untoggle icon, lines put back.

Can some one give recomendations how to implement this behaviour of
text viewer?

Thanks!



0

For my plugin LogFilter.
It can grad lines from standard IDEA console and put it into 'Special' tab. This special tab - is just another one ConsoleView.
I like to have such toggles like in 'IDE: Log' tab. Then i'm toggle some filter, i'll not seen filtered lines, then untoggles - lines must be putted back.

0

Anna, is this still a closed API?  The users of my plugin are requesting a way to filter the contents of ConsoleViews because I'm basically showing the equivalent of log file output in them with clear component discriminators and similar.  I'd like to have an editable combo box with the known components as standard values and allow the user to type any other pattern by which the contents would be filtered.

0

Just thought I'd bump this in case it's possible now. This is something my users have been requesting regularly and I'd prefer to use core plugin SDK features rather than have to roll my own if possible. Any thoughts?

0

Okay, I went ahead and implemented my own reusable component with a filter toolbar above a console view that basically implements the primary interface of ConsoleView (print(), printHyperlink(), clear(), scrollTo(), etc.) with delegation to the actual console view but retention of printed information so that when the filters are changed, the console view can be repopulated according to the filter (or lack thereof).

This is working very well in all the locations where I own the console view, but there's one quite important place I can't add it, the unit test output console view.  That console view is populated by sending messages to the ProcessHandler which multi-casts those messages to registered listeners, one of which is (indirectly) the console view.

Is there any way to decorate or replace the unit test output console view with one that I supply so that I can provide the same filtering capabilities?

Thanks!

0

@Scott Wells - Is that filterable ConsoleView you've created open source?  I'd love to be able to reuse that.

0

@Cary Robbins, not currently, though it wouldn't be difficult to extract it for reuse.  Let me see if I can put together something in the next couple of days.  I'll keep you posted on progress here.

0

@Cary Robbins, I've extracted the filtering ConsoleView into an OSS form that you should be able to access here:

https://bitbucket.org/RoseSilverSoftware/illuminatedcloudoss

The plugin project includes an example tool window that should show how to use it and some of the features of the component.  Let me know if you have any issues accessing it or figuring it out.

0

Awesome, thank you!  Looking forward to trying it out.

0

Please sign in to leave a comment.