Code Explorer: functions alphabetic without separate private

Let us know what you would like to see in the next version of this software

Moderator: kfury77

Forum rules
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.

  • Do not create new topics for already requested features. Add your comments to the existing feature request topics instead;
  • Create separate topic for each feature suggestion. Do NOT post a number of non-related feature suggestions in a single topic;
  • Give your topic a meaningful title. Do NOT create topics with meaningless titles, such as "My Suggestion" or "My Problem".

Please note that we DO READ all suggestions, even if a reply is not posted. Thanks!

Code Explorer: functions alphabetic without separate private

Postby sootsnoot » Fri Feb 10, 2017 7:21 am

RapidPHP 14.2.0.186

I don't remember what version changed this (and maybe I'm wrong and the behavior hasn't changed, but I don't think so).

When I see a function call, it's very often the case that I want to see the definition of that function. Most function definitions in my code appear within classes, so I'm looking at member functions defined within a class. The Code Explorer pane is what I use, but it seems to me that I have only two choices for the order of function names shown in the pane:

  1. Source order - all function names ordered by the sequence they are defined in the source, with annotations and fonts signifying visibility and staticness.
  2. Alphabetical order - except that all public functions appear first, followed by all functions with protected or private visibility.

The call site doesn't tell me whether the function is public, private, or protected. So to find the definition I have to look in two separate lists (and the lists are separated by a long list of variables). I find this very counter-productive. I really would like to see a single list of all function definitions in alphabetical order, with annotations and fonts signifying visibility and staticness. If there are users who like the current separate lists (are there any?) then add a third state to the order button (or make it a selection box). For myself, I'd be happy if you just changed the behavior of the alphabetical order not to make separate lists based on visibility, which I think is what the behavior was in earlier versions. If memory serves me right, earlier versions did not mark the names to show staticness or visibility. But when you added the markings (a nice feature), you also split the list into two parts (a mis-feature). I did search the forum as well as a I could, but couldn't find any discussion/requests/complaints about this.

Thanks in advance for considering this.
sootsnoot
 
Posts: 26
Joined: Sun Feb 24, 2013 4:30 am

Re: Code Explorer: functions alphabetic without separate pri

Postby Aivars » Fri Feb 10, 2017 10:30 am

As far as I know this isn't a new behaviour but I think you're right, private and public should be mixed together when sorted. We will consider changing this indeed, but only for the next major version not smaller update (in case someone is used to the current functionality).
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2453
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Code Explorer: functions alphabetic without separate pri

Postby sootsnoot » Fri Feb 10, 2017 6:35 pm

Okay, great, thanks. Though if there are users who like the current behavior, it might be kinder to them to change the current "choose order" button to have three states, or make it a drop-down selection. (Doing that would also allow the change to be made as a minor update rather than waiting for next major version). But either way, it would be nice for me to have a single list at some point :-)
sootsnoot
 
Posts: 26
Joined: Sun Feb 24, 2013 4:30 am

Re: Code Explorer: functions alphabetic without separate pri

Postby Aivars » Fri Feb 10, 2017 6:58 pm

From all the alternatives adding extra options/checkboxes/items is the worst choice in the long haul, because although it helps to solve the immediate problem effortlessly, it also adds complexity to the software. But sometimes it's the only viable alternative.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2453
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Code Explorer: functions alphabetic without separate pri

Postby sootsnoot » Thu Apr 12, 2018 2:54 pm

Very disappointed to see this isn't fixed in the 2018 major update :cry: Did you have a change of heart, or did it get lost?
sootsnoot
 
Posts: 26
Joined: Sun Feb 24, 2013 4:30 am

Re: Code Explorer: functions alphabetic without separate pri

Postby Aivars » Fri Apr 13, 2018 8:10 am

This has been fixed for 2018, public and private functions are now sorted as a single list. You can see whether it's public/private/static by icons.

Sorry for the huge screenshot, I'm using Surface Pro to post this, but I hope you can make a sense if it.

classexplorer.png
classexplorer.png (61.21 KiB) Viewed 10848 times
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2453
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Code Explorer: functions alphabetic without separate pri

Postby sootsnoot » Fri Apr 13, 2018 8:19 pm

Your example source code has only function definitions, they are defined in alphabetical order, and it looks like you haven't clicked the option to list alphabetically.

Try this source code:
Code: Select all
<?php
static $st1;
class QT {
    static $st2;
    private static $st3;
    protected static $st4;
    public function z() {}
    private function y() {}
    public function x() {}
    protected function w() {}
    public function v() {}
}


Hmm, I can't seem to make the img tag work (at least in preview), but here are two images using both the broken img tag and the url tag

Here's what I see without alphabetizing:
Imagehttps://drive.google.com/open?id=1W6b_qa7Yoag8ea2V3HTER4y7YXoGWAnB
And then with alphabetizing:
Imagehttps://drive.google.com/open?id=1THmI99bQME4ldyFfs4jr5HANrUlGd-PI

So as you can see, alphabetizing does not show all the functions in a single list. With real code, I think it's worse, but I just wanted an example nearly as simple as yours.

This also brings up a question about the annotations - are they documented somewhere? If not, then I guess the color indicates visibility (public or not). But what does the little "s" in a circle mean? I would have guessed "static", but in my example $st2 is static but does not have the little "s".

Thanks!

PS I don't mean to imply that no improvement was made (I didn't try to compare to old version results). I'm only saying that it still doesn't display a single contiguous alphabetized list :mrgreen:
sootsnoot
 
Posts: 26
Joined: Sun Feb 24, 2013 4:30 am

Re: Code Explorer: functions alphabetic without separate pri

Postby pmk65 » Fri Apr 13, 2018 9:47 pm

Im experiencing problems with the Code Explorer too, so I tried the example provided by sootsnoot.

On my system the functions are sorted correctly in alphabetical order, BUT ONLY when "List Variables" is turned off. Otherwise I get the same output as sootsnoot.

My screenshots (List Variables off):
Image
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 678
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: Code Explorer: functions alphabetic without separate pri

Postby sootsnoot » Sat Apr 14, 2018 2:56 am

I wasn't even aware of the "List Variables" option. So that would seem to provide a workaround for my primary complaint about finding the definition of a method function based on a call site (I use the PEAR naming convention, such that the class name maps to the library-relative pathname of the file that defines the function). At least for this example.

But I haven't yet looked at the Code Explorer window for real-life code examples. If alphabetical listing with "List Variables" turned off gets it right for all my real-life code, I'll be pretty happy. If not, then I'll post additional examples. Thanks for the tip, pmk65!
sootsnoot
 
Posts: 26
Joined: Sun Feb 24, 2013 4:30 am

Re: Code Explorer: functions alphabetic without separate pri

Postby pmk65 » Sun Apr 15, 2018 1:12 pm

sootsnoot wrote:This also brings up a question about the annotations - are they documented somewhere? If not, then I guess the color indicates visibility (public or not). But what does the little "s" in a circle mean? I would have guessed "static", but in my example $st2 is static but does not have the little "s".


The documentation really needs a workover. I have the same problem with understanding what the various icons indicate.
How about adding a tooltip/hint to the icons? Then the hint would show what type the icon indicating.
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 678
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: Code Explorer: functions alphabetic without separate pri

Postby Aivars » Mon Apr 16, 2018 2:56 pm

There are 2 issues and both will be addressed in the next update:

1) Indeed, the sorting is broken when variables and properties are added to the mix
2) Code parser does not recognize static $property instead of more standard public static $property.

There are not that many icons for class members, you have separate icon for functions, properties, constants and local variables. If it's marked by S then that's a static member. Additionally, private class functions are displayed grayscaled (and, I think the same will be true for properties in the next update).
You can click on various items in the code explorer and be instantly taken to where that member is defined and see what it is.

Thank you for bringing up the sorting issue and giving clear samples so that I could easily find what went wrong!
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2453
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Code Explorer: functions alphabetic without separate pri

Postby sootsnoot » Mon Apr 16, 2018 8:18 pm

Great, thanks!

Looking at some real code, it does seem to be the case that the only problem is that the alphabetical list of method functions is broken into sections by alphabetical lists of properties. And if I turn off the option to list variables, then I get the single contiguous list of method functions that I was looking for. So that's a good workaround for me.

When the list of variables is enabled, the functions remain alphabetized, but the variables appear interspersed in chunks of seemingly arbitrary length. The variables within each chunk are alphabetical, but unlike the functions, they are not alphabetized globally within the class, each chunk is separately alphabetized. Since I can't see any pattern to the chunking of variables, I don't know how to make a small testcase for you. I imagine you should have plenty of real code laying around that will reproduce the problem, but if you really want one of my examples I could post it (or let me know a way to upload it, I'd rather not post it publicly).

-Rich

PS I also verified that adding "public" to "static $st1" caused it to get marked with the 's' for static. Nice to get that fixed, since I pretty much never use "public" on class properties, only on method functions!
sootsnoot
 
Posts: 26
Joined: Sun Feb 24, 2013 4:30 am

Re: Code Explorer: functions alphabetic without separate pri

Postby Aivars » Tue Apr 17, 2018 11:19 am

Please try the new update, it should be better.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2453
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Code Explorer: functions alphabetic without separate pri

Postby sootsnoot » Tue Apr 17, 2018 6:07 pm

Yup, looks all better now with 15.0.0.201, thanks!

By the way, I did notice that when exiting the program (with 57 files open), there was quite a long pause with the Windows "busy" cursor displayed and a pop-up window titled "Related Products" that was empty. If I clicked the "Close" button on that window, the program completed shutdown okay. If I waited long enough, the popup window got populated with a list of other products, and again closing it completed shutdown okay. Next time I exited, I checked the "Don't show this again" box before closing. And the next shutdown after that seemed to complete more quickly. I'm not posting a new entry because it's not really a bug, it has an easy workaround, and I can't reproduce it having checked the "Don't show again" box. Just thought you might want to know :twisted:
sootsnoot
 
Posts: 26
Joined: Sun Feb 24, 2013 4:30 am

Re: Code Explorer: functions alphabetic without separate pri

Postby Aivars » Tue Apr 17, 2018 6:10 pm

I don't think the slowness was related to the exit notification, but I'll keep it in mind and see if there's a pattern.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2453
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Next

Return to HTMLPad / Rapid CSS / Rapid PHP / WeBuilder Feature Requests

Who is online

Users browsing this forum: No registered users and 12 guests

cron