private boolean pluginSanityCheck(Bundle b) { boolean passed = true; boolean hasPluginXml = (b.getResource("/plugin.xml") != null); if (b.getHeaders().get(BUNDLE_WITHOUT_PLUGIN_XML) == null && !hasPluginXml) { logger.debug("\t" + getNiceBundleName(b) + " Plugin has no plugin.xml resource"); passed = false; } if (hasPluginXml && !isSingleton(b)) { logger.warn("\t" + getNiceBundleName(b) + " plugin is not a singleton so its plugin.xml will not be seen by the registry."); passed = false; } return passed; }
private boolean pluginSanityCheck(Bundle b) { boolean passed = true; boolean hasPluginXml = (b.getResource("/plugin.xml") != null); if (b.getHeaders().get(BUNDLE_WITHOUT_PLUGIN_XML) == null && !hasPluginXml) { logger.info("\t" + getNiceBundleName(b) + " Plugin has no plugin.xml resource"); passed = false; } if (hasPluginXml && !isSingleton(b)) { logger.warn("\t" + getNiceBundleName(b) + " plugin is not a singleton so its plugin.xml will not be seen by the registry." ); passed = false; } return passed; }
private void displayPlatform() { Bundle thisBundle = context.getBundle(); Version v = PluginUtilities.getBundleVersion(thisBundle); logger.info("Starting Protege 4 OWL Editor (Version " + v.getMajor() + "." + v.getMinor() + "." + v.getMicro() + ", Build = " + PluginUtilities.getBuildNumber(thisBundle) + ")"); logger.info("Platform:"); logger.info(" Java: JVM " + System.getProperty("java.runtime.version") + " Memory: " + (Runtime.getRuntime().maxMemory() / 1000000) + "M"); logger.info(" Language: " + Locale.getDefault().getLanguage() + ", Country: " + Locale.getDefault().getCountry()); logger.info(" Framework: " + context.getProperty(Constants.FRAMEWORK_VENDOR) + " (" + context.getProperty(Constants.FRAMEWORK_VERSION) + ")"); logger.info(" OS: " + context.getProperty(Constants.FRAMEWORK_OS_NAME) + " (" + context.getProperty(Constants.FRAMEWORK_OS_VERSION) + ")"); logger.info(" Processor: " + context.getProperty(Constants.FRAMEWORK_PROCESSOR)); for (Bundle plugin : context.getBundles()) { if (isPlugin(plugin)) { logger.info("Plugin: " + getNiceBundleName(plugin) + " (" + plugin.getVersion() + ")"); } } for (Bundle plugin : context.getBundles()) { if (isPlugin(plugin)) { pluginSanityCheck(plugin); } } }
if (isPlugin(plugin)) { if (isActive(plugin)) { logger.info("Plugin: {} ({})", getNiceBundleName(plugin), plugin.getVersion()); pluginCount++; "Please see the Protégé log for more details.", getNiceBundleName(plugin), plugin.getVersion());