~ubuntu-branches/ubuntu/utopic/eclipse-eclox/utopic

« back to all changes in this revision

Viewing changes to eclox.ui/src/eclox/ui/console/action/ClearLog.java

  • Committer: Package Import Robot
  • Author(s): Graham Inggs
  • Date: 2013-07-07 20:33:10 UTC
  • Revision ID: package-import@ubuntu.com-20130707203310-a44yw80gqtc2s9ob
Tags: upstream-0.10.0
ImportĀ upstreamĀ versionĀ 0.10.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************************************************
 
2
 * Copyright (C) 2003-2006, 2013, Guillaume Brocker
 
3
 * 
 
4
 * All rights reserved. This program and the accompanying materials
 
5
 * are made available under the terms of the Eclipse Public License v1.0
 
6
 * which accompanies this distribution, and is available at
 
7
 * http://www.eclipse.org/legal/epl-v10.html
 
8
 *
 
9
 * Contributors:
 
10
 *     Guillaume Brocker - Initial API and implementation
 
11
 *
 
12
 ******************************************************************************/ 
 
13
 
 
14
package eclox.ui.console.action;
 
15
 
 
16
import org.eclipse.jface.action.Action;
 
17
 
 
18
import eclox.core.doxygen.BuildJob;
 
19
import eclox.ui.Images;
 
20
import eclox.ui.Plugin;
 
21
import eclox.ui.console.Console;
 
22
 
 
23
public class ClearLog extends Action {
 
24
        
 
25
        /**
 
26
         * the console to act on
 
27
         */
 
28
        private Console console;
 
29
        
 
30
        /**
 
31
         * Constructor
 
32
         * 
 
33
         * @param       console the console to act on
 
34
         */
 
35
        public ClearLog( Console console ) {
 
36
                super( "Clear Console", Plugin.getImageDescriptor(Images.CLEAR_CONSOLE) );
 
37
                this.console = console;
 
38
                setToolTipText( "Clear Build Log" );
 
39
        }
 
40
 
 
41
        public void run() {
 
42
                BuildJob        job = console.getJob();
 
43
                if( job != null ) {
 
44
                        job.clearLog();
 
45
                }
 
46
                
 
47
                super.run();
 
48
        }
 
49
        
 
50
}