There are several threads on the forum about this, but documentation and examples are only a google away:
E.g.:
http://fun-tech.se/stm32/index.phphttp://vedder.se/2012/04/setup_arm_toolchain/If you don't want to use the lite Codesourcery toolchain (limited) and don't want to compile your own GCC-based one (not hard, but takes a while), there are plenty of precompiled ones available. E.g. here:
https://launchpad.net/gcc-arm-embeddedYou will want a bare metal toolchain - i.e. arm-none-eabi, not arm-linux-eabi or something like that. Don't bother with Clang/llvm - the bare metal ARM toolchains are pretty much non-existent and unsupported. GCC is very much the industry standard.
I have also posted how to use OpenOCD + GDB to debug, check my past posts.
Re IDE - that depends, most people use Eclipse, the SW4ST is also Eclipse based. The second link above shows how to set Eclipse up as well.
I am not sure what you mean by "getting the libraries in there". You just download them, build them using your toolchain (you may have to either add the files to your project, make a library project in Eclipse/Netbeans or prepare your own makefile) and use them as normal. It is normal C programming, nothing special there.
I guess your post is more about how to use Netbeans/Eclipse than really ARM programming.