final Object o = e.createExecutableExtension("class"); if (o instanceof ThemePreferenceMapper) { String pluginId = e.getAttribute("pluginId"); ThemePreferenceMapper mapper = (ThemePreferenceMapper) o; mapper.setPluginId(pluginId); if (o instanceof GenericMapper) { String xml = e.getAttribute("xml"); String contributorPluginId = e.getContributor() .getName();
private void readStockThemes(Map<String, ColorTheme> themes) { IConfigurationElement[] config = Platform.getExtensionRegistry() .getConfigurationElementsFor( Activator.EXTENSION_POINT_ID_THEME); try { for (IConfigurationElement e : config) { String xml = e.getAttribute("file"); String contributorPluginId = e.getContributor().getName(); Bundle bundle = Platform.getBundle(contributorPluginId); InputStream input = (InputStream) bundle.getResource(xml) .getContent(); ParsedTheme theme = parseTheme(input, false); amendThemeEntries(theme.getTheme().getEntries()); themes.put(theme.getTheme().getName(), theme.getTheme()); } } catch (Exception e) { e.printStackTrace(); } }
String getInitalizerClassName() { if (intializerClassName == null) intializerClassName = element.getAttribute(GROUP_INTIALIZER_CLASS_ATTR); return intializerClassName; }
/** * Returns the hyperlink detector target's description. * * @return the hyperlink detector target's description or <code>null</code> if not provided */ public String getDescription() { return fElement.getAttribute(DESCRIPTION_ATTRIBUTE); }
/** * Returns the hyperlink detector's name. * * @return the hyperlink detector's name */ public String getName() { return fElement.getAttribute(NAME_ATTRIBUTE); }
/** * Returns the filter's pattern. * * @return the pattern string or <code>null</code> if it's not a pattern filter */ public String getPattern() { return fElement.getAttribute(PATTERN_ATTRIBUTE); }
/** * Returns the filter's description. * * @return the description or <code>null</code> if no description is provided */ public String getDescription() { String description= fElement.getAttribute(DESCRIPTION_ATTRIBUTE); if (description == null) description= ""; //$NON-NLS-1$ return description; }
/** * @param element the configuration element */ public CleanUpDescriptor(IConfigurationElement element) { fElement= element; fId= element.getAttribute(ATTRIBUTE_ID_ID); fRunAfter= element.getAttribute(ATTRIBURE_ID_RUNAFTER); }
/** * Returns the id of this delegate * @return id */ public String getId() { return fElement.getAttribute("id"); //$NON-NLS-1$ }
/** * Returns the hyperlink detector's target id. * * @return the hyperlink detector's target id */ public String getTargetId() { return fElement.getAttribute(TARGET_ID_ATTRIBUTE); }
/** * Reads (if needed) and returns the label of this extension. * * @return the label for this extension. */ public String getLabel() { if (fLabel == null) { fLabel= fConfiguration.getAttribute(LABEL_ATTRIBUTE); Assert.isNotNull(fLabel); } return fLabel; }
/** * Returns the value of the boolean configuration element attribute with the * given name, or <code>false</code> if the attribute is missing. */ private boolean getBooleanAttribute(IConfigurationElement element, String name) { String valueString = element.getAttribute(name); return valueString != null && valueString.equalsIgnoreCase(Boolean.TRUE.toString()); }
public boolean canActivatePlugIn() { String value= fElement.getAttribute(ACTIVATE_PLUG_IN_ATTRIBUTE); if (value == null) return true; return Boolean.valueOf(value).booleanValue(); }
public ContentProviderDescriptor(IConfigurationElement element) { configurationElement = element; id = configurationElement.getAttribute(ID); basePriority = parsePriority(); priority = basePriority; String uriPatternString = configurationElement.getAttribute(URI_PATTERN); uriPattern = uriPatternString != null ? Pattern.compile(uriPatternString) : DEFAULT_URI_PATTERN; }
public Descriptor(IConfigurationElement configElement) throws CoreException { fConfigElement = configElement; fInstance= null; String name = configElement.getAttribute(ATT_NAME); String pageClassName = configElement.getAttribute(ATT_CLASS); if (name == null) { throw new CoreException(new Status(IStatus.ERROR, JavaUI.ID_PLUGIN, 0, "Invalid extension (missing attributeName)", null)); //$NON-NLS-1$ } if (pageClassName == null) { throw new CoreException(new Status(IStatus.ERROR, JavaUI.ID_PLUGIN, 0, "Invalid extension (missing class name): " + name, null)); //$NON-NLS-1$ } }
private static void verbose_found_container_initializer(String containerID, IConfigurationElement configurationElement) { Util.verbose( "CPContainer INIT - found initializer\n" + //$NON-NLS-1$ " container ID: " + containerID + '\n' + //$NON-NLS-1$ " class: " + configurationElement.getAttribute("class")); //$NON-NLS-1$ //$NON-NLS-2$ }
private static void verbose_found_variable_initializer(String variable, IConfigurationElement configElement) { Util.verbose( "CPVariable INIT - found initializer\n" + //$NON-NLS-1$ " variable: " + variable + '\n' + //$NON-NLS-1$ " class: " + configElement.getAttribute("class")); //$NON-NLS-1$ //$NON-NLS-2$ }
private static void verbose_failed_to_instanciate_container_initializer(String containerID, IConfigurationElement configurationElement) { Util.verbose( "CPContainer INIT - failed to instanciate initializer\n" + //$NON-NLS-1$ " container ID: " + containerID + '\n' + //$NON-NLS-1$ " class: " + configurationElement.getAttribute("class"), //$NON-NLS-1$ //$NON-NLS-2$ System.err); }
public String getNonNullAttribute(String attribute) throws InvalidRegistryObjectException { String value= fElement.getAttribute(attribute); if (value == null) fail(MessageFormat.format(RulerColumnMessages.ExtensionPointHelper_missing_attribute_msg, new Object[] {fName, attribute})); return value; }
private void readGroup(IConfigurationElement element) { String groupID = element.getAttribute(GROUP_ID_ATTR); if (!isNullOrEmpty(groupID)) { FunctionGroup group = new FunctionGroup(groupID, element); getGroupMapById().put(groupID, group); getKnownGroups().add(group); } }