Blog by Barbara Douma
Since the introduction of Uniface 10.3, we have been rolling out a feature called smart suggestions, which adds search and filtering functionality on the basis of object name and description. This makes it easier and faster to find an object that you want to open, edit, or use in a given context. As you type a keyword or part of an object name, the Uniface IDE provides a list of suggestions for objects that match the provided string and are appropriate to the context.
Smart suggestions were originally introduced on the Main U-Bar in Uniface 10.3.01.012 (see the blog Smart Suggestions in the Main U-Bar of the IDE). Since then, we've added this feature to the Component Editor when editing name-based properties. You get smart suggestions when you:
· Rename entities, fields, and labels in the Component Editor (10.3.02.001)
· Define the Modeled Component and Bound To properties in a derived component (10.3.02.002).
Now our focus is on the Resource Browser, starting with the Component Editor. As of Uniface 10.3.02.008, the Uniface IDE provides suggestions in the Model tab, so that you can easily find the modeled entities and fields that you need to use.
Resource Browser: Model Tab
The Model tab of the Resource Browser has been redesigned. It now includes a U-Bar that can be used to find and filter the modeled entities displayed in the tab. The list of entities includes subtype (specialization) entities. Icons indicate whether an entity is a normal modeled entity ()
or a subtype entity ( ).
To ensure fast performance, a maximum of 50 objects can be displayed. You can override this by clicking Show all, or configure to a different maximum using the UBAR_RESULTS_MAXHITS logical.
Suggestions for Modeled Entities and Fields
Instead of browsing through hundreds of entities, just start typing a string that occurs in the object name or description in the Model tab's U-Bar. As you type, the list is filtered to show only matching entities and sub-entities.
As usual, 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
You can scroll through the list of suggestions using the Up and Down arrow keys or the scroll bar.
To insert an entity into the component structure, highlight the entity in the list, then drag and drop the entity into the component structure (or draw the entity frame for a form or report component.)
To add the entity's fields to the component structure, you first need to select the entity—highlight the entity in the Model tab and press Enter, or double-click the item. This copies the entity URL to the U-Bar and, by default, displays the entity's fields. (Notice that the fld: code is appended to the URL.)
What if you selected an entity to display its fields before you inserted the entity? No worries. Just right-click on a a field and choose Parent Entity from the context menu.
The parent entity is then displayed in the Model tab so you can highlight and insert it.
Suggestions for Parent or Subtype Entities
As you saw already, subtype entities are easy to recognize in the Model tab, but you can also find the parent or subtypes of a given entity.
For example, to get the supertype of a subtype entity, right-click the subtype in the Model tab, and choose Parent Entity.
You can also use the context menu to show the subtypes of an entity. For example, the following suggestions are shown when you choose Subtype Entities for the UTREE_PERSON.UTREE entity:
Notice that the ent: object code has been added to the entity URL.
If you now select one of the subtypes, the complete URL, including the supertype is copied to the U-Bar and its fields are displayed:
Navigation Using the Object URL
If you want to return to the supertype object, you can click on the object's name and press Enter. In fact, each element of the URL is like a button that can be clicked to navigate up the object URL.
When you select an object name, a list of the subobject types is displayed. For entities, these are ent: for subtypes and fld: (the default) for fields.
We hope you will enjoy the Resource Browser improvements that we have introduced so far.
But it doesn't end there! As of Uniface 10.3.02.009, smart suggestions are provided in Model tab of the Entity Editor when you add modeled entities to a relationship, and in the Project Editor when you add create derived components from a modeled component. The principles and behavior are the same as in the Component Editor.
This page has no comments.