Pages: 1
  Print  
Author Topic: Searching In Resources  (Read 2629 times)
Offline (Male) Goombert
Posted on: September 13, 2014, 08:09:47 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
I've been back and forth contemplating the implementation of a global search feature to quickly find use of functions and variables in LateralGM.

This is what searching for resources is like in Studio. The results are tabled and can be saved to a text file, though not copied to your clipboard.


In Eclipse IDE when you search there is a docked form to the bottom that appears with a filtered version of the file tree that allows you to expand files to find the occurrence of each expression. You can also copy the nodes to your clipboard to save the results in a text editor to a file or share them.


Both of these options are possible, though if we were to go the Eclipse route the results do not actually have to be docked they can be a free form or something similar. There are several questions I would like to ask everyone. Going back to the Eclipse idea also gave me the idea again about the search filter having more advanced settings, we could make it search inside the resources like Windows explorer and thread the results to feed in as the search completes. The search filter results would be like an extension of what eclipse does basically, because I thought of this I saw no reason to have a separate search feature at all.

A) What do you think about the GM search feature?
A.1) If I were to implement LGM's this way, would you like the ability to copy the results to the clipboard?
A.2) Would you like the search results to be a separate form from the search settings or should they be the same form/window?
B) What do you think about the Eclipse search feature?
B.1) Would you like the search results to be a separate form from the search settings or should they be the same form/window?
C) What do you think about the search filter on the resource tree having more advanced options?
C.1) Would you want this in addition to a separate search feature?

Answers to these questions will better assist me in the implementation of advanced resource search functionality and I am also open to new suggestions. You do not have to participate in my R&D but by participating in the questionnaire and posting your answers you agree that you have given informed consent to participate.
« Last Edit: September 13, 2014, 08:11:26 pm by Robert B Colton » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Male) Josh @ Dreamland
Reply #1 Posted on: September 13, 2014, 09:19:46 pm

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2950

View Profile Email
If you could show events in the resource tree... wow. I never even considered how powerful that'd be. I'd recommend putting it in a different view which can be toggled, though, as I believe common users would be annoyed by the expandability of objects. I hate in Eclipse that if I try to recursively expand, I get a whole bunch of shit I don't care about (because it's all text files). But that'd be a super cool feature, especially for search.

Yoyo's execution is poor; their results page looks bloated (it's wide and tall; why?) and ugly (it doesn't even expand the whole way; looks like poor CSS). And unless you can float it, or it's always on top, it looks easy to lose. If it's always on top, then it's just annoying because it's always in the way. Copying results to the clipboard could be useful, but the results are overly verbose, too. I'd go resource:line:position: full text of line with terms highlighted, eg,

shader0:vertex:2:11: something whatever passthrough whatever shader0:fragment:2:11: something whatever passthrough whatever object0:Create:1:0: this line literally just says "ass", you ass

And you may as well keep them in a separate window, unless you can get the total space down (possibly by putting the options all in a single column and the results to the right, or in a row—search box spanning above—with results to the bottom).


Now that I've said that, let me again state that I LOVE the idea of the Eclipse feature. If I may...



Tell me that doesn't look nice.

Now, let me pitch you this: do what I did for JoshEdit: Have a QuickFind dialog which searches in anything, with a wrench to configure advanced settings. Have a small button that does the full-text search, and a small wrench icon that configures it. You can even have that configuration dialog offer a plain-text results list, but I think that's overkill.

Good luck on the implementation; this feature sounds killer.
« Last Edit: September 13, 2014, 09:21:59 pm by Josh @ Dreamland » Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) Goombert
Reply #2 Posted on: September 14, 2014, 12:32:13 am

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
Yeah wow Josh, this is one of those occasions where I was not thinking the whole way through but damn I did not realize it could be that nice. My personal vote goes for that, but I would like to propose some additional changes. I think we should eliminate the checkboxes there and replace them with the settings wrench as a button at the end of the search box/filter. Here's where it gets kind of tricky though to me having the thing filter as you type may not be desirable for everyone, so I think I would also additionally add a setting there for you to toggle Synchronous Update and if you have it disabled you have to hit the next or previous button or similar. Additionally most of the settings YYG offers in their shit little panel I would also throw into that panel so you can filter specific resources and stuff. But I'll be honest Josh I also think we should have a preference for the object events to be expandable by default even when not searching, users can toggle it from preferences which is also default functionality of Eclipse class files.

Here's an important question:
What should happen when you click on an event of an object node?
A) The resource frame appears as well as the code editor for the event.
B) Only the code editor for the event appears with an indication of the object (I believe most code windows already have the object name in the title which I did so that you can find them when the tab bar is active under the one look and feel)

I am also astounded at your ability to conceptualize that I am literally splooging looking at that screenshot. I can handle the entire implementation by myself I just would like additional feedback from everyone else as I implement it. It would also be nice Josh if you could do one simple thing, add left right up and down arrow icons to Calico as well as an alternative settings icon like a cog or something because I think the wrench we use in F&R is the same one we use for Game Settings. This feature is now top priority for me and all my future free time will be dedicated to its implementation until it is completed.
« Last Edit: September 14, 2014, 12:39:49 am by Robert B Colton » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) TheExDeus
Reply #3 Posted on: September 14, 2014, 07:39:37 am

Developer
Joined: Apr 2008
Posts: 1860

View Profile
I love the Josh's execution of the idea. I would personally take any search in resource function, even a GM:S clone, but if we can make it better, then why shouldn't we. I think the idea Josh had is that we use the already present "Search for resources" fields you just added, and allow people search in code the as well (if appropriate buttons are clicked). This means we don't have to have several search dialogs.

Quote
But I'll be honest Josh I also think we should have a preference for the object events to be expandable by default even when not searching, users can toggle it from preferences which is also default functionality of Eclipse class files.
That's actually a cool idea, because then I would almost never open the object dialog (unless I need to add an event). We already removed D&D (optionally) so people with code don't see it. Now we could remove the need for object dialog for people who use only code. It's still useful of course (adding events, changing sprite etc.), but when I have already made an object and added all the events, then I only open it to change the code.

Quote
A) The resource frame appears as well as the code editor for the event.
B) Only the code editor for the event appears with an indication of the object (I believe most code windows already have the object name in the title which I did so that you can find them when the tab bar is active under the one look and feel)
Both are quite interesting options. I think only the code editor needs to open, because you clicked on an event - which means you want to edit it. If the person clicks on a higher node (the obj_player resource) then the object editor should open. So the editor opens for the resource you clicked on. If you click on room, room editor opens, if you click on Room Creation Code, the code editor opens. It seems more logical to me because of the "User does, user sees" kind of thing.
Logged
Offline (Unknown gender) egofree
Reply #4 Posted on: September 14, 2014, 07:41:18 am
Contributor
Joined: Jun 2013
Posts: 601

View Profile Email



Tell me that doesn't look nice.

+1000

This looks perfect to me. I prefer much the hierarchical approach of the Eclipse search than the GM version. With the hierarchical version you've got a much more global view at first glance. Personally i don't care about the clipboard.
Logged
Offline (Unknown gender) TheExDeus
Reply #5 Posted on: September 14, 2014, 07:51:18 am

Developer
Joined: Apr 2008
Posts: 1860

View Profile
Ah, yes, I forgot about the clipboard question. I don't really care about that either. I use search for searching, not documenting.
Logged
Offline (Male) Josh @ Dreamland
Reply #6 Posted on: September 14, 2014, 10:19:18 am

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2950

View Profile Email
But I'll be honest Josh I also think we should have a preference for the object events to be expandable by default even when not searching, users can toggle it from preferences which is also default functionality of Eclipse class files.

I suggested that.
If you could show events in the resource tree... wow. I never even considered how powerful that'd be. I'd recommend putting it in a different view which can be toggled, though, as I believe common users would be annoyed by the expandability of objects. I hate in Eclipse that if I try to recursively expand, I get a whole bunch of shit I don't care about (because it's all text files). But that'd be a super cool feature, especially for search.

I said a couple of the other things you said, but it sounds like you have the right idea on those, so I won't reiterate.

As for what should happen when you click on an event of an object node, try not to reimplement the object editor in the resource tree. Just open the object editor to that event. You can include groupings in the tree if you really want, but try to avoid code duplication. Showing the code editor won't work when other DND is involved.

As for the icons, I can do that. There's already a wrench icon for use in the JE quick-find; it's not used elsewhere. Go ahead and use it for consistency.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Female) IsmAvatar
Reply #7 Posted on: September 14, 2014, 09:22:42 pm

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 877

View Profile Email
Looks great. I've always wanted to make the object code more easily accessible. My first thought was to replace the action list and DND panel with a code editor, but it'd be tight. My next thought was to consolidate the event selector into some sort of combo box or something in the toolbar of the code editor, and make the Object Properties be minimizable somehow. Being able to quickly navigate to an object's event from the tree sounds appealing.

Two things:
* What does "Filter Tree" mean?
* Regex.
Logged
Offline (Male) Josh @ Dreamland
Reply #8 Posted on: September 14, 2014, 10:33:00 pm

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2950

View Profile Email
I believe "filter tree" actually means "prune tree," and it hides non-matching paths. And yeah, regex is a must.

My concern with losing the DND editor is how existing DND tiles will render when loaded. Once upon a time, Robert was looking into embedding DND into the code editor rich-text style, but...
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Pages: 1
  Print