<commit_before>/**
 * @module JUnit
 */
module JUnit {

  export var log:Logging.Logger = Logger.get("JUnit");

  /**
   * Returns true if the JUnit plugin is enabled (both the hawtio insight and JUnit mbeans are available
   */
  export function isJUnitPluginEnabled(workspace:Workspace) {
    return getIntrospectorMBean(workspace)  &&
          workspace.hasDomainAndProperties('io.hawt.junit', {type: 'JUnitFacade'});
  }

  export function getIntrospectorMBean(workspace: Workspace) {
    return Core.getMBeanTypeObjectName(workspace, "io.hawt.introspect", "Introspector");
  }
}<commit_msg>#817 show the JUnit tab if there exists the junit mbean (and the introspector); whatever the current JMX tree selection ;)<commit_after>/**
 * @module JUnit
 */
module JUnit {

  export var log:Logging.Logger = Logger.get("JUnit");

  /**
   * Returns true if the JUnit plugin is enabled (both the hawtio insight and JUnit mbeans are available
   */
  export function isJUnitPluginEnabled(workspace:Workspace) {
    return getIntrospectorMBean(workspace)  &&
          workspace.findMBeanWithProperties('io.hawt.junit', {type: 'JUnitFacade'});
  }

  export function getIntrospectorMBean(workspace: Workspace) {
    return Core.getMBeanTypeObjectName(workspace, "io.hawt.introspect", "Introspector");
  }
}
{'fraction_non_alphanumeric': 0.10906298003072197, 'fraction_numerical': 0.002304147465437788, 'mean_word_length': 4.4978902953586495, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5709271', 'n_tokens_mistral': 417, 'n_tokens_neox': 403, 'n_words': 104}