Class ModuleLibrarySearchProvider
java.lang.Object
com.inductiveautomation.ignition.designer.findreplace.AbstractSearchProvider
com.inductiveautomation.ignition.designer.scripteditor.workspace.ModuleLibrarySearchProvider
- All Implemented Interfaces:
SearchProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.designer.findreplace.SearchProvider
SearchProvider.SelectedObjectsHandler
-
Constructor Summary
ConstructorsConstructorDescriptionModuleLibrarySearchProvider
(DesignerContext context, String name, Runnable locateFunc) -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of "categories", or sub-selectable units, supported by this search provider.getName()
Returns the name of the search provider, which will be used in the gateway and a UI to uniquely identify the provider.protected String
Returns a key that will be used withBundleUtil
to get various descriptions of the selectable objects.boolean
Whether or not the set of objects searched by this provider is selectable- for examples, which groups or windows are to be searched.retrieveSearchableObjects
(Collection<Object> categories, List<Object> searchObjects, TaskProgressListener progress) Returns an iterator that provides all of the objects described by the parameters.void
Instructs the SearchProvider to show a dialog in order to select the objects to search.Methods inherited from class com.inductiveautomation.ignition.designer.findreplace.AbstractSearchProvider
notifySearchClosed, selectedObjectsToString, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.inductiveautomation.ignition.designer.findreplace.SearchProvider
addAsyncReplaceListener, getExecutor, getId
-
Constructor Details
-
ModuleLibrarySearchProvider
-
-
Method Details
-
getName
Description copied from interface:SearchProvider
Returns the name of the search provider, which will be used in the gateway and a UI to uniquely identify the provider. It is expected to be in the current session's language. -
getCategories
Description copied from interface:SearchProvider
Returns a list of "categories", or sub-selectable units, supported by this search provider. The actual objects will be passed back in to retrieveSearchableObjects when the search is executed. -
hasSelectableObjects
public boolean hasSelectableObjects()Description copied from interface:SearchProvider
Whether or not the set of objects searched by this provider is selectable- for examples, which groups or windows are to be searched. -
selectObjects
Description copied from interface:SearchProvider
Instructs the SearchProvider to show a dialog in order to select the objects to search. The object are returned through the passed in handler, and will later be passed into executeSearch. -
getSelectableObjectBaseKey
Description copied from class:AbstractSearchProvider
Returns a key that will be used withBundleUtil
to get various descriptions of the selectable objects. It is expected that the following keys exist:
'{Key}.One' - "%d object"
'{Key}.Many' - "%d objects"
'{Key}.Default' - what will be searched if no objects are selected. For example, "All groups" or "Default provider"- Specified by:
getSelectableObjectBaseKey
in classAbstractSearchProvider
- Returns:
- a
BundleUtil
key corresponding to a description for a selectable object.
-
retrieveSearchableObjects
public Iterator<SearchObject> retrieveSearchableObjects(Collection<Object> categories, List<Object> searchObjects, TaskProgressListener progress) Description copied from interface:SearchProvider
Returns an iterator that provides all of the objects described by the parameters. The iterator will generally stream the results, calculating the next object on each call to hasNext().The provided ProgressListener can be used to provide progress information as the Iterator is processed. Some providers may not be able to calculate progress, in which case they should call setIndeterminate(true), but the provider implementors are encouraged to provide anything they can, even if it's very coarse.
- Parameters:
categories
- indicates the user selection (if applicable) of which categories should be searched.searchObjects
- the user selected objects (if applicable) to be searched.progress
- a progress listener for this provider, which can be updated as the returned Iterator is used. If not supported, the provider should call setIndeterminate(true).
-