Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
When include a file, auto add matching brackets
Loaden:
In the #include statement:
When entering the #include <xxxx.h| , auto add the ending matching bracket.
As we know, if include a file, like this:
#include "someheader.h
Then, the CC tip's will show "someheader.h" in the Tip Window.
But when we selected it, it's only change to:
#include "someheader.h // HERE, lose a " or >
If we apply this patch, it's can auto completion the matching brackets.
Like this:
#include "someheader.h"
OR
#include <someheader.h>
EDIT: fix, when type some char, it will failed.
[attachment deleted by admin]
Loaden:
Fix a bug, now it will works well.
killerbot:
Although I didn't try the patch out, this would indeed be nice. Question when the closing "> is added, I assume the cursor is behind it so I don't 'enter' the closing "> to the next line ?
I was wondering what you and others think of this (some of my personal irritations ;-) ).
I typically structure a project like this :
Project-Dir with the following subdirs :
* Project (contains the cbp file)
* src (contains *.cpp and .h[that don't need to be exported]
* inc (contains *h[that are to be exported, typical use : when the project is a static lib or dll]
Use case 1 :
I am working on a file in the src dir, when I want to include a header file it gives them to me as "../src/header.h". This is correct but I like it to be normalized/reduced --> ../src is where I am at the moment, so I just want "header.h"
Use case 2 :
I added for example the inc directory of another component to the list of include/search directories.
I want to include in a source file in the src directory of my current project a header from that other component.
Not even 1 header file from the added include directory shows up. It would be nice those would pop up to.
Use case 3 :
In the ultimate case when I start an include with < , I would like to see the C/C++ headers too in the list.
I have type already so many times vector, string, iostream, .... ;-)
What do you guys think ?
Loaden:
About Use case 1 ~ 3:
Hi, killerbot, I need check the code, but now, i can't be sure it.
I will trying.
Loaden:
--- Quote from: killerbot on May 02, 2010, 09:35:59 am --- Question when the closing "> is added, I assume the cursor is behind it so I don't 'enter' the closing "> to the next line ?
--- End quote ---
Yes, if completion the right brace, the caret is here:
#include <some.h>|
Navigation
[0] Message Index
[#] Next page
Go to full version