package de.braintags.vertx.util;

/**
 * Copyright: Copyright (c) 13.02.2017 <br>
 * Company: Braintags GmbH <br>
 * 
 * @author mpluecker
 * 
 */
public class DebugDetection {

  private static final boolean develop = detectDevelopMode();
  private static final boolean test = detectTestMode();
  private static final boolean fileCachingDisabled = detectFileCahcingDisabled();

  public static boolean isLaunchedByEclipse() {
    return develop;
  }

  public static boolean isTest() {
    return test;
  }

  public static boolean isFileCachingDisabled() {
    return fileCachingDisabled;
  }

  private static boolean detectTestMode() {
    String test = System.getProperty("test");
    if (test != null)
      return "true".equals(test);
    else
      return isLaunchedByEclipse();
  }

  private static boolean detectFileCahcingDisabled() {
    return "true".equals(System.getProperties().getProperty("vertx.disableFileCaching"));
  }

  private static boolean detectDevelopMode() {
    String develop = System.getProperty("develop");
    if (develop != null)
      return "true".equals(develop);
    else
      return java.lang.management.ManagementFactory.getRuntimeMXBean().getInputArguments().toString()
          .indexOf("-agentlib:jdwp") >= 0;
  }

}

@@ -237,32 +237,99 @@
 DevelopMode();%0D%0A
+  private static final boolean profiling = detectProfilingMode();%0D%0A
   private static
@@ -361,32 +361,32 @@
 ectTestMode();%0D%0A
-
   private static
@@ -584,32 +584,103 @@
 n test;%0D%0A  %7D%0D%0A%0D%0A
+  public static boolean isProfiling() %7B%0D%0A    return profiling;%0D%0A  %7D%0D%0A%0D%0A
   public static 
@@ -927,34 +927,32 @@
  return 
-isLaunchedByEclips
+detectDevelopMod
 e();%0D%0A  
@@ -1004,32 +1004,32 @@
 ngDisabled() %7B%0D%0A
-
     return %22true
@@ -1102,32 +1102,165 @@
 ing%22));%0D%0A  %7D%0D%0A%0D%0A
+  private static boolean detectProfilingMode() %7B%0D%0A    return %22true%22.equals(System.getProperties().getProperty(%22profiling%22));%0D%0A  %7D%0D%0A%0D%0A
   private static

remove dummy code