Code::Blocks  SVN r11506
Classes | Namespaces | Macros | Functions | Variables
codecompletion.cpp File Reference
#include <sdk.h>
#include <wx/tokenzr.h>
#include <wx/html/htmlwin.h>
#include <cbstyledtextctrl.h>
#include <editor_hooks.h>
#include <filegroupsandmasks.h>
#include <multiselectdlg.h>
#include "codecompletion.h"
#include "ccoptionsdlg.h"
#include "ccoptionsprjdlg.h"
#include "insertclassmethoddlg.h"
#include "selectincludefile.h"
#include "parser/ccdebuginfo.h"
#include "parser/cclogger.h"
#include "parser/parser.h"
#include "parser/tokenizer.h"
#include "doxygen_parser.h"
#include "gotofunctiondlg.h"
Include dependency graph for codecompletion.cpp:

Go to the source code of this file.

Classes

struct  CodeCompletionHelper::GotoDeclarationItem
 used to record the position of a token when user click find declaration or implementation More...
 

Namespaces

 CodeCompletionHelper
 

Macros

#define CC_CODECOMPLETION_DEBUG_OUTPUT   0
 
#define TRACE(format, args...)
 
#define TRACE2(format, args...)
 
#define REALTIME_PARSING_DELAY   500
 
#define TOOLBAR_REFRESH_DELAY   150
 
#define EDITOR_ACTIVATED_DELAY   300
 

Functions

bool CodeCompletionHelper::LessFunctionScope (const CodeCompletion::FunctionScope &fs1, const CodeCompletion::FunctionScope &fs2)
 
bool CodeCompletionHelper::EqualFunctionScope (const CodeCompletion::FunctionScope &fs1, const CodeCompletion::FunctionScope &fs2)
 
bool CodeCompletionHelper::LessNameSpace (const NameSpace &ns1, const NameSpace &ns2)
 
bool CodeCompletionHelper::EqualNameSpace (const NameSpace &ns1, const NameSpace &ns2)
 
wxChar CodeCompletionHelper::GetLastNonWhitespaceChar (cbStyledTextCtrl *control, int position)
 for OnGotoFunction(), search backward More...
 
xxxxx **begin result *wxChar CodeCompletionHelper::GetNextNonWhitespaceChar (cbStyledTextCtrl *control, int position)
 for OnGotoFunction(), search forward /* yyy More...
 
int CodeCompletionHelper::CompareStringLen (const wxString &first, const wxString &second)
 Sorting in GetLocalIncludeDirs() More...
 
bool CodeCompletionHelper::TestIncludeLine (wxString const &line)
 for CodeCompleteIncludes() a line has some pattern like below More...
 
bool CodeCompletionHelper::EditorHasNameUnderCursor (wxString &NameUnderCursor, bool &IsInclude)
 return identifier like token string under the current cursor pointer More...
 
static wxString CodeCompletionHelper::AutocompGetName (const wxString &selected)
 when user select one item in the suggestion list, the selected contains the full display name, for example, "function_name():function_return_type", and we only need to insert the "function_name" to the editor, so this function just get the actual inserted text. More...
 

Variables

static wxString g_GlobalScope (_T("<global>"))
 Scopes choice name for global functions in CC's toolbar. More...
 
static const char * cpp_keyword_xpm []
 
static const char * d_keyword_xpm []
 
static const char * unknown_keyword_xpm []
 
static const char * header_file_xpm []
 
int idMenuGotoFunction = wxNewId()
 
int idMenuGotoPrevFunction = wxNewId()
 
int idMenuGotoNextFunction = wxNewId()
 
int idMenuGotoDeclaration = wxNewId()
 
int idMenuGotoImplementation = wxNewId()
 
int idMenuOpenIncludeFile = wxNewId()
 
int idMenuFindReferences = wxNewId()
 
int idMenuRenameSymbols = wxNewId()
 
int idViewClassBrowser = wxNewId()
 
int idCurrentProjectReparse = wxNewId()
 
int idSelectedProjectReparse = wxNewId()
 
int idSelectedFileReparse = wxNewId()
 
int idEditorSubMenu = wxNewId()
 
int idClassMethod = wxNewId()
 
int idUnimplementedClassMethods = wxNewId()
 
int idGotoDeclaration = wxNewId()
 
int idGotoImplementation = wxNewId()
 
int idOpenIncludeFile = wxNewId()
 
int idRealtimeParsingTimer = wxNewId()
 
int idToolbarTimer = wxNewId()
 
int idProjectSavedTimer = wxNewId()
 
int idReparsingTimer = wxNewId()
 
int idEditorActivatedTimer = wxNewId()
 

Class Documentation

◆ CodeCompletionHelper::GotoDeclarationItem

struct CodeCompletionHelper::GotoDeclarationItem

used to record the position of a token when user click find declaration or implementation

Definition at line 262 of file codecompletion.cpp.

Collaboration diagram for CodeCompletionHelper::GotoDeclarationItem:
Class Members
wxString filename
unsigned line

Macro Definition Documentation

◆ CC_CODECOMPLETION_DEBUG_OUTPUT

#define CC_CODECOMPLETION_DEBUG_OUTPUT   0

Definition at line 65 of file codecompletion.cpp.

◆ EDITOR_ACTIVATED_DELAY

#define EDITOR_ACTIVATED_DELAY   300

◆ REALTIME_PARSING_DELAY

#define REALTIME_PARSING_DELAY   500

◆ TOOLBAR_REFRESH_DELAY

#define TOOLBAR_REFRESH_DELAY   150

◆ TRACE

#define TRACE (   format,
  args... 
)

◆ TRACE2

#define TRACE2 (   format,
  args... 
)

Definition at line 89 of file codecompletion.cpp.

Variable Documentation

◆ cpp_keyword_xpm

const char* cpp_keyword_xpm[]
static
Initial value:
= {
"16 16 2 1",
" c None",
". c #04049B",
" ",
" ....... ",
" ......... ",
" .. .. ",
".. ",
".. .. .. ",
".. .. .. ",
".. ...... ......",
".. ...... ......",
".. .. .. ",
".. .. .. ",
".. .. ",
"... .. ",
" ......... ",
" ....... ",
" "}

Definition at line 284 of file codecompletion.cpp.

◆ d_keyword_xpm

const char* d_keyword_xpm[]
static
Initial value:
= {
" 14 14 6 1",
" c none",
". c #fefefe",
"# c #e43a3a",
"a c #e40000",
"b c #e48f8f",
"c c #8f0000",
" ",
" ",
" .#aaaa#b. ",
" baabb#aa# ",
" ba# baa# ",
" ba# bcab ",
" ba# #a# ",
" ba# bac ",
" ba# ba# ",
" ba# bc# ",
" ba# #cb ",
" bcc ac# ",
" #aa###ac# ",
" cccccc#b "
}

Definition at line 307 of file codecompletion.cpp.

◆ g_GlobalScope

wxString g_GlobalScope(_T("<global>"))
static

Scopes choice name for global functions in CC's toolbar.

Referenced by CodeCompletion::FindFunctionAndUpdate(), and CodeCompletion::ParseFunctionsAndFillToolbar().

◆ header_file_xpm

const char* header_file_xpm[]
static
Initial value:
= {
"16 16 9 1",
" c None",
"+ c #D23E39",
"$ c #CF0C0A",
"@ c #CB524B",
"& c #E2D8D8",
"# c #C7C7C4",
"_ c #E4B9B5",
"- c #F7F9F7",
"= c #EBE9E7",
" ######### ",
" #=-----#### ",
" #--------=## ",
" #--------=-# ",
" #--=@_-----# ",
" #--=+_-----# ",
" #--=++@_---# ",
" #--&$@@$=--# ",
" #--&$__$&=-# ",
" #--&$__$&=-# ",
" #--&$__$&=-# ",
" #-==#=&#==-# ",
" #-========-# ",
" #----=====-# ",
" ############ ",
" "}

Definition at line 366 of file codecompletion.cpp.

◆ idClassMethod

int idClassMethod = wxNewId()

Definition at line 413 of file codecompletion.cpp.

◆ idCurrentProjectReparse

int idCurrentProjectReparse = wxNewId()

Definition at line 409 of file codecompletion.cpp.

◆ idEditorActivatedTimer

int idEditorActivatedTimer = wxNewId()

Definition at line 423 of file codecompletion.cpp.

◆ idEditorSubMenu

int idEditorSubMenu = wxNewId()

Definition at line 412 of file codecompletion.cpp.

◆ idGotoDeclaration

int idGotoDeclaration = wxNewId()

Definition at line 415 of file codecompletion.cpp.

◆ idGotoImplementation

int idGotoImplementation = wxNewId()

Definition at line 416 of file codecompletion.cpp.

Referenced by CodeCompletion::OnGotoDeclaration().

◆ idMenuFindReferences

int idMenuFindReferences = wxNewId()

Definition at line 405 of file codecompletion.cpp.

◆ idMenuGotoDeclaration

int idMenuGotoDeclaration = wxNewId()

Definition at line 402 of file codecompletion.cpp.

Referenced by CodeCompletion::OnGotoDeclaration().

◆ idMenuGotoFunction

int idMenuGotoFunction = wxNewId()

Definition at line 399 of file codecompletion.cpp.

◆ idMenuGotoImplementation

int idMenuGotoImplementation = wxNewId()

Definition at line 403 of file codecompletion.cpp.

Referenced by CodeCompletion::OnGotoDeclaration().

◆ idMenuGotoNextFunction

int idMenuGotoNextFunction = wxNewId()

Definition at line 401 of file codecompletion.cpp.

◆ idMenuGotoPrevFunction

int idMenuGotoPrevFunction = wxNewId()

Definition at line 400 of file codecompletion.cpp.

◆ idMenuOpenIncludeFile

int idMenuOpenIncludeFile = wxNewId()

Definition at line 404 of file codecompletion.cpp.

◆ idMenuRenameSymbols

int idMenuRenameSymbols = wxNewId()

Definition at line 406 of file codecompletion.cpp.

◆ idOpenIncludeFile

int idOpenIncludeFile = wxNewId()

Definition at line 417 of file codecompletion.cpp.

◆ idProjectSavedTimer

int idProjectSavedTimer = wxNewId()

Definition at line 421 of file codecompletion.cpp.

◆ idRealtimeParsingTimer

int idRealtimeParsingTimer = wxNewId()

Definition at line 419 of file codecompletion.cpp.

◆ idReparsingTimer

int idReparsingTimer = wxNewId()

Definition at line 422 of file codecompletion.cpp.

◆ idSelectedFileReparse

int idSelectedFileReparse = wxNewId()

Definition at line 411 of file codecompletion.cpp.

◆ idSelectedProjectReparse

int idSelectedProjectReparse = wxNewId()

Definition at line 410 of file codecompletion.cpp.

◆ idToolbarTimer

int idToolbarTimer = wxNewId()

Definition at line 420 of file codecompletion.cpp.

◆ idUnimplementedClassMethods

int idUnimplementedClassMethods = wxNewId()

Definition at line 414 of file codecompletion.cpp.

◆ idViewClassBrowser

int idViewClassBrowser = wxNewId()

Definition at line 407 of file codecompletion.cpp.

◆ unknown_keyword_xpm

const char* unknown_keyword_xpm[]
static
Initial value:
= {
"16 16 7 1",
" c None",
". c #FF8800",
"+ c #FF8D0B",
"@ c #FF9115",
"# c #FFA948",
"$ c #FFC686",
"% c #FFFFFF",
" ",
" ",
" .... ",
" ........ ",
" ..+@+..... ",
" .+#$#+.... ",
" ..@$%$@..... ",
" ..+#$#+..... ",
" ...+@+...... ",
" ............ ",
" .......... ",
" .......... ",
" ........ ",
" .... ",
" ",
" "}

Definition at line 338 of file codecompletion.cpp.