Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Explorer - Option to have module show up in multiple places (Feature request) #4477

Closed
jhiston opened this issue Oct 31, 2018 · 11 comments
Labels
difficulty-01-duckling Issue where no particularly involved knowledge of the internal API is needed. enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-code-explorer status-declined This will not be implemented. user-interface This issue explicitly relates to the visible interface of Rubberduck.

Comments

@jhiston
Copy link

jhiston commented Oct 31, 2018

In large applications I often find myself wanting multiple types of groupings of my modules. E.g. view only interfaces, view only classes supporting/associated with a specific form (as identified through a naming convention).

Given the existing folder annotations functionality, I'm wondering whether it would be possible to do one or more of the following:

  • have a checkbox or equivalent switching between a "folder" in the explorer showing 1) direct children and subfolders (current behavior) or 2) all children (including those in subfolders) and subfolders
  • allow multiple lines of folder annotations in a module (e.g. to allow one to group and see only interfaces under one subfolder (define a "@folder Interfaces") or more complicated views such as for a form specific resizing class "C_GreatestForm_MyResizing" allow multiple folder annotations: "@folder FormFunctionality\Resizing\FormSpecific\GreatestFormEver", "@folder GreatestFormEver\FormFunctionality", "@folder Resizing\FormSpecific")
  • Search functionality supporting equivalent filtering

Would also be interested in hearing how others organize class modules when start reaching 30+ modules in a project...

Thanks!

@retailcoder
Copy link
Member

Would also be interested in hearing how others organize class modules when start reaching 30+ modules in a project...

Have you seen the Battleship project? It illustrates this pretty well. There is no "One True Way" of doing this, and that's something you tend to get better at with experience, but despite VBA's lack of namespaces, I find organizing project files exactly as I would in a .net project feels very natural. See the source code for this very project right here: over 200K lines of code in Gosh-I-don't-know how many files, across 20 projects, and yet everything has its makes-some-minimal-sense place.

I don't think supporting multiple folder annotations is sensible; seems confusing, and internally it has implications that make it rather complicated to handle. Curious about the 3rd bullet though, can you expand a bit on how the search/filter functionality can be enhanced? Very open to the idea!

@jhiston
Copy link
Author

jhiston commented Oct 31, 2018

I haven't seen the Battleship project in detail.... I find I just like to impose a lot of grouping when I have repetition (which obviously try and avoid but like in the form resizing example, there can be reasons/cases where one needs a form specific implementation and I try to keep the actual forms as lightweight as possible).

Re: bullet 3 and search, just a simple textbox with ability to type e.g. "I_*" and then list in the explorer is limited to modules whose name starts with "I_" (e.g. my interfaces), or "GreatestFormEver" and then list would be restricted to classes with names associating them with the specific form. Would want it to have a degree of persistence (e.g. filter remains in place as one navigates and makes changes to code), and even better would be having drop-down functionality (like the search-and-replace functionality within the VBE) to recall previous just searched terms....

It is also entirely possible that there is a ?new? feature that has recently been added (your use of 'enhanced' has me double checking around the code explorer UI as I don't remember seeing any search/filter functionality...) I'm using 2.2.0.3835 (from about....)

@Hosch250
Copy link
Member

I'm not sure which version this is in, but there should be a search bar at the top of the code explorer, where if you type "I_" (without the quotes), it will filter to all items that contain "I_" in the name (including parent folders). It should be between the folder view and the toolbar. It will retain that filter, and recently got a bugfix/enhancement to keep the filter across parses.

@retailcoder
Copy link
Member

@Hosch250 that was #3418, a whole year ago - v2.2.0.x would have it.

@jhiston
Copy link
Author

jhiston commented Oct 31, 2018

Blind.... I am going blind..... completely saw it as whitespace.... and only @Hosch250 's comment (thank you!) has made me pick up on the standard magnifying glass search icon over on the far right.....

This is what I was thinking of with that third bullet point..... One immediate question is whether the filtering results should be affected by the "fx" (toggle signatures) state.... search results for e.g. "I_" seem to be also including modules where the search term is found within the signatures. I (think) I am (at times) only interested in restricting the filtering to the actual module names - is linking the result list to the "fx" button state a reasonable feature request?

@Hosch250
Copy link
Member

We were actually just discussing the discoverability of this in chat. We are planning on putting a gray "search" placeholder text in that box.

Your feature request seems reasonable to me; it was literally brought up as a feature point when we first implemented this, but decided to wait until someone else requested the feature. It would make a good setting, I think.

@retailcoder
Copy link
Member

I think I actually like that idea. 👍

@Vogel612 Vogel612 added enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. user-interface This issue explicitly relates to the visible interface of Rubberduck. feature-code-explorer difficulty-01-duckling Issue where no particularly involved knowledge of the internal API is needed. labels Oct 31, 2018
@Vogel612
Copy link
Member

I'd say we hijack this issue into being about the discoverability of search. As @retailcoder elaborates above, multiple Folders are something of a more complex beast.

I personally don't think that Rubberduck should provide the option for multiple folder annotations, though I can understand why it would be useful...

@mansellan
Copy link
Member

It does make me wonder though - could / should we have a feature to annotate (modules, or perhaps any member?) with arbitrary tags? We could then enhance the search bar with a tags mode to do incremental tag filtering.

@mansellan
Copy link
Member

Per chat, I'll open a fresh issue for tags

@mansellan
Copy link
Member

#4478 and #4506 cover the items discussed above - closing this.

@mansellan mansellan added the status-declined This will not be implemented. label Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty-01-duckling Issue where no particularly involved knowledge of the internal API is needed. enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-code-explorer status-declined This will not be implemented. user-interface This issue explicitly relates to the visible interface of Rubberduck.
Projects
None yet
Development

No branches or pull requests

5 participants