ee0083339d7a386bcae3657eb70e70c510f2a3a7
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / handlers / ConfigureMinMax.java
1 /**********************************************************************
2 * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
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 - Initial API and implementation
10 * Bernd Hufmann - Updated for TMF
11 **********************************************************************/
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 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.dialogs.MinMaxDialog;
18 import org.eclipse.ui.IViewPart;
19
20 /**
21 * Action class implementation to configure minimum and maximum time range values.
22 *
23 * @version 1.0
24 * @author sveyrier
25 *
26 */
27 public class ConfigureMinMax extends Action {
28
29 // ------------------------------------------------------------------------
30 // Attributes
31 // ------------------------------------------------------------------------
32 /**
33 * The corresponding sequence diagram view reference.
34 */
35 protected SDView fView = null;
36
37 // ------------------------------------------------------------------------
38 // Constructors
39 // ------------------------------------------------------------------------
40
41 /**
42 * Standard constructor.
43 *
44 * @param view The sequence diagram view for the action
45 */
46 public ConfigureMinMax(IViewPart view) {
47 super();
48 if (view instanceof SDView) {
49 fView = (SDView) view;
50 }
51 }
52
53 // ------------------------------------------------------------------------
54 // Methods
55 // ------------------------------------------------------------------------
56
57 @Override
58 public void run() {
59 if ((fView != null) && (fView.getSDWidget() != null)) {
60 MinMaxDialog minMax = new MinMaxDialog(fView.getSite().getShell(), fView.getSDWidget());
61 minMax.open();
62 }
63 }
64 }
This page took 0.036599 seconds and 4 git commands to generate.