profile-image

adroot

andrei dmitriev Moscow, Russian Federation
kate cppdevelop plugin

Developer Tools 18 comments

Score 72%
72 Likes
28 Dislikes
Jul 19 2007
You have two ways
1 select highlighting as C++
2 in method CppView::slotDocChanged
exists QString hlModeName = kv->hlModeName(hlMode); where hlModeName - is Kate highlighting for source - Feb 06 2008
thanks, I'm fix and it :) - Feb 05 2007
i fix it.
sorry what can't answer you earlier,

ps. nice avatar :) - Feb 05 2007
Sorry, I bad speek English and I have betraid not correct value to a word "replacement", i correct this as "alternative"
- Jan 22 2007
thanks! - Jan 19 2007
you KDE < 3.3 or > 3.5 ? - Jan 19 2007
good this
QRegExp rxMacro( "^#\\s*define\\s+([^\\s\\r\\n]+)" ); - Jan 19 2007
replace 152 str on
QRegExp rxMacro( "^#\\s*define\\s([^\\s\\r\\n]+)" ); - Jan 19 2007
Kate CTags Plugin

Text Editors 16 comments

Score 79%
79 Likes
21 Dislikes
Feb 09 2007
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 - Jul 23 2007
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 - Jan 18 2007