Blog by Gerton Leijdekker

February, 7 2019


In Uniface 10, developers can open development objects from, among other places, the U-Bar by entering the object's full name or selecting the desired object from a list. For small applications these are very useful options however, for larger applications, having a simple way of searching for objects would improve the user's experience and reduce the frustration of searching through, what could possibly be, a long list.

To improve the user experience and provide a simple way to search for objects, we have added smart suggestions to the main U-Bar.

About Suggestions

Smart suggestions are intended to help enter a value that is relevant in a given context, such as the URL of an object, the value of a property, code, or a new name of an object. They can help with entering correct syntax, as well as with finding objects while entering a URL.

Suggestions are offered as you type. Simply start typing, and based on what you enter, suggestions are offered in a drop-down box below the field. You can quickly accept a suggestion using the down/up keys, then continue to enter more text, or press Enter/Tab to select the value.

The offered suggestions depend on the purpose of the entry field and what you type.

Suggestions in the Main U-Bar

The purpose of the Main U-Bar is to open an object for editing. Object URLs have a defined syntax, so the suggestions offered depend on how much of the URL you have entered or selected.

To start with, you need to enter the code of the main development object. If you don’t know the type code, try a keyword, such as form, service, entity, or include to get suggestions based on the description.

If you do know the code, you can just start typing it, for example cpt for components. In this case, a list of component types is offered.


Use the navigation keys to select the type of object you are looking for and press Enter to select it.

(Of course, the list of available types is small, so the easiest way is just to select the type from the list of suggestions without typing anything. 😊)

Suggestions for Objects

Once you have selected the main object type, you can start typing the name of the object, or a string that occurs in the object name or description. While typing, suggestions are offered. The first item that matches is highlighted.

If there is no exact match, suggestions are provided for items that contain the string somewhere in the name or description.

Depending on your naming conventions, your object names and/or descriptions may contain keywords that represent some functional domain, sub-application, or some sort of category. Such information can be used in the U-Bar to find your objects.

Use the arrow keys to accept a suggestion, and press Enter or Tab to open it. However, if you want to open the object at a specific sub-object, type a forward slash to get the next object type suggestions.

You can then select the sub-object type to get the next suggestions.

Wildcards

If your naming conventions are a bit more complex, you can use wildcards * and ? or Uniface characters profile (Gold+*, Gold+?) to enter a naming pattern. For example, perhaps you have a naming convention for components that uses the first 2 characters to specify a functional domain, followed by 4, followed by 2 characters to specify some functional behavior (browse, maintenance, edit, open, erase, batch, …). You could then enter a string like AU????BR, or *BR to find the matching components.

Smart suggestions

What is considered smart depends on the context. The suggestions at the top of the list are considered most relevant; probably the thing you’re looking for. Does the IDE really know? No, but it does make an educated guess.

In the Main U-Bar, for each object type, suggestions are ordered based on modification date, because you often look for an object you recently worked on.

Once you start entering something after the object type, the suggestions are offered in the following order:

  1. Objects whose name starts with the entered text
  2. Objects whose name contains the entered text
  3. Objects whose description contains the entered text

Performance

By default, the number of suggestions offered is limited to 50, which allows the IDE to show suggestions instantly. Depending on the connection speed between the IDE and your Repository, you may want to tweak this number by using an assignment file setting. In practice, if your object is not in the first 50, you will probably make your search criteria more specific.

There are situations where you simply don’t know what you’re looking for—you just want to explore the Repository a bit. For such situations, you can have the IDE show all suggestions, allowing you to scroll through the list of suggested objects using the scrollbar.

Conclusion

We feel this is a really useful feature that helps developers navigate around their application’s sources using Uniface 10.

7 Comments

  1. Very nice! Well done!

  2. I love this feature already.  This might also 'stimulate' developers to use the description field (smile)

  3. saw a demo last Friday and I  have seen more new stuff added. 



  4. Smart suggestions when renaming entities, fields, and labels in the Component Editor is available when you install our latest patch (10.3.02.001).

    No need to specify a type: entity rename presents you with a list of modeled entities, field (if entity is modeled) a list of fields in the modeled entity, and labels a list of fields in your component.

    Give it a try (wink)

  5. Haha, where does it stop? (smile)  Really, I love these small enhancements in the IDE.


    We, me and my UnividualS colleagues, are working on migration and modernisation projects. Customers are migrating to Uniface 10. These projects start in Uniface 9 (our input) en end in Uniface 10 (our deliverables ). This means that I am forced to use Uniface 9 from time to time. Every time I wonder how we, Uniface developers, worked in the past. Having several environments active on the pc in order to work on multiple components at the same time, to name one major difference.


    In Uniface 10 the IDE is nonmodal, so I can work on several objects at the same time in one environment. Using projects to cluster the objects in logical sets made life easier. The smart suggestions in the U-Bar made it even better.

    And now this enhancement! 


    It makes me wonder. What's next?

  6. What's next? Smart suggestions for 'Modeled Component' and 'Bound To' properties. You can use these when defining inheritance from a Modeled Component. Available in patch 10.3.02.002.

  7. What's next? How about the ability to find 2nd level sub-UDOs in the main Ubar without specifying their parent UDO? E.g. I know I have an Include Proc 'IVALKEY' but I forgot in which library this Include Proc resides. It may even exist in more than one library.
    Generic Seach (under ude:Utilities) would help but isn't there yet; what about something like libinc:*/inc:IVALKEY in the UBar?
    Of course there will be a limit to how many levels deep the Ubar would support this, but one additional level would already be very helpful for locating objects like Include Procs, Global Procs (and other global objects once their new editors come available).
    Or another example: find the components where a given entity is the first sub-UDO: cpt:*/ent:customer.model
    Sure, I can use any SQL workbench to find this kind of information, but the Ubar is the place for this because it can start the editor straightaway.