- private static void selectFile(String fileName, String... folderTreePath) {
- selectFolder(false, folderTreePath);
-
- SWTBotTable fileTable = fBot.table();
- fBot.waitUntil(Conditions.widgetIsEnabled(fileTable));
- fBot.waitUntil(ConditionHelpers.isTableItemAvailable(fileName, fileTable));
- SWTBotTableItem tableItem = fileTable.getTableItem(fileName);
- tableItem.check();
- }
-
- private static void setOptions(int optionFlags, String traceTypeName) {
- SWTBotCheckBox checkBox = fBot.checkBox(Messages.ImportTraceWizard_CreateLinksInWorkspace);
- if (checkBox.isEnabled()) {
- if ((optionFlags & ImportTraceWizardPage.OPTION_CREATE_LINKS_IN_WORKSPACE) != 0) {
- checkBox.select();
- } else {
- checkBox.deselect();
- }
- }
-
- checkBox = fBot.checkBox(Messages.ImportTraceWizard_PreserveFolderStructure);
- if ((optionFlags & ImportTraceWizardPage.OPTION_PRESERVE_FOLDER_STRUCTURE) != 0) {
- checkBox.select();
- } else {
- checkBox.deselect();
- }
-
- checkBox = fBot.checkBox(Messages.ImportTraceWizard_ImportUnrecognized);
- if ((optionFlags & ImportTraceWizardPage.OPTION_IMPORT_UNRECOGNIZED_TRACES) != 0) {
- checkBox.select();
- } else {
- checkBox.deselect();
- }
-
- checkBox = fBot.checkBox(Messages.ImportTraceWizard_OverwriteExistingTrace);
- if ((optionFlags & ImportTraceWizardPage.OPTION_OVERWRITE_EXISTING_RESOURCES) != 0) {
- checkBox.select();
- } else {
- checkBox.deselect();
- }
-
- SWTBotCombo comboBox = fBot.comboBoxWithLabel(Messages.ImportTraceWizard_TraceType);
- if (traceTypeName != null && !traceTypeName.isEmpty()) {
- comboBox.setSelection(traceTypeName);
- } else {
- comboBox.setSelection(ImportTraceWizardPage.TRACE_TYPE_AUTO_DETECT);
- }
- }
-
- private void checkOptions(int optionFlags, String expectedSourceLocation, IPath expectedElementPath) throws CoreException {