Skip to content

2.0 Alpha Preview

Pre-release
Pre-release
Compare
Choose a tag to compare
@retailcoder retailcoder released this 23 Apr 06:41

Note: This is a PREVIEW release. If you're looking for a stable version, please see v1.4.3

This version will throw an exception if the VBE contains a protected project. A hotfix will be issued shortly.

Rubberduck 2.0 features a brand new WPF UI for all docked toolwindows, a redesigned settings dialog... TONS of bug fixes (no worries, tons of new bugs, too!). We're issuing this alpha release because even without the Code Explorer, there's enough new and working material here, that we just couldn't wait to finish everything 2.0 to release them.

Thank you for your support, we hope you'll enjoy Rubberduck at least as much as we like working on it!

Installing

If you're running an earlier version of Rubberduck, uninstall it first - this version is a new major version, and introduces a number of breaking changes, both in its own code base, the exposed COM API, and the deserializable contents of configuration files.

The installer must be executed with administrative privileges. See the Installing wiki page for all the details and troubleshooting.


None of the below lists are exhaustive.

New Features

  • Smart Indenter "indent procedure" and "indent module" functionalities are now embedded into Rubberduck. If you're running 64-bit Office and you miss Smart Indenter (written in VB6, only worked in a 32-bit VBA environment), you might like this one.
  • IDE-Integrated Git Source Control is here as well.
  • "Reflection" API to write sentient VBA meta-code, e.g. iterate all methods in a VBA project.
  • Rubberduck CommandBar we're using it pretty much as a status bar really.
    • "Refresh" button parses anything that's new or modified
    • "Current selection" button, when project is parsed and unmodified, returns information (start/end of selection, declaration type, etc.) about the current selection (tooltip displays VB_Description procedure attribute if there's one)
    • "Parser Error" status button brings up "Parser Errors" search result toolwindow, to navigate any parser errors (please let us know of any code that compiles but doesn't parse, we can't seem to come up with any!)
  • Mouse and Keyboard Hooks
    • We can now track the caret position in the IDE, and evaluate menu commands' enabled state based on current selection (e.g. "Encapsulate field" is only enabled when Rubberduck recognizes you're on a public field; "Extract Method" is only enabled when the current selection would be valid for that refactoring, etc.)
    • We can now map and configure hotkeys to commands
  • Unit Tests now work in AutoCAD and Corel DRAW hosts.
  • When possible, inspection quick-fixes can be applied to an entire module/project at once
  • Inspections can be ignored using an @Ignore InspectionName annotation
  • Inspection severity can be set to DoNotShow in one click by selecting "Disable this inspection" in the inspection results toolwindow
  • New Code Inspections
    • EmptyStringLiteralInspection (replaces "" with vbNullString)
    • EncapsulatePublicFieldInspection (makes fields private, exposes them as properties)
    • MoveDeclarationCloserToUsageInpsection (reduces variable scope)
    • ProcedureCanBeWrittenAsFunctionInspection (procedure uses a ByRef parameter as a return value)
    • SelfAssignedDeclarationInspection (warns about "As New" local object variables)
    • UntypedFunctionUsageInspection (warns about use of Variant-returning functions when String returning version exists)
    • UseMeaningfulNameInspection (warns about numbered and disemvoweled identifiers)
    • WriteOnlyPropertyInspection (warns about public properties that don't expose a getter)
  • New Refactorings
    • EncapsulateField
    • ExtractInterface
    • ImplementInterface
    • IntroduceParameter
    • MoveCloserToUsage

Parser Improvements

  • Countless grammar bugs were fixed
  • Now parses asynchronously and resolves much, much faster than 1.4.x
  • Reads and accounts for module attributes (e.g. VB_PredeclaredId, VB_UserMemId, etc.)
  • Built-in declarations are now acquired by actually loading and inspecting the referenced COM type libraries
  • Precompiler directives are interpreted: "dead" code is effectively ignored (using module-scope precompiler constants)

Missing Features & Known Issues

  • Translations are not done yet (except German - thanks to @INOPIAE and @Vogel612!).
  • Code Explorer toolwindow is missing - '@Folder annotations are supported, but have no effect for now; Code Explorer 2.0 will use them to determine a "virtual folder structure" to organize code files in.
  • Indenter Settings preview box isn't updating with selection changes
    • "Undo indent" isn't implemented yet
  • Built-in declarations acquired through COM interop
    • Constants' value isn't extracted (that's a regression)
    • VT_PTR return types aren't walked to determine the "AsTypeName" of object-returning functions, which limits member call resolution of built-in references
  • Project-wide precompiler constants aren't accounted for
  • Browse v2.0 opened issues