~ubuntu-branches/ubuntu/utopic/eclipse-linuxtools/utopic

« back to all changes in this revision

Viewing changes to lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/handlers/Print.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2014-05-12 18:11:40 UTC
  • mfrom: (3.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140512181140-w237r3vsah1tmybz
Tags: 2.2.1-1
* New upstream release.
* Refreshed d/patches.
* Removed eclipse-cdt-valgrind-remote package, all its functionality
  is now provided by eclipse-cdt-profiling-framework-remote.
* Added remove-license-feature.patch.
* Bump Standards-Version to 3.9.5.
* Enable eclipse-changelog package.
* Enable eclipse-rpm-editor package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**********************************************************************
2
 
 * Copyright (c) 2005, 2006 IBM Corporation and others.
3
 
 * Copyright (c) 2011, 2012 Ericsson.
4
 
 * 
 
2
 * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
5
3
 * All rights reserved.   This program and the accompanying materials
6
4
 * are made available under the terms of the Eclipse Public License v1.0
7
5
 * which accompanies this distribution, and is available at
8
6
 * http://www.eclipse.org/legal/epl-v10.html
9
 
 * 
10
 
 * Contributors: 
11
 
 * IBM - Initial API and implementation
12
 
 * Bernd Hufmann - Updated for TMF
 
7
 *
 
8
 * Contributors:
 
9
 *     IBM - Initial API and implementation
 
10
 *     Bernd Hufmann - Updated for TMF
13
11
 **********************************************************************/
 
12
 
14
13
package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers;
15
14
 
16
 
import org.eclipse.jface.action.Action;
17
15
import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
18
16
 
19
17
/**
20
18
 * Action class implementation for 'Printing'.
21
 
 * 
 
19
 *
22
20
 * @version 1.0
23
21
 * @author sveyrier
24
22
 */
25
 
public class Print extends Action {
 
23
public class Print extends BaseSDAction {
26
24
 
27
25
    // ------------------------------------------------------------------------
28
26
    // Constants
29
27
    // ------------------------------------------------------------------------
 
28
 
30
29
    /**
31
30
     * The action ID.
32
31
     */
33
32
    public static final String ID = "org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.print"; //$NON-NLS-1$
34
 
    
35
 
    // ------------------------------------------------------------------------
36
 
    // Attributes
37
 
    // ------------------------------------------------------------------------
38
 
    /**
39
 
     * The sequence diagram view reference
40
 
     */
41
 
    private SDView fView;
42
 
    
 
33
 
43
34
    // ------------------------------------------------------------------------
44
35
    // Constructors
45
36
    // ------------------------------------------------------------------------
 
37
 
46
38
    /**
47
 
     * Constructor 
48
 
     * 
 
39
     * Constructor
 
40
     *
49
41
     * @param view The view reference
50
 
     */    
 
42
     */
51
43
    public Print(SDView view) {
52
 
        super();
 
44
        super(view);
53
45
        setId(ID);
54
 
        fView = view;
55
46
    }
56
47
 
57
48
    // ------------------------------------------------------------------------
58
49
    // Methods
59
50
    // ------------------------------------------------------------------------
60
 
    /*
61
 
     * (non-Javadoc)
62
 
     * @see org.eclipse.jface.action.Action#run()
63
 
     */
 
51
 
64
52
    @Override
65
53
    public void run() {
66
 
        if ((fView == null) || fView.getSDWidget() == null){
 
54
        if ((getView() == null) || getView().getSDWidget() == null){
67
55
            return;
68
56
        }
69
57
 
70
 
        fView.getSDWidget().print();
 
58
        getView().getSDWidget().print();
71
59
    }
72
60
}