01: /*******************************************************************************
02: * Copyright (c) 2003, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.activities;
11:
12: import java.util.Set;
13:
14: import org.eclipse.jface.resource.ImageDescriptor;
15:
16: /**
17: * An instance of this interface provides support for managing
18: * <code>IWorkbench</code> activities. An instance of this interface may be
19: * obtained via {@link org.eclipse.ui.IWorkbench#getActivitySupport()}.
20: * <p>
21: * This interface is not intended to be extended or implemented by clients.
22: * </p>
23: *
24: * @since 3.0
25: */
26: public interface IWorkbenchActivitySupport {
27:
28: /**
29: * Returns the activity manager for the workbench.
30: *
31: * @return the activity manager for the workbench. Guaranteed not to be
32: * <code>null</code>.
33: */
34: IActivityManager getActivityManager();
35:
36: /**
37: * Sets the set of identifiers to enabled activities.
38: *
39: * @param enabledActivityIds
40: * the set of identifiers to enabled activities. This set may be
41: * empty, but it must not be <code>null</code>. If this set
42: * is not empty, it must only contain instances of <code>String</code>.
43: */
44: void setEnabledActivityIds(Set enabledActivityIds);
45:
46: /**
47: * Return the image associated with this activity.
48: *
49: * @param activity the activity
50: * @return the image associated with this activity. Never <code>null</code>.
51: * @since 3.1
52: */
53: ImageDescriptor getImageDescriptor(IActivity activity);
54:
55: /**
56: * Return the image associated with this category.
57: *
58: * @param category the category
59: * @return the image associated with this category. Never <code>null</code>.
60: * @since 3.1
61: */
62: ImageDescriptor getImageDescriptor(ICategory category);
63:
64: /**
65: * Return the trigger point manager for this instance.
66: *
67: * @return the trigger point manager. Never <code>null</code>.
68: * @since 3.1
69: */
70: ITriggerPointManager getTriggerPointManager();
71:
72: /**
73: * Return a copy of the current activity set. This copy will contain all
74: * activity and category definitions that the workbench activity manager
75: * contains, and will have the same enabled state. It will not have the same
76: * listeners. This is useful for user interfaces that wish to modify the
77: * activity enablement state (such as preference pages).
78: *
79: * @return a copy of the current activity set
80: * @since 3.1
81: */
82: IMutableActivityManager createWorkingCopy();
83: }
|