KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2004, 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 /**
16  * The trigger point advisor is a mechanism provided by the workbench that is
17  * consulted whenever code that is considered a trigger point is hit. It is the
18  * role of the advisor to determine what, if any, activities should be enabled
19  * as a consequence of this action. The advisor also has the option of vetoing
20  * the operation.
21  *
22  * <p>
23  * This interface is not intended to be extended or implemented by clients.
24  * </p>
25  *
26  * @since 3.1
27  * @see org.eclipse.ui.activities.ITriggerPoint
28  */

29 public interface ITriggerPointAdvisor {
30
31     /**
32      * Answer whether the activities bound to the identifier should be enabled
33      * when triggered by the provided trigger point.
34      *
35      * @param triggerPoint
36      * the trigger point to test
37      * @param identifier
38      * the identifier to test against the trigger point
39      * @return the set of activities to enable. If the set is not
40      * <code>null</code> the caller may proceed with their usage of
41      * the object represented by the identifier. If <code>null</code>
42      * the caller should abort the action.
43      */

44     Set JavaDoc allow(ITriggerPoint triggerPoint, IIdentifier identifier);
45 }
46
Popular Tags