+
+ private static boolean isSelectedCategory(String categoryId, IConfigurationElement[] config, Set<String> selectedTraceTypes) {
+ for (IConfigurationElement ce : config) {
+ if (ce.getName().equals(TmfTraceType.TYPE_ELEM)) {
+ String traceTypeId = ce.getAttribute(TmfTraceType.ID_ATTR);
+ if (selectedTraceTypes.contains(traceTypeId)) {
+ if (categoryId.equals(ce.getAttribute(TmfTraceType.CATEGORY_ATTR))) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ private static boolean isSelectedCategory(CustomTxtTraceDefinition[] customTxtTraceDefinitions, Set<String> selectedTraceTypes) {
+ for (CustomTxtTraceDefinition def : customTxtTraceDefinitions) {
+ String traceTypeId = CustomTxtTrace.class.getCanonicalName() + ":" + def.definitionName; //$NON-NLS-1$
+ if (selectedTraceTypes.contains(traceTypeId)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static boolean isSelectedCategory(CustomXmlTraceDefinition[] customXmlTraceDefinitions, Set<String> selectedTraceTypes) {
+ for (CustomXmlTraceDefinition def : customXmlTraceDefinitions) {
+ String traceTypeId = CustomXmlTrace.class.getCanonicalName() + ":" + def.definitionName; //$NON-NLS-1$
+ if (selectedTraceTypes.contains(traceTypeId)) {
+ return true;
+ }
+ }
+ return false;
+ }