public static void trace(String option, String msg, Throwable error) {
   final DebugOptions debugOptions = activator.getDebugOptions();
   if (debugOptions.isDebugEnabled()
       && debugOptions.getBooleanOption(PI_RENDERERS + option, false)) {
     System.out.println(msg);
     if (error != null) {
       error.printStackTrace(System.out);
     }
   }
   activator.getTrace().trace(option, msg, error);
 }
Пример #2
0
  @Override
  protected void doExecute() throws Exception {
    final DebugOptions debugOptions = DebugConsoleCommands.getDebugOptions();
    if (debugOptions.isDebugEnabled()) {
      printf("Traceing is currently enabled.");
    } else {
      printf("Traceing is not enabled.");
    }

    final Map<String, String> options = debugOptions.getOptions();
    final TreeSet<String> keys = new TreeSet<String>(options.keySet());
    if (!keys.isEmpty()) {
      printf("The following debug options are set:");
      for (final String key : keys) {
        printf("  %s = %s", key, options.get(key));
      }
    } else {
      printf("No debug options set.");
    }
  }