Bug 389092

Summary: Please add graphviz dot file format preview support
Product: [Applications] kate Reporter: Igor Zhuravlov <zhuravlov.ip>
Component: plugin-previewAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: wishlist CC: kossebau
Priority: NOR    
Version First Reported In: 16.08   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Igor Zhuravlov 2018-01-17 06:03:25 UTC
Is it possible? It would be very useful.

Maybe a more general solution is possible? When preview plugin takes a text being edited, sends it to some command pre-specified, and displays an output from that command in the preview area. Different commands may be specified for various file extensions of MIME types.
Comment 1 Friedrich W. H. Kossebau 2018-01-17 09:19:04 UTC
It is possible, needs the KGraphViewer KParts plugin installed (I only know about this one).

See example screenshot at https://frinring.wordpress.com/2017/09/25/ktexteditorpreviewplugin-0-1-0/ for editing Dot files in action :)

I agree with your proposed approach of a more general solution. Actually, the preview plugin actually does it: any actual rendering is delegated to other plugins, based on the MIME type, and does so by reusing the existing KParts plugin infrastructure.
The preview plugin itself just takes a snapshot of the current text and sends it over to the KParts plugin, any rendering and further UI is completely controlled by those KParts plugins.
Comment 2 Igor Zhuravlov 2018-01-18 01:53:34 UTC
I've installed KGraphViewer, and now it works like a charm. Thank you very much!