Releases: BigBahss/vscode-cmantic
Releases · BigBahss/vscode-cmantic
v0.9.0
[0.9.0] - June 2, 2021
Added
- Added
Update Function Signature
code-action. After changing a function signature, this code-action will be provided to update that function's declaration or definition. - Added a setting
Code Actions: Enable Update Function Signature
. When disabled, C-mantic will not spend any time tracking changes to function signatures. - Added completion suggestions to
Add Include
. - C-mantic now has full documentation at https://bigbahss.github.io/vscode-cmantic/. Documentation can be opened directly from VS Code through the
Refactor...
andSource Actions...
menus.
Fixed
- Fixed another bug when determining if an existing header guard matches the configured settings.
v0.8.1
[0.8.1] - May 1, 2021
Changed
- Improved UI elements (For example, when generating a constructor, you may not select delegating constructor with other initializers. Invalid options will automatically uncheck themselves.)
Fixed
- Fixed a bug when determining if an existing header guard matches the configured settings.
- Improved the performance of generating getters and setters. (#29)
v0.8.0
[0.8.0] - April 17, 2021
Added
- Extended the capability of
Add Header Guard
to update existing header guards if they do not match the configured settings. The code-action will display asAmend Header Guard
. (#26) - Added
cmantic.generateRelationalOperators
command/code-action. Works very similar tocmantic.generateEqualityOperators
andcmantic.generateStreamOutputOperator
. (#28)
Fixed
- Fixed a bug where
Add Include
would place the include between the#ifndef
and#define
of a header guard when there are no includes yet in the file. - Fixed some problems stemming from anonymous scopes (#27):
- Definitions can now be properly generated from anonymous namespaces.
- Getters/Setters can now be generated for members of anonymous sub-classes (the functions are generated as members of the named parent class).
- With the cursor inside of an anonymous sub-class,
Generate Equality Operators
andGenerate Stream Output Operator
will now operate on the named parent class.
- Fixed an error thrown while trying to generate code after the last line or before the first line in the file (realistically this would only happen if the file did not end in a newline and a better position could not be found). (#27)
v0.7.1
[0.7.1] - April 14, 2021
Added
- Added a setting
Cpp: Friend Comparison Operators
to generate equality operators as friend functions rather than member functions.
Changed
Create Matching Source File
will no longer ask to add definitions if there are no eligible functions.
Fixed
- Fixed a bug when parsing the first preprocessor statement in a file.
- Fixed C++ specific code-actions getting provided for C files.
v0.7.0
[0.7.0] - April 8, 2021
Added
- Added
cmantic.generateStreamOutputOperator
command/code-action. Works very similar tocmantic.generateEqualityOperators
. (#23) - Added
cmantic.addDefinitions
command/code-action, accessible through theRefactor...
menu. (#25) - Expanded support for multi-root workspaces. Most settings can now be configured per workspace folder.
Changed
- Removed the setting
C_mantic.cpp.indentation.namespace
. Namespace indentation will always be auto-detected now.
Fixed
- Fixed a bug when determining if a cached matching header/source file still exists. This would cause some commands to throw an error if the file has been removed.
- Fixed a bug where name qualification of generated code would contain duplicate namespace names.
v0.6.3
[0.6.3] - March 31, 2021
Added
- Added a setting
Accessor: Bool Getter Is Prefix
to prefix getters ofbool
members with 'is' (e.g.bool enabled
generatesbool isEnabled() const
). - Base classes can now be selected to compare when using
Generate Equality Operators
.
Changed
- Searching for matching header/source files will now take into account the settings
Files: Exclude
andSearch: Exclude
. - Setters will now be generated with a more appropriate parameter name instead of 'value'.
Add Definition
will now check for C++20'sconsteval
keyword when determining where a definition can be placed.- Extension is now packaged with webpack to improve load times.
Fixed
- Fixed a bug where
Add Declaration
andMove Definition into class
quick-fixes weren't accessible from theRefactor...
menu. - Fixed an oversight where attributes would end up in getter's and setter's return/parameter type.
- Fixed a bug in identifying ranges of member access levels when consecutive access levels are the same.
v0.6.2
[0.6.2] - March 14, 2021
Changed
- Generating getters, setters, and equality operators will now insert a
public:
access specifier if one is not found in the class.
Fixed
- Fixed recognition of function definitions and declarations. Before, if a function definition ended with a semi-colon, it was recognized as a declaration.
- Improved recognition of virtual functions, and functions that are deleted or defaulted.
- Fixed
Move Definition into/out-of class body
code-action being suggested for free functions. - Fixed
Generate Constructor
recognizing thevirtual
keyword as a base class. - Fixed namespace generation for qualified namespace names and
inline
namespaces. - Improved
Auto
namespace indentation. - Fixed a bug when finding matching header/source files and when sorting directories displayed by
Create Matching Source File
. - Fixed a bug where using
Move Definition into class
and selecting public access would do nothing. - Fixed an error thrown on
clangd
when anonymous structs exist in the file.
v0.6.1
[0.6.1] - March 11, 2021
Added
- Added support for explicit template specialization. Definitions for specialized function templates/member functions of specialized class templates can now be generated in the matching source file.
- Added support for nested templates.
Changed
- Placement of generated code will now account for trailing comments.
- Template parameter(s) will now be added to the parameter of equality operators.
Fixed
- Fixed title of
Add Declaration
code-action displaying the wrong target file. - Fixed recognition of explicit template specializations, and multi-lined template statements.
- Fixed placement of
inline
specifier for function templates (inline
was getting inserted before the template statement, which was a syntax error). - Fixed an issue where, under certain conditions, generated definitions/declarations would be placed within unrelated blocks of code (this only happened on
ms-vscode.cpptools
and was a result of how it provides definitions/declarations for overloaded functions and undefined functions). - Fixed name qualification of generated code in the case that a parent scope has a qualified name.
- Fixed a bug that would throw an error when generating equality operators for an empty class/struct.
- Fixed
Add Declaration
andMove Definition
not recognizing parent class templates. - Fixed recognition of leading comments. Comments that had multiple newlines in-between it and a symbol were incorrectly being recognized as leading comments.
- Fixed a bug where generated code would be placed at the very top of the file.
v0.6.0
[0.6.0] - March 09, 2021
Added
- Added
cmantic.addDeclaration
command/code-action.Add Declaration
will add a declaration of a function to the corresponding header file if the function is not already declared there. If the function is a member function, the declaration will be added to the class, wherever it is defined. Additionally for member functions,Add Declaration
will be provided as aQuick Fix
(suggested in the blue light-bulb menu), because defining a member function outside of the class with no declaration is an error. (#21) - Added a setting
Code Actions: Enable Add Declaration
to control whether theAdd Declaration
code-action is suggested (light-bulb menu). (#21) - Added more variables for generating header guard
#define
's. SeeHeader Guard: Define Format
in the settings for the full list of available variables.
Changed
Move Definition into class
will now be available for member functions that are not declared in the class. Similar toAdd Declaration
, this code-action will be provided as aQuick Fix
, since it also fixes the underlying error. (#21)- Changed the way that code generation determines line-spacing: If code is being inserted between 2 non-empty lines, it will no longer place an empty line in-between.
Fixed
- Fixed whitespace alignment of
Add Definition
for member functions in the case that the declaration is not indented. - Fixed indentation of code generated in classes in the case that the class is empty (before, if the class was empty, the new code would not be indented).
v0.5.2
[0.5.2] - February 28, 2021
Added
- Template support has been expanded to properly generate member functions of class templates. Template parameter packs and default template arguments are now handled properly. (#18)
Changed
- Function templates and member functions of class templates can no longer be generated outside of header files. If getter/setter definition locations are set to generate in source files, it will fallback to generating in the current file. (#18)
- Generating constructors will no longer prompt the user to select initializers if the class has no initializers, instead of showing an empty prompt.
- Generating equality operators will no longer prompt the user to select member variables to compare if the class has no member variables, instead of showing an empty prompt.