Skip to content

Commit

Permalink
Added some more debugging messages
Browse files Browse the repository at this point in the history
Replaced abbreviation bitmap with new HiDPI one
  • Loading branch information
eranif committed Oct 21, 2017
1 parent 0e8cc61 commit bcf22eb
Show file tree
Hide file tree
Showing 9 changed files with 364 additions and 4 deletions.
5 changes: 4 additions & 1 deletion LiteEditor/cl_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3990,12 +3990,14 @@ int LEditor::GetEOLByOS()

void LEditor::ShowFunctionTipFromCurrentPos()
{
clDEBUG1() << "Calling ShowFunctionTipFromCurrentPos..." << clEndl;
if(TagsManagerST::Get()->GetCtagsOptions().GetFlags() & CC_DISP_FUNC_CALLTIP) {

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

int pos = DoGetOpenBracePos();

clDEBUG1() << "Brace open position is:" << pos << clEndl;
clDEBUG1() << "Firing wxEVT_CC_CODE_COMPLETE_FUNCTION_CALLTIP event..." << clEndl;
// see if any of the plugins want to handle it
clCodeCompletionEvent evt(wxEVT_CC_CODE_COMPLETE_FUNCTION_CALLTIP, GetId());
evt.SetEventObject(this);
Expand All @@ -4005,6 +4007,7 @@ void LEditor::ShowFunctionTipFromCurrentPos()
if(EventNotifier::Get()->ProcessEvent(evt)) return;

if(pos != wxNOT_FOUND) {
clDEBUG1() << "Using default behavior for wxEVT_CC_CODE_COMPLETE_FUNCTION_CALLTIP event" << clEndl;
m_context->CodeComplete(pos);
}
}
Expand Down
6 changes: 5 additions & 1 deletion LiteEditor/context_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
#include "clEditorStateLocker.h"
#include "clSelectSymbolDialog.h"
#include "CxxVariableScanner.h"
#include "file_logger.h"

//#define __PERFORMANCE
#include "performance.h"
Expand Down Expand Up @@ -2540,7 +2541,7 @@ wxString ContextCpp::CallTipContent()
void ContextCpp::DoCodeComplete(long pos)
{
CHECK_JS_RETURN_VOID();

clDEBUG1() << "ContextCpp::DoCodeComplete(" << pos << ") is called" << clEndl;
long currentPosition = pos;
bool showFuncProto = false;
int pos1, pos2, end;
Expand All @@ -2553,6 +2554,7 @@ void ContextCpp::DoCodeComplete(long pos)
}

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

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

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

} else {
Expand Down
Binary file modified Runtime/codelite-bitmaps.zip
Binary file not shown.
5 changes: 3 additions & 2 deletions abbreviation/abbreviation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "wxCodeCompletionBoxEntry.h"
#include "wxCodeCompletionBoxManager.h"
#include <wx/clntdata.h>
#include "globals.h"

static AbbreviationPlugin* thePlugin = NULL;

Expand Down Expand Up @@ -146,8 +147,8 @@ void AbbreviationPlugin::AddAbbreviations(clCodeCompletionEvent& e)
jsonData.SetEntries(data.GetEntries());
m_config.WriteItem(&jsonData);
}

static wxBitmap bmp = LoadBitmapFile(wxT("abbrev.png"));
wxBitmap bmp = clGetManager()->GetStdIcons()->LoadBitmap("replace-blue");
if(bmp.IsOk()) {
// search for the old item
const wxStringMap_t& entries = jsonData.GetEntries();
Expand Down
Binary file added bitmaps/16-replace-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bitmaps/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bitmaps/24-replace-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bitmaps/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bcf22eb

Please sign in to comment.