Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.

1 /*******************************************************************************2 * Copyright (c) 2000, 2006 IBM Corporation and others.3 * All rights reserved. This program and the accompanying materials4 * are made available under the terms of the Eclipse Public License v1.05 * which accompanies this distribution, and is available at6 * http://www.eclipse.org/legal/epl-v10.html7 *8 * Contributors:9 * IBM Corporation - initial API and implementation10 *******************************************************************************/11 12 package org.eclipse.ui.activities;13 14 importjava.util.Set;15 16 /**17 * An instance of this interface is a category as defined by the extension18 * point <code>org.eclipse.ui.activities</code>.19 * <p>20 * An instance of this interface can be obtained from an instance of 21 * <code>IActivityManager</code> for any identifier, whether or not a category 22 * with that identifier is defined in the extension registry.23 * </p>24 * <p>25 * The handle-based nature of this API allows it to work well with runtime26 * plugin activation and deactivation, which can cause dynamic changes to the27 * extension registry.28 * </p>29 * <p>30 * This interface is not intended to be extended or implemented by clients.31 * </p>32 * 33 * @since 3.034 * @see IActivityManager35 */36 publicinterface ICategory extendsComparable {37 38 /**39 * Registers an instance of <code>ICategoryListener</code> to listen for40 * changes to properties of this instance.41 * 42 * @param categoryListener43 * the instance to register. Must not be <code>null</code>.44 * If an attempt is made to register an instance which is45 * already registered with this instance, no operation is46 * performed.47 */48 void addCategoryListener(ICategoryListener categoryListener);49 50 /**51 * Returns the set of category activity bindings for this instance.52 * <p>53 * This method will return all category activity bindings for this54 * instance, whether or not this instance is defined.55 * </p>56 * <p>57 * Notification is sent to all registered listeners if this property58 * changes.59 * </p>60 * 61 * @return the set of category activity bindings. This set may be empty,62 * but is guaranteed not to be <code>null</code>. If this set is63 * not empty, it is guaranteed to only contain instances of <code>ICategoryActivityBinding</code>.64 * @see ICategoryActivityBinding65 */66 Set getCategoryActivityBindings();67 68 /**69 * Returns the identifier of this instance.70 * 71 * @return the identifier of this instance. Guaranteed not to be <code>null</code>.72 */73 String getId();74 75 /**76 * Returns the name of this instance suitable for display to the user.77 * <p>78 * Notification is sent to all registered listeners if this property79 * changes.80 * </p>81 * 82 * @return the name of this instance. Guaranteed not to be <code>null</code>.83 * @throws NotDefinedException84 * if this instance is not defined.85 */86 String getName() throwsNotDefinedException;87 88 /**89 * Returns the description of this instance suitable for display to the user.90 * <p>91 * Notification is sent to all registered listeners if this property92 * changes.93 * </p>94 * 95 * @return the description of this instance. Guaranteed not to be <code>null</code>.96 * @throws NotDefinedException97 * if this instance is not defined.98 */99 String getDescription() throwsNotDefinedException;100 101 /**102 * Returns whether or not this instance is defined.103 * <p>104 * Notification is sent to all registered listeners if this property105 * changes.106 * </p>107 * 108 * @return <code>true</code>, iff this instance is defined.109 */110 boolean isDefined();111 112 /**113 * Removes an instance of <code>ICategoryListener</code> listening114 * for changes to properties of this instance.115 * 116 * @param categoryListener117 * the instance to remove. Must not be <code>null</code>.118 * If an attempt is made to remove an instance which is not119 * already registered with this instance, no operation is120 * performed.121 */122 void removeCategoryListener(ICategoryListener categoryListener);123 }124