01: /*******************************************************************************
02: * Copyright (c) 2004, 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: /**
15: * The trigger point advisor is a mechanism provided by the workbench that is
16: * consulted whenever code that is considered a trigger point is hit. It is the
17: * role of the advisor to determine what, if any, activities should be enabled
18: * as a consequence of this action. The advisor also has the option of vetoing
19: * the operation.
20: *
21: * <p>
22: * This interface is not intended to be extended or implemented by clients.
23: * </p>
24: *
25: * @since 3.1
26: * @see org.eclipse.ui.activities.ITriggerPoint
27: */
28: public interface ITriggerPointAdvisor {
29:
30: /**
31: * Answer whether the activities bound to the identifier should be enabled
32: * when triggered by the provided trigger point.
33: *
34: * @param triggerPoint
35: * the trigger point to test
36: * @param identifier
37: * the identifier to test against the trigger point
38: * @return the set of activities to enable. If the set is not
39: * <code>null</code> the caller may proceed with their usage of
40: * the object represented by the identifier. If <code>null</code>
41: * the caller should abort the action.
42: */
43: Set allow(ITriggerPoint triggerPoint, IIdentifier identifier);
44: }
|