KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > activities > IWorkbenchActivitySupport


1 /*******************************************************************************
2  * Copyright (c) 2003, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.activities;
12
13 import java.util.Set JavaDoc;
14
15 import org.eclipse.jface.resource.ImageDescriptor;
16
17 /**
18  * An instance of this interface provides support for managing
19  * <code>IWorkbench</code> activities. An instance of this interface may be
20  * obtained via {@link org.eclipse.ui.IWorkbench#getActivitySupport()}.
21  * <p>
22  * This interface is not intended to be extended or implemented by clients.
23  * </p>
24  *
25  * @since 3.0
26  */

27 public interface IWorkbenchActivitySupport {
28
29     /**
30      * Returns the activity manager for the workbench.
31      *
32      * @return the activity manager for the workbench. Guaranteed not to be
33      * <code>null</code>.
34      */

35     IActivityManager getActivityManager();
36
37     /**
38      * Sets the set of identifiers to enabled activities.
39      *
40      * @param enabledActivityIds
41      * the set of identifiers to enabled activities. This set may be
42      * empty, but it must not be <code>null</code>. If this set
43      * is not empty, it must only contain instances of <code>String</code>.
44      */

45     void setEnabledActivityIds(Set JavaDoc enabledActivityIds);
46     
47     /**
48      * Return the image associated with this activity.
49      *
50      * @param activity the activity
51      * @return the image associated with this activity. Never <code>null</code>.
52      * @since 3.1
53      */

54     ImageDescriptor getImageDescriptor(IActivity activity);
55
56     /**
57      * Return the image associated with this category.
58      *
59      * @param category the category
60      * @return the image associated with this category. Never <code>null</code>.
61      * @since 3.1
62      */

63     ImageDescriptor getImageDescriptor(ICategory category);
64     
65     /**
66      * Return the trigger point manager for this instance.
67      *
68      * @return the trigger point manager. Never <code>null</code>.
69      * @since 3.1
70      */

71     ITriggerPointManager getTriggerPointManager();
72     
73     /**
74      * Return a copy of the current activity set. This copy will contain all
75      * activity and category definitions that the workbench activity manager
76      * contains, and will have the same enabled state. It will not have the same
77      * listeners. This is useful for user interfaces that wish to modify the
78      * activity enablement state (such as preference pages).
79      *
80      * @return a copy of the current activity set
81      * @since 3.1
82      */

83     IMutableActivityManager createWorkingCopy();
84 }
85
Popular Tags