Skip to main content
Jump to: navigation, search

Papyrus/Mars Work Description/Improvments/Search UI

Overview

The Papyrus search UI is a dialog integrated into the Eclipse search interfaces. Its role is to let the user search for elements and attributes in the UML models and diagrams created with Papyrus.

There are two kinds queries that the user can provide: text query or OCL query. For each kind of query, the user can use a simple search mode, or an advanced search mode. In the simple search mode, the user must search among all elements and attributes in the model. In the advanced search mode, the user can choose the types of elements and attributes to search for, as well as element stereotypes.

The improvement work done for Mars focuses mainly on the advanced search mode. Along with bug fixes, the new advanced search mode of Mars improves the UI for stereotypes displaying, and adds new options to search for stereotyped elements.

The following video shows a demo of the new search UI in action: Papyrus Search Improvements Video

Frontend Changes and Improvements

The advanced search UI has been improved for stereotypes searching. The new UI is the following:

Papyrus advanced search UI

The major zones of the new UI are the following:

  • Zone A: This is the text query and its options. The main difference in Mars is the addition of the explanatory text.
  • Zone B: This filtered checkbox tree viewer shows the UML elements that the user wants to search for. The major difference concerns the selection of elements. When an element is selected, all of its attributes are selected. When the last attribute of an element is deselected, the element is deselected. Selection bugs, when the UI refreshes for any reason, have been fixed.
  • Zone C: This is a new filtered checkbox tree viewer. It shows the stereotypes that are applied in the selected resources, i.e. the selected models for the search. Attributes of stereotypes also appear. The behavior of the tree viewer is the same as the behavior of the zone B tree viewer.
  • Zone D: These two new checkboxes add options to search for stereotyped elements. When "Enforce all and only selected stereotypes are applied" is checked, UML elements must and must only have the selected stereotypes applied to be eligible for search. When "Enforce at least one stereotype is applied" is checked, a UML element must at least have one selected stereotype applied, to be eligible for search. If none of the checkboxes are checked, then stereotyped elements are returned, but also any UML element selected by the user in zone B, even if they do not have a selected stereotype applied.
  • Zone E: Buttons to select/deselect all stereotypes in zone D have been added. Bugs on "Refresh lists" button have been fixed.

Backend Changes and Improvements

Backend improvements have been made on the performance of the search functionality.

The performance of the search operations has been improved for stereotypes searching. Stereotype collecting operations have been greatly optimized. Utility methods of Ecore are not called anymore since they demand a lot of underlayered computing.

The performance of results display is another issue since display operations are very demanding. To lessen the load of display operations, results display is now flattened: an element is displayed with its qualified name instead of a hierarchical display of all of its parents.

To further reduce perceived lag, when displaying results, an asynchronous display of results is also introduced. The results are now displayed progressively after the search. The main difference with the old search UI, is that now the UI does not hang when there are a lot of results to display (e.g. more than 100). For small samples of results to display, the behavior is not impacted, and results are still preceived as displayed instantly.

A progress monitor has been added so the user can check the progress of the search operations.

Finally several bugs have been fixed. They are referenced in the Bugzilla References section of this page.

Bugzilla References

The following bugs are fixed:

Bug 456874 - Error when searching in the models for a specific String

  • Problem: Index out of bound exception when searching for some strings.
  • Solution: Fixed the computation of offsets and length for matches found in a string.

Bug 459431 - Refresh types button removes attributes of elements after filter

  • Problem: Attributes of elements or stereotypes are hidden after the refresh button is clicked, in some instances.
  • Solution: Fixed UI refreshing backend.

Bug 459429 - Unnecessary UI refresh when selecting same search kind

  • Problem: The UI refreshes when the user selects the same search mode he/she is already in.
  • Solution: UI now remembers search mode.

Bug 459425 - In advanced search, selecting an element should select all of its attributes by default

  • Problem: The user could select an element, but its attributes aren't selected automatically.
  • Solution: Selecting an element now selects all of its attributes. Deselecting the last attribute of an element also deselects the element. Backend bugs were also fixed to reflect correctly the user selection.

Bug 459417 - Text above search textbox

  • Problem: Explanatory text above search UI query textbox was not shown.
  • Solution: Explanatory text is now shown and more explicit on effects of leaving the text query blank.

Bug 460605 - Selecting a project does not search in the scope of the project but in workspace

  • Problem: Search is performed in whole workspace when a project folder is selected.
  • Solution: Fixed scope collection when a project folder is selected.

Bug 460580 - Active diagram resource loading bug

  • Problem: Search is not performed on correct resource when active diagram is selected as resource.
  • Solution: Get the model of the active diagram as resource to search in

Bug 461057 - Filter shows duplicate stereotypes

  • Problem: The filter dialog box shows duplicate stereotypes when the same stereotype is applied in different projects.
  • Solution: Fixed stereotype comparison for both display and actual filtering action.

Bug 432834 - The search operation loads models into the active ModelSet

  • Problem: When searching in several models (e.g. all workspace models), all or some searched models, with diagrams, are loaded into the current model's model explorer.
  • Solution: Fixed by creating a composite query when several resources are selected as the search scope.

Bug 461824 - Documentation

  • Problem: User help documentation not update to date
  • Solution: Updated

Bug 461823 - Performance of stereotype collecting

  • Problem: Stereotypes must be collected for display but the operation takes too long.
  • Solution: Optimized by not having to go through whole model but the correct resource content list.

Bug 461822 - Results display performance and monitoring

  • Problem: Results display hangs the UI and progress is not monitored and displayed to the user.
  • Solution: Display is now asynchronuous and the progress is shown to the user.

Bug 461819 - Results should be displayed as flat

  • Problem: Flat display of results, instead of hierarchical, for performance issues
  • Solution: Display flat results with qualified names

Bug 461821 - Attributes matches aren't displayed correctly

  • Problem: Non-string attributes are displayed as empty strings. Some attribute matches are not displayed when they have the same offset and length because their hashcode is then the same.
  • Solution: Fixed hashcode method of attribute match and display non-string attributes correctly (i.e. name of named element)

Bug 461818 - Search for elements with at least one stereotype applied

  • Problem: User should be able to search for elements with only at least one stereotype applied (i.e. OR operator)
  • Solution: Added a checkbox for this option

Bug 461825 - Stereotypes list in advanced search

  • Problem: Stereotypes list in advanced UI does not show icons. Furthermore the display of some inherited stereotypes is bugged.
  • Solution: Children collecting was fixed

Bug 461826 - Cannot search for any attribute type

  • Problem: The user could only search for primitive attributes.
  • Solution: Search for any attribute type. Name of named element used for search if the attribute is a type that's a sub-type of named element.

Bug 461816 - Tooltips for buttons

  • Problem: Tooltips for buttons should be displayed to help the user.
  • Solution: Added

Bug 461795 - Stereotypes list should only include applied stereotypes and should be separated

  • Problem: The advanced search UI grouped stereotypes and UML types together. Furthermore all stereotypes of applied profiles were displayed. This makes the list too big. The user may also want to separate stereotypes from UML types.
  • Solution: Created another list, next to the UML types list, for stereotypes. Only applied stereotypes are displayed in this list.

Bug 462692 - Stereotype collecting also collects in .uml files without any associated .di file

  • Problem: Some stereotypes that aren't applied in actual Papyrus projects are shown.
  • Solution: Fixed with new UML visitor

Ongoing and Future Work

Copyright © Eclipse Foundation, Inc. All Rights Reserved.