Commit | Line | Data |
---|---|---|
73005152 | 1 | /********************************************************************** |
df0b8ff4 BH |
2 | * Copyright (c) 2005, 2006 IBM Corporation and others. |
3 | * Copyright (c) 2011, 2012 Ericsson. | |
4 | * | |
73005152 BH |
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 | |
73005152 BH |
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; | |
df0b8ff4 | 18 | import org.eclipse.linuxtools.tmf.ui.views.uml2sd.dialogs.MinMaxDialog; |
73005152 BH |
19 | import org.eclipse.ui.IViewPart; |
20 | ||
21 | /** | |
df0b8ff4 BH |
22 | * Action class implementation to configure minimum and maximum time range values. |
23 | * | |
24 | * @version 1.0 | |
73005152 BH |
25 | * @author sveyrier |
26 | * | |
27 | */ | |
28 | public class ConfigureMinMax extends Action { | |
29 | ||
df0b8ff4 BH |
30 | // ------------------------------------------------------------------------ |
31 | // Attributes | |
32 | // ------------------------------------------------------------------------ | |
33 | /** | |
34 | * The corresponding sequence diagram view reference. | |
35 | */ | |
73005152 BH |
36 | protected SDView view = null; |
37 | ||
df0b8ff4 BH |
38 | // ------------------------------------------------------------------------ |
39 | // Constructors | |
40 | // ------------------------------------------------------------------------ | |
41 | ||
42 | /** | |
43 | * Standard constructor. | |
44 | * | |
45 | * @param _view The sequence diagram view for the action | |
46 | */ | |
73005152 BH |
47 | public ConfigureMinMax(IViewPart _view) { |
48 | super(); | |
49 | if (_view instanceof SDView) { | |
50 | view = (SDView) _view; | |
51 | } | |
52 | } | |
53 | ||
df0b8ff4 BH |
54 | // ------------------------------------------------------------------------ |
55 | // Methods | |
56 | // ------------------------------------------------------------------------ | |
57 | ||
58 | /* | |
59 | * (non-Javadoc) | |
60 | * @see org.eclipse.jface.action.Action#run() | |
61 | */ | |
73005152 BH |
62 | @Override |
63 | public void run() { | |
df0b8ff4 | 64 | if ((view != null) && (view.getSDWidget() != null)) { |
73005152 BH |
65 | MinMaxDialog minMax = new MinMaxDialog(view.getSite().getShell(), view.getSDWidget()); |
66 | minMax.open(); | |
67 | } | |
68 | } | |
69 | } |