Package ghidra.app.services
Interface StringTranslationService
-
public interface StringTranslationServiceInterface for providing string translating services.Implementations of this interface are usually done via a Plugin and then registered via
Plugin's registerServiceProvided().
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static HelpLocationcreateStringTranslationServiceHelpLocation(java.lang.Class<? extends Plugin> pluginClass, StringTranslationService sts)Helper that creates aHelpLocationbased on the plugin and sts.default HelpLocationgetHelpLocation()Returns theHelpLocationinstance that describes where to direct the user for help when they hit f1.java.lang.StringgetTranslationServiceName()Returns the name of this translation service.voidtranslate(Program program, java.util.List<ProgramLocation> stringLocations)Requests this translation service to translate the specified string data instances.
-
-
-
Method Detail
-
getTranslationServiceName
java.lang.String getTranslationServiceName()
Returns the name of this translation service. Used when building menus to allow the user to pick a translation service.- Returns:
- string name.
-
getHelpLocation
default HelpLocation getHelpLocation()
Returns theHelpLocationinstance that describes where to direct the user for help when they hit f1.- Returns:
HelpLocationinstance or null.
-
translate
void translate(Program program, java.util.List<ProgramLocation> stringLocations)
Requests this translation service to translate the specified string data instances.The implementation generally should not block when performing this action.
- Parameters:
program- the program containing the data instances.stringLocations-Listof string locations.
-
createStringTranslationServiceHelpLocation
static HelpLocation createStringTranslationServiceHelpLocation(java.lang.Class<? extends Plugin> pluginClass, StringTranslationService sts)
Helper that creates aHelpLocationbased on the plugin and sts.- Parameters:
pluginClass- Plugin that provides the string translation servicests-StringTranslationService- Returns:
- HelpLocation with topic equal to the plugin name and anchor something like "MyTranslationServiceName_String_Translation_Service".
-
-