1 19 20 package org.netbeans; 21 22 import java.util.Arrays ; 23 import java.util.logging.Level ; 24 25 33 public abstract class Events { 34 35 36 public static final String PERF_START = "perfStart"; 38 public static final String PERF_TICK = "perfTick"; 40 public static final String PERF_END = "perfEnd"; 42 43 public static final String START_CREATE_REGULAR_MODULE = "startCreateRegularModule"; 45 public static final String FINISH_CREATE_REGULAR_MODULE = "finishCreateRegularModule"; 47 public static final String START_CREATE_BOOT_MODULE = "startCreateBootModule"; 49 public static final String FINISH_CREATE_BOOT_MODULE = "finishCreateBootModule"; 51 public static final String CREATED_MODULE_SYSTEM = "createdModuleSystem"; 53 public static final String START_LOAD_BOOT_MODULES = "startLoadBootModules"; 55 public static final String FINISH_LOAD_BOOT_MODULES = "finishLoadBootModules"; 57 public static final String START_DEPLOY_TEST_MODULE = "startDeployTestModule"; 59 public static final String FINISH_DEPLOY_TEST_MODULE = "finishDeployTestModule"; 61 public static final String DELETE_MODULE = "deleteModule"; 63 public static final String START_ENABLE_MODULES = "startEnableModules"; 65 public static final String FINISH_ENABLE_MODULES = "finishEnableModules"; 67 public static final String START_DISABLE_MODULES = "startDisableModules"; 69 public static final String FINISH_DISABLE_MODULES = "finishDisableModules"; 71 public static final String PREPARE = "prepare"; 73 public static final String START_LOAD = "startLoad"; 75 public static final String FINISH_LOAD = "finishLoad"; 77 public static final String START_UNLOAD = "startUnload"; 79 public static final String FINISH_UNLOAD = "finishUnload"; 81 public static final String INSTALL = "install"; 83 public static final String UNINSTALL = "uninstall"; 85 public static final String RESTORE = "restore"; 87 public static final String UPDATE = "update"; 89 public static final String LOAD_SECTION = "loadSection"; 91 public static final String CLOSE = "close"; 93 public static final String START_READ = "startRead"; 95 public static final String FINISH_READ = "finishRead"; 97 public static final String MODULES_FILE_PROCESSED = "modulesFileProcessed"; 99 public static final String MODULES_FILE_SCANNED = "modulesFileScanned"; 101 public static final String START_AUTO_RESTORE = "startAutoRestore"; 103 public static final String FINISH_AUTO_RESTORE = "finishAutoRestore"; 105 public static final String FAILED_INSTALL_NEW = "failedInstallNew"; 107 public static final String FAILED_INSTALL_NEW_UNEXPECTED = "failedInstallNewUnexpected"; 109 public static final String LOAD_LAYERS = "loadLayers"; 111 public static final String UNLOAD_LAYERS = "unloadLayers"; 113 public static final String WRONG_CLASS_LOADER = "wrongClassLoader"; 115 public static final String EXTENSION_MULTIPLY_LOADED = "extensionMultiplyLoaded"; 117 public static final String MISSING_JAR_FILE = "missingJarFile"; 119 public static final String CANT_DELETE_ENABLED_AUTOLOAD = "cantDeleteEnabledAutoload"; 121 public static final String MISC_PROP_MISMATCH = "miscPropMismatch"; 123 public static final String PATCH = "patch"; 125 126 protected Events() { 127 } 128 129 135 public final void log(String message, Object ... args) { 136 if (Util.err.isLoggable(Level.FINE) && 137 message != PERF_START && message != PERF_TICK && message != PERF_END) { 138 Util.err.fine("EVENT -> " + message + " " + Arrays.asList(args)); 139 } 140 try { 141 logged(message, args); 142 } catch (RuntimeException re) { 143 Util.err.log(Level.WARNING, null, re); 146 } 147 } 148 149 151 protected abstract void logged(String message, Object [] args); 152 153 } 154 | Popular Tags |