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 DesignerContext
protected final Resource
protected final ResourceWorkspace
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractScriptSearchObject
(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.void
locate()
Brings focus to the item in the UI in whatever way is appropriate.protected abstract void
Opens the editor for the resource in the current workspace.protected void
Saves the resource in the current workspace.protected abstract void
serializeResource
(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, wait
Methods 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:SearchObject
Returns an icon that can be used to identify this type of result. Should be 16x16 or smaller.- Specified by:
getIcon
in interfaceSearchObject
-
getName
Description copied from interface:SearchObject
The 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:
getName
in interfaceSearchObject
-
locate
public void locate()Description copied from interface:SearchObject
Brings 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:
locate
in 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
- theResourceBuilder
instance representing the resource to be serialized
-