public boolean getBooleanDebugOption(String option, boolean defaultValue) {
   if (debugTracker == null) {
     if (JobManager.DEBUG) JobMessages.message("Debug tracker is not set"); // $NON-NLS-1$
     return defaultValue;
   }
   DebugOptions options = (DebugOptions) debugTracker.getService();
   if (options != null) {
     String value = options.getOption(option);
     if (value != null) return value.equalsIgnoreCase("true"); // $NON-NLS-1$
   }
   return defaultValue;
 }
 public boolean getBooleanOption(String option, boolean defaultValue) {
   if (debugTracker == null) {
     if (bundleContext == null) return defaultValue;
     debugTracker = new ServiceTracker(bundleContext, DebugOptions.class.getName(), null);
     debugTracker.open();
   }
   DebugOptions options = (DebugOptions) debugTracker.getService();
   if (options == null) return defaultValue;
   String value = options.getOption(option);
   if (value == null) return defaultValue;
   return value.equalsIgnoreCase("true"); // $NON-NLS-1$
 }
示例#3
0
 public boolean getBooleanDebugOption(String option, boolean defaultValue) {
   if (debugTracker == null) {
     RuntimeLog.log(
         new Status(
             IStatus.ERROR,
             RegistryMessages.OWNER_NAME,
             0,
             RegistryMessages.bundle_not_activated,
             null));
     return defaultValue;
   }
   DebugOptions options = (DebugOptions) debugTracker.getService();
   if (options != null) {
     String value = options.getOption(option);
     if (value != null) return value.equalsIgnoreCase("true"); // $NON-NLS-1$
   }
   return defaultValue;
 }