1 /******************************************************************************* 2 * Copyright (c) 2000, 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.console; 12 13 /** 14 * A console factory extension is responsible for opening a console in the console view. 15 * Extensions appear on a menu in the console view, and their <code>openConsole</code> 16 * method is called when the action is invoked. Implementations may choose to open a new 17 * console or activate an existing console. The extension point used to contribute a 18 * console factory is <code>org.eclipse.ui.console.consoleFactories</code>. 19 * <p> 20 * Following is an example console factory extension. 21 * <pre> 22 * <extension point="org.eclipse.ui.console.consoleFactories"> 23 * <consoleFactory 24 * label="Command Console" 25 * icon="icons\cmd_console.gif" 26 * class="com.example.CommandConsoleFactory"> 27 * </consoleFactory> 28 * </extension> 29 * </pre> 30 * An action appears in the console view's 'Open Console' drop-down menu with the 31 * corresponding <code>label</code> and optional <code>icon</code>. When the action 32 * is invoked, the specified <code>class</code> is instantiated and called to 33 * open a console, via the method <code>openConsole()</code>. 34 * </p> 35 * <p> 36 * Clients providing console factory extensions are intended to implement 37 * this interface. 38 * </p> 39 * @since 3.1 40 */ 41 public interface IConsoleFactory { 42 /** 43 * Opens a console in the console view. Implementations may create a new 44 * console or activate an existing console. 45 */ 46 public void openConsole(); 47 48 } 49