Package help.screenshot
Class GhidraScreenShotGenerator
- java.lang.Object
-
public abstract class GhidraScreenShotGenerator extends AbstractScreenShotGenerator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class generic.test.AbstractGenericTest
AbstractGenericTest.ExceptionHandlingRunner
-
-
Field Summary
-
Fields inherited from class help.screenshot.AbstractScreenShotGenerator
DEFAULT_FILENAME_SUFFIX, DIALOG_HEADER_HEIGHT, env, image, NEW_FILENAME_SUFFIX, NEW_FILENAME_SUFFIX_KEY, program, SAVE_CREATED_IMAGE_FILE, SAVE_CREATED_IMAGE_FILE_KEY, tool
-
Fields inherited from class ghidra.test.AbstractGhidraHeadlessIntegrationTest
PROJECT_NAME
-
Fields inherited from class generic.test.AbstractGenericTest
concurrentTestExceptionRule, DEFAULT_TEST_TOOL_NAME, DEFAULT_TOOL_NAME, ruleChain, TESTDATA_DIRECTORY_NAME, watchman
-
Fields inherited from class generic.test.AbstractGTest
BATCH_MODE, DEFAULT_WAIT_DELAY, DEFAULT_WAIT_TIMEOUT, DEFAULT_WINDOW_TIMEOUT, PARALLEL_MODE, PRIVATE_LONG_WAIT_TIMEOUT, testName
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GhidraScreenShotGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
finished(java.io.File helpTopic, java.lang.String oldImageName)
Call when you are finished generating a new image.protected FrontEndTool
getFrontEndTool()
protected java.io.File
getHelpTopic()
protected java.io.File
getHelpTopicDir(java.lang.String helpTopic)
protected java.util.List<java.io.File>
getHelpTopicDirs()
protected java.lang.String
getHelpTopicName()
protected java.awt.Image
getOldImage(java.io.File helpTopicDir, java.lang.String imageName)
protected void
handleGIFImage(java.io.File gifFile)
void
loadDefaultTool()
void
performFrontEndAction(java.lang.String actionName, java.lang.String owner, boolean wait)
protected void
reallySaveToHelp(java.io.File helpTopicDir, java.lang.String imageName)
void
saveOrDisplayImage()
Generally, you shouldn't use this.void
saveOrDisplayImage(java.lang.String name)
void
saveToHelp(java.lang.String helpTopic, java.lang.String imageName)
Deprecated.use insteadfinished(File, String)
.void
showImage(java.lang.String helpTopic, java.lang.String oldImageName)
Deprecated.use insteadfinished(File, String)
.protected void
showResults()
void
tearDown()
-
Methods inherited from class help.screenshot.AbstractScreenShotGenerator
addr, address, addSelection, captureComponent, captureComponents, captureDialog, captureDialog, captureDialog, captureDialog, captureDialog, captureDialog, captureDialog, captureDialog, captureIsolatedComponent, captureIsolatedProvider, captureIsolatedProvider, captureIsolatedProviderWindow, captureListingField, captureListingRange, captureMenu, captureMenuBarMenu, captureMenuBarMenuHierachy, captureProvider, captureProvider, captureProvider, captureProviderWindow, captureProviderWindow, captureProviderWindow, captureProviderWindow, captureProviderWindow, captureProviderWithScreenShot, captureToolWindow, captureWindow, captureWindow, captureWindow, closeNonProgramArchives, closeProvider, createBookmark, createEmptyImage, crop, doubleClickCursor, drawArrow, drawArrow, drawBorder, drawLine, drawOval, drawRectangle, drawRectangle, drawRectangleAround, drawRectangleAround, drawRectangleWithDropShadowAround, drawText, drawText, error, exit, fillRectangle, findChildWithType, findComponent, findProviderToolBarButton, findRowByPartialText, generateImage, getBounds, getCursorBounds, getDialog, getDialog, getDockableComponent, getDockableComponent, getField, getPopupMenu, getProvider, getProvider, go, goToListing, goToListing, goToListing, hideTableColumn, leftClickCursor, loadPlugin, loadPlugin, loadProgram, loadProgram, makeSelection, makeSelection, middleClickCursor, moveProvider, moveProviderToFront, moveProviderToFront, moveProviderToItsOwnWindow, moveProviderToItsOwnWindow, moveWindowUp, padImage, paintFix, performAction, performAction, performDialogAction, performMemorySearch, placeImagesSideBySide, positionCursor, positionCursor, positionListingCenter, positionListingTop, prepareCommentsDialog, prepareTool, pressButtonOnDialog, pressOkOnDialog, readImage, removeField, removeFlowArrows, rightClickCursor, scrollToRow, selectRow, selectRow, setDividerPercentage, setDockIcon, setListingFieldWidth, setSelected, setSelectedAnayzer, setToolSize, setUp, setUser, setWindowSize, showAnalysisOptions, showColumnSettings, showCommentDialog, showMenuBarMenu, showOptions, showProgramOptions, showProvider, showTab, showTableColumn, takeSnippet, topOfListing, writeFile
-
Methods inherited from class ghidra.test.AbstractGhidraHeadedIntegrationTest
addPlugin, click, click, click, createApplicationConfiguration, createApplicationLayout, getAction, getPluginByName, saveTool, showDialogWithoutBlocking, showTool, waitForBusyTool, waitForProgram
-
Methods inherited from class ghidra.test.AbstractGhidraHeadlessIntegrationTest
applyCmd, createDefaultProgram, createDefaultProgram, createInProgram, debugProgramInTool, deleteProject, getLanguageCompilerSpecPair, getLanguageService, getPlugin, getSLEIGH_8051_LANGUAGE, getSLEIGH_X86_64_LANGUAGE, getSLEIGH_X86_LANGUAGE, getUniqueSymbol, getUniqueSymbol, getZ80_LANGUAGE, goTo, goTo, initializeSystemProperties, makeSelection, makeSelection, makeSelection, makeSelection, makeSelection, modifyProgram, redo, redo, redo, replaceService, toAddressSet, toAddressSet, toAddressSet, tx, undo, undo, undo, waitForScriptCompletion
-
Methods inherited from class docking.test.AbstractDockingTest
assertEnabled, assertToggleButtonSelected, capture, checkMessageDisplay, clickComponentProvider, clickComponentProvider, close, close, closeAllWindows, closeAllWindows, closeAllWindowsAndFrames, closeProvider, closeSaveChangesDialog, createContext, createContext, createRenderedImage, createScreenImage, disposeErrorGUI, dockingSetUp, dockingTearDown, expandPath, expandTree, findButtonByActionName, findButtonByIcon, findButtonByText, findComponent, findComponentByName, getAction, getAction, getAction, getActionsByName, getActionsByOwner, getActionsByOwnerAndName, getClipboardText, getComponentProvider, getDialogComponent, getDialogComponentProvider, getDockableComponent, getLocalAction, getNode, getOpenWindowsAsString, getStatusText, getTitleForWindow, getWindow, getWindowByTitle, getWindowByTitleContaining, getWindows, isEnabled, isEnabled, isSelected, isUseErrorGUI, performAction, performAction, performAction, performAction, performDialogAction, pressButtonByText, pressButtonByText, printOpenWindows, selectPath, selectTabIfAvailable, setErrorGUIEnabled, setErrorsExpected, setToggleActionSelected, setToggleActionSelected, setToggleButtonSelected, setToggleButtonSelected, showProvider, triggerActionKey, triggerActionKey, triggerBackspaceKey, triggerEnter, triggerEscapeKey, triggerKey, triggerKey, triggerText, triggerText, waitForComponentProvider, waitForComponentProvider, waitForDialogComponent, waitForDialogComponent, waitForDialogComponent, waitForJDialog, waitForJDialog, waitForTableModel, waitForTree, waitForUpdateOnChooser, waitForWindow, waitForWindow, waitForWindow, waitForWindow, waitForWindowByName, waitForWindowByTitleContaining, waitForWindowByTitleContaining, writeImage, writeImage
-
Methods inherited from class generic.test.AbstractGenericTest
clickMouse, clickMouse, clickTableCell, createStackTraceForAllThreads, createTempDirectory, createTempFile, createTempFile, createTempFileForTest, createTempFileForTest, createTempFilePath, createTempFilePath, deleteMatchingTempFiles, deleteSimilarTempFiles, doubleClick, dragMouse, editCell, executeOnSwingWithoutBlocking, findAbstractButtonByName, findAbstractButtonByText, findButtonByIcon, findButtonByText, findComponent, findComponent, findComponentByName, findComponentByName, findComponentsByName, findOwnedWindows, findPathToText, findTestDataFile, findTreePathToText, fixupGUI, getAllWindows, getDebugFileDirectory, getInstanceField, getInstanceFieldByClassType, getLocalResourceFile, getRenderedTableCellValue, getTestDataDir, getTestDataDirectory, getTestDataFile, getText, hasTestFailed, initializeLayout, invokeConstructor, invokeInstanceMethod, invokeInstanceMethod, leftClick, loadTextResource, loadTextResource, middleClick, moveMouse, postEvent, pressButton, pressButton, pressButtonByName, pressButtonByName, pressButtonByText, pressButtonByText, printMemory, privateWaitForPostedSwingRunnables_SwingSafe, rightClick, runSwing, runSwing, runSwing, runSwingWithExceptions, setComboBoxSelection, setInstanceField, setText, testFailed, toString, waitForPostedSwingRunnables, waitForSwing, waitForTasks, windowForComponent, yieldToSwing
-
Methods inherited from class generic.test.AbstractGTest
assertArraysEqualOrdered, assertArraysEqualUnordered, assertArraysEqualUnordered, assertContainsExactly, assertContainsExactly, assertListEqualOrdered, assertListEqualOrdered, assertListEqualsArrayOrdered, assertListEqualsArrayUnordered, assertListEqualUnordered, failWithException, getName, getRandomInt, getRandomInt, getRandomString, getRandomString, getTestDirectoryPath, sleep, waitFor, waitFor, waitFor, waitFor, waitForCondition, waitForCondition, waitForCondition, waitForConditionWithoutFailing, waitForValue, waitForValueWithoutFailing
-
-
-
-
Method Detail
-
tearDown
public void tearDown() throws java.lang.Exception
- Overrides:
tearDown
in classAbstractScreenShotGenerator
- Throws:
java.lang.Exception
-
showResults
protected void showResults()
-
saveOrDisplayImage
public void saveOrDisplayImage()
Generally, you shouldn't use this. This is only visible for those who do not directly extend this class.
-
saveOrDisplayImage
public void saveOrDisplayImage(java.lang.String name)
-
handleGIFImage
protected void handleGIFImage(java.io.File gifFile)
-
getHelpTopic
protected java.io.File getHelpTopic()
-
loadDefaultTool
public void loadDefaultTool()
-
getHelpTopicName
protected java.lang.String getHelpTopicName()
-
finished
public void finished(java.io.File helpTopic, java.lang.String oldImageName)
Call when you are finished generating a new image. This method will either show the newly created image or write it to disk, depending upon the value ofAbstractScreenShotGenerator.SAVE_CREATED_IMAGE_FILE
, which is a system property.- Parameters:
helpTopic
- The help topic that contains the imageoldImageName
- The name of the image
-
getOldImage
protected java.awt.Image getOldImage(java.io.File helpTopicDir, java.lang.String imageName)
-
showImage
@Deprecated public void showImage(java.lang.String helpTopic, java.lang.String oldImageName)
Deprecated.use insteadfinished(File, String)
.- Parameters:
helpTopic
- The help topic that contains the imageoldImageName
- The name of the image
-
saveToHelp
@Deprecated public void saveToHelp(java.lang.String helpTopic, java.lang.String imageName)
Deprecated.use insteadfinished(File, String)
.- Parameters:
helpTopic
- The help topic that contains the imageimageName
- The name of the image
-
reallySaveToHelp
protected void reallySaveToHelp(java.io.File helpTopicDir, java.lang.String imageName)
-
getHelpTopicDir
protected java.io.File getHelpTopicDir(java.lang.String helpTopic)
-
getHelpTopicDirs
protected java.util.List<java.io.File> getHelpTopicDirs()
-
getFrontEndTool
protected FrontEndTool getFrontEndTool()
-
performFrontEndAction
public void performFrontEndAction(java.lang.String actionName, java.lang.String owner, boolean wait)
-
-