Skip to content

Commit

Permalink
Merge pull request #6114 from retailcoder/Prep
Browse files Browse the repository at this point in the history
Version bump 2.5.9
  • Loading branch information
retailcoder authored Jun 30, 2023
2 parents 2cee32f + a0d0311 commit d03b512
Show file tree
Hide file tree
Showing 43 changed files with 504 additions and 319 deletions.
62 changes: 39 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,34 @@
<!-- ![banner](https://user-images.githubusercontent.com/5751684/113501222-8edfe880-94f1-11eb-99a9-64583e413ef3.png) -->
[**Installing**](https://github.com/rubberduck-vba/Rubberduck/wiki/Installing)[Contributing](https://github.com/rubberduck-vba/Rubberduck/blob/next/CONTRIBUTING.md)[Attributions](https://github.com/rubberduck-vba/Rubberduck/blob/next/docs/Attributions.md)[Blog](https://rubberduckvba.blog)[Wiki](https://github.com/rubberduck-vba/Rubberduck/wiki)[rubberduckvba.com](https://rubberduckvba.com)

<a href='https://ko-fi.com/N4N2IWEIG' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi1.png?v=3' border='0' alt='Support us on ko-fi.com' /></a>
## Links

- [**Installing**](https://github.com/rubberduck-vba/Rubberduck/wiki/Installing)
- [Contributing](https://github.com/rubberduck-vba/Rubberduck/blob/next/CONTRIBUTING.md)
- [Attributions](https://github.com/rubberduck-vba/Rubberduck/blob/next/docs/Attributions.md)
- [Wiki](https://github.com/rubberduck-vba/Rubberduck/wiki)
- [Website](https://rubberduckvba.com)
- [Blog](https://rubberduckvba.blog)
- [Shop](https://ko-fi.com/rubberduckvba/shop)

## Build Status
<a href='https://ko-fi.com/N4N2IWEIG' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi1.png?v=3' border='0' alt='Support us on ko-fi.com' /></a>

|Branch | Build Status | Release notes &amp; Download Links |
|------------|--------------|-|
| **main** | ![main branch build status][mainBuildStatus] | [latest release](https://github.com/rubberduck-vba/Rubberduck/releases/latest) |
| **next** | ![next branch build status][nextBuildStatus] | [pre-releases](https://github.com/rubberduck-vba/Rubberduck/releases) |
## Releases

[nextBuildStatus]:https://ci.appveyor.com/api/projects/status/we3pdnkeebo4nlck/branch/next?svg=true
[mainBuildStatus]:https://ci.appveyor.com/api/projects/status/we3pdnkeebo4nlck/branch/main?svg=true
- The [latest release](https://github.com/rubberduck-vba/Rubberduck/releases/latest)
- See [all releases](https://github.com/rubberduck-vba/Rubberduck/releases) including pre-release tags

---

## [License (GPLv3)](https://github.com/rubberduck-vba/Rubberduck/blob/next/LICENSE)

Copyright &copy; 2014-2021 Rubberduck project contributors.
Copyright &copy; 2014-2023 Rubberduck project contributors.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.en.html) for more details.

---

## [JetBrains](https://www.jetbrains.com) | [ReSharper](https://www.jetbrains.com/resharper/)

[![JetBrains ReSharper logo](https://cloud.githubusercontent.com/assets/5751684/20271309/616bb740-aa58-11e6-91c9-65287b740985.png)](https://www.jetbrains.com/resharper/)

Since the project's early days, JetBrains' Open-Source team has been supporting Rubberduck with free OSS licenses for all core contributors - and we deeply thank them for that. ReSharper has been not only a tool we couldn't do without; it's been an inspiration, the ultimate level of polished perfection to strive for in our own IDE add-in project. So just like you're missing out if you write VBA and you're not using Rubberduck, you're missing out if you write C# and aren't using ReSharper.

<sub>Note: Rubberduck is not a JetBrains product. JetBrains does not contribute and is not affiliated to the Rubberduck project in any way.</sub>

---

## What is Rubberduck?

The Visual Basic Editor (VBE) has stood still for over 20 years, and there is no chance a first-party update to the legacy IDE ever brings it up to speed with modern-day tooling. Rubberduck aims to bring the VBE into this century by doing exactly that.
Expand All @@ -43,11 +37,11 @@ Read more about contributing here:

[![contribute!](https://user-images.githubusercontent.com/5751684/113513709-071dcc80-9539-11eb-833d-d21532065306.png)](https://github.com/rubberduck-vba/Rubberduck/blob/next/CONTRIBUTING.md)

The add-in has *many* features - below is a quick overview.
The add-in has *many* features - below is a quick overview. See https://rubberduckvba.com/features for more details.

### Enhanced Navigation

The Rubberduck *command bar* displays docstring for the current member
The Rubberduck *command bar* displays docstring for the current member.

![command bar](https://user-images.githubusercontent.com/5751684/113501975-25fb6f00-94f7-11eb-9189-fcf2a0dd98da.png)

Expand Down Expand Up @@ -77,7 +71,7 @@ Special comments that become a game changer with Rubberduck processing them: org

### More?

Of course there's more! There's tooling to help synchronizing the project with files in a folder (for source/version control), some auto-completion features like self-closing parentheses and quotes; there's a regular expression assistant, a replacement for the VBE's *add/remove references* dialog, and so many other things to discover, and yet even more to implement.
Of course there's more! There's tooling to help synchronizing the project with files in a folder (useful for source/version control!), some auto-completion features like self-closing parentheses and quotes; there's a regular expression assistant, a replacement for the VBE's *add/remove references* dialog, and so many other things to discover, and yet even more to implement.

---

Expand All @@ -93,3 +87,25 @@ Rubberduck isn't a lightweight add-in and consumes a large amount of memory. So
Join us on our [Discord server](https://discord.gg/MYX9RECenJ) for support, questions, contributions, or just to come and say hi!

For more information please see [Getting Started](https://github.com/rubberduck-vba/Rubberduck/blob/next/docs/GettingStarted.md) in the project's wiki, and follow the project's blog for project updates and advanced VBA OOP reading material.

---

## Roadmap

After over two years without an "official" new release, Rubberduck version jumped from 2.5.2 to 2.5.9, adding minor but interesting features to an already impressive array.

### The road ahead

Rubberduck 2.x is now planned to end at 2.5.9.x, perhaps with a number of small revisions and bug fixes, but nothing major should be expected, as the developers' attention is shifting to the 3.0 project:

- Parsing and understanding VBA code is moving to a language (LSP) server
- We're making a new editor _inside_ (for now) the Visual Basic Editor that will be the LSP client
- Baseline server-side feature set for 3.0 is everything 2.5.9 does
- Baseline client-side feature set for 3.0 is the 2.5.x UI (perhaps tweaked a bit/lot) hosted in the Rubberduck Editor

Fully controlling the editor opens Rubberduck to everything we ever dreamed of:

- In-editor syntax and static code analysis reporting and quick-fixing
- Full editor theming, custom syntax highlighting

See the [Rubberduck3](https://github.com/rubberduck-vba/Rubberduck3) repository for more information.
20 changes: 16 additions & 4 deletions Rubberduck.CodeAnalysis/Inspections/Abstract/InspectionBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,14 @@ public IEnumerable<IInspectionResult> GetInspectionResults(CancellationToken tok
.Where(ir => !ir.IsIgnoringInspectionResult(finder))
.ToList();
stopwatch.Stop();
Logger.Trace("Intercepted invocation of '{0}.{1}' returned {2} objects.", GetType().Name, nameof(DoGetInspectionResults), result.Count);
Logger.Trace("Intercepted invocation of '{0}.{1}' ran for {2}ms", GetType().Name, nameof(DoGetInspectionResults), stopwatch.ElapsedMilliseconds);
if (result.Count > 0)
{
Logger.Trace("'Returned {2} results, completed in {3}ms.", result.Count, stopwatch.ElapsedMilliseconds);
}
else
{
Logger.Trace("Completed in {2}ms", stopwatch.ElapsedMilliseconds);
}
return result;
}

Expand All @@ -103,8 +109,14 @@ public IEnumerable<IInspectionResult> GetInspectionResults(QualifiedModuleName m
.Where(ir => !ir.IsIgnoringInspectionResult(finder))
.ToList();
stopwatch.Stop();
Logger.Trace("Intercepted invocation of '{0}.{1}' returned {2} objects.", GetType().Name, nameof(DoGetInspectionResults), result.Count);
Logger.Trace("Intercepted invocation of '{0}.{1}' ran for {2}ms", GetType().Name, nameof(DoGetInspectionResults), stopwatch.ElapsedMilliseconds);
if (result.Count > 0)
{
Logger.Trace("'Returned {2} results, completed in {3}ms.", result.Count, stopwatch.ElapsedMilliseconds);
}
else
{
Logger.Trace("Completed in {2}ms", stopwatch.ElapsedMilliseconds);
}
return result;
}

Expand Down
1 change: 1 addition & 0 deletions Rubberduck.Core/Rubberduck.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<PackageReference Include="NLog.Schema">
<Version>4.5.10</Version>
</PackageReference>
<PackageReference Include="Octokit" Version="6.0.0" />
<PackageReference Include="System.IO.Abstractions" Version="12.2.1" />
<PackageReference Include="System.ValueTuple">
<Version>4.5.0</Version>
Expand Down
23 changes: 14 additions & 9 deletions Rubberduck.Core/Templates/TemplateFileHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,21 @@ public interface ITemplateFileHandlerProvider

public class TemplateFileHandlerProvider : ITemplateFileHandlerProvider
{
private readonly string _rootPath;
private readonly Lazy<string> _rootPath;
private readonly IFileSystem _filesystem;

public TemplateFileHandlerProvider(
IPersistencePathProvider pathProvider,
IFileSystem fileSystem)
{
_rootPath = pathProvider.DataFolderPath("Templates");
_rootPath = new Lazy<string>(() => pathProvider.DataFolderPath("Templates"));
_filesystem = fileSystem;
}

public ITemplateFileHandler CreateTemplateFileHandler(string templateName)
{
if (!_filesystem.Directory.Exists(_rootPath))
{
_filesystem.Directory.CreateDirectory(_rootPath);
}

var fullPath = _filesystem.Path.Combine(_rootPath, templateName);
EnsureRootPathExists();
var fullPath = _filesystem.Path.Combine(_rootPath.Value, templateName);
if (!_filesystem.Directory.Exists(_filesystem.Path.GetDirectoryName(fullPath)))
{
throw new InvalidOperationException("Cannot provide a path for where the parent directory do not exist");
Expand All @@ -42,9 +38,18 @@ public ITemplateFileHandler CreateTemplateFileHandler(string templateName)

public IEnumerable<string> GetTemplateNames()
{
var info = _filesystem.DirectoryInfo.FromDirectoryName(_rootPath);
EnsureRootPathExists();
var info = _filesystem.DirectoryInfo.FromDirectoryName(_rootPath.Value);
return info.GetFiles().Select(file => file.Name).ToList();
}

private void EnsureRootPathExists()
{
if (!_filesystem.Directory.Exists(_rootPath.Value))
{
_filesystem.Directory.CreateDirectory(_rootPath.Value);
}
}
}

public interface ITemplateFileHandler
Expand Down
Loading

0 comments on commit d03b512

Please sign in to comment.