PDA

View Full Version : Artistic Style Plugin



Lykurg
17th March 2010, 18:56
Hi there!

Finally I did it myself since I waited long enough... I have created a plugin for creator that formats your code with the great tool Artistic Style. Such a plugin was terrible missing by me, since I am so lazy to keep a consistent structure in my files. :rolleyes:

Right now the plugin is very basic and only have a poor looking configure page. But I will work on it. Also binary versions for the Qt sdk's creator will follow. For now, you have to compile it yourself, but if you want to have a look at it: http://astyleplugin.berlios.de (http://astyleplugin.berlios.de/)

Enjoy,

Lykurg

Lykurg
19th March 2010, 18:13
Hey,

just release version 0.2! New Stuff:
The cursor stays now at the same row after formating and is not jumping around.
I have created a new settings page which is now readable...:cool:
Binaries for Linux SDK and Windows SDK (32 bit): Now you can easily use Artistic Style Plugin with the creator which is bundled in the SDK's. Just extract the downloaded archive in the root directory.



http://astyleplugin.berlios.de


Lykurg

Lykurg
20th March 2010, 17:28
So, here we go again. Version 0.3 is out. I fixed two bugs and do some small enhancements.

http://astyleplugin.berlios.de

Lykurg

Lykurg
29th April 2010, 19:49
Ok, release 0.4 with one speed and one convenience improvement is out!

Lykurg

P.s.: Since I had get my first MacBook Pro that week, I have planed also to release a binary for OS X. Unfortunately mac development is not so easy as thought :( The next weeks I also wont have time to take care about. So if any of you are familiar with creating a creator plugin for OS X, it would be nice if you could post a minimalistic howto... That would speed up things.

Lykurg
9th August 2010, 07:36
Hi,

recently I released 0.5.1 with some bugfixes and improvements. Qt Creator 2.0.0 is now also supported.

Download the Binary for creator 2.0.0 and windows. (http://prdownload.berlios.de/astyleplugin/ArtisticStylePlugin-0.5.1-qtc200-windows32.zip)

Lykurg

Lykurg
20th February 2011, 21:38
So finally I managed to spend some more time on the plugin. Thus it works now with the new creator version 2.1.0 and it works properly when the code is folded. So check out the new version 0.6!

Olivia
27th April 2011, 12:42
Ok, release 0.4 with one speed and one convenience improvement is out!

Lykurg

P.s.: Since I had get my first MacBook Pro that week, I have planed also to release a binary for OS X. Unfortunately mac development is not so easy as thought :( The next weeks I also wont have time to take care about. So if any of you are familiar with creating a creator plugin for OS X, it would be nice if you could post a minimalistic howto... That would speed up things.

Any news about Mac OS X version?

madrich
22nd August 2011, 15:15
Hi,

the PlugIn is realy great. But, after updateing to QtC 2.2 it isn't working anymore.
Is there any plan to port for the latest QtCreator version?

Best, Richard

fonzi337
3rd April 2012, 19:57
I know this is an old thread, but I'm interested in this as well. Having a Qt Creator plugin for automatic code style checking seems the best way to go. Has any progress been made on this? Are there other tools/plugins out there that are recommended for Qt/C++ style checking?

wysota
3rd April 2012, 22:19
As far as I know Lorenz is currently working on a new version of the plugin.

Lykurg
3rd April 2012, 23:15
I doooooooo (http://www.youtube.com/watch?v=o9ItbbkHl5Q, 0:13)! But the goals are so high.... I guess I will need some weeks. So I will hurry up to release a beta, which should do the basic stuff.

fonzi337
4th April 2012, 00:57
I'm glad to hear this project is still alive. :) I have a few questions though. I'm mainly wondering how extensive the styling options are. The screenshots at the Artistic Style Plugin website seem to indicate that indentation is, for the most part, all the formatting the plugin does. Is this indeed the case? What about enforcing CamelCase for variables? The "m_" prefix for private data members? Ensuring pointer declarations are written as "int* myType" vs. "int * myType" or "int *myType"? The placement of curly braces? These are just some examples of the auto-formatting capabilities I am looking for. It would be fantastic if all these coding styles could be specified with this plugin. :)

Lykurg
4th April 2012, 07:25
It is just a wrapper around Artistic Style. For its options see http://astyle.sourceforge.net/astyle.html.

CamelCase and "m_" are not supported, since it is too dangerous and you can't be sure that all occurrences get updated. Unless you program a real compiler...

Lykurg
18th February 2013, 16:11
8729



Ehm, almost a year later... BUT after a week of pure developing it is ready! Version 1.0.0 - because is sounds nicer then 0.7:D

Almost an entire rewrite. Now supports astylerc files defind by OTHER_FILES in the pro file. Looks for astylerc file in the users home directory. It can format a whole (Qt based) project, etc. etc.

Visit astyleplugin.sourceforge.net (http://astyleplugin.sourceforge.net)! (A git repository will follow.)

Lykurg
21st March 2013, 20:00
Hi,

just updated to version 1.0.1 and uploaded binary packages to work with the new Qt Creator 2.7.0.

tahayassen
27th April 2013, 03:44
Thank you!!! :) This application is perfect.

Lykurg
5th May 2013, 18:30
Just uploaded a new version which uses Artistic Style 2.03. Enjoy!

ghassenus
27th November 2013, 19:03
hi thank's for this plugin
but i have a little problem with it it doesn't recognize the arrow operator (->) so when i try to apply (-pad-ope), it arrange all operators except the arrow

Lykurg
29th November 2013, 10:28
Hi, unfortunately I do not develop artistic style. Have you tried if the problem also exist if you call astyle? If so please post a bug report at http://sourceforge.net/p/astyle/bugs/. Also please do use the latest 2.0.4 release. I noticed my plugin uses an older version...

Currently I am working on a replacement. It hopefully is available after the Christmas Holidays.

Best

Lykurg
15th December 2013, 12:09
Well, it is not the replacement, but I have uploaded a new version which works with QtC 3.0.0. The plugin now uses Artistic Style 2.04.

The downloads you'll find at the sourceforge page as usual.

Best

ghassenus
25th February 2014, 22:26
thx
i'll try it