0d68d35d22ce9ffb0dc5daad2d5c8d33d3bbc14e
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / handlers / OpenSDPagesDialog.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.internal.tmf.ui.Activator;
17 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
18 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
19 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.dialogs.PagesDialog;
20 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDAdvancedPagingProvider;
21 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.Messages;
22
23 /**
24 * Action class implementation for paging.
25 *
26 * @version 1.0
27 * @author Bernd Hufmann
28 */
29 public class OpenSDPagesDialog extends Action {
30
31 // ------------------------------------------------------------------------
32 // Constants
33 // ------------------------------------------------------------------------
34
35 /**
36 * The action ID.
37 */
38 public static final String ID = "org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.sdPaging"; //$NON-NLS-1$
39
40 // ------------------------------------------------------------------------
41 // Attributes
42 // ------------------------------------------------------------------------
43
44 /**
45 * The sequence diagram view reference
46 */
47 protected SDView fView;
48 /**
49 * The advanced paging provider reference.
50 */
51 protected ISDAdvancedPagingProvider fProvider;
52
53 // ------------------------------------------------------------------------
54 // Constructors
55 // ------------------------------------------------------------------------
56
57 /**
58 * Constructor
59 *
60 * @param view
61 * The view reference
62 * @param provider
63 * The provider
64 */
65 public OpenSDPagesDialog(SDView view, ISDAdvancedPagingProvider provider) {
66 super(Messages.SequenceDiagram_Pages);
67 setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_GOTO_PAGE));
68 setId(ID);
69 fView = view;
70 fProvider = provider;
71 }
72
73 // ------------------------------------------------------------------------
74 // Operations
75 // ------------------------------------------------------------------------
76
77 @Override
78 public void run() {
79 if (fView == null) {
80 return;
81 }
82 PagesDialog dialog = new PagesDialog(fView, fProvider);
83 dialog.open();
84 }
85 }
This page took 0.033036 seconds and 4 git commands to generate.