proposal for extension of KTextEditor interface

F@lk Brettschneider falk.brettschneider at gmx.de
Sun Jan 5 01:58:04 UTC 2003


Roberto Raggi wrote:

>On Sunday 05 January 2003 01:39, F at lk Brettschneider wrote:
>  
>
>>Roberto Raggi wrote:
>>    
>>
>>>On Sunday 05 January 2003 01:03, F at lk Brettschneider wrote:
>>>      
>>>
>>>>Hi!
>>>>FYI: Attached is the cool chat we had on 5/1/2003 about 1:00 MET. About
>>>>the problem with showing debugger variable value tooltips via the
>>>>texteditor interface...
>>>>Cheers
>>>>F at lk
>>>>        
>>>>
>>>wow.. i like the idea to have this kind of tooltip ;) i suggest to add to
>>>KTextEditor interfaces a method that describe how a "valid word" is made
>>>
>>>something like
>>> setWordValidator( const QValidator* wordValidator );
>>>      
>>>
>>Even cooler since it also reduces the number of signal emitting.
>>Although I don't have a clue how the validator could detect valid stuff
>>(variable names, expressions, ...) in native text. Do you already have
>>an idea how to do it?
>>    
>>
>
>maybe with something like
>
>// in cppsupport
>class CppExpressionsValidator: public QValidator{
>...
>    virtual State validate ( QString & input, int & pos ) const {
>         Context* ctx = computeContextFromCursorPosition( cursorPosition );
>         if( ctx->containsVariable( input ) ) 
>            return Acceptable;
>         ....
>    }
>}
>
>this works because validator is defined in kdevelop
>
Wow! Exactly what I was missing for the tooltip feature :-)
Now I just hope that gdb isn't too slow to result the value for the tooltip.
Ciao
F at lk






More information about the KDevelop-devel mailing list