« first day (572 days earlier)      last day (2608 days later) » 

00:01
RELOAD!
[Hosch250/Rubberduck] 19 commits. 18280 additions. 6729 deletions.
[retailcoder/Rubberduck] 11 commits. 1718 additions. 542 deletions.
[rubberduck-vba/Rubberduck] 12 commits. 1 closed issue. 3 issue comments. 17925 additions. 6377 deletions.
[skiwi2/OLog] 3 commits. 2 opened issues. 1 closed issue. 93 additions. 3 deletions.
[skiwi2/OLog-Userscript] 2 opened issues.
 
1 hour later…
01:11
[Hosch250/Rubberduck] Hosch250 pushed commit 46bb2160 to AutoSave: AutoSaveSettings
@Mat'sMug Like that ^?
 
2 hours later…
02:53
> Much better, although the property change notifications are a bit overkill and make me wonder why you didn't implement INotifyPropertyChanged (in the "might as well" category)... the final/release code will fetch the settings as they are needed, from the serialized settings file. But yeah, better! :+1:
@Mat'sMug I did the events so you can change the settings class from the settings, and everything just propagates through.
But yes, that should be INotifyPropertyChanged.
Personally, I think we should make the entire settings work through events so we don't have to unload/reload everything.
Except the menus, of course.
03:10
Hey MZ-Tools 8 is like $80??!!
@Hosch250 menus don't reload anymore ;-) check out the Localize() method; the menu captions are a Func<string>, not just a string :-)
OK.
So, does anything reload?
It shouldn't have to with the settings rewrite.
Nope. Everything is super-clean!
[Hosch250/Rubberduck] Hosch250 pushed commit a670307b to AutoSave: Use INotifyPropertyChanged
> Theoretically. Because of people who decided to be less theoretical about it, we had to institute some throttling.
That's from Pops in response to:
> So, theoretically, I could query your server for some 20k numbers if I didn't want to get rate-banned?
"for some values of 'theoretically'"
03:15
OK, does that look good enough for a PR?
@Mat'sMug If you start making people pay for RD, I insist you hire me.
you're brave. I would have just derived from ViewModelBase and called it a day haha
@Mat'sMug Huh?
I've never even heard of that class.
every ViewModel derives from it
I've never worked in any XAML control.
Should it derive from it, or is my implementation good?
it's basically an INotifyPropertyChanged implementation, with a static helper method that takes a Bitmap and returns a BitmapImage
I think it's good
OK, PR 911 - call the cops.
I like how @Duga pops in the right monitor and GMail pops in the left monitor at the same time
I turned GitHub emails off.
I like my GitHub spam :)
I got sick of throwing it out.
03:21
lol, the inbox tab says "Inbox (482) - [email protected]"
I was going to have to upgrade my garbage service if I didn't change something.
LOL, my inbox has 10 items - all read.
And, I've got to do the dishes now. See you later.
later! I'll be watching a movie, I'll probably get back to that CodeExplorerViewModel after
> Use default timer of 10 minutes (at least, I think 10,000 ms == 10 min).
lol
10K ms == 10 seconds
04:00
@Mat'sMug OK, I don't have time to fix it, but yeah, R# added the file (didn't know it did that).
Yes, I meant to address 909 in there.
Yeah, those methods can be inlined.
And, I need to make it not prompt (or at least configurable to prompt) if the file does not already exist.
04:59
@Mat'sMug Should I allow it to prompt the user to save if it isn't saved yet, or just do nothing?
@Mat'sMug Yep, I figured that out.
600,000 ms == 10 min.
05:10
[Hosch250/Rubberduck] Hosch250 pushed commit 9e7958e5 to AutoSave: Update Autosave.
 
1 hour later…
06:16
@Hosch250 you'll have to figure out a way to check if the host Office document is saved or not for that
Can you get the filename?
If it's null or empty, don't autosave
Or, optionally still trigger on unsaved host, that'll prompt
I'd have that disabled by default though
06:51
hmm... async parsing somehow does block the VBE if the project is large enough
 
1 hour later…
08:16
[retailcoder/Rubberduck] retailcoder pushed commit f6ac72bf to CodeExplorer: code explorer window builds and shows up... still without any content.
 
3 hours later…
11:05
> Need to, no. You're right. It doesn't need to, but it probably should @retailcoder. The only use case that I can think of that wouldn't have unmanaged resources is some sort of web interface or some such thing. If we put it on HostApplicationBase we need to program against its interface instead of IHostApplication, no?
 
5 hours later…
15:54
@Mat'sMug It throws an exception when the file doesn't exist.
Yes, I did that in the latest commit.
Currently, it doesn't save at all. I'm not sure whether to leave it like that, or provide an option to attempt to save anyway.
@RubberDuck Is that better?
[Hosch250/Rubberduck] Hosch250 pushed commit 228ea798 to AutoSave: Implement full disposable pattern.
16:26
 
1 hour later…
18:13
@Hosch250 Yes, but no. One sec.
Just rewrote my cover letter... Not fun.
    [ComVisible(false)]
    public abstract class HostApplicationBase<TApplication> : IHostApplication
        where TApplication : class
    {
        private readonly string _applicationName;
        protected readonly TApplication Application;
        protected HostApplicationBase(string applicationName)
        {
            _applicationName = applicationName;

            try
            {
                Application = (TApplication)Marshal.GetActiveObject(applicationName + ".Application");
Sorry about the tabs vs spaces thing there....
18:30
[Hosch250/Rubberduck] Hosch250 pushed commit 0685fb7a to ProcuedureShouldBeFunction: Save added files so I can switch forks.
s/forks/branches.
@RubberDuck Why 'GC.SuppressFinalize(this)'?
We got rid of all those before, when we were fixing the memory leaks.
I don't remember if I checked whether it was required or not, but it certainly didn't hurt not having them.
@Hosch250 because we're telling the garbage collector that we're cleaning up our resources ourselves.
OK.
So, what if we clean up our resources, then have the GC re-clean them up?
Is it just overkill, or something?
Idk. Just following M$ recommendations.
> The Framework provides the System.IDisposable interface that should be implemented to provide the developer a manual way to release unmanaged resources as soon as they are not needed. It also provides the GC.SuppressFinalize method that can tell the GC that an object was manually disposed of and does not need to be finalized anymore, in which case the object’s memory can be reclaimed earlier. Types that implement the IDisposable interface are referred to as disposable types.
18:45
[Hosch250/Rubberduck] Hosch250 pushed commit 89a9fd9d to AutoSave: Re-re-fix issue #909
Also keep in mind that IHostApplication will be null with nothing to dispose/release when the host isn't an Office application. We've got users running RD in all kinds of non-Office settings, too.
Hmm wait, that's not relevant
@Mat'sMug Would it be OK to use a Listener for Procedure Should Be Function?
I'm using a listener on ArgList.
20:06
How's that?
The fix doesn't really work yet.
[Hosch250/Rubberduck] Hosch250 pushed commit a0a12ab7 to ProcuedureShouldBeFunction: Inspection works, fix doesn't.
20:55
@Hosch250 great! Make the wording more like a suggestion though
Later.
21:10
This is one ugly LINQ statement:
return state.ArgListsWithOneByRefParam
    .Where(context => context.Context.Parent is VBAParser.SubStmtContext)
    .Select(context => new ProcedureShouldBeFunctionInspectionResult(this,
        new QualifiedContext<VBAParser.ArgListContext>(context.ModuleName,
            context.Context as VBAParser.ArgListContext),
        new QualifiedContext<VBAParser.SubStmtContext>(context.ModuleName,
            context.Context.Parent as VBAParser.SubStmtContext),
        new QualifiedContext<VBAParser.ArgContext>(context.ModuleName,
This inspection is definitely going up for review.
> I am trying to use the Find All References feature to detect locations where a given `Function` is used. (Specifically, I want to find usages of [`Chart_GetObjectsFromObject`](https://github.com/byronwall/bUTL/blob/master/src/code/Chart_Helpers.bas#L45) used throughout the other modules in the bUTL add-in).

**Problem**: Rubberduck is not correctly finding references in modules outside of the module where the `Function` is declared.

I don't think the problem is specific to that add-in,
21:41
> Thanks for this! I pasted the two supplied snippets in a new VBA project, in their respective module.

For some reason that I need to investigate, the `'Module2 Code` comment stalls the 2.0 parser. Anyway so I removed the heading comments and finally got the parser into a "ready" state. I suspect that weird glitch might have something to do with a `COMException` @Hosch250 identified in the comment parser earlier this week.

Anyway so I right-clicked the reference to the `test()` function i
Gosh, this is becoming ugly fast.
[Hosch250/Rubberduck] Hosch250 pushed commit 70b021e6 to ProcuedureShouldBeFunction: Changes Sub into Function. Definitely needs to be cleaned up.
@Mat'sMug Is there a simple way to get the declaration for a QualifiedContext?
Ugh. Now this is getting tricky.
22:00
> (I had to do a refactor/rename to verify if all references were effectively found, since the "find all references" UI for 2.0 isn't, well, designed yet)
@Mat'sMug Should this work?
var procedure =
    _state.AllDeclarations.Single(d =>
            !d.IsBuiltIn &&
            d.Project == _subStmtQualifiedContext.ModuleName.Project &&
            d.ComponentName == _subStmtQualifiedContext.ModuleName.ComponentName &&
            d.Context is VBAParser.SubStmtContext &&
            d.IdentifierName == procedureName);
It should work almost all the time, but almost all the time isn't good enough.
22:11
> The 1.x "simple list" dockable toolwindow won't fit in with the sleek design of the 2.0 UI.

The corresponding 2.0 (XAML) UI needs to still be dockable, but also needs a separate toolwindow for each use - we want to be able to browse identifier references and still have other "simple list" navigation features displayed, such as "find all implementations".

We need it to have tabs, so Rubberduck "remembers" previous searches; The hard part will be to keep up with code changes, so that navig
@Hosch250 use AllUserDeclarations to get rid of the !IsBuiltIn check.. or did I push that change?
@Mat'sMug I pulled from Next, and it isn't there.
Rubberduck-vba's Next.
Ok
@Hosch250 what's that for?
That is to get the declaration for the currently-being-changed Sub.
You can get the current procedure's name and type from the VBE API, and then you have an identifier to look for...
22:17
I have the current Procedure's identifier already.
var procedureName = _subStmtQualifiedContext.Context.ambiguousIdentifier().GetText();
22:36
Use the QualifiedContext's selection, there's an extension method that returns true when you give it a selection that intersects. IIRC it's Contains(QualifiedSelection)
But first filter should be the identifier name, like, don't bother with a declaration's selection if the name doesn't match
@Hosch250 why wouldn't it work all the time?
Oh, OK.
I don't know, I just don't know VBA enough to know all the edge cases.
I'd use SingleOrDefault to get a null instead of an exception if no match is found
There has to be a match, because I wouldn't be working with it otherwise.
I reversed the entire expression because it will likely help the short circuiting.
Ok, but shit happens. If that call throws and nothing catches it, everything goes down with it.
22:44
I'd rather it be null when shit happens, with code that handles the null, than having to sprinkle try/catch blocks everywhere
Yup.
Done.
Ugh, 1-based/0-based indexing conversion caught me again.
New:
Function fo(ByVal f As Boolean) As Boolean
    fo = f
End Function

Function dd(ByVal ff As Boolean, ByVal dd As Integer) As Boolean
    dd = ff
End Function

Function ff(ByVal d As Integer) As Integer
    ff = d
End Function

Sub xx()
    f = fo(f)
    ff = dd(ff, dd)
    d = ff(d)
End Sub
Old:
Sub fo(ByRef f As Boolean)

End Sub

Sub dd(ByRef ff As Boolean, ByVal dd As Integer)

End Sub

Sub ff(d As Integer)

End Sub

Sub xx()
    fo True
    dd True, 1
    ff 9
End Sub
Does that look right?
Umm, no it doesn't.
This looks right:
Function fo(ByVal f As Boolean) As Boolean
    fo = f
End Function

Function dd(ByVal ff As Boolean, ByVal dd As Integer) As Boolean
    dd = ff
End Function

Function ff(ByVal d As Integer) As Integer
    ff = d
End Function

Sub xx()
    f = fo(True)
    ff = dd(True, 1)
    d = ff(9)
End Sub
Hi, @Dean.
23:32
@Hosch250 gotta love ambiguous names... that resolves correctly?
Yes.
The parser/resolver work great.
(self-pat-on-the-back) :-)
@Hosch250 until we find another bug, that is!
OK, you can check that PR when you are ready.
23:34
That one was kind of fun.
I'm posting it on CR now.
So, what Subs qualify for that?
Any Sub with a single ByRef parameter.
I use a Listener to get all ArgListContext's that have 1 ByRef parameter.
The inspection selects all Subs from that list (context.Parent).
The quick fix updates the sub, then all references.
Everything seems to be working very sweetly.
That's a bit overkill and slows down the parser, we should limit the number of listeners as much as possible - OTOH it considerably speeds up an expensive inspection.
23:37
BTW, did you ever try to get the unit tests working?
Yeah, the other option is digging around in the parse tree to get things.
Nope, I've been trying to figure out a neat way to expose a tree structure to the code explorer
@Hosch250 yeah, I can see why you went that way
I wish I could get past that issue. I think @RubberDuck did it last time.
@Mat'sMug I have enough experience the other way with Remove/Reorder :P
23:49
[Hosch250/Rubberduck] Hosch250 pushed commit dd7c4d16 to ProcuedureShouldBeFunction: I didn't need to DI the ArgListContext through two classes...
Ugh, bug detected.

« first day (572 days earlier)      last day (2608 days later) »