Recent Posts

Pages: 1 2 [3] 4 5 6 7 8 ... 10
21
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on October 03, 2022, 07:43:47 pm »
@ollydbg

OK, I think I have fixed this issue by using such patch:

Code
From 8523dd2bd9a58d1780c3d2efe9459f7e5fccfb41 Mon Sep 17 00:00:00 2001
From: hide<hide@hide.hide>
Date: Fri, 30 Sep 2022 15:11:28 +0800
Subject: fix the wrong tip code when Chinese comment is used


diff --git a/clangd_client/src/codecompletion/parser/parser.cpp b/clangd_client/src/codecompletion/parser/parser.cpp
index 2b9c5ea..3ddde25 100644
--- a/clangd_client/src/codecompletion/parser/parser.cpp
+++ b/clangd_client/src/codecompletion/parser/parser.cpp
@@ -2546,7 +2546,8 @@ void Parser::OnLSP_HoverResponse(wxCommandEvent& event, std::vector<ClgdCCToken>
         if (not valueItemsCount) return;
 
         json contents = pJson->at("result").at("contents");
-        wxString contentsValue = contents.at("value").get<std::string>();
+        std::string contentsValueStdString = contents.at("value").get<std::string>();
+        wxString contentsValue(contentsValueStdString.c_str(), wxConvUTF8);
 
         // Example Hover contents: L"instance-method HelloWxWorldFrame::OnAbout\n\nType: void\nParameters:\n- wxCommandEvent & event\n\n// In HelloWxWorldFrame\nprivate: void HelloWxWorldFrame::OnAbout(wxCommandEvent &event)"
         // get string array of hover info separated at /n chars.
@@ -2670,7 +2671,8 @@ void Parser::OnLSP_SignatureHelpResponse(wxCommandEvent& event, std::vector<cbCo
         json signatures = pJson->at("result").at("signatures");
         for (size_t labelndx=0; labelndx<signatureCount && labelndx<10; ++labelndx)
         {
-                wxString labelValue = signatures[labelndx].at("label").get<std::string>();
+                std::string labelValueStdString = signatures[labelndx].at("label").get<std::string>();
+                wxString labelValue(labelValueStdString.c_str(), wxConvUTF8);
                 v_SignatureTokens.push_back(cbCodeCompletionPlugin::CCCallTip(labelValue));
         }
 


I'm not sure the second hunk is needed, but the first hunk is the true fix.

@ollydbg

Would you test Clangd_Client rev 82 or the current nightly clangd_client to see if it solves the tooltip problem?

I've applied your fix for every clangd json std::string reference.
Example:
Code
 
idValue = GetwxUTF8Str(pJson->at("id").get<std::string>());

GetwxUTFStr is defined as:
Code
        wxString GetwxUTF8Str(const std::string stdString)
        {
            return wxString(stdString.c_str(), wxConvUTF8);
        }


Let me know if it works and thanks for testing.
22
General (but related to Code::Blocks) / Re: Welcome Newcomers - PLEASE READ!!!
« Last post by sherwood on October 03, 2022, 01:15:27 pm »
Greetings,

I am new, I am here

BUT not new to Code::Blocks!

Cheers,
Sherwood
23
General (but related to Code::Blocks) / Re: Are Scripted Wizards without license?
« Last post by stahta01 on October 03, 2022, 01:58:49 am »
The ones a simple search on copyright found
Code
Copyrighted by:
  HighTec EDV-Systeme GmbH
    multiple .h, .c, .S, and .x files
  http://www.resedit.net
    resource.rc
  Free Software Foundation
    multiple Makefile.in and Makefile
24
General (but related to Code::Blocks) / Are Scripted Wizards without license?
« Last post by stahta01 on October 03, 2022, 01:22:17 am »
I am using the CB Scripted wizard to create some simple projects? Do any of them have a license that is not mentioned in a source file?

Link to my git repo https://github.com/stahta01/mingw64_gcc_toolchain_test_cbprojects

I am having weird issues building MinGW64 GCC 4.8.x that are likely CRT/GCC/Binutils caused problems.
I am hoping these test project will help determine which part has the problem.

Tim S.
25
General (but related to Code::Blocks) / Thank you
« Last post by ikel on October 02, 2022, 09:06:06 pm »
Hi Code::Blocks developers,

Again, just to say thanks for all the efforts you put into Code::Blocks.
As for yesterday, I taught my 7 yo son on the basic of C++ programming using Code::Blocks IDE.

He found it easy to edit the file, and easy enough to hit the Build and Run button on the top toolbar.
He had a great time playing with cout, <<, endl and ;.

Many thanks.

Regards,
Ikel
26
Development / Re: Differences in the GUI with the update of the Dll wxmsw317u
« Last post by sergioferrari52 on October 02, 2022, 09:04:59 pm »
This problem was resolved with nightly revision 12932 that uses wx321 dlls.
27
General (but related to Code::Blocks) / Re: src/update.bat change typo
« Last post by Miguel Gimenez on October 02, 2022, 08:25:56 pm »
Fixed in r12938, thankk you.
28
General (but related to Code::Blocks) / src/update.bat change typo
« Last post by everSome on October 02, 2022, 08:15:27 pm »
The new function at the end of src/update.bat, namely

:copySvgFiles - create a directory and copy avg files to it
setlocal
echo Copy svg files from %~1 to %~1
call:mkdirSilent %~2\svg
xcopy /D /y %~1\svg\*.svg %~2\svg > nul
endlocal
GOTO:EOF

would seem to have a typo in the echo line, perhaps it should be:

echo Copy svg files from %~1 to %~2
29
Nightly builds / Re: The 01 October 2022 build (12932) is out.
« Last post by Pecan on October 02, 2022, 06:01:42 pm »
The Clangd_Client for this nightly can be downloaded at
https://sourceforge.net/projects/cb-clangd-client/files/Plugin_Install_Package/Windows_x64/

Filename: ClangdClientForCBNightly_20221001_rev12932_win64.zip (Direct download link)

Copy the included clangd_client.zip to  <YourCodeBlocksNightlyFolder>\share\CodeBlocks\clangd_client.zip
Do not unzip this file.

Copy the included clangd_client.dll to <YourCodeBlocksNightlyFolder>\share\CodeBlocks\plugins\clangd_client.dll

Restart your CodeBlocks Nightly.

Install instructions for LLVM/clangd are included within the downloaded .zip file.
30
Development / Re: Crash when using with SVG files
« Last post by ollydbg on October 02, 2022, 04:53:36 pm »
It was a misunderstanfing on my side, it is fixed now.

Good work.
Pages: 1 2 [3] 4 5 6 7 8 ... 10