Class AbstractScriptSearchObject
java.lang.Object
com.inductiveautomation.ignition.designer.scripteditor.search.AbstractScriptSearchObject
- All Implemented Interfaces:
SearchObject
- Direct Known Subclasses:
AccelerometerScriptSearchObject,AuthChallengeScriptSearchObject,BarcodeScriptSearchObject,BluetoothScriptSearchObject,FormSubmissionHandlerScriptSearchObject,KeyEventScriptSearchObject,KeystrokeScriptSearchObject,MessageHandlerScriptSearchObject,NfcScanScriptSearchObject,PageStartupScriptSearchObject,ScheduledScriptSearchObject,ShutdownInterceptSearchObject,ShutdownScriptSearchObject,StartupScriptSearchObject,TagChangeScriptSearchObject,TimerScriptSearchObject,UpdateScriptSearchObject
Abstract base class for search objects that provide functionality for locating and managing event scripts
saved as resources within the designer context.
This class offers common methods and properties for handling these scripts.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DesignerContextprotected final Resourceprotected final ResourceWorkspace -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractScriptSearchObject(ResourceWorkspace workspace, DesignerContext context, Resource resource) -
Method Summary
Modifier and TypeMethodDescriptiongetIcon()Returns an icon that can be used to identify this type of result.getName()The name of the object that matches the search pattern.voidlocate()Brings focus to the item in the UI in whatever way is appropriate.protected abstract voidOpens the editor for the resource in the current workspace.protected voidSaves the resource in the current workspace.protected abstract voidserializeResource(ResourceBuilder builder) Serializes the specific resource into the providedResourceBuilder.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.inductiveautomation.ignition.designer.findreplace.SearchObject
getOwnerName, getText, isMutable, setText
-
Field Details
-
context
-
workspace
-
resource
-
-
Constructor Details
-
AbstractScriptSearchObject
protected AbstractScriptSearchObject(ResourceWorkspace workspace, DesignerContext context, Resource resource)
-
-
Method Details
-
getIcon
Description copied from interface:SearchObjectReturns an icon that can be used to identify this type of result. Should be 16x16 or smaller.- Specified by:
getIconin interfaceSearchObject
-
getName
Description copied from interface:SearchObjectThe name of the object that matches the search pattern. In other words, a description of the element inside the owner, such as "Name", or "Expression".- Specified by:
getNamein interfaceSearchObject
-
locate
public void locate()Description copied from interface:SearchObjectBrings focus to the item in the UI in whatever way is appropriate. Most of the time this will mean bringing up the editor for the object.- Specified by:
locatein interfaceSearchObject
-
openEditor
protected abstract void openEditor()Opens the editor for the resource in the current workspace. Implementations should handle the specific workspace type. -
saveResource
protected void saveResource()Saves the resource in the current workspace. Implementations should manage serialization of the specific resource -
serializeResource
Serializes the specific resource into the providedResourceBuilder. Subclasses should implement this method to apply their resource-specific serialization logic.- Parameters:
builder- theResourceBuilderinstance representing the resource to be serialized
-