Merge branch 'FixJUnits'
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / handlers / Print.java
1 /**********************************************************************
2 * Copyright (c) 2005, 2006, 2011 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 * $Id: Print.java,v 1.2 2006/09/20 20:56:26 ewchan Exp $
8 *
9 * Contributors:
10 * IBM - Initial API and implementation
11 * Bernd Hufmann - Updated for TMF
12 **********************************************************************/
13 package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers;
14
15 import org.eclipse.jface.action.Action;
16 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
17
18 public class Print extends Action {
19
20 // ------------------------------------------------------------------------
21 // Attributes
22 // ------------------------------------------------------------------------
23 public static final String ID = "org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.print"; //$NON-NLS-1$
24
25 SDView fView;
26
27 // ------------------------------------------------------------------------
28 // Constructors
29 // ------------------------------------------------------------------------
30 public Print(SDView view) {
31 super();
32 setId(ID);
33 fView = view;
34 }
35
36 // ------------------------------------------------------------------------
37 // Operations
38 // ------------------------------------------------------------------------
39 /*
40 * (non-Javadoc)
41 * @see org.eclipse.jface.action.Action#run()
42 */
43 @Override
44 public void run() {
45 if (fView == null)
46 return;
47 if (fView.getSDWidget() == null)
48 return;
49 fView.getSDWidget().print();
50 }
51 }
This page took 0.04022 seconds and 6 git commands to generate.