I'm not much of c# developer (F#, C++, Perl, javascript but only bits of C#) but after 2 or 3 years of fairly intensive tactical dev in Excel I'm wondering if I can help...
the scope of the project is basically to take over the VBE and improve everything we can about it - so there's quite a lot of not-yet-implemented ideas :)
@Tim that exact part is scheduled to be pretty much redone soon, @Hosch250 wants to implement some kind of tree structure a la Roslyn, so we stop needing to parse an entire module whenever a comma changes somewhere
incremental parsing can be a pain... I'm trying to think if there's anything in VBA that would make it so...
(don;t know if you've ever done much perl, but the syntax is deliberately ambiguous and the way a statement is parsed can change completely by what declarations have gone before)
the real hard part is resolving identifier references; whenever we parse one module, we don't know whether identifier references in other modules need to be added or removed, so we re-walk every parse tree (one per module) just to re-resolve identifier references everywhere. it works, but it's terribly inefficient.
one thing we're struggling with, is determining the underlying type of a document-type module, e.g. knowing that ThisWorkbook is a Workbook object, without having to write any host-specific code to do it
I used to wrap up my perl code inside a Windows Scripting Host wrapper and then plug that into the IDE via some pretty basic interfaces.... meant I had a text (no compile) scripting language wrapped in a COM layer that plugged into the editor... and a better language than VBA for doing it :)
> Also, it would help if you can upload your rubberduck.config file (should be in C:\Users{user}\AppData\Roaming\Rubberduck) or a screenshot of your indenter settings.
Wait a second, if you look at the UserForm class in the VBE object browser, Initialize, Terminate, and QueryClose aren't listed as events. They have to be inherited.
I'm thinking Initialize and Terminate are inherited from the generic VB Class class. Load and QueryClose probably come from some arcane MFC class someplace.
Except it's so freakin' old it appears to be written in ANSI C...
Coming from JS, I've realized the methods for working with arrays in VBA are very minimal. Because of this, I've created this mess of code to find the index of certain items within 2D arrays. The basic idea of this code is to go through a bunch of open reports, store them in an array, and pull th...
Found it with a hex editor in VBE7.dll. It's part of the DFrame class:
DFrame..Activate....Deactivate..Resize..QueryClose..Cancel As Integer,CloseMode As Integer......0ñ#.................´?..Initialize......Xñ#.................É?..Terminate.......ClientLeft..ClientTop...ClientWidth.ClientHeight........Name....Visible.Ðñ#..DÁ€...ú:...........}A......RightToLeft.Move........SetFocus....ZOrder.............. ò#...........$.õ>......Hide....<ò#...........$..?..PrintForm...\ò#
@Hosch250 let's have an IDeclarationsProvider interface and implement a class whose role will be to spit out an IEnumerable<Declaration> with all the built-in declarations we can't get through the COM collector
e.g.
public interface IDeclarationsProvider
{
IEnumerable<Declaration> Gimme(); // hmm somehow would be nice if the COM collector could implement that interface too
}
then let's move the Debug and Err stuff into an implementation of it
and make the COM collector (or the parser?) take an IEnumerable<IDeclarationsProvider> dependency and just multi-bind all implementations with Ninject so we can just iterate them all and generate all the Declarations we need
that way when we come across new built-in declarations we need to add, we can just implement that interface and it'll get picked up automagically
@Hosch250 and then review all inspection issues, stabilize rename refactoring as much as possible, release and move on to that tree thing
@Hosch250 let's have an IDeclarationsProvider interface and implement a class whose role will be to spit out an IEnumerable<Declaration> with all the built-in declarations we can't get through the COM collector
we want the missing events, but also the missing methods and their parameters too
DFrame..Activate....Deactivate..Resize..QueryClose..Cancel As Integer,CloseMode As Integer......0ñ#.................´?..Initialize......Xñ#.................É?..Terminate.......ClientLeft..ClientTop...ClientWidth.ClientHeight........Name....Visible.Ðñ#..DÁ€...ú:...........}A......RightToLeft.Move........SetFocus....ZOrder.............. ò#...........$.õ>......Hide....<ò#...........$..?..PrintForm...\ò#
wow, did you know if you add empty handlers for all form events, and only write code in one of them, that the VBE removes the empty handlers when you compile?
@Hosch250 oh right, just the ones we're not picking up from the MSForms type lib already
> Here is the sample formatted codes: 
And here is my setting:  Thank you.