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