Class UISearchHelper


  • public final class UISearchHelper
    extends Object
    Special helper for searching elements in UI controls
    Restriction:
    This class is not intended to be sub-classed by clients.
    Restriction:
    This class is not intended to be instantiated by clients.
    • Method Detail

      • expandTreeViewerStepByStep

        public static void expandTreeViewerStepByStep​(org.eclipse.swt.widgets.Display actualDisplay,
                                                      org.eclipse.ui.navigator.CommonViewer viewer,
                                                      int delayBeforeExpandAll,
                                                      int stepDelaying,
                                                      ISelection selection)
        Expand all items in CommonViewer step by step and selected element from selection after expanding
        • First step: CommonViewer will be expand to 2 levels.
        • Second step: wait delayBeforeExpandAll before tree will be expand all
        • Next step: each branch corresponding to the top items of CommonViewer (see methods Tree.getTopItem()) will be expand all with delay equals to stepDelaying
        • Final step: try to select item corresponding to the selection
          Parameters:
          actualDisplay - actual Display, can't be null
          viewer - actual CommonViewer for expanding all operation, can't be null
          delayBeforeExpandAll - time in milliseconds before tree will be expand all
          stepDelaying - time in milliseconds before next branch from top tree item will be expand all
          selection - selection ISelection for choose in viewer after expanding, can be null if there is no selection
        • getActiveSearchMonitor

          public static org.eclipse.core.runtime.IProgressMonitor getActiveSearchMonitor​(String searchPattern)
          Gets actual IProgressMonitor by the search pattern from SearchBox
          Parameters:
          searchPattern - search pattern from SearchBox, can't be null
          Returns:
          actual search IProgressMonitor or null if there is no searching operation with pattern equals searchPattern