KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > console > IConsolePageParticipant


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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.console;
12
13 import org.eclipse.core.runtime.IAdaptable;
14 import org.eclipse.ui.part.IPageBookViewPage;
15
16 /**
17  * A console page participant is notified of page lifecycle events such as
18  * creation, activation, deactivation and disposal. A page participant can
19  * also provide adapters for a page. Participants are contributed via the
20  * <code>org.eclispe.ui.console.consolePageParticipants</code> extension point.
21  * <p>
22  * Participant behavior is implementation dependent. For example, a page participant
23  * could add actions to a console's toolbar by accessing a its page's action bars.
24  * </p>
25  * <p>
26  * Following is an example extension definition.
27  * <pre>
28  * &lt;extension point=&quot;org.eclipse.ui.console.consolePageParticipants&quot;&gt;
29  * &lt;consolePageParticipant
30  * id=&quot;com.example.ExamplePageParticipant&quot;
31  * class=&quot;com.example.ExamplePageParticipant&quot;&gt;
32  * &lt;/consolePageParticipant&gt;
33  * &lt;/extension&gt;
34  * </pre>
35  * </p>
36  * The example page participant is contributed to all console pages. An optional
37  * <code>enablement</code> attribute may be specified to control which consoles
38  * a page participant is applicable to.
39  * <p>
40  * Clients contributing console page participant extensions are intended to
41  * implement this interface.
42  * </p>
43  * @since 3.1
44  */

45 public interface IConsolePageParticipant extends IAdaptable {
46     /**
47      * Called during page initialization. Marks the start of this
48      * page participant's lifecycle.
49      *
50      * @param page the page corresponding to the given console
51      * @param console the console for which a page has been created
52      */

53     public void init(IPageBookViewPage page, IConsole console);
54     
55     /**
56      * Disposes this page participant. Marks the end of this
57      * page participant's lifecycle.
58      */

59     public void dispose();
60     
61     /**
62      * Notification this participant's page has been activated.
63      */

64     public void activated();
65     
66     /**
67      * Notification this participant's page has been deactivated.
68      */

69     public void deactivated();
70     
71 }
72
Popular Tags