Advertisement

AngelScript coding with Code::Blocks

Started by June 23, 2012 04:21 AM
1 comment, last by TheAtom 12 years, 5 months ago
Hi,

I got frustrated with text editors and decided to try see what IDEs can do for angelscript.
I tested QtCreator, Visual Studio, Eclipse, Netbeans.
All of them crumbled in the sight of a single '@'.

So i thought "Well if i change the their parser enough to recognize @ as * or &, it would work"

I did just that.
QtCreator: got it working, but QtCreator is not a very good IDE, missing a lot of features i want.
Eclipse: uses clang hinting and codecompletion, as i understood it i did not let me change its parser. ( i may be wrong)
Netbeans: huge project, i got lost in it. i hope return this at a later date
Visual Studio: does not have settings to alter parser settings, poor handling of @. With VassistX works better but still crappy + slow

i was left two choices, CodeLite and Code::Blocks.
CodeLite already comes with @ support. But it lacks features of Code::Blocks.
CodeLite code completion had flaws (ctags). did not show built-in types, did not filter variables by scope, code outline was slow and worked %50 of the time, Refactor did not work for angelscript stuff

I settled with Code::Blocks, simple changes in parser was enough to get what i wanted
here is the product of my adventurous day:

win32
https://docs.google....RTBNNjh0a284Vnc (11 mb)
my settings, put this file at C:\Users\[username]\AppData\Roaming\CodeBlocks (highlight, *.as extension etc..)
https://docs.google....TTd5Ny12dEVmSkE
source:
https://docs.google.com/open?id=0B3MVwL3eqJwFX1JjV212ZmRHWjg

code completion
as1.png
outline
as2.png
function parameter help
as3.png
jumping and find references and rename
as4.png
many more...

Caveat:
AngelScript does not need ; end of class implementation, it still compiles with semicolons. Code::Blocks parser expects semicolon end of class decleration. I could not find a way to disable it without breaking Code::Blocks' c++ support. just place a ; end of your classes.

I hope it will be useful to someone.
Nice! :)

I've added a link to this post on the wiki.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement
saejox: which MSVC have you tried? Since MSVC2010, the parser can't handle '@' at all and is pretty much unable to read AS code. However in all the previous releases the parser simply ignores '@' and that's fine for most practical purposes - handles are treated as value types and autocomplete expects '.' operator to drop down the method names. From there, not much work is needed to enjoy the full capabilities of this excellent IDE (autocompletion, code lookup, jumping to code/definition, listing all references, class view list, you name it). Combine with autogenerated headers for all classes registered to AS engine. I wrapped it up here:
http://www.gamedev.net/topic/594639-symbols-table-andor-syntax-tree/page__view__findpost__p__4806355
and some screens:
http://www.gamedev.net/topic/603001-creating-as-ide-thoughts/page__p__4817006#entry4817006
(yes, it's about the n-th time I link to these posts, propaganda must flow).

This topic is closed to new replies.

Advertisement