Description: This is a port of KDevelop 3.3.5's CTags plugin.
Other changes: * When a document is opened/switched with kate, the plugin will attempt to locate a 'tags' file. It will look in the folder containing the document, or in the folders ancestors. The level of this search is controlled via the config page. * The 'ctags' view now shows the location of the tags file, and allows for the file to be loaded.Last changelog:
0.2 --- 1. Add "--extra=+q" to default ctags args. 2. When opening a file, use absFilePath - to ensure duplicates are not opened. 3. If file start with '/', then dont prepend tags file path.
I got an somewhat improved version of this plugin included into kdesdk in the upcoming kde 4.2 :)
The plugins can be compiled separately for KDE 4.1, but you need to add:
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
to the top of the CMakeLists.txt and you need the development packages for kdesdk.
Here you can find the source:
svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdesdk/kate/plugins/kate-ctags
hi im create simple patch, it
Adds in a plug-in an opportunity to come back in same place whence you have entered into function or other label tags (as in vim on ctrl+T and ctrl +])
http://www.kde-apps.org/content/show.php/kate-ctags-plugin-patch?content=62818
Hello everybody,
I've got problems when i try to compile the sources. There is a direcory which not exist: ctags/kate.
I'm using kate 2.5.5, Qt 3.3 , gcc 4.1.1
on kde 3.5.5
I wondered this plugin for a long time... thanks :)
I installed it with ./configure, make and make install but when I launch kate, the plugin never appears in the plugin menu !!!
I'm using kate 2.5.5 on kde 3.5.5 on Debian.
Is ther something elle to do to install it ?
devhil
The 'undefined references' are caused by missing KDE_EXPORT macros in the Kate application interfaces. Fixed for KDE 3.5.6. You can also apply the patch [1] in kdebase/kate/interfaces and recompile Kate.
[1] http://www.gmdsoft.de/haumann/kde/kate-interface-exports.diff
Ratings & Comments
16 Comments
It would be perfect to have a tree view with ctags in kate. Is there no hope for such a solution?
I got an somewhat improved version of this plugin included into kdesdk in the upcoming kde 4.2 :) The plugins can be compiled separately for KDE 4.1, but you need to add: find_package(KDE4 REQUIRED) include(KDE4Defaults) to the top of the CMakeLists.txt and you need the development packages for kdesdk. Here you can find the source: svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdesdk/kate/plugins/kate-ctags
hi, would it be possible to have autocompletion upon pressing . or ->? It would popup a list of public methods or member variables.
hi im create simple patch, it Adds in a plug-in an opportunity to come back in same place whence you have entered into function or other label tags (as in vim on ctrl+T and ctrl +]) http://www.kde-apps.org/content/show.php/kate-ctags-plugin-patch?content=62818
Hello everybody, I've got problems when i try to compile the sources. There is a direcory which not exist: ctags/kate. I'm using kate 2.5.5, Qt 3.3 , gcc 4.1.1 on kde 3.5.5
I wondered this plugin for a long time... thanks :) I installed it with ./configure, make and make install but when I launch kate, the plugin never appears in the plugin menu !!! I'm using kate 2.5.5 on kde 3.5.5 on Debian. Is ther something elle to do to install it ? devhil
After logout-login it should work or after you have executed 'kded --check'
1.-) ./sudo make uninstall 2.-) ./make clean 3.-) ./configure --prefix=/usr 4.-) ./make 5.-) ./sudo make install 6.-) start kate 7.-) enjoy
i add stack for it work as in VIM file kate-ctags-plugin-0.1/ctags/ctags2_part.cpp > /*! > * @class CTagsStack > * imlemented back go by ctags > */ > void CTagsStack::pushStep(KURL const & url, int strNum) { > StackNode *st = new StackNode(); > st->url = url; > st->numStr = strNum; > stack.push(st); > } > > int CTagsStack::popStep(KURL *url) { > if(stack.isEmpty()) return -1; > StackNode st = *stack.pop(); > *url = st.url; > return st.numStr; > } 196a215,216 > new KAction(i18n("return on 1 step back"), 0, 0, this, SLOT(slotStepBack()), > actionCollection(), "ctags_return_step"); 218a239 > m_stack.clearAllStep(); 243,244c264,271 < KURL url; < --- > KURL url, _url; > Kate::View *kv = m_view->m_win->viewManager()->activeView(); > if(kv) { > Kate::Document *kdoc = kv->getDoc(); > _url = kdoc->url(); > int strNum = kv->cursorLine(); > m_stack.pushStep(_url, strNum); > } 386a414,421 > void PluginKateCTagsInterface::slotStepBack( ) > { > KURL url; > int strNum = 0; > if((strNum = m_stack.popStep(&url))!= -1 ) { > openDocument(url, strNum); > } > } diff kate-ctags-plugin-0.1/ctags/ctags2_part.h kate-ctags-plugin-0.1.1/ctags/ctags2_part.h 44a45 > #include 57a59,78 > typedef struct StackNode > { > KURL url; > int numStr; > > } StackNode; > > typedef QPtrStack _CTagsStack; > > class CTagsStack > { > protected: > _CTagsStack stack; > public: > CTagsStack() { stack.setAutoDelete( TRUE ); } > void pushStep(KURL const & url, int strNum); > int popStep(KURL *url); > void clearAllStep() { stack.clear(); } > }; > 102c123 < --- > void slotStepBack(); 109c130 < --- > CTagsStack m_stack; and diff -r kate-ctags-plugin-0.1/ctags/ui.rc kate-ctags-plugin-0.1.1/ctags/ui.rc 5a6 > and set in action ctags_return_step ctrl+T
/usr/local/bin/bash ../libtool --silent --tag=CXX --mode=link g++ -Wno-long-long -Wundef -Wall -W -Wpointer-arith -O2 -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -o katectagsplugin.la -rpath /usr/local/lib/kde3 -module -avoid-version -module -no-undefined -R /usr/local/lib -R /usr/local/lib -R /usr/X11R6/lib -R /usr/X11R6/lib -L/usr/local/lib -L/usr/X11R6/lib ctags2_part.lo readtags.lo ctags2_widget.lo tags.lo ctagskinds.lo ctags2_widgetbase.lo -lkateinterfaces libtool: link: cannot find the library `' how to solve this?
Hi! I created a Kubuntu deb for the interested :) http://www.kolumbus.fi/kare.sars/kate-ctags-plugin_0.1-0ubuntu1_i386.deb /Kåre
This really made my day thanks! Regards, Kåre
/bin/sh ../libtool --silent --tag=CXX --mode=link g++ -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -o katectagsplugin.la -rpath /usr/kde/3.5/lib/kde3 -module -avoid-version -module -no-undefined -Wl,--no-undefined -Wl,--allow-shlib-undefined -R /usr/kde/3.5/lib -R /usr/kde/3.5/lib -R /usr/qt/3/lib -R /usr/lib -L/usr/kde/3.5/lib -L/usr/qt/3/lib -L/usr/lib -Wl,--as-needed -Wl,--enable-new-dtags ctags2_part.lo readtags.lo ctags2_widget.lo tags.lo ctagskinds.lo ctags2_widgetbase.lo -lkateinterfaces .libs/ctags2_part.o: In function `PluginKateCTagsInterface::getFileLineFromPattern(KURL const&, QString const&)': ctags2_part.cpp:(.text+0x49bb): undefined reference to `Kate::application()' ctags2_part.cpp:(.text+0x4ad5): undefined reference to `Kate::application()' collect2: ld returned 1 exit status make[2]: *** [katectagsplugin.la] Error 1 KDE 3.5.5.
The 'undefined references' are caused by missing KDE_EXPORT macros in the Kate application interfaces. Fixed for KDE 3.5.6. You can also apply the patch [1] in kdebase/kate/interfaces and recompile Kate. [1] http://www.gmdsoft.de/haumann/kde/kate-interface-exports.diff
Nicely done! I would have defaulted the --c++-types option to --c++-types=+cdefgmnpstuvx but that's minor. Thanks.
Well I would if I knew what the parameters meant...