} catch (ClassNotFoundException e) { String msg = MessageFormat.format("[{0}]: Not able to load class [{1}]", config.getDeclaringExtension().getDeclaringModule().getName(), implClassName); throw new CoreException(msg, e); } else { String msg = MessageFormat.format("[{0}]: Specified class [{1}] must be derived from [{2}]", config.getDeclaringExtension().getDeclaringModule().getName(), implClassName, baseClass.getName()); } catch (Exception e) { String msg = MessageFormat.format("[{0}]: Not able to create new instance of class [{1}]", config.getDeclaringExtension().getDeclaringModule().getName(), interactorClass.getName()); throw new CoreException(msg, e);
displayName = declaringModule.getName();
} catch (ClassNotFoundException e) { String msg = MessageFormat.format("[{0}]: Not able to load class [{1}]", config.getDeclaringExtension().getDeclaringModule().getName(), writerPluginClassName); throw new CoreException(msg, e); } else { String msg = MessageFormat.format("[{0}]: Specified class [{1}] must be derived from [{2}]", config.getDeclaringExtension().getDeclaringModule().getName(), writerPluginClassName, ProductWriterPlugIn.class.getName()); } catch (Exception e) { String msg = MessageFormat.format("[{0}]: Specified class [{1}] could not be instantiated", config.getDeclaringExtension().getDeclaringModule().getName(), writerPluginClass.getName()); throw new CoreException(msg);
declaringModule.getName()); moduleContext.getLogger().severe(message); return; if (helpSetUrl == null) { String message = String.format("Help set resource path [%s] of module [%s] not found.", helpSetPath, declaringModule.getName()); moduleContext.getLogger().severe(message); return; DefaultHelpSetFactory factory = new VerifyingHelpSetFactory(helpSetPath, declaringModule.getName(), moduleContext.getLogger()); HelpSet helpSet = HelpSet.parse(helpSetUrl, declaringModule.getClassLoader(), factory); helpSetPath, declaringModule.getName(), ""); moduleContext.getLogger().log(Level.SEVERE, message, ""); helpSetId, helpSetPath, declaringModule.getName()); moduleContext.getLogger().severe(message);
private void configureInteractor(ConfigurationElement config) throws CoreException { String interactorClassName = getConfigString(config, INTERACTOR_ELEMENT_NAME); if (interactorClassName != null) { Interactor interactor = loadObjectInstance(config, Interactor.class, interactorClassName); interactor.addListener(activationHandler); String interactorListenerClassName = getConfigString(config, INTERACTOR_LISTENER_ELEMENT_NAME); if (interactorListenerClassName != null) { InteractorListener interactorListener = loadObjectInstance(config, InteractorListener.class, interactorListenerClassName); interactor.addListener(interactorListener); } setInteractor(interactor); } else { String msg = MessageFormat.format("[{0}]: Missing element [{1}] whose value must be an instance of [{2}]", config.getDeclaringExtension().getDeclaringModule().getName(), INTERACTOR_ELEMENT_NAME, Interactor.class.getName()); throw new CoreException(msg); } }
@Override public void configure(ConfigurationElement config) throws CoreException { super.configure(config); ConfigurationElement itemsElement = config.getChild(ELEMENT_NAME_ITEMS); if (itemsElement == null) { return; } ConfigurationElement[] children = itemsElement.getChildren(); String[] groupItems = new String[children.length]; for (int i = 0; i < children.length; i++) { ConfigurationElement child = children[i]; String childName = child.getName(); switch (childName) { case ELEMENT_NAME_ACTION_ID: case ELEMENT_NAME_ACTION_GROUP_ID: groupItems[i] = child.getValue().trim(); break; case ELEMENT_NAME_SEPARATOR: groupItems[i] = null; break; default: Module declaringModule = config.getDeclaringExtension().getDeclaringModule(); throw new CoreException(String.format("Module [%s]: '%s' is an unknown 'groupItems' element", declaringModule.getName(), childName)); } } setProperty(ACTION_KEY_GROUP_ITEMS, groupItems); }
super.configure(config); moduleName = config.getDeclaringExtension().getDeclaringModule().getName();