tags:

views:

43

answers:

1

hi,

I'm using GNAT Programming Studio to update some ada files. I have a style check, which for these old files produces literally thousands of warnings. Helpfully GPS has a little auto fix 'wrench' icon in the locations view, that's great but I don't want to go through and click the wrench ten thousand times.

Is there a way to have it correct these errors automatically without me having to click each wrench? They are all right so I want to be changed automatically.

I saw some documentation saying you could do it: http://www.adacore.com/wp-content/files/auto_update/gps-docs/Code-Fixing.html

But I don't get the auto fix option when I right click. Maybe you need the pro version? I've tried everything I can think of.

This would save hours of work, so it's really appreciated if someone could help on this.

Thanks!

+1  A: 

(This isn't an answer, just an observation :-)

According to an AdaCore Developer Center posting, "An auto fix is now offered for messages like 'suggested replacement', automatically applying the replacement suggested by the compiler." That notice was posted 24 Feb 2009.

If you're not using GNAT Pro, I'm assuming you're using GNAT GPL 2009, which was released at the end of May 2009. Now there's two months between those dates, but generally AdaCore seems to (and understandably) upgrades their Pro version before migrating the upgrades into their GPL version. So that's my guess as to why you're not seeing that option in GPS.

So...you can move to GNAT Pro, wait for GNAT GPL 2010 (I've not heard anything about that yet, but I'd like to think it'll be out in a couple months), wait for someone else here who has an actual answer via scripting or something, or have one of your interns or minions do the clicking--unless you are a minion, in which case you're SOL.

Marc C
Thanks for the reply, yeah looks like I'll have to wait for the next free version or shell out for the pro version.
Richard