KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > debug > ui > console > JavaStackTraceConsolePage


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 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.jdt.internal.debug.ui.console;
12
13 import org.eclipse.jface.action.IToolBarManager;
14 import org.eclipse.swt.widgets.Composite;
15 import org.eclipse.ui.IActionBars;
16 import org.eclipse.ui.console.IConsoleConstants;
17 import org.eclipse.ui.console.IConsoleView;
18 import org.eclipse.ui.console.TextConsole;
19 import org.eclipse.ui.console.TextConsolePage;
20 import org.eclipse.ui.console.TextConsoleViewer;
21
22 public class JavaStackTraceConsolePage extends TextConsolePage {
23     
24     private AutoFormatSettingAction fAutoFormat;
25
26     public JavaStackTraceConsolePage(TextConsole console, IConsoleView view) {
27         super(console, view);
28     }
29
30     protected void createActions() {
31         super.createActions();
32         
33         IActionBars actionBars= getSite().getActionBars();
34         fAutoFormat = new AutoFormatSettingAction(this);
35         IToolBarManager toolBarManager = actionBars.getToolBarManager();
36         toolBarManager.appendToGroup(IConsoleConstants.OUTPUT_GROUP, fAutoFormat);
37     }
38
39     protected TextConsoleViewer createViewer(Composite parent) {
40         return new JavaStackTraceConsoleViewer(parent, (JavaStackTraceConsole) getConsole());
41     }
42 }
43
Popular Tags