D16779: kate-ctags plugin: support KDevelop (WIP)
René J.V. Bertin
noreply at phabricator.kde.org
Fri Nov 9 15:58:31 GMT 2018
rjvbb created this revision.
rjvbb added a reviewer: Kate.
rjvbb added projects: Kate, KTextEditor, KDevelop.
Herald added a subscriber: kwrite-devel.
rjvbb requested review of this revision.
REVISION SUMMARY
This is a work-in-progress set of changes intending to make the CTags plugin available in/from KDevelop.
KDevelop does not currently have support for KTextEditor configuration dialogs so I've had to move the `common_db` database to a generic location (cf. the snippets plugin which does the same). I'm open to migration suggestions (common_db can take quite a while to (re)generate).
TEST PLAN
Currently this allows jumping to a symbol's declaration or definition in a (new) document; even the cursor is positioned correctly in my tests. Evidently this requires a companion change in KDevelop because it does not yet implement KTextEditorIntegration::showToolView() and openURL. For completeness sake:
KTextEditor::View *MainWindow::openUrl(const QUrl &url, const QString &encoding)
{
Q_UNUSED(encoding);
auto documentController = Core::self()->documentControllerInternal();
auto doc = url.isEmpty() ? documentController->openDocumentFromText(QString()) : documentController->openDocument(url);
return doc ? doc->activeTextView() : nullptr;
}
bool MainWindow::showToolView(QWidget *widget)
{
const auto view = ToolViewFactory::fromWidget(widget);
if (view) {
Core::self()->uiController()->raiseToolView(widget);
qWarning() << Q_FUNC_INFO << view << view->m_text;
return true;
}
qWarning() << Q_FUNC_INFO << "no ToolViewFactory for" << widget;
return false;
}
That showToolView() method doesn't work though, and opening the toolview manually yields a garbled plugin UI, as if it doesn't get the correct size information.
REPOSITORY
R40 Kate
REVISION DETAIL
https://phabricator.kde.org/D16779
AFFECTED FILES
addons/kate-ctags/kate_ctags_view.cpp
addons/kate-ctags/katectagsplugin.desktop
To: rjvbb, #kate
Cc: kdevelop-devel, kwrite-devel, #kde_applications, glebaccon, antismap, michaelh, iodelay, vbspam, ngraham, demsking, geetamc, head7, Pilzschaf, akshaydeo, surgenight, arrowd, cullmann, kfunk, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181109/35051f0b/attachment.html>
More information about the KDevelop-devel
mailing list