blob: b6a52eabd3176fc8c66c95214a048104e7d2a0fc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.team.internal.ccvs.ui.console;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.console.*;
import org.eclipse.ui.console.IConsole;
import org.eclipse.ui.console.IConsolePageParticipant;
import org.eclipse.ui.part.IPageBookViewPage;
/**
* Console helper that allows contributing actions to the console view when
* the CVS console is visible. Added to the console via an extension point
* from org.eclipse.ui.console.
*
* @since 3.1
*/
public class CVSConsolePageParticipant implements IConsolePageParticipant {
private CVSOutputConsole console;
private IPageBookViewPage page;
private ConsoleRemoveAction consoleRemoveAction;
public void init(IPageBookViewPage page, IConsole console) {
this.console = (CVSOutputConsole)console;
this.page = page;
this.consoleRemoveAction = new ConsoleRemoveAction();
IActionBars bars = page.getSite().getActionBars();
bars.getToolBarManager().appendToGroup(IConsoleConstants.LAUNCH_GROUP, consoleRemoveAction);
}
public void dispose() {
this.consoleRemoveAction = null;
this.page = null;
this.console = null;
}
public void activated() {
}
public void deactivated() {
}
public Object getAdapter(Class adapter) {
return null;
}
}
|