Bug 111205 - Have "Reformat source" obey katepart indentation options
Summary: Have "Reformat source" obey katepart indentation options
Status: RESOLVED LATER
Alias: None
Product: kdevelop
Classification: Applications
Component: Astyle (show other bugs)
Version: 3.2.1
Platform: Unlisted Binaries Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 133182 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-21 12:55 UTC by greatbunzinni
Modified: 2008-06-30 01:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description greatbunzinni 2005-08-21 12:55:37 UTC
Version:           3.2.1 (using KDE KDE 3.4.2)
Installed from:    Unspecified Linux

When I run "reformat source code" in a text file, it generates all indentation with space characters instead of tab characters, although KDevelop's options state that all indentations are done by tabs.
Comment 1 Matt Rogers 2005-08-21 17:59:03 UTC
you have to make sure it's configured properly. The "Reformat source code" option doesn't use the settings from the editor.
Comment 2 greatbunzinni 2005-08-22 11:35:43 UTC
but isn't that an inconsistency? If the program uses at least two separate sets of settings to act on the same options and behaviour, not only it will bring confusion to the user's but it also will make the usage and configuration a lot harder and absolutely not intuitive. Isn't there a plan to fix this bug?
Comment 3 Amilcar do Carmo Lucas 2005-08-22 13:25:48 UTC
KDevelop can use 3 diferent editors currently. These present three diferent configuration dialogs. But it can use even more as long as there is a ktexteditor interface to them. I've heard that there is a emacs-ktexteditor interface, that would be our fourth editor.

What you want is for us to parse all the settings of these editors and discover which one affects the indentation, and then trconfigure astyle (source formatter) according to it ?

It seams to bee too much work, for such a simple thing. And it will stop working as soon as a new editor comes out.

Comment 4 greatbunzinni 2005-08-25 00:35:47 UTC
Yes, it seems to be too much work and not an easy task. Still, it isn't all that nice if there are options scattered through kdevelop which aren't usable.
Comment 5 greatbunzinni 2006-05-01 18:55:57 UTC
Forgive me for reopening the bug but I've realized something. Couldn't this problem be solved just by running the "Tools"->"Clean indentation" routine after running the "Edit"->"Formato Sourcecode" routine?
Comment 6 Matt Rogers 2006-10-15 07:28:00 UTC
*** Bug 133182 has been marked as a duplicate of this bug. ***
Comment 7 Jens Dagerbo 2006-12-16 19:46:26 UTC
Re comment #5: yes, in theory. The problem is that "clean indentation" is a dynamically added action that KDevelop knows nothing about. To access non-exposed features of a dynamically loaded plugin is nasty business.. really only justified in very special cases. 
Comment 8 Jens Dagerbo 2006-12-16 19:47:55 UTC
Btw, I think this is a wish. Changing subject accordingly.
Comment 9 Andreas Pakulat 2008-06-30 01:12:12 UTC
I don't see this happening at all, we don't control astyle and we don't control the editors indentation setting. If somebody has a bright idea how to fix this, please re-open.