Jump to content
Rinzwind

code completion?

Recommended Posts

I thought let's try out C++ Builder for fun. Downloaded Community edition, installed, created empty VCL application, code... and find out code completion/insight is not working at all. When hovering over a variable it says 'bla bla is being indexed' forever. When I change the compiler to classic it works again. Anyone else? Seems like a huge hindrance? Anyone where everything is working fine? The structure viewer is also missing things like buttons... which are there in Delphi.

  • Like 1
  • Sad 1

Share this post


Link to post

The flakey code completion is, as you say, a huge hindrance. Embarcadero are aware of this, hopefully it will be better in the coming version (11) (although community edition releases usually lag behind the subscription license versions a bit).

Your comment about missing things in the structure viewer is puzzling though. It's a bit of a vague description. Can you be more precise and/or post a screen shot or two?

Share this post


Link to post

When I type #include < characters get entered automatically that I don't want.  I'm not sure what this technology is called but it is a pain.  I have some of my own headers that I include with <> because they are used by multiple projects.  How is this turned off?  I have 10.4 Community.

  • Like 1

Share this post


Link to post

After typing #include < there is a selection box with file names.  If I ignore that something gets selected anyway and characters from a file name are inserted.  I would like to turn it off.

Share this post


Link to post

Checking up on this it seems that #include <xxx.h> is recommended for including standard headers only.  What are you trying to achieve by using this rather than the normal #include "xxx.h" syntax?

Share this post


Link to post

The <> syntax is used to include library headers and that can include your own library code shared by multiple projects.

Share this post


Link to post

Thought for fun let's quickly check the status of 11.1

 

I really wonder how the dare to publish the product like this. Open example project Notifications (C:\Users\Public\Documents\Embarcadero\Studio\22.0\Samples\CPP\VCL\Windows 10 Notifications\Notifications.cbproj).  Run, fine. Open Notifications.cpp. Lot's of 'errors' showns (while it runs fine), like 'vcl.h' file not found, unknown type name 'TComponent', etc etc. Trying code completions with MyNotification-> shows no class members at all. Am I missing something, or is this just the state it is in and C++ devs are expected to be impressed by this and try the product further? Nope...

 

 

  • Sad 1

Share this post


Link to post

Aah, it seems those errors and non-intellisense etc show case only with the classic 32 bit Borland C++ compiler, which happens to be selected by default for the 32 bit target :classic_blink: .  Then again, even using the 64 bit target, intellisense is way, WAY too slow to be usable. Code completion takes forever to show any suggestions (3 long seconds). Embarcardero is delusional if they think this is acceptable. Seems like no-one is using current versions of C++ Builder, aka a show of 'keeping up appearances'.

Share this post


Link to post

In 11.1  a new VCL project defaults to clang32 (not classic).

 

and I, for one, am an enthusiastic professional C++ programmer who uses Embarcadero RAD Studio 11.1.

 

It is true there is a "balance" between the classic compiler and clang compiler for Win32 VCL applications. Once you have used C++ 17 it is very painful to go back to the restrictions of the classic compiler though.....

Share this post


Link to post

Yeah it selected classic because it was an example project which weren't updated. The "new" tooling still needs a lot of work this little trial showed me. Could as well have no code completion if it lags that much.

 

They should embark on some new adventures, like support for D which is imho a much nicer and cleaner language than that horrible convoluted C++.

Share this post


Link to post

Thought let's try again in 11.2. It really is the most basic of tests. Start RAD Studio, new C++ Windows VCL project, drop a button, double click and try to get code completion to work correctly (*Button1->)

 

It won't. or at least not as it should. They can't sell this right? And their blah blah about how much it was improved for C++... I also only get '... is being indexed' tooltips when hovering over any object ID. CTRL+click also does not take you to the VCL definitions. Is it working for anyone here?

 

It seems to only work when I enable the classic compiler in project properties... flabbergasted about this quality level. Its been like this for years. They really don't sell C++ Builder anymore to anyone new to it?

Edited by Rinzwind

Share this post


Link to post

They say that you need to save the project first before it works. 

 

I'm running 11.2 and code completion is still poor.    For our large project it's indexing 300+ files,  taking min 10% CPU, hundreds of MB of disk space.  I just end up switching it off.

  • Thanks 1

Share this post


Link to post

Tried saving & compiling  & running.. still issues with the most basic scenario.

*Button1->

Also hovering over TObject now just gives a short 'Calculating...' tooltip, then nothing. Sounds all too familiar with previous versions. Anyone care to ask Embarcadero what is going on here?

Share this post


Link to post

Roger

 

I use

 

     Project Options - Building - C++ Compiler - LSP

 

and untick

 

  'Enable Project iNdexing for Navigation/Tooltip support'

  • Thanks 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×