Author Topic: Questions about features  (Read 5058 times)

Offline HighCommander4

  • Single posting newcomer
  • *
  • Posts: 5
Questions about features
« on: November 08, 2008, 08:49:48 pm »
Hello everyone,

I'm considering switching to Code::Blocks as my IDE, and I was wondering whether it has the following features:

1) Checking for compiler errors on the fly, i.e. underlying any errors I make in red right after I type it (not sure what the proper term for this is).*
2) Support for Subversion, i.e. committing files to the repository from within Code::Blocks.

Thanks in advance for the info.

* a quick Google search told me that NetBeans calls this feature "live parsing", and Visual Studio calls this feature "incremental compilation" - I hope you get the point
« Last Edit: November 08, 2008, 09:28:09 pm by HighCommander4 »

Offline HighCommander4

  • Single posting newcomer
  • *
  • Posts: 5
Re: Questions about features
« Reply #1 on: November 10, 2008, 06:37:49 am »
I downloaded Code::Blocks and don't see either of these features... does Code::Blocks not have them, or do I just not know how to activate them? Are there perhaps plugins that do these things?

mariocup

  • Guest
Re: Questions about features
« Reply #2 on: November 10, 2008, 08:05:50 am »
Hi,

for windows there is already an unofficial SVN plugin for Code::Blocks that works well.

http://tools.assembla.com/svn/CBTortoiseSVN/CBTortoiseSVN/trunk

Bye,

Mario

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Questions about features
« Reply #3 on: November 10, 2008, 10:02:09 am »
Your other request is unlikely to be implemented any time soon, if ever. It's a feature that requires specific support from the compiler, and most compilers at this time do not offer such support, while the ones that do support it do not have a standard interface, nor document it in any way.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline HighCommander4

  • Single posting newcomer
  • *
  • Posts: 5
Re: Questions about features
« Reply #4 on: November 10, 2008, 07:23:43 pm »
Your other request is unlikely to be implemented any time soon, if ever. It's a feature that requires specific support from the compiler, and most compilers at this time do not offer such support, while the ones that do support it do not have a standard interface, nor document it in any way.

That's unfortunate. Does anyone know of a multi-platform, open-source IDE that does support this? The only one I know of is Visual Studio, which fails on both accounts (and NetBeans turns out to only do it for Java, not C++).

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Questions about features
« Reply #5 on: November 10, 2008, 07:31:31 pm »
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Questions about features
« Reply #6 on: November 10, 2008, 08:13:31 pm »
Actually, that feature of highlighting errors while you write the program was one of the things I wanted to implement in the new Code Completion plugin. However, I changed the project from a full parser to a full preprocessor, and now I don't have the time to work on the parser.

It'd be of great help if the compiler offered an interface to ease the process, but, also, writing a very complete parser would make this IDE rock a lot more than it does right now. Error highlighting and code completion as it would be just the beginning. Refactoring, call graphs and even suggestions (optimal member alignment comes to my mind right now) would also be possible.

Convince my boss to pay me to work on that instead, and I'll do it :wink:

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Questions about features
« Reply #7 on: November 11, 2008, 12:55:45 pm »
Visual Studio has the advantage that it can reuse the compiler's parser which it just keeps mapped in RAM. Obviously, there's no way we can do such a thing, because Microsoft certainly won't give anyone enough information to do it.
However, I've heard a friend's cousin's sister say her neighbour told her some guy on the gcc team is allegedly working on some voodoo which might make such a thing possible with gcc some distant day in the future. Though, until we see a working, stable, usable version of it, it's all just talk.
There are modified versions of gcc which let you export their parse data, but they're terribly inefficient for this scenario. Seeing that you want to check syntax as you type, this would mean having to spawn at least 1-2 processes per second (assuming you batch several keypresses into one scan) each of which starts a full parse (possibly reading through 200 include files) and writes out data, which you parse again.

Writing a custom parser is all nice and well, but like everything it has advantages and disadvantages. Compilers have quite a wide range both of implementation details and standard compliance, and often they're seriously tuneable on their behaviour, too. What compiles fine with one may not compile with another at all, or produce a warning, this is no secret. Now, a custom parser would be expected to deal with this in some way, which isn't easy.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline HighCommander4

  • Single posting newcomer
  • *
  • Posts: 5
Re: Questions about features
« Reply #8 on: November 11, 2008, 05:36:15 pm »
I was reading this article the other day about gcc planning to do this:
http://www.spindazzle.org/greenblog/index.php?/archives/74-Interview-GCC-as-an-incremental-compile-server.html

I wonder how Eclipse CDT does it, seeing as they don't provide a compiler?
« Last Edit: November 11, 2008, 05:38:02 pm by HighCommander4 »

Offline HighCommander4

  • Single posting newcomer
  • *
  • Posts: 5
Re: Questions about features
« Reply #9 on: November 18, 2008, 03:36:52 am »
The Eclipse CDT.

I wonder how Eclipse CDT does it, seeing as they don't provide a compiler?

I tried the Eclipse CDT. They seem to provide their own parser which works independently of the actual compiler you use. Sadly, it's not very good: it seems to only detect syntax errors, not semantic errors (so if I leave out a semicolon, it will detect that immediately, but if I try to call a bogus method on an object, it will accept that silently and complain only when I build the project).

The refactoring abilities are fairly buggy too: I tried to Refactor->Rename a method, and it ended up changing calls to methods of other classes with the same name to the new name as well (how is Code::Blocks with that, by the way?)

I'm afraid I may end up being stuck with Visual Studio after all... and with who knows what when I decide to port my program to Mac... :(