Fix static analysis warnings for UML2SD
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / handlers / ConfigureMinMax.java
1 /**********************************************************************
2 * Copyright (c) 2005, 2006 IBM Corporation and others.
3 * Copyright (c) 2011, 2012 Ericsson.
4 *
5 * All rights reserved. This program and the accompanying materials
6 * are made available under the terms of the Eclipse Public License v1.0
7 * which accompanies this distribution, and is available at
8 * http://www.eclipse.org/legal/epl-v10.html
9 *
10 * Contributors:
11 * IBM - Initial API and implementation
12 * Bernd Hufmann - Updated for TMF
13 **********************************************************************/
14 package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers;
15
16 import org.eclipse.jface.action.Action;
17 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
18 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.dialogs.MinMaxDialog;
19 import org.eclipse.ui.IViewPart;
20
21 /**
22 * Action class implementation to configure minimum and maximum time range values.
23 *
24 * @version 1.0
25 * @author sveyrier
26 *
27 */
28 public class ConfigureMinMax extends Action {
29
30 // ------------------------------------------------------------------------
31 // Attributes
32 // ------------------------------------------------------------------------
33 /**
34 * The corresponding sequence diagram view reference.
35 */
36 protected SDView fView = null;
37
38 // ------------------------------------------------------------------------
39 // Constructors
40 // ------------------------------------------------------------------------
41
42 /**
43 * Standard constructor.
44 *
45 * @param view The sequence diagram view for the action
46 */
47 public ConfigureMinMax(IViewPart view) {
48 super();
49 if (view instanceof SDView) {
50 fView = (SDView) view;
51 }
52 }
53
54 // ------------------------------------------------------------------------
55 // Methods
56 // ------------------------------------------------------------------------
57
58 /*
59 * (non-Javadoc)
60 * @see org.eclipse.jface.action.Action#run()
61 */
62 @Override
63 public void run() {
64 if ((fView != null) && (fView.getSDWidget() != null)) {
65 MinMaxDialog minMax = new MinMaxDialog(fView.getSite().getShell(), fView.getSDWidget());
66 minMax.open();
67 }
68 }
69 }
This page took 0.034294 seconds and 6 git commands to generate.