/** * Contributes an extension to the {@link TaskEditor}. * * @param pluginId the id of the contributing plug-in, may be <code>null</code> * @param id the id of the extension, may not be <code>null</code> * @param name the name of the extension that is displayed in the settings page * @param extension the extension implementation */ public static void addTaskEditorExtension( String pluginId, String id, String name, AbstractTaskEditorExtension extension) { Assert.isNotNull(id); RegisteredTaskEditorExtension descriptor = new RegisteredTaskEditorExtension(extension, id, name); descriptor.setPluginId(pluginId); RegisteredTaskEditorExtension previous = extensionsById.put(id, descriptor); if (previous != null) { StatusHandler.log( new Status( IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Duplicate taskEditorExtension id=" //$NON-NLS-1$ + id, null)); } }