Bug 389092 - Please add graphviz dot file format preview support
Summary: Please add graphviz dot file format preview support
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: plugin-preview (show other bugs)
Version: 16.08
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-17 06:03 UTC by Igor Zhuravlov
Modified: 2018-01-18 01:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!