Repository navigation
v0.3.0
Pre-release
Pre-release
Our own refactorings in the Ctrl+. menu (a pre-release: they have been tried on a 50-project solution, not on many), Simplified Chinese (the extension speaks the language VS Code does), and fixes found while using them.
- Added, refactorings: Visual Studio's and Rider's refactorings the C# language server lacks, in the same Ctrl+. menu (the C# extension is needed; they run inside its server): Extract Interface (choose members, generic constraints kept), Extract Members to Partial Class, Extract Superclass, Extract Class, Pull Members Up, Push Members Down, Use Base Type Where Possible, Convert Abstract Class ↔ Interface, Move Type to Namespace, Change Signature, and Extract Method / Local Function checked by the compiler (the server's own makes uncompilable
outparameters). Choices are asked in a form in the editor area (Esc or Cancel changes nothing); every result is compiled in the projects it touches before it is applied, and nothing is applied when it would add errors; a new type or file whose name exists already is refused. Refactorings describes each one. - Added, settings:
shinobi.refactorings.disabledhides refactorings you never use (the entries sit in the Refactor menu group that fits them: extract, rewrite, move). - Added, all views: the manifest's strings are localized in
package.nls.jsonandpackage.nls.zh-cn.json(commands, submenus, settings with their descriptions and enum values, view titles, welcome pages, custom editors and task definitions), and the extension host's messages inl10n/bundle.l10n.jsonandl10n/bundle.l10n.zh-cn.jsonthrought()insrc/core/i18n.ts, which takes the English text as the key. - Added, webviews: a shared dictionary (
src/webview/shared/i18n.ts) translates the Solution Explorer, NuGet manager, Error List, Configuration Manager, Startup Projects, Publish and New Project panels; they follow the language VS Code runs in (<html lang>set by their HTML), not a setting of their own. - Added, refactorings: Change Signature (Ctrl+. on a method, constructor or local function, or on a call): reorder, add, remove, rename and retype parameters; callers, overrides, implementations, renamed uses and
<param>tags follow, the result is compiled before it is applied. - Added, rename: a file renamed in VS Code's Explorer offers to rename the type named after it (and its references), like the Solution Explorer already did; F2 on a type in a C# file named after it offers to rename the file afterwards.
- Added, Solution Explorer: file nesting puts
Order.Lines.csunderOrder.cs(parts of a partial class, also what Extract Members to Partial Class writes);fileNesting: offshows them flat. - Fixed, refactorings: Extract Members to Partial Class keeps the modifiers of the type (
internal,static,sealed...) on the new part. - Fixed, launch profiles: a
launchSettings.jsonthat starts with a byte order mark (Visual Studio writes it that way) was ignored with "InvalidSymbol at offset 0"; it is read. - Fixed, Solution Explorer: expanded folders are restored parents first, and a folder that is gone is no error line on every refresh.
- Fixed, rename: a renamed file in a project with several target frameworks is read again by the language server (the files using the type kept "could not be found" until the window was reloaded).
- Fixed, menu generator:
npm run generate:menuswrites the NLS keys of the generated commands and submenus topackage.nls.jsonagain, so regenerating the menus keeps the Chinese titles. - Fixed, Solution Explorer: the view is contributed once, to the activity bar container, and
shinobi.solutionExplorer.location'ssecondary-sidebaris applied at activation withvscode.moveViews, which moves the view to the secondary sidebar and back. A host whose core has no such container keeps the view in the side bar, without the warning the second contribution caused. - Fixed, Solution Explorer: the view no longer hides itself in a folder without
.sln/.slnxfiles; it is activated when it opens (not only by a solution in the folder) and shows "No solution in this folder" with the Create New Project... and Open Solution... buttons where the tree would be, in English and Chinese. - Fixed, Create New Project:
dotnet new's solution templates carry no type tag and were taken for project templates, so the wizard created a solution, then randotnet new slnagain in the project's folder, found no project file there and removed the whole folder, leaving nothing behind. The template is now recognised as a solution from itsSolutionclassification and creates the.slnx(.slnwith SDKs before 9.0.200, or the format picked in the wizard) without a project. The solution filter template, which also says "Solution", is not offered. - Fixed, Solution Explorer: where a view container sits is workbench state, not something a manifest can set. A container that was moved to the panel (or ended up there) is not part of either sidebar, so it can be missing from the activity bar even with the view always contributed. On activation the extension resets the container's location: it is in the activity bar (left sidebar) again; with
shinobi.solutionExplorer.location: "secondary-sidebar"its view is moved to the right sidebar, or to the left one on hosts without that container. - Added, Solution Explorer:
shinobi.solutionExplorer.locationhas a third value,manual: the extension leaves the Solution Explorer where you dragged it and does not reset its location on activation (sidebar, the default, still does, which brings back a view container stuck in the panel).