<table><tr><td style="">kossebau created this revision.<br />kossebau added a reviewer: KDevelop.<br />Restricted Application added a subscriber: kdevelop-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D8492" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Source formatting is a feature seemingly only used by some.<br />
So it makes sense to allow disabling this feature, for some minimal smaller<br />
runtime footprint and less unused clutter in the UI (like menu actions or<br />
settings).</p>

<p>This patch achieves this to a good degree:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">makes the plugins astyle & customscript normal global plugins which can be enabled/disabled by the user</li>
<li class="remarkup-list-item">removes the SourceFormatterController actions from the menus when there are no formatters available</li>
<li class="remarkup-list-item">shows no source formatting settings page in the project settings when there are no formatters available</li>
</ul>

<p>Not yet done is to hide the source formatting settings page from the<br />
application settings dialog in case no formatters are available. That might<br />
need some more custom logic all over the shell code, which is not so nice.<br />
Instead the option should be investigated to make the source formatting<br />
controller a normal plugin with a suited interface, which then can be<br />
queried by other code needing that service.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>See plugins astyle & customscript turn up in plugin selection settings.<br />
Disable and enable both and see how actions in the main Edit menu and the<br />
context menu on file items are present or not present, as well as the<br />
formatting settings page in the project settings dialog being shown or not.</p>

<p>See also the formatting settings pages for projects and the global one only<br />
offering the formatters of the enabled plugins.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>BRANCH</strong><div><div>makeFormatterPluginsDisableable</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8492" rel="noreferrer">https://phabricator.kde.org/D8492</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kdevplatform/shell/mainwindow.cpp<br />
kdevplatform/shell/mainwindow_p.cpp<br />
kdevplatform/shell/mainwindow_p.h<br />
kdevplatform/shell/sourceformattercontroller.cpp<br />
kdevplatform/shell/sourceformattercontroller.h<br />
kdevplatform/shell/sourceformatterselectionedit.cpp<br />
kdevplatform/shell/sourceformatterselectionedit.h<br />
plugins/astyle/kdevastyle.json<br />
plugins/customscript/kdevcustomscript.json<br />
plugins/sourceformatter/sourceformatterplugin.cpp</div></div></div><br /><div><strong>To: </strong>kossebau, KDevelop<br /><strong>Cc: </strong>kdevelop-devel<br /></div>