void (TestData data, Module module) { data.TEST_OBJECT = type.getType(); if (TestType.GROUP == type) { data.GROUP_NAME = getText(TestType.GROUP); data.PACKAGE_NAME = ""; data.MAIN_CLASS_NAME = ""; data.METHOD_NAME = ""; data.SUITE_NAME = ""; } else if (TestType.PACKAGE == type) { data.PACKAGE_NAME = getText(TestType.PACKAGE); data.GROUP_NAME = ""; data.MAIN_CLASS_NAME = ""; data.METHOD_NAME = ""; data.SUITE_NAME = ""; } else if (TestType.METHOD == type || TestType.CLASS == type || TestType.SOURCE == type) { String className = getText(TestType.CLASS); data.GROUP_NAME = ""; data.SUITE_NAME = ""; if (TestType.METHOD == type || TestType.SOURCE == type) data.METHOD_NAME = getText(TestType.METHOD); data.MAIN_CLASS_NAME = className; data.PACKAGE_NAME = StringUtil.getPackageName(className); } else if (TestType.SUITE == type) { data.SUITE_NAME = getText(TestType.SUITE); data.PACKAGE_NAME = ""; data.GROUP_NAME = ""; data.MAIN_CLASS_NAME = ""; data.METHOD_NAME = ""; } else if (TestType.PATTERN == type) { final LinkedHashSet<String> set = new LinkedHashSet<>(); final String[] patterns = getText(TestType.PATTERN).split("\\|\\|"); for (String pattern : patterns) { if (!pattern.isEmpty()) { set.add(pattern); } } data.setPatterns(set); } try { data.PROPERTIES_FILE = propertiesFileDocument.getText(0, propertiesFileDocument.getLength()); } catch (BadLocationException e) { throw new RuntimeException(e); } try { data.OUTPUT_DIRECTORY = outputDirectoryDocument.getText(0, outputDirectoryDocument.getLength()); } catch (BadLocationException e) { throw new RuntimeException(e); } }