KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
14  * The console manager manages registered consoles.
15  * <p>
16  * Clients are not intended to implement this interface.
17  * </p>
18  * @since 3.0
19  */

20 public interface IConsoleManager {
21     
22     /**
23      * Registers the given listener for console notifications. Has
24      * no effect if an identical listener is already registered.
25      *
26      * @param listener listener to register
27      */

28     public void addConsoleListener(IConsoleListener listener);
29     
30     /**
31      * Unregisters the given listener for console notifications. Has
32      * no effect if an identical listener is not already registered.
33      *
34      * @param listener listener to unregister
35      */

36     public void removeConsoleListener(IConsoleListener listener);
37
38     /**
39      * Adds the given consoles to the console manager. Has no effect for
40      * equivalent consoles already registered. The consoles will be added
41      * to any existing console views.
42      *
43      * @param consoles consoles to add
44      */

45     public void addConsoles(IConsole[] consoles);
46     
47     /**
48      * Removes the given consoles from the console manager. If the consoles are
49      * being displayed in any console views, the associated pages will be removed
50      * and disposed.
51      *
52      * @param consoles consoles to remove
53      */

54     public void removeConsoles(IConsole[] consoles);
55     
56     /**
57      * Returns a collection of consoles registered with the console manager.
58      *
59      * @return a collection of consoles registered with the console manager
60      */

61     public IConsole[] getConsoles();
62     
63     /**
64      * Opens the console view and displays given the console.
65      * If the view is already open, it is brought to the front unless
66      * the view is pinned on a console other than the given console.
67      * Has no effect if the given console is not currently registered.
68      *
69      * @param console console to display
70      */

71     public void showConsoleView(IConsole console);
72     
73     /**
74      * Warns that the content of the given console has changed in
75      * all console views. Has no effect if the given console is not
76      * currently registered.
77      *
78      * @param console the console that has changed
79      */

80     public void warnOfContentChange(IConsole console);
81     
82     /**
83      * Creates and returns a collection of new pattern match listeners enabled for
84      * the given console. The pattern match listeners are new instances, intended
85      * to be used in a new console. No methods on the participants have been
86      * called. Clients are responsible for connecting to and disconnecting from
87      * the pattern match listeners.
88      * <p>
89      * Console pattern match listeners are contributed via the
90      * <code>org.eclipse.ui.console.consolePatternMatchListeners</code> extension point.
91      * </p>
92      *
93      * @param console the console for which pattern match listeners are requested
94      * @return a collection of new pattern match listeners
95      * @see IPatternMatchListener
96      * @since 3.1
97      */

98     public IPatternMatchListener[] createPatternMatchListeners(IConsole console);
99     
100     /**
101      * Requests a redraw of any visible console page containing the specified console.
102      *
103      * @param console the console to be refreshed
104      * @since 3.1
105      */

106     public void refresh(IConsole console);
107     
108 }
109
Popular Tags