public static String getParameterValue(IExtension ext, String key, String defaultValue) { String val = PluginUtilities.getAttribute(ext, key); if (val == null) { return defaultValue; } if (isProtegeProperty(val)) { return getProtegeProperty(val); } else { return val; } }
public boolean matches(IExtension extension) { for (PluginExtensionMatcher extensionMatcher : extensionMatchers) { if (extensionMatcher.matches(extension)) { return true; } } return false; }
/** * Gets the name of the action. This is the name * that will be used for the menu item text etc. */ public String getName() { return PluginUtilities.getAttribute(extension, ProtegeActionPluginJPFImpl.NAME_PARAM); }
public P newInstance() throws ClassNotFoundException, IllegalAccessException, InstantiationException { ExtensionInstantiator<P> instantiator = new ExtensionInstantiator<>(extension); return instantiator.instantiate(); }
protected PluginExtensionMatcher getExtensionMatcher() { PluginParameterExtensionMatcher matcher = new PluginParameterExtensionMatcher(); // matcher.put(ViewComponentPluginJPFImpl.WORKSPACE_TAB_ID_PARAM, tabId); return matcher; }
@Override protected PluginExtensionMatcher getExtensionMatcher() { return new EditorKitExtensionMatcher(editorKit); }
/** * This method needs to be overriden to provide a * <code>PluginExtensionMatcher</code>, which is used to filter * the plugin extensions to a desired subset. */ protected PluginExtensionMatcher getExtensionMatcher() { return new DefaultPluginExtensionMatcher(); }
/** * Gets the one and only instance of <code>PluginUtilities</code>. */ public static synchronized PluginUtilities getInstance() { if (instance == null) { instance = new PluginUtilities(); } return instance; }
/** * Invoked by reflection. Do not remove. */ public boolean isProtegeDefaultTab() { return PluginProperties.getBooleanParameterValue(extension, PROTEGE_DEFAULT_TAB, false); }
public static String getParameterValue(IExtension ext, String key, String defaultValue) { String val = PluginUtilities.getAttribute(ext, key); if (val == null) { return defaultValue; } if (isProtegeProperty(val)) { return getProtegeProperty(val); } else { return val; } }
public OntologyRepositoryFactory newInstance() throws ClassNotFoundException, IllegalAccessException, InstantiationException { ExtensionInstantiator<OntologyRepositoryFactory> instantiator = new ExtensionInstantiator<>(extension); return instantiator.instantiate(); } }
/** * Gets the tooltip text for the action. * @return A <code>String</code> representing the tooltip * text, or <code>null</code> if the action created by this * plugin shouldn't have any tooltip text. */ public String getToolTipText() { return PluginUtilities.getAttribute(extension, TOOL_TIP_PARAM); }
protected PluginExtensionMatcher getExtensionMatcher() { PluginParameterExtensionMatcher matcher = new PluginParameterExtensionMatcher(); // matcher.put(ViewComponentPluginJPFImpl.WORKSPACE_TAB_ID_PARAM, tabId); return matcher; }
@Override protected PluginExtensionMatcher getExtensionMatcher() { return new EditorKitExtensionMatcher(editorKit); }
public static String getParameterValue(IExtension ext, String key, String defaultValue) { String val = PluginUtilities.getAttribute(ext, key); if (val == null) { return defaultValue; } if (isProtegeProperty(val)) { return getProtegeProperty(val); } else { return val; } }
/** * Gets the name of the action. This is the name * that will be used for the menu item text etc. */ public String getName() { return PluginUtilities.getAttribute(extension, ProtegeActionPluginJPFImpl.NAME_PARAM); }
protected PluginExtensionMatcher getExtensionMatcher() { PluginParameterExtensionMatcher matcher = new PluginParameterExtensionMatcher(); // matcher.put(ViewComponentPluginJPFImpl.WORKSPACE_TAB_ID_PARAM, tabId); return matcher; }
/** * Gets the tooltip text for the action. * @return A <code>String</code> representing the tooltip * text, or <code>null</code> if the action created by this * plugin shouldn't have any tooltip text. */ public String getToolTipText() { return PluginUtilities.getAttribute(extension, ProtegeActionPluginJPFImpl.TOOL_TIP_PARAM); }
/** * Gets the tooltip text for the action. * @return A <code>String</code> representing the tooltip * text, or <code>null</code> if the action created by this * plugin shouldn't have any tooltip text. */ public String getToolTipText() { return PluginUtilities.getAttribute(extension, ProtegeActionPluginJPFImpl.TOOL_TIP_PARAM); }
/** * Gets the <code>EditorKitFactory</code> label. This is * typically used for UI menu items etc. */ public String getLabel() { String param = PluginUtilities.getAttribute(extension, LABEL_PARAM); if (param == null) { return "<Error: Label not defined!> " + extension; } return param; }