Author Topic: find references and irrelevant results  (Read 3452 times)

IkerAriz

  • Senior Community Member
  • Posts: 148
  • Hero Points: 6
Re: find references and irrelevant results
« Reply #15 on: October 03, 2018, 09:49:58 pm »
Quote
It will require displaying a progress dialog...
Quote
Also, if you cancel, you will be left with files that are unvetted and unexpanded, just like before.

I was hoping the feature would work like so:
  • I right click on a symbol and select "Find References without false positives" (or something like that).
  • SE looks at each candidate file, fully scans it for references, and adds the file and its references to the References window only if it has references. Unvetted files or files without references are never added to the window at all.
  • While SE searches and adds items to the References window the status bar shows "Searching:... Press any key to stop". No need for a popup dialog to stop the search.
  • As a result of the above, if I hit a key to stop the search the window will only contain the vetted files and references found so far.

Ideally, this method would be available as a third "find references" option in addition to the existing two so that a separate context menu entry would be unnecessary. Ie, "incrementally enabled", "incrementally disabled" and "without false positives".
« Last Edit: October 04, 2018, 12:49:43 am by IkerAriz »

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2900
  • Hero Points: 438
Re: find references and irrelevant results
« Reply #16 on: October 04, 2018, 02:21:47 pm »
The progress dialog is a requirement, you have to give the user an idea of how long something is going to take and an obvious way to stop it.  The status bar is not obvious enough.

As an additional tweak, I am making the "refresh" button on the References tool window force all references to be expanded and the false-positive files to be filtered out.  This works no matter what references search strategy mode you are in.

When the user hits cancel, the unvetted files will still be there.  There is really no point in throwing away that information.  You may think of it as clutter, but heh, you did terminate the search early, and the references you are looking for might be in one of those files.  This give you the opportunity to go hunting that you wouldn't have if I removed the unvetted files.

IkerAriz

  • Senior Community Member
  • Posts: 148
  • Hero Points: 6
Re: find references and irrelevant results
« Reply #17 on: October 04, 2018, 03:14:53 pm »
Quote
The progress dialog is a requirement ...  The status bar is not obvious enough.

The current (non-incremental) Find Refs has worked with just the status bar for many years and I've found this unobtrusiveness to be a good thing. It'd be nice if this goodness were preserved in this new case (or controllable via an option).

Quote
When the user hits cancel, the unvetted files will still be there ... you may think of it as clutter, but ... the references you are looking for might be in one of those files.  This give you the opportunity to go hunting that you wouldn't have if I removed the unvetted files.

I understand that the unvetted files might be useful for some users. But I've been treated to unvetted files in SE for a long time and can confidently say that I'm not one of those users (when I need to go "hunting" I use basic find/grep). This is what motivated my feature request to begin with.


Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2900
  • Hero Points: 438
Re: find references and irrelevant results
« Reply #18 on: October 04, 2018, 04:59:53 pm »
Then progress dialog is equally unobtrusive, relative to the fact that the mode you are asking for requires that all the calculations be done up-front, so the editor is going to be busy calculating references, so that is what is going to be obtrusive, not the progress dialog.  When it is done, the progress dialog goes away and the editor regains control.

IkerAriz

  • Senior Community Member
  • Posts: 148
  • Hero Points: 6
Re: find references and irrelevant results
« Reply #19 on: October 04, 2018, 05:21:27 pm »
Rather than calculate all references for all candidate files up front and then updating the window, can the window be updated after each each set of vetted references is found? In other words:

Code: [Select]
term = "foobar"

candidates_files = get_candidate_files (index, term)

for each candidate in candidates_files:

    true_refs = full_reference_calculation (index, candidate, term, ...)

    if count of true_refs > 0:
        add true_refs to output window

This would allow the user to see results as they're being calculated (a useful feature independent of the "find ref mode") and give them a chance to hit a key to stop.

IkerAriz

  • Senior Community Member
  • Posts: 148
  • Hero Points: 6
Re: find references and irrelevant results
« Reply #20 on: October 11, 2018, 03:20:07 pm »
I'm testing the new "find all refs immediately" strategy (with the progress dialog) and it doesn't wear well when compared to the old strategy. Is the pseudo-code approach I proposed above workable?

Iker


Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2900
  • Hero Points: 438
Re: find references and irrelevant results
« Reply #21 on: October 11, 2018, 03:26:31 pm »
No.  I am not going to throw away files from the list that are not expanded yet.

IkerAriz

  • Senior Community Member
  • Posts: 148
  • Hero Points: 6
Re: find references and irrelevant results
« Reply #22 on: October 11, 2018, 03:51:47 pm »
They need not be "thrown away". Just looking for an option that would let users decide whether to have unvetted files added to the output window or not.

IkerAriz

  • Senior Community Member
  • Posts: 148
  • Hero Points: 6
Re: find references and irrelevant results
« Reply #23 on: October 12, 2018, 01:18:14 pm »
Elaborating a bit on what I meant above by "not wearing well"...

To recap, the main issues with the old strategy that motivated my request were the following:
  • False positives. For some projects false positives are a not helpful and detract from the usefulness of the reference search. I was looking for a way to omit them completely.
  • Distracting visual noise. Under the old strategy SE frequently adds items to the references window that it later realizes are false positives and removes. This makes the content of the window quite noisy and "unstable" as items disappear and/or shift position. A strategy that included only fully vetted references would allow for a more pleasant, "stable" output so that items remain where they are after they've been made visible. 
The new "find immediately" strategy doesn't address either of these issues. It behaves much like the old strategy but also adds a modal progress dialog that is significantly more distracting (as it's visually more prominent and blocks use of the editor altogether).