[Feature] Enable per-project setting of source formatters

Authored by kossebau on Jul 25 2017, 9:58 PM.

Description

[Feature] Enable per-project setting of source formatters

Summary:
Patch adds a plugin kdevsourceformatter, as currently needed
to provide some per-project config pages. To ensure it is
always available, "X-KDevelop-LoadMode": "AlwaysOn" is set.
This plugin then provides the per-project config page
for source formatters.

To reuse the code for selecting, editing, creating & deleting
formatters, the respective code is factored out from
the class KDevelop::SourceFormatterSettings
into a new (exported) class KDevelop::SourceFormatterSelectionEdit,
which is then used both from the global and the project config page.

To enable the SourceFormarController instance to take the per-project
settings into account, the API of ISourceFormatterController is
changed to always include the url of the object, so the project
it belongs to can be estimated.

Test Plan:
Changes to per-project settings are properly saved and restored in
the UI.
Source format controller takes settings of project into account
if configured to do, both for snippets/line and whole files.

Reviewers: KDevelop, kfunk

Reviewed By: KDevelop, kfunk

Subscribers: kfunk, kdevelop-devel

Differential Revision: https://phabricator.kde.org/D6903

Details

Committed
kossebauAug 6 2017, 12:00 AM
Reviewer
KDevelop
Differential Revision
D6903: [Feature] Enable per-project setting of source formatters
Parents
R33:f8e0b1b9f036: Add (next commit) needed include
Branches
Unknown
Tags
Unknown