1 /******************************************************************************* 2 * Copyright (c) 2000, 2006 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.ui.console; 15 16 import org.eclipse.core.runtime.IAdaptable; 17 import org.eclipse.ui.part.IPageBookViewPage; 18 19 /** 20 * A console page participant is notified of page lifecycle events such as 21 * creation, activation, deactivation and disposal. A page participant can also 22 * provide adapters for a page. Participants are contributed via the 23 * <code>org.eclispe.ui.console.consolePageParticipants</code> extension point. 24 * <p> 25 * Participant behavior is implementation dependent. For example, a page 26 * participant could add actions to a console's toolbar by accessing a its 27 * page's action bars. 28 * </p> 29 * <p> 30 * Following is an example extension definition. 31 * </p> 32 * 33 * <pre> 34 * <extension point="org.eclipse.ui.console.consolePageParticipants"> 35 * <consolePageParticipant 36 * id="com.example.ExamplePageParticipant" 37 * class="com.example.ExamplePageParticipant"> 38 * </consolePageParticipant> 39 * </extension> 40 * </pre> 41 * 42 * The example page participant is contributed to all console pages. An optional 43 * <code>enablement</code> attribute may be specified to control which consoles 44 * a page participant is applicable to. 45 * <p> 46 * Clients contributing console page participant extensions are intended to 47 * implement this interface. 48 * </p> 49 * 50 * @since 3.1 51 */ 52 public interface IConsolePageParticipant extends IAdaptable { 53 /** 54 * Called during page initialization. Marks the start of this 55 * page participant's lifecycle. 56 * 57 * @param page the page corresponding to the given console 58 * @param console the console for which a page has been created 59 */ init(IPageBookViewPage page, IConsole console)60 void init(IPageBookViewPage page, IConsole console); 61 62 /** 63 * Disposes this page participant. Marks the end of this 64 * page participant's lifecycle. 65 */ dispose()66 void dispose(); 67 68 /** 69 * Notification this participant's page has been activated. 70 */ activated()71 void activated(); 72 73 /** 74 * Notification this participant's page has been deactivated. 75 */ deactivated()76 void deactivated(); 77 78 } 79