MCPcopy Create free account
hub / github.com/KDE/kdevelop / IFileFormatter

Class IFileFormatter

kdevplatform/interfaces/isourceformattercontroller.h:21–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20namespace KDevelop {
21class IFileFormatter
22{
23 Q_DISABLE_COPY_MOVE(IFileFormatter)
24public:
25 IFileFormatter() = default;
26 virtual ~IFileFormatter() = default;
27
28 /**
29 * Format text using packaged source formatter and style.
30 * @param text the text to format
31 * @param leftContext the context at the left side of the text.
32 * If it is in another line, it must end with a newline.
33 * @param rightContext the context at the right side of the text.
34 * If it is in the next line, it must start with a newline.
35 *
36 * @note If the source formatter cannot work correctly with the context,
37 * it will just return the input text.
38 */
39 virtual QString format(const QString& text, const QString& leftContext = QString(),
40 const QString& rightContext = QString()) const = 0;
41};
42
43/** \short An interface to the controller managing all source formatter plugins
44 */

Callers

nothing calls this directly

Calls 1

QStringClass · 0.70

Tested by

no test coverage detected