KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > ui > console > CVSConsolePageParticipant


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.team.internal.ccvs.ui.console;
12
13 import org.eclipse.ui.IActionBars;
14 import org.eclipse.ui.console.*;
15 import org.eclipse.ui.console.IConsole;
16 import org.eclipse.ui.console.IConsolePageParticipant;
17 import org.eclipse.ui.part.IPageBookViewPage;
18
19 /**
20  * Console helper that allows contributing actions to the console view when
21  * the CVS console is visible. Added to the console via an extension point
22  * from org.eclipse.ui.console.
23  *
24  * @since 3.1
25  */

26 public class CVSConsolePageParticipant implements IConsolePageParticipant {
27
28     private ConsoleRemoveAction consoleRemoveAction;
29     
30     public void init(IPageBookViewPage page, IConsole console) {
31         this.consoleRemoveAction = new ConsoleRemoveAction();
32         IActionBars bars = page.getSite().getActionBars();
33         bars.getToolBarManager().appendToGroup(IConsoleConstants.LAUNCH_GROUP, consoleRemoveAction);
34     }
35
36     public void dispose() {
37         this.consoleRemoveAction = null;
38     }
39
40     public void activated() {
41     }
42
43     public void deactivated() {
44     }
45
46     public Object JavaDoc getAdapter(Class JavaDoc adapter) {
47         return null;
48     }
49 }
50
Popular Tags