how to access the editor configuration from the cppsupportpart.cpp
F@lk Brettschneider
falk.brettschneider at gmx.de
Wed Dec 18 21:39:03 UTC 2002
Hi Andreas!
Roberto Raggi wrote:
>On Wednesday 18 December 2002 18:21, Andreas Wuest wrote:
>
>
>>>if the bug is related to qeditor you can fix it in kdevelop/part/qeditor
>>>or if
>>>it is a kate's bug you must look in kdelibs/kate/part
>>>
>>>
>>the problem cannot be solved in qeditor or the kate part because the
>>problem is the following one : creating a new method in the cppsupportpart
>>inserts the method definition into the header file. The string that will
>>be inserted is created in the cppsupportpart and unfortunately the
>>there the indention is hardcoded ("\t"). The correct solution would be
>>to look up in the configuration what indention has been configured.
>>depending on that configuration we have to use spaces or tabs to
>>indent the header definition and for this you need access to the
>>editor (indention) configuration. So how can i get the configuration
>>in the cppsupportpart ?
>>
>>
>
>i'm sorry Andreas, but you can't access to indent configuration with current
>KTextEditor interface :(
>
I wouldn't it like if the cppsupportpart knows about all the editors and
how they can be accessed. It results in a huge switch statement for the
single editors.
Better is to extend the KTextEditor interface with a for instance
putStringInFile(const QString& text, int line, int column) method. Then
the editor can handle it by itself (or not).
Ciao
F at lk
More information about the KDevelop-devel
mailing list