Skip to content

Commit bcf22eb

Browse files
committed
Added some more debugging messages
Replaced abbreviation bitmap with new HiDPI one
1 parent 0e8cc61 commit bcf22eb

File tree

9 files changed

+364
-4
lines changed

9 files changed

+364
-4
lines changed

LiteEditor/cl_editor.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3990,12 +3990,14 @@ int LEditor::GetEOLByOS()
39903990

39913991
void LEditor::ShowFunctionTipFromCurrentPos()
39923992
{
3993+
clDEBUG1() << "Calling ShowFunctionTipFromCurrentPos..." << clEndl;
39933994
if(TagsManagerST::Get()->GetCtagsOptions().GetFlags() & CC_DISP_FUNC_CALLTIP) {
39943995

39953996
if(EventNotifier::Get()->IsEventsDiabled()) return;
39963997

39973998
int pos = DoGetOpenBracePos();
3998-
3999+
clDEBUG1() << "Brace open position is:" << pos << clEndl;
4000+
clDEBUG1() << "Firing wxEVT_CC_CODE_COMPLETE_FUNCTION_CALLTIP event..." << clEndl;
39994001
// see if any of the plugins want to handle it
40004002
clCodeCompletionEvent evt(wxEVT_CC_CODE_COMPLETE_FUNCTION_CALLTIP, GetId());
40014003
evt.SetEventObject(this);
@@ -4005,6 +4007,7 @@ void LEditor::ShowFunctionTipFromCurrentPos()
40054007
if(EventNotifier::Get()->ProcessEvent(evt)) return;
40064008

40074009
if(pos != wxNOT_FOUND) {
4010+
clDEBUG1() << "Using default behavior for wxEVT_CC_CODE_COMPLETE_FUNCTION_CALLTIP event" << clEndl;
40084011
m_context->CodeComplete(pos);
40094012
}
40104013
}

LiteEditor/context_cpp.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
#include "clEditorStateLocker.h"
8282
#include "clSelectSymbolDialog.h"
8383
#include "CxxVariableScanner.h"
84+
#include "file_logger.h"
8485

8586
//#define __PERFORMANCE
8687
#include "performance.h"
@@ -2540,7 +2541,7 @@ wxString ContextCpp::CallTipContent()
25402541
void ContextCpp::DoCodeComplete(long pos)
25412542
{
25422543
CHECK_JS_RETURN_VOID();
2543-
2544+
clDEBUG1() << "ContextCpp::DoCodeComplete(" << pos << ") is called" << clEndl;
25442545
long currentPosition = pos;
25452546
bool showFuncProto = false;
25462547
int pos1, pos2, end;
@@ -2553,6 +2554,7 @@ void ContextCpp::DoCodeComplete(long pos)
25532554
}
25542555

25552556
// Search for first non-whitespace wxChar
2557+
clDEBUG1() << "Triggering char is:" << ch << clEndl;
25562558
switch(ch) {
25572559
case '.':
25582560
// Class / Struct completion
@@ -2638,6 +2640,7 @@ void ContextCpp::DoCodeComplete(long pos)
26382640
}
26392641

26402642
if(showFuncProto) {
2643+
clDEBUG1() << "Function prototype is requested..." << clEndl;
26412644
// for function prototype, the last char entered was '(', this will break
26422645
// the logic of the Getexpression() method to workaround this, we search for
26432646
// expression one char before the current position
@@ -2649,6 +2652,7 @@ void ContextCpp::DoCodeComplete(long pos)
26492652

26502653
// get the token
26512654
wxString word = editor.GetTextRange(word_start, word_end);
2655+
clDEBUG1() << "Function prototype is requested for:" << expr << "|" << word << clEndl;
26522656
CodeCompletionManager::Get().Calltip(&editor, line, expr, text, word);
26532657

26542658
} else {

Runtime/codelite-bitmaps.zip

3.27 KB
Binary file not shown.

abbreviation/abbreviation.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include "wxCodeCompletionBoxEntry.h"
4242
#include "wxCodeCompletionBoxManager.h"
4343
#include <wx/clntdata.h>
44+
#include "globals.h"
4445

4546
static AbbreviationPlugin* thePlugin = NULL;
4647

@@ -146,8 +147,8 @@ void AbbreviationPlugin::AddAbbreviations(clCodeCompletionEvent& e)
146147
jsonData.SetEntries(data.GetEntries());
147148
m_config.WriteItem(&jsonData);
148149
}
149-
150-
static wxBitmap bmp = LoadBitmapFile(wxT("abbrev.png"));
150+
151+
wxBitmap bmp = clGetManager()->GetStdIcons()->LoadBitmap("replace-blue");
151152
if(bmp.IsOk()) {
152153
// search for the old item
153154
const wxStringMap_t& entries = jsonData.GetEntries();

bitmaps/16-replace-blue.png

862 Bytes
Loading

bitmaps/[email protected]

1.9 KB
Loading

bitmaps/24-replace-blue.png

1.35 KB
Loading

bitmaps/[email protected]

3.29 KB
Loading

0 commit comments

Comments
 (0)