Recent Posts

Pages: 1 2 3 4 [5] 6 7 8 9 10
41
Plugins development / Re: Code completion using LSP and clangd
« Last post by ollydbg on Yesterday at 02:10:21 am »
@ollydbg

m_CodeCompletionEnabled variable refers to Settings/Editor/Code completion checkbox.

For your debugged CB, it must be currently unchecked which means neither Code completion nor clangd_client can run.

I have screen shots, see below as in attachment.

I have Settings/Editor/Code completion checkbox checked. If I member correctly this checkbox does not mean we should "disable" the plugin, instead, it means we don't show the suggestion prompt when we are editing.

The other screen shot shows the version latest version I'm using.

42
Contributions to C::B / Re: Code::Blocks' translation
« Last post by LETARTARE on January 15, 2022, 11:03:44 pm »
yes, it's a typo error !
43
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on January 15, 2022, 10:32:40 pm »
@ollydbg

m_CodeCompletionEnabled variable refers to Settings/Editor/Code completion checkbox.

For your debugged CB, it must be currently unchecked which means neither Code completion nor clangd_client can run.


44
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on January 15, 2022, 09:51:15 pm »
@ollydbg

When you run the debugger, CB  ordinary uses the personality "default" which, for you, I'm guessing has CodeCompletion plugin enabled.

You should use a separate personality for debugging so that you can disable CodeCompletion in the debugged CB without disabling it in your production CB.

For me, in CB main menu/project/SetProgramArgument I have:
--debug-log --no-dde --no-check-associations --multiple-instance --no-splash-screen --verbose /p cbDebug315

Then I can disable CodeCompletion in the debugged CB MainMenu/plugins/managePlugins without it affecting the main CB personality "default".

I'd still like to see the "manage plugins" status of both clangd_client and Code Completion plugins to determine why your m_CodeCompletionEnabled variable is false.
45
General (but related to Code::Blocks) / https://highlightjs.org/
« Last post by omlk on January 15, 2022, 09:40:14 pm »
Maybe forum administrator apply https://highlightjs.org/
;)
46
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on January 15, 2022, 06:59:46 pm »
Hi, I try to debug this plugin, but I have always have this line hit:


I have always get the m_CodeCompletionEnabled is false, and I have no idea how to enable it.

What I did is like below:

1, I have build a normal cbp:

Code
D:\code\cb\cb_sf_git\cccrash2019\src\CodeBlocks_wx31_64.cbp

I just build it.

2, I just open the downloaded clangd_client project, and I changed some build options:

In the build option custom variables, I set the variable:  TARGET_DEVEL_DIR
as the value: D:\code\cb\cb_sf_git\cccrash2019, which is the root folder of my local C::B git/svn

3, I changed the output filename as:
Code
$(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks\plugins\clangd_client.dll

which means the build target(clangd_client.dll) will be put in the same folder as the other core plugins.

4,  I set the Execution working dir as:

Code
$(TARGET_DEVEL_DIR)\src\devel31_64

Which is the folder where codeblocks.exe locates.

5,  I change the post build script as:

Code
cmd /c if not exist $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks mkdir $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks
zip -jq9 $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks\clangd_client.zip src/resources/manifest.xml src/resources/*.xrc
zip -r9  $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks\clangd_client.zip src/resources/images > nul

This means I make a clangd_client.zip, and put it in the destination devel31_64 folder.

The variable m_CodeCompletionEnabled should,in fact, be false.
Note that the line:     m_CodeCompletionEnabled = ccmcfg->ReadBool(_T("/code_completion"), false);

is asking if the old code_completion is enabled. It not asking if "/clangd_client" is enabled.
"/code_completion" must be disabled for clangd_client to run.
I'll change the comments to make that clearer.

Edit: 2022/01/15 10:30
I might be wrong about this. I'll do more checking.

The .cbp you've created look good.

Just a little more information.

Run or debug the CB you created the plugin for.
In the menu for the running debugged/run CB
Go to MainMenu=>Plugins=>Manage Plugins and tell us what the clangd_client plugin version is:


47
Contributions to C::B / Re: Code::Blocks' translation
« Last post by gd_on on January 15, 2022, 06:56:46 pm »
Quote
''All_codeblocks_All_codeblocks-fr.mo' that I renamed 'codeblocks-fr.po'
Are you sure ? The extension should stay .mo (a compiled form), not .po (a text form).

More, on launchpad (https://translations.launchpad.net/codeblocks-gd) you can download a .po file, but you can also download a .mo file which should be directly usable in Code::Blocks
48
Contributions to C::B / Re: Code::Blocks' translation
« Last post by Miguel Gimenez on January 15, 2022, 06:17:57 pm »
If you debug the devel version (compile the workspace and press F8) and press stop in the popup, the culprit will appear on screen.
49
Contributions to C::B / Re: Code::Blocks' translation
« Last post by LETARTARE on January 15, 2022, 05:40:24 pm »
Hello,
I just loaded the file 'All_codeblocks_All_codeblocks-fr.po' to test it on 'CB-12467-wx315'.
Under Win7 with "Poedit-3.0.1', I got ''All_codeblocks_All_codeblocks-fr.mo' that I renamed 'codeblocks-fr.po', then dropped in "$(APP_PATH)\share\CodeBlocks\locale\fr_FR"

At the start of "cb-12647"
  - without this file: no problem
  - with this file and choice 'French' in Settings : an argument window appears twice (see attachment)

This message is provided in "wx-3.1.5\src\common\menucmn.cpp" during the second "wxCHECK_MSG"
Code
wxMenuItem* wxMenuBase::Insert(size_t pos, wxMenuItem *item)
{
    wxCHECK_MSG( item, NULL, wxT("invalid item in wxMenu::Insert") );

    if ( pos == GetMenuItemCount() )
    {
        return DoAppend(item);
    }
    else
    {
        wxCHECK_MSG( pos < GetMenuItemCount(), NULL,
                     wxT("invalid index in wxMenu::Insert") );

        return DoInsert(pos, item);
    }

I looked for the deadlines of code, and the tracks are numerous, I found in
Quote
ProjectManagerUI::CreateMenu(wxMenuBar* menuBar)
a possibility with 'GetMenuiItemCount ()' and 'Insert(...)' corresponding to the image provided:
Quote
menu->Insert(menu->GetMenuItemCount() - 1, idMenuFileProperties, _("Properties..."));

I then deleted the translation of "Properties ..." into the * .mo file, but the result is unchanged, so it must be elsewhere ...

If you have tracks ?


50
Plugins development / Re: Code completion using LSP and clangd
« Last post by ollydbg on January 15, 2022, 02:15:44 pm »
Hi, I try to debug this plugin, but I have always have this line hit:

Code
// ----------------------------------------------------------------------------
void CodeCompletion::OnAttach()
// ----------------------------------------------------------------------------
{
    AppVersion appVersion;
    appVersion.m_AppName = "clangd_client";
    // Set current plugin version
PluginInfo* pInfo = (PluginInfo*)(Manager::Get()->GetPluginManager()->GetPluginInfo(this));
pInfo->version = appVersion.GetVersion();

    // ccmanager's config obtained from Menu=>Settings=>Editor=>Code Completion (sub panel)
    // Get the CB config item that enables CodeCompletion
    ConfigManager* ccmcfg = Manager::Get()->GetConfigManager(_T("ccmanager"));
    m_CodeCompletionEnabled = ccmcfg->ReadBool(_T("/code_completion"), false);
    if (not m_CodeCompletionEnabled)
    {
        pInfo->version = pInfo->version.BeforeFirst(' ') + " Inactive";
        return;
    }


I have always get the m_CodeCompletionEnabled is false, and I have no idea how to enable it.

What I did is like below:

1, I have build a normal cbp:

Code
D:\code\cb\cb_sf_git\cccrash2019\src\CodeBlocks_wx31_64.cbp

I just build it.

2, I just open the downloaded clangd_client project, and I changed some build options:

In the build option custom variables, I set the variable:  TARGET_DEVEL_DIR
as the value: D:\code\cb\cb_sf_git\cccrash2019, which is the root folder of my local C::B git/svn

3, I changed the output filename as:
Code
$(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks\plugins\clangd_client.dll

which means the build target(clangd_client.dll) will be put in the same folder as the other core plugins.

4,  I set the Execution working dir as:

Code
$(TARGET_DEVEL_DIR)\src\devel31_64

Which is the folder where codeblocks.exe locates.

5,  I change the post build script as:

Code
cmd /c if not exist $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks mkdir $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks
zip -jq9 $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks\clangd_client.zip src/resources/manifest.xml src/resources/*.xrc
zip -r9  $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks\clangd_client.zip src/resources/images > nul

This means I make a clangd_client.zip, and put it in the destination devel31_64 folder.




Pages: 1 2 3 4 [5] 6 7 8 9 10