Codeblocks в вопросах и ответах

New plugins:

  • Abbreviatons (extracted from the core): provides auto-completion (note that this has nothing to do with code completion): http://wiki.codeblocks.org/index.php?title=Abbreviations_plugin
  • Cscope: integrates the source code searching features of Cscope: http://wiki.codeblocks.org/index.php?title=Cscope_plugin
  • DoxyBlocks: support for doxygen inline documentation: http://wiki.codeblocks.org/index.php?title=DoxyBlocks_plugin
  • EditorConfig: http://forums.codeblocks.org/index.php/topic,16512.0.html
  • EditorTweaks: make one off changes to active editor (EOL mode, wrap etc) and code alignment tool: http://wiki.codeblocks.org/index.php?title=Editor_Tweaks_plugin
  • FileManager: tree view of the file system with support for basic file management operations in the management pane: http://wiki.codeblocks.org/index.php?title=File_Manager_plugin
  • NassiShneiderman: creation of Nassi Shneiderman diagrams: http://wiki.codeblocks.org/index.php?title=NassiShneiderman_plugin
  • ReopenEditor: reopens last closed editor(s) via hotkey (Ctrl+Shift+t) or menu-item
  • SmartIndent (extracted from the core): multi-language support for automatic indenting of code to match typical indentation styles
  • SpellChecker: check spelling in comments and strings using hunspell: http://wiki.codeblocks.org/index.php?title=SpellChecker_plugin
  • ToolsPlus: creation and management of custom tools: http://wiki.codeblocks.org/index.php?title=Tools%2B_plugin

Возможные ошибки

Довольно распространенной проблемой является отсутствия компилятора по указанному пути в настройках Code::Blocks. У этой проблемы есть две причины:

  • Либо вы установили пакет без MinGW. Соответственно вернитесь вверх и проверьте правильность выполненных шагов.
  • Возможно, автоматические прописанный путь к компилятору является неверным. Тогда укажите путь к компилятору самостоятельно (он должен быт в директории установленного Code::Blocks, которую вы указывали при установке): Settings -> Compiler -> Global compiler settings -> Toolchain executables:

Если это не решило проблему, то пишите в комментарии свою проблему (также дополняйте сообщения скриншотами ошибок) и мы обязательно поможем ее решить.

Ну а на этом все! Удачи!

7 апреля 2015

Софт, Софт

Search

Menu Path
Function
Keyboard Shortcut
Search > Find…
Search for text
Ctrl-F
Search > Find in files…
Search for text
Ctrl-Shift-F
Search > Find next
Repeat the last search in the same direction
F3
Search > Find previous
Repeat the last search in the opposite direction
Shift-F3
Search > Incremental search
Set focus on Incremental Search input and show the toolbar, if hidden
Ctrl-I
Search > Replace…
Find and replace text
Ctrl-R
Search > Replace in files…
Find and replace text
Ctrl-Shift-R
Search > Goto line…
Goto a specific line
Ctrl-G
Search > Goto next changed line
Goto next changed line
Ctrl-F3
Search > Goto previous changed line
Goto previous changed line
Ctrl-Shift-F3
Search > Goto file…

Alt-G
Search > Goto function…

Ctrl-Shift-G
Search > Goto previous function

Ctrl-PAGEUP
Search > Goto next function

Ctrl-PAGEDOWN
Search > Goto declaration

Ctrl-Shift-.
Search > Goto implementation

Ctrl-.
Search > Find references

Alt-.
Search > Open include file

Ctrl-Shift-.

Debugger plugin:

  • Make sure we always store remote debugging project options sorted by target
  • Rework the plugin to not use ProjectLoaderHooks
  • Fix crash when trying to attach when there is no loaded project (ticket #879)
  • Fix regression when executing additional commands before
  • Make sure we don’t save empty serial baud attributes in the debugger extension
  • Improve UI of Debugger project options panel
  • Check additional shell commands when deciding if the remote settings for target/projects need to be saved
  • Rework the UI for the “Remote connection” tab in the project opions to look a bit more pleasant
  • Improve the IsPointerType to detect restrict and const volatile types as pointers correctly
  • sdk: Add another parameter to cbDebuggerPlugin::AddWatch to make it similar to AddMemoryRangeWatch
  • sdk: Make it possible to delay the update of memory range watches (possible massive breakage)
  • sdk: Add event which will be used to notify debug windows that data is ready
  • Initial implementation of Memory Range Watches
  • Set the plugin value of the event when sending EVT_DEBUGGER_UPDATED
  • Send CURSOR_CHANGED event when the debugger has stopped on a breakpoint/signal
  • Fix the disassembly view with newer GDBs
  • Make it possible to evaluate expression in wxSmith code blocks
  • Improvements for Fortran (ticket #717)
  • Put the recent entered command in the position 0 of the wxComboBox list.
  • Remove gdb_types.script because it is not longer used (the scripting support has been removed from the debugger)
  • Make sure to quit correctly when attaching to process fails
  • Make it possible to attach to a process using the command line (This commit adds –dbg-attach and –dbg-config command line options)
  • Prevent warning for invalid current directory when attaching to process
  • Make sure to set the SHELL variable before starting GDB

JavaScript Code Blocks

These code blocks are similar to the JavaScript Validation Rules and
Capturing Rules, except that they can exist independently of any other step, and they don’t have
to be run on a particular response.

Code blocks can exist anywhere in your script. In fact, if you wanted to you could make a script
that’s just a single code block, and do everything in JavaScript.

A code block

Code blocks are more powerful than ordinary step-by-step scripting because you have the control flow of an actual
programming language: looping, conditionals, functions, etc.

To add a code block to your script, select Add Code Block from the top bar.

Configuration¶

Highlight

Source · Extension · Supersedes: CodeHilite

The Highlight extension, which is part of Python Markdown Extensions, integrates with Material for MkDocs and provides several options for configuring syntax highlighting of code blocks:

Default: – This option allows to control whether highlighting should be carried out during build time by Pygments or runtime with a JavaScript highlighter. Remember to add the necessary and if you want to use the latter:

Pygments JavaScript Syntax highlighting with Highlight.js

Highlight.js can be integrated by creating an file initializing the highlighter and including the respective stylesheet and JavaScript from a CDN serving Highlight.js in :

Note that Highlight.js has no affiliation with the Highlight extension.

Default: – This option will add line numbers to all code blocks. If you wish to add line numbers to some, but not all code blocks, consult the section on later in this document, which also contains some tips on working with line numbers:

Default: – The Highlight extension provides three ways to add line numbers, all of which are supported by Material for MkDocs. While wraps a code block in a table, and render line numbers as part of the line itself:

Note that will put line numbers next to the actual code, which means that they will be included when selecting text with the cursor or copying a code block to the clipboard. Thus, the usage of or is recommended.

Material for MkDocs doesn’t provide official support for the other options of this extension, so they may be supported but might yield unexpected results. Use them at your own risk.

InlineHilite

Source · Extension

The InlineHilite extension, which is part of Python Markdown Extensions also integrates with Material for MkDocs and adds support for syntax highlighting of inline code blocks. It’s built on top of the Highlight extension and can be enabled via :

See the section on for usage information.

Keys

Source · Extension

The Keys extension, which is part of Python Markdown Extensions, allows for inserting keyboard keys, e.g. Ctrl+Alt+Del , and can be enabled via :

SuperFences

The SuperFences extension, which is also part of Python Markdown Extensions, allows for the nesting of code blocks inside other blocks, and is therefore strongly recommended:

Snippets

The Snippets extension, which is also part of Python Markdown Extensions, allows to insert content from other files or other, regular content, and can be enabled via :

Code Completion:

  • Calltip improvements: cleaned it up (strip duplicates), refined the calltip window position, “Pretty Print” each function names
  • Fixed showing the Call tip for consturctors and destructors
  • Optimised the Symbols browser by avoid unnecessary updates
  • Fixed some bug when saving/loading the Code completion options
  • Made ‘Find implementation’ and ‘Find declaration’ to be more precise (goto to line and column)
  • Fixed some bugs with the refresh of the Code completion toolbar
  • Fixed many bugs in the parser (crashes, deadlocks and parsing errors)
  • Added support to the parser for handling conditional preprocessor directives (only for file scope, included files aren’t expanded)
  • Improved the Macro replacement and added macro replacement for GCC/MSVC build-ins
  • Made the parser more robust and improved the thread safety
  • Introduce two major options for the operation of the Code completion plugin: one parser for all workspace or a parser per project
  • Improved the parsing of Class inheritance, now it is better and faster
  • Improved parsing of C++ template constructs, typedef statements, operator overloading
  • Added macro expansion for some code patterns (e.g. wxWidgets’s event handling table/entry macros)
  • Added None/Null parser for parsing files not included in any C::B project.
  • Adding code with auto-completion follows the active indentation and EOL style
  • Support auto-completion for include header file names and preprocessor directives
  • Automatically append the text if the prefix word already exists before the caret(after the user hit Enter on the suggestion list)
  • Support auto-completion for member variable initialisation
  • Added some tools for simple refactoring tasks: find references, rename a symbol (not 100% precise)

Not implemented (TODO) — parsing of multiple template arguments

Usage¶

This section discusses how to use different syntax highlighting features with Pygments – the default highlighter – so they don’t apply when using a JavaScript syntax highlighter.

Specifying the language

Code blocks must be enclosed with two separate lines containing three backticks. To add code highlighting to those blocks, add the language short name directly after the opening block. See the list of available lexers to find the short name for a given language.

Example:

Result:

Adding annotations

Source · Experimental · Insiders only

Annotations offer a comfortable and friendly way to attach explanations to arbitrary sections of code blocks by adding simple markers within block/inline comments that refer to items of a list following the code block, i.e. , , etc. Material for MkDocs detaches the list from the flow of the document, injects the content of each list item into a tooltip, and links each list marker to the corresponding tooltip.

In order to opt-in to annotation support, a slightly different syntax is required – just add the respective language short code and the class, after the three backticks. Alternatively, if you want to enable annotations globally, add the following to :

Note that annotations can be placed anywhere in a code block where a comment for the language can be placed, which for JavaScript is and , for Yaml , etc.

Example:

Result:

  1. Annotations can contain arbitrary content which is shown when the marker is focussed, including any kind of formatting, links, admonitions, details, and even diagrams:

    Tip: You can use Tab to navigate annotations.

  2. Annotations can be placed anywhere in a code block were a comment for the underlying language can be placed.

    Python JavaScript Lua

    We’re working on a solution for languages without comments, which will be available shortly.

  3. Of course, this can be combined with , highlighting and all other code block related features.

Annotations require syntax highlighting with – they’re currently not compatible with other JavaScript-based syntax highlighters. Support may be added later on.

Adding line numbers

Line numbers can be added to a code block by using the option directly after the short name, whereas represents the starting line number. A code block can start from a line number other than , which allows splitting large code blocks for readability.

Example:

Result:

1
2
3
4
5

Highlighting specific lines

Specific lines can be highlighted by passing the line numbers to the argument placed right after the language short name. Note that line counts start at , regardless of the starting line number specified as part of .

Example:

Result:

Line ranges can also be used for conveniently specifying multiple lines.

Example:

Result:

Highlighting inline code blocks

When is enabled, inline code blocks can be highlighted by prefixing them with a shebang-like sequence, i.e. , directly followed by the language short name.

Example:

Result:

The function is used to generate a sequence of numbers.

Adding keyboard keys

When is enabled, keyboard keys can be rendered with a simple syntax. Consult the Python Markdown Extensions documentation to learn about all available key codes.

Example:

Result:

Ctrl+Alt+Del

Embedding external files

Also known as transcludes or file transclusion in MultiMarkdown.

When is enabled, content from other files can be embedded, which is especially useful to reference and embed the contents of source files directly into your project documentation.

Example:

Result:

Note that is not limited to code blocks, but can be used anywhere from a document to move repeating content to separate files, which is also explained in the official documentation.

Translation for trunk

Language Status Untranslated Needs review Last Changed

Afrikaans

18

099.17

2155

2009-01-22 11:29:08 UTC
2009-01-22

Albanian

64

097.05

2109

6

2008-12-05 20:31:31 UTC
2008-12-05

Arabic

654

069.90

1519

52

2016-04-01 18:11:36 UTC
2016-04-01

Basque

179

091.76

1994

2012-01-24 17:56:04 UTC
2012-01-24

Belarusian

79

096.36

2094

2014-04-14 18:44:36 UTC
2014-04-14

Bengali

38

098.25

2135

2007-02-24 14:01:37 UTC
2007-02-24

Bosnian

80

096.32

2093

46

2011-10-04 17:56:05 UTC
2011-10-04

Brazilian Portuguese

2173

000.00

6

2021-09-04 14:20:56 UTC
2021-09-04

Breton

120

094.48

2053

2018-04-26 08:11:32 UTC
2018-04-26

Bulgarian

798

063.28

1375

66

2011-02-05 16:44:20 UTC
2011-02-05

Catalan

957

055.96

1216

7

2011-03-17 13:37:43 UTC
2011-03-17

Catalan (Valencian)

100.00

2173

2017-08-27 10:34:02 UTC
2017-08-27

Chinese (Hong Kong)

39

098.21

2134

2009-01-24 11:05:42 UTC
2009-01-24

Chinese (Simplified)

2173

000.00

3

2021-08-18 10:37:37 UTC
2021-08-18

Chinese (Traditional)

2173

000.00

2021-02-26 08:18:09 UTC
2021-02-26

Chuang; Zhuang

14

099.36

2159

2010-12-10 11:56:21 UTC
2010-12-10

Czech

912

058.03

1261

233

2011-07-28 20:06:21 UTC
2011-07-28

Danish

320

085.27

1853

123

2008-05-17 23:04:56 UTC
2008-05-17

Dutch

2120

002.44

53

2017-03-16 21:47:10 UTC
2017-03-16

English (United Kingdom)

2173

000.00

2020-10-18 10:48:24 UTC
2020-10-18

Estonian

11

099.49

2162

2

2008-05-16 13:59:50 UTC
2008-05-16

Finnish

265

087.80

1908

2009-02-05 17:28:22 UTC
2009-02-05

Franco-Provençal

8

099.63

2165

2

2009-02-18 23:12:30 UTC
2009-02-18

French

2173

000.00

2021-08-24 10:07:39 UTC
2021-08-24

French (Canada)

100.00

2173

2021-05-28 16:18:33 UTC
2021-05-28

Galician

146

093.28

2027

2021-01-30 10:32:31 UTC
2021-01-30

German

2173

000.00

1

2021-04-20 18:53:55 UTC
2021-04-20

Greek

1675

022.92

498

2012-01-28 22:15:51 UTC
2012-01-28

Hebrew

59

097.28

2114

4

2010-09-27 12:00:53 UTC
2010-09-27

Hungarian

1387

036.17

786

12

2013-01-06 14:50:56 UTC
2013-01-06

Indonesian

393

081.91

1780

24

2011-10-11 16:05:15 UTC
2011-10-11

Italian

2172

000.05

1

2021-04-25 15:38:09 UTC
2021-04-25

Japanese

1388

036.13

785

2014-07-18 10:07:23 UTC
2014-07-18

Korean

1313

039.58

860

7

2015-05-03 09:19:09 UTC
2015-05-03

Kurdish

58

097.33

2115

2017-04-06 23:17:29 UTC
2017-04-06

Latvian

25

098.85

2148

2011-05-06 13:26:57 UTC
2011-05-06

Lithuanian

2173

000.00

1

2014-03-01 09:03:44 UTC
2014-03-01

Low German

1

099.95

2172

2009-08-19 14:11:23 UTC
2009-08-19

Malay

100.00

2173

2008-04-05 10:28:34 UTC
2008-04-05

Min Nan Chinese

13

099.40

2160

2011-12-07 14:45:06 UTC
2011-12-07

Norwegian Bokmal

772

064.47

1401

8

2014-03-08 20:33:23 UTC
2014-03-08

Ossetian

100.00

2173

2017-09-04 16:14:56 UTC
2017-09-04

Persian

103

095.26

2070

1

2008-12-29 18:42:15 UTC
2008-12-29

Polish

1833

015.65

340

14

2020-04-29 09:48:06 UTC
2020-04-29

Portuguese

2173

000.00

2017-06-11 13:56:44 UTC
2017-06-11

Romanian

412

081.04

1761

6

2014-02-05 17:50:41 UTC
2014-02-05

Russian

2173

000.00

3

2020-12-16 12:05:16 UTC
2020-12-16

Serbian

436

079.94

1737

2020-03-15 11:15:36 UTC
2020-03-15

Serbian Latin

100.00

2173

2014-02-08 18:38:57 UTC
2014-02-08

Sinhalese

2136

001.70

37

5

2014-06-15 07:47:12 UTC
2014-06-15

Slovak

750

065.49

1423

2012-10-26 19:29:11 UTC
2012-10-26

Slovenian

1275

041.33

898

72

2012-09-01 17:31:22 UTC
2012-09-01

Spanish

2172

000.05

1

1

2021-04-18 23:32:30 UTC
2021-04-18

Swedish

1226

043.58

947

119

2010-02-13 14:41:20 UTC
2010-02-13

Thai

219

089.92

1954

2021-05-17 13:35:10 UTC
2021-05-17

Turkish

1657

023.75

516

180

2013-03-31 16:44:34 UTC
2013-03-31

Ukrainian

1251

042.43

922

3

2020-08-03 15:27:30 UTC
2020-08-03

Uyghur

17

099.22

2156

1

2016-05-10 15:48:14 UTC
2016-05-10

Uzbek

14

099.36

2159

14

2021-03-22 10:43:42 UTC
2021-03-22

Vietnamese

32

098.53

2141

43

2008-12-20 13:39:00 UTC
2008-12-20

Yiddish

100.00

2173

2008-04-16 21:28:59 UTC
2008-04-16

Translated

Untranslated

Описание и рекомендации

Code::Blocks – интегрированная среда разработки (IDE) для создания программных продуктов на языках C, C++, Fortran. Система полностью конфигурируема, масштабируется подключением автономных модулей (плагинов).

Продукт распространяется по лицензии GNU – бесплатно, с открытым исходным кодом. Интерфейс CodeBlocks англоязычный, официальная версия на русском отсутствует.

Разновидности интегрированной среды

Инсталляторы Code::Blocks отличаются не только поддержкой различных ОС.

Разработчики предлагают несколько видов установщика для Windows:

  • полный пакет, БЕЗ компилятора, но включающий все плагины;
  • non admin – версия для пользователей, не имеющих прав администратора на компьютере;
  • no setup – редакция, функционирующая без инсталляции;
  • издание, содержащее дополнительный GCC компилятор и средства отладки под MinGW-проекты.

Все установщики имеют отдельные релизы для архитектуры 32-bit. Инсталляторы без маркировки разрядности выпущены под системы 64-bit. Важный нюанс, Portable выпуск Code::Blocks можно скачать в двух вариациях. Один архив содержит компилятор MinGW, второй – нет. Аналогичная ситуация с инсталлятором для полной редакции.

CodeBlocks с компилятором C/C++

Интегрированная среда содержит инструменты отладки и перевода программных строк в машинный код.

Версия IDE с компилятором C может включать несколько модулей от различных разработчиков:

  • MinGW;
  • Microsoft Visual C++;
  • Digital Mars;
  • Watcom;
  • Borland C++;
  • CDCC – плагин под микроконтроллеры;
  • Intel C++;
  • Clang.

Дополнительно в IDE может присутствовать компилятор Digital Mars D, инструменты для создания исполняемых файлов с кода на языках программирования Fortran, GDC, а также архитектуры ARM. Допускается импорт проектов Microsoft Visual Studio, Dev-C++.

Отладка и интерфейс

Среда поддерживает инструмент GDB (проект GNU) и стандартный дебаггер всех выпусков Microsoft Visual Studio (MS CDB). Визуализация результатов отладки осуществляется через GNU-профайлер.

При программировании на языке Си, Code::Blocks предлагает воспользоваться инструментом RAD – для быстрой разработки приложений. Это методика наглядного создания пакетов с графическим интерфейсом.

CodeBlocks и русский язык

Официальной версии IDE на русском с компилятором или без него не существует. Это неудивительно, поскольку навыки программирования предполагают знание базовых команд меню на английском.

Дальнейшая инструкция реализуется в 8 шагов:

  1. Зайти в корневую директорию программы.
  2. Последовательно открыть подкаталоги share, CodeBlocks.
  3. Извлечь файл русификатора из архива внутрь каталога, общий путь к файлу будет выглядеть примерно так
    C:\Program Files\CodeBlocks\share\CodeBlocks\locale\ru_RU\codeblocks.mo
  4. Открыть IDE.
  5. В главном меню последовательно выбрать пункты Settings, Environment.
  6. В открывшемся окне перейти на вкладку View.
  7. Отметить пункт Internationalization.
  8. В активизировавшемся выпадающем меню, расположенном напротив, выбрать Russian.

Чтобы изменения вступили в силу требуется перезапустить среду. Пакет откроется с русскоязычным интерфейсом.

Установка компилятора MinGW

Установка самого Code::Blocks не представляет ничего сложного. Желательно только устанавливать его в папку, в пути к которой нет пробелов или кириллицы.
Дистрибутив Code::Blocks версии 17.12 содержал старую версию компилятора MinGW, поэтому приходилось отдельно скачивать Code::Blocks без компилятора MinGW и затем устанавливать компилятор.
В настоящий момент версия Code::Blocks 20.03 содержит актуальную версию MinGW (по умолчанию используется 64-разрядная версия компилятора, но можно скачать дистрибутив и с 32-разядной версией).
Но на всякий случай рассмотрим отдельно установку MinGW (на примере 32-разрядной версии). Сначала скачиваем дистрибутив Code::Blocks с сайта проекта mingw.org. После запуска появится следующее окно.

Нажмимаем Install и получаем следующее окно.

Здесь в поле Installation Directory указываем расположение файлов компилятора. По умолчанию это C:\MinGW, его и оставляем. Нажимаем Continue и начинается загрузка и установка менеджера для установки MinGW.

Нажимаем Continue и получаем следующее окно.

Для программированя на C++ выбираем для установки пакеты mingw32-base-bin (A Basic MinGW Installation) и mingw32-gcc-g++-bin (The GNU C++ Compiler), а затем жмём в меню Installation -> Apply Changes. Появится окно, в котором будет отображаться загрузка выбранных пакетов.

По завершении загрузки пакетов нажимаем на кнопку Close

При первом запуске Code::Blocks автоматически обнаружит установленный компилятор. При возникновении проблем необходимо перейти в меню Settings -> Compiler… и на вкладке Toolchain executables проверить правильность пути к MinGW, а также имена файлов компилятора и линковщика. Теперь можно создавать проект.

Compiler plugin:

  • Add an option to targets which allows the user to select the linker executable to be used for the target
  • Make the LinkerExecutableOption::AutoDetect work as advertised
  • Cleaned up obsolete interim C/C++ standards that are now properly supported by GCC (i.e. C++11/14/17; C17)
  • Print Build banner at command preBuild step, else they appear to belong to previous target
  • Fix assert about RecalcSizes (ticket #857)
  • Expand CodeBlocks variables for non-ttCommandsOnly targets also
  • Fix potential crash if the choice control is removed from the toolbar
  • Print a log message that we are modifying the dll search path before running an executable
  • Adjust the regexp for detecting the compiler version to support double digit numbers
  • Do not switch to the build log when the workspace is closed
  • Fix a crash introduced in r11465 (ticket #582)
  • Clear target specific variables from the MacroManager on every recalculation (ticket #582)
  • Remove duplicated compiler option
  • Clear logs when the workspace is closed (ticket #656)
  • Make sure the goto prev/next build error goes only on errors
  • Show the build message when the user requests goto prev/next error
  • Add support for -std=c++17 flag
  • Don’t show a log message when the wxKill command fails to kill children, because they’ve finished already
  • Hide process output when the process is stopped/killed
  • Fix double send of cbEVT_COMPILER_FINISHED when the executable is closed after run
  • Make the abort button work again (ticket #104). Kill the started process and all children instead of using wxSIGTERM

Key binder plugin:

  • Fix warning for Ctrl-P being duplicated
  • Introduce version 2.0 using CodeLight key binding methods; allowing future ability to dynamically set menu and global accelerators to any frame
  • Sort cbKeybinder20.conf file and remove old (duplicate) bindings
  • Use correct file separator on Linux for .config/cbKeyBinder10.ini
  • If there is no .cbKeyBinder10.ini file try to load cbKeybinder10.ini
  • Add overridden menu accelerators to global table for Linux
  • Obtain correct config folder on linux (ticket 840)
  • Freeze config panel while updating
  • Avoid ‘Wheres the event handler gone’ asserts when modifying shortcuts
  • Fix F2, Shift-F2 and allow linux to handle any View menu check items (ticket #273)

Lexers:

  • Add syntax highlighting for Nim (ticket #657)
  • Add WAVE keyword to Windows resource lexer (ticket #834)
  • Improve C/C++ lexer (ticket #741)
  • Add YAML lexer, make sure to always use spaces when editing YAML files
  • Add option to change the colour of the indentation guides for all lexers not only for the ObjC lexer
  • Add selection, active line, matching brace and no matching brace style options using code
  • Add lexer for plaintext files
  • Add lexer for Markdown (ticket #640)
  • Update doxygen keywords in the C/C++ lexer
  • Update keywords for the new Fortran standard (ticket #683)
  • Update GLSL lexer to v4.60 Standard (ticket #588)

Examples

There’s nothing like learning by example! Here are a few contrived examples of things you can accomplish
with code blocks.

HTTP

The object (representing the HTTP user agent belonging to the currently running bot) has methods for all of the
common HTTP methods (GET, POST, etc).

Response Validation

Validators (similar to the Validation Rules that you can use with ordinary
HTTP steps) call a JavaScript function to examine the response and return true if it’s valid, or false if it’s not.

Validator functions can be normal JavaScript functions or the newer ES2016+ arrow functions.

You can specify multiple validator functions for a single response.

Response Capturing

Often, the server will send you some data that you need to save and use later in your script.

In code blocks, you can capture these from the response and store them using a validator function. Note that we use
the for capturing too; there is no separate property
for Capturing Rules as there is with ordinary HTTP steps.

Simply call anywhere in your code block to set a bot-scoped variable. These special
variables are available for the bot’s entire iteration of the Loadster script, unlike ordinary JavaScript variables
which are scoped to the individual code block and may not be available to subsequent steps.

Looping and conditionals can be done with all the usual JavaScript language constructs. This trivial example shows
looping with a loop, the modulus function, an statement, and setting and getting special bot
variables with variable interpolation of .

Description

Code Blocks is an open source, free, C, C++ and Fortran IDE cross-platform that provides a ton of options. It is a no-cost C++IDE created with for users who have high demands.

Those behind this free software program designed it for extensive user customization and maximum flexibility. Centered on a plug-in style framework, the software is capable of being extended in the user’s preferred manner. There is even a built-in plug-in wizard that empowers users to build their unique plug-ins.

IMPORTANT: We currently do not list Code::Blocks Linux versions, but you can find all of them on projects homepage here.

Other Plugins

  • abbreviations: Applied patch to fix abbreviations target is missing in some project files (thanks stahta01)
  • abbreviations: Fixed bug in with non-alpha-numeric character abbreviations (thanks BlueHazzard)
  • cb_share_config: Added simple “export all” functionality for easy backup of all config stubs to a backup folder
  • cbp2make: Added (further improved) cbp2make by mirai-computing due to project seems dead otherwise
  • CodeStat: Fix assert in the progress update (thanks blauzahn)
  • cscope: Fix hang of cscope when given a missing file (ticket #448 Robert Morin)
  • help: allow to search for keywords also on CPlusPlus.com
  • DoxyBlocks: Clean up the UI a bit
  • DoxyBlocks: Filter out comment strings in the parameter documentation (thanks Yves De Muyter)
  • HexEditor: Change the label of the OK button to Find
  • HexEditor: Limit vertical resizing of the search dialog
  • HexEditor: Fix text misalignment when selecting numbers in the editor
  • IncrementalSearch: wx3 compatibility-fix
  • ProjectImporter: Better handling for more recent VC workspaces / project files (patch by unknown person)
  • SourceExporter/NassiShneiderman: Make sure only one File -> Export menu is created no matter which plugin is created first
  • SourceExporter: Fix undefined behaviour
  • ThreadSearch: Add option to disable/enable the autosizing of log columns (fixes #324, thanks Sergey Bezgodov)
  • ThreadSearch: Fix infinite filesystem traversal when there are cyclic symlinks present
  • todo: Display count of list item (ticket #452 Sergey Bezgodov)
  • todolist plugin: some code improvements by frithjofh
  • Valgrind: Quote the path to the xml file if needed — makes the plugin work when the project is located in a path with spaces

SDK new/changed APIs:

  • sdk: Implement cbProject::operator= so it is possible to copy projects
  • sdk: Change the return type of cbWatch::GetDebugString (ABI break)
  • sdk: Remove cbWatchesDlg::UpdateWatches, because it is no longer used
  • sdk: Add cbEVT_DEBUGGER_CONTINUED event for debugger
  • UI: Try to place child windows always on a valid display (ticket #770)
  • sdk: Make cbAssert to send SIGINT instead of SIGTERM
  • SDK: Make cbResolveSymLinkedDirPath a bit more robust
  • sdk: Add function which could be used to get the rect of the monitor where a window is placed (extracted from PlaceWindow)
  • sdk: Add API for sorting menu items in the editor’s context menu (modify all plugins to use it)
  • UI: Use sorted container to provide a more stable iteration when building the module menu
  • UI: Use the setting for caret line to show it in the syntax highlight settings

General:

  • Better support for dark themes in Linux
  • Support open file’s containing folder using the context menu of the file
  • Context menu item to show file in project tree
  • Improved lexers for various languages
  • Added the ability to show tooltips on cbAuiNotebook tabs — show full filename and project in tooltip for editor tabs
  • Added the ability to maximize editors with double-click on tab
  • Add ability to hide the editor tabs, can be toggled with “View -> Hide editor tabs” or “Ctrl+H”
  • Select file from all projects in the workspace (Search->Goto file)
  • Some accessibility improvements — more things are accessible only with a keyboard
  • Lots of improvements to the Marcos support in the options — more options support macro expansion and there are more variables
  • Added per language override for the ‘use tabs’ setting. Currently only for Python files (always use spaces) and for Makefiles (always use tabs)
  • Use gtk-notebook as default notebook on systems using wxGTK, so the notebook-tabs integrate more smooth into the systems theme
  • Active project no longer stored in workspace but in dedicated layout file for the workspace,
  • Speed up scrolling in wxScintilla
  • Harmonised find and replace dialogues
  • Added power user support for units glob feature. These are directory paths that can be specified, and all files in there will be considered as sources for the project. This can be based on a wild-card for the file types, and can be recursive. When no wild-card is specified (empty) the default CB wild-card for adding files is used
  • Made the localization to be off by default, hopefully this will minimize the number of people getting the right-to-left text issue
  • Add predefined settings for the terminals on Linux

Linux 32 and 64-bit

Distro File Download from
codeblocks_20.03_amd64_oldstable.tar.xz FossHUB or Sourceforge.net
codeblocks_20.03_i386_oldstable.tar.xz FossHUB or Sourceforge.net
codeblocks_20.03_amd64_stable.tar.xz FossHUB or Sourceforge.net
codeblocks_20.03_i386_stable.tar.xz FossHUB or Sourceforge.net
codeblocks-20.03-1.el6.rmps.tar FossHUB or Sourceforge.net
codeblocks-20.03-1.el7.rmps.tar FossHUB or Sourceforge.net
For Ubuntu, use this PPA

Note: The Linux packages above are compressed archives (tar, tar.xz or tar.bz2). When you decompress the package you downloaded on your system, you will find all the .rpm or .deb packages required to install Code::Blocks.

Note: On RedHat/CentOS older revisions of 6 (up to 6.2 as far as we know) you need to add repoforge (former rpmforge) to your repolist, to be able to install the needed wxGTK-package. See http://repoforge.org/use for an instruction.

Note: Redhat/CentOS probably also needs an installed hunspell-package, if you want to install the contrib-plugins.

Scripted Wizard

  • Apply YWX additions (GetWizardScriptFolder, FillContainerWithSelectCompilers,AppendContainerWithSelectCompilers,FillContainerWithChoices,AppendContainerWithChoices)
  • Improve Code::Blocks plugin wizard (ticket #481, thanks bluehazzard)
  • Add support for 3.1 in the WxWidgets wizard (thanks New Pagodi)
  • Fix images to be 32×32 and be transparent (fixes ticket #314)
  • Added FLUID and SDL2 templates (patch by unknown person)
  • Add new templates to automake build-system
  • Added Java wizards for fun
  • Added qt5 and improved qt4 wizard (patch by unknown person)
  • Added arduino and msp430 wizards (patch by unknown person)
  • Added SDL2 wizard (patch by unknown person)
  • Added wizard for D language (patch by unknown person)
  • Applied (modified) patch by stahta01 to relax wizards when searching for library files to link against, see:

Editor:

  • Try to fix flicker when moving the cursor with keyboard/mouse (ticket #890)
  • Disable middle-mouse button paste until user sets Settings -> Editor -> Other editor setting -> Enable marked text paste with middle mouse click (on Windows)
  • Fix non-latin keys to work in shortcuts in the editor on Linux
  • Add controls for selecting the technology and font quality
  • Auto-size marker margin column and switch to breakpoint image with the correct size
  • Make the width of the change bar to change with the zoom
  • Add an option which can be used to disable the save-to-temp-and-move operation we use by default
  • Add menu item ‘Copy full path’ in the editor tab context menu
  • Implement ‘Fold current block’ to work when the cursor is inside the block (ticket #700)
  • Fix the feature which restores editor folds when the project/editor is reloaded
  • Make it possible to set the white-space mode to “Only indent”
  • Enable pasting when there are multiple cursors and typing with them is enabled
  • Group all find related items together at the top of the context menu in the editor
  • Move the Code Refactoring -> Rename symbols menu item to the Insert submenu
  • Move Properties to the bottom of the editor’s context menu
  • Remove excessive separators from the editor’s context menu
  • Remove menu items from editor’s context menu which are duplicated in the editor’s tab
  • Move Copy/Cut/Paste from a submenu Edit to the main context menu of the editor
  • Add ‘Close to the left’ and ‘Close to the right’ menu items in the context menu for the editor’s notebook
  • Implement caret buffer in the editor (up to now we have it implemented in the EditorTweaks plugin). UI in the Settings -> Editor -> General -> Other editor settings
  • Do not mess the editor with brace selection completion when there are multiple cursors
  • Pass a theme object to editors created for new files (ticket #100)
  • Make the line for the current position during debugging to use the same colour as the caret line (ticket #659)
Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Adblock
detector