User forums > Using Code::Blocks

SmartSense/IntelliSense/CodeCompletion

<< < (3/4) > >>

killerbot:
did you save first, will try out my self later on

mann:
hello my friends,

ok thank you for answer. my colleagues and I have decided to stick to visual studio and use anjuta for the linux development of our project for now. but maybe we will reconsider codeblocks when version 2.0 has been released and code completion works more reliably. thank you for your work,

greetings from hokkaido

killerbot:

--- Quote from: Aboq on January 05, 2007, 01:20:47 pm ---Another Problem: Function Parameter display doesnt work right

void tester(int testparam) {
  // do something
}

void main() {
  // i enter tester( -> no parameters displayed
  // i delete ( and enter ( -> parameters are now displayed
}


--- End quote ---

I can confirm. I think I know why.
When I typed tester, after the test the CC popped up suggesting 'tester', however I kept on typing, so I typed tester, after the r was typed in the CC tooltip was still there. When I type the ( -> tooltip dismissed but the ( apparently did not trigger new CC tooltip for the arguments. When I then erase the ( and type it again, itworks. The ( in this case didn't had to clean up a previous tooltip.

Other test, instead of typing tester completely, I choose the tooltip suggestion that popped up after the 'test' (be hitting enter), so the tooltip was gone, after that enter-key I typed the ( and CC kicked in for the arguments.


@Yiannis, hope this gives you enough information to fix it ??

Alturin:

--- Quote from: mandrav on January 05, 2007, 09:04:13 am ---Typedefs are supported.

--- End quote ---


--- Code: ---struct test_struct
{
    int first;
    int last;
    int percentage;
    char* text;
};

typedef struct test_struct MY_TEST_STRUCT;

int main()
{
    MY_TEST_STRUCT testOne;
    testOne. // hit ctrl-space, nothing happens, but code-completion DOES recognise it as a symbol (it shows up as local variable)

    return 0;
}

--- End code ---


--- Code: ---struct test_struct
{
    int first;
    int last;
    int percentage;
    char* text;
};

typedef struct test_struct MY_TEST_STRUCT;

int main()
{
    struct test_struct testTwo;
    test // hit ctrl-space, nothing happens, code-completion does not even recognise testTwo as a local variable

    return 0;
}

--- End code ---


--- Code: ---struct test_struct
{
    int first;
    int last;
    int percentage;
    char* text;
};

typedef struct test_struct test_struct;

int main()
{
    test_struct testThree;
    testThree. // hit ctrl-space, the list of available variables shows up

    return 0;
}

--- End code ---


--- Code: ---struct test_struct
{
    int first;
    int last;
    int percentage;
    char* text;
};

int main()
{
    test_struct testFour;
    testFour. // hit ctrl-space, the list of available variables shows up

    return 0;
}

--- End code ---

So, I don't really see in what way typedefs are supported :(.
Apparent from test three and four it doesn't really parse the typedef, it just assumes it's there somehow?
It would be really superb to have typedef support, that is, testOne. completing properly.

TDragon:

--- Quote from: Alturin on May 27, 2007, 09:03:55 pm ---So, I don't really see in what way typedefs are supported :(.

--- End quote ---
Typedefs are certainly supported; it's C-style struct specifiers ("typedef struct test_struct blah;") that aren't. The typedef line is not recognized in any of the first three samples because of this; the last two examples work because "test_struct" is directly recognized as the previously declared struct -- which is entirely correct in C++ (except that the struct definition lacks a semicolon after the closing curly brace).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version