Source:
<code>public void testChangeFont() { SWTBotUtils.createProject(TRACE_PROJECT_NAME); SWTBotUtils.openTrace(TRACE_PROJECT_NAME, fTestFile.getAbsolutePath(), COLUMN_TRACE_TYPE); SWTBotEditor editorBot = SWTBotUtils.activateEditor(fBot, fTestFile.getName()); SWTBotTable tableBot = editorBot.bot().table(); maximizeTable(tableBot); tableBot.contextMenu("Show Raw").click(); tableBot.setFocus(); tableBot.click(4, 1); tableBot.select(4); SWTBotStyledText rawText = editorBot.bot().styledText(); FontData font = getFont(rawText); fBot.menu("Window").menu("Preferences").click(); fBot.waitUntil(Conditions.shellIsActive("Preferences")); SWTWorkbenchBot bot = new SWTWorkbenchBot(); bot.activeShell().activate(); bot.text().setText("color"); SWTBotTreeItem generalItem = bot.tree().getTreeItem("General"); generalItem.click(); generalItem.select(); bot.waitUntil(ConditionHelpers.IsTreeChildNodeAvailable("Appearance", generalItem)); SWTBotTreeItem appearanceNode = generalItem.getNode("Appearance"); appearanceNode.click(); appearanceNode.select(); bot.waitUntil(ConditionHelpers.IsTreeChildNodeAvailable("Colors and Fonts", appearanceNode)); SWTBotTreeItem colorAndFontNode = appearanceNode.getNode("Colors and Fonts"); colorAndFontNode.click(); colorAndFontNode.select(); SWTBotTreeItem tracingItem = bot.tree(1).getTreeItem("Tracing"); tracingItem.click(); tracingItem.select(); tracingItem.expand(); SWTBotTreeItem traceEventTableFont = <START> tracingItem.getNode(0); <END> traceEventTableFont.click(); traceEventTableFont.select(); bot.button("Use System Font").click(); bot.button("Apply").click(); FontData font2 = getFont(rawText); assertFalse(font2.equals(font)); bot.button("Reset").click(); bot.button("Apply").click(); assertEquals(getFont(rawText), font); fBot.closeAllEditors(); SWTBotUtils.deleteProject(TRACE_PROJECT_NAME, fBot); }</code><technical_language>explicit name, order change if add new settings</technical_language>

Target:
public void testChangeFont() { SWTBotUtils.createProject(TRACE_PROJECT_NAME); SWTBotUtils.openTrace(TRACE_PROJECT_NAME, fTestFile.getAbsolutePath(), COLUMN_TRACE_TYPE); SWTBotEditor editorBot = SWTBotUtils.activateEditor(fBot, fTestFile.getName()); SWTBotTable tableBot = editorBot.bot().table(); maximizeTable(tableBot); tableBot.contextMenu("Show Raw").click(); tableBot.setFocus(); tableBot.click(4, 1); tableBot.select(4); SWTBotStyledText rawText = editorBot.bot().styledText(); FontData font = getFont(rawText); fBot.menu("Window").menu("Preferences").click(); fBot.waitUntil(Conditions.shellIsActive("Preferences")); SWTWorkbenchBot bot = new SWTWorkbenchBot(); bot.activeShell().activate(); bot.text().setText("color"); SWTBotTreeItem generalItem = bot.tree().getTreeItem("General"); generalItem.click(); generalItem.select(); bot.waitUntil(ConditionHelpers.IsTreeChildNodeAvailable("Appearance", generalItem)); SWTBotTreeItem appearanceNode = generalItem.getNode("Appearance"); appearanceNode.click(); appearanceNode.select(); bot.waitUntil(ConditionHelpers.IsTreeChildNodeAvailable("Colors and Fonts", appearanceNode)); SWTBotTreeItem colorAndFontNode = appearanceNode.getNode("Colors and Fonts"); colorAndFontNode.click(); colorAndFontNode.select(); SWTBotTreeItem tracingItem = bot.tree(1).getTreeItem("Tracing"); tracingItem.click(); tracingItem.select(); tracingItem.expand(); SWTBotTreeItem traceEventTableFont = tracingItem.getNode("Trace event raw text font (set to default: Text Font)"); traceEventTableFont.click(); traceEventTableFont.select(); bot.button("Use System Font").click(); bot.button("Apply").click(); FontData font2 = getFont(rawText); assertFalse(font2.equals(font)); bot.button("Reset").click(); bot.button("Apply").click(); assertEquals(getFont(rawText), font); fBot.closeAllEditors(); SWTBotUtils.deleteProject(TRACE_PROJECT_NAME, fBot); }