lttng: Update copyright headers
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / handlers / OpenSDPagesDialog.java
CommitLineData
73005152 1/**********************************************************************
df0b8ff4
BH
2 * Copyright (c) 2005, 2008 IBM Corporation and others.
3 * Copyright (c) 2011, 2012 Ericsson.
013a5f1c 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
013a5f1c
AM
9 *
10 * Contributors:
73005152
BH
11 * IBM - Initial API and implementation
12 * Bernd Hufmann - Updated for TMF
13 **********************************************************************/
14package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers;
15
16import org.eclipse.jface.action.Action;
8fd82db5 17import org.eclipse.linuxtools.internal.tmf.ui.Activator;
013a5f1c 18import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
73005152 19import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
df0b8ff4 20import org.eclipse.linuxtools.tmf.ui.views.uml2sd.dialogs.PagesDialog;
73005152 21import org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDAdvancedPagingProvider;
73005152
BH
22import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.SDMessages;
23
24/**
df0b8ff4 25 * Action class implementation for paging.
013a5f1c
AM
26 *
27 * @version 1.0
28 * @author Bernd Hufmann
73005152
BH
29 */
30public class OpenSDPagesDialog extends Action {
31
32 // ------------------------------------------------------------------------
df0b8ff4 33 // Constants
73005152 34 // ------------------------------------------------------------------------
df0b8ff4
BH
35 /**
36 * The action ID.
37 */
73005152 38 public static final String ID = "org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.sdPaging"; //$NON-NLS-1$
013a5f1c 39
df0b8ff4
BH
40 // ------------------------------------------------------------------------
41 // Attributes
42 // ------------------------------------------------------------------------
43 /**
44 * The sequence diagram view reference
45 */
73005152 46 protected SDView fView;
df0b8ff4
BH
47 /**
48 * The advanced paging provider reference.
49 */
73005152
BH
50 protected ISDAdvancedPagingProvider fProvider;
51
52 // ------------------------------------------------------------------------
53 // Constructors
54 // ------------------------------------------------------------------------
55 /**
013a5f1c
AM
56 * Constructor
57 *
a55887ca
AM
58 * @param view
59 * The view reference
60 * @param provider
61 * The provider
73005152 62 */
eb63f5ff 63 public OpenSDPagesDialog(SDView view, ISDAdvancedPagingProvider provider) {
73005152 64 super(SDMessages._44);
8fd82db5 65 setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_GOTO_PAGE));
73005152 66 setId(ID);
eb63f5ff
BH
67 fView = view;
68 fProvider = provider;
73005152
BH
69 }
70
71 // ------------------------------------------------------------------------
72 // Operations
73 // ------------------------------------------------------------------------
74 /*
75 * (non-Javadoc)
76 * @see org.eclipse.jface.action.Action#run()
77 */
78 @Override
79 public void run() {
80 if (fView == null) {
81 return;
82 }
83 PagesDialog dialog = new PagesDialog(fView, fProvider);
84 dialog.open();
85 }
86}
This page took 0.037523 seconds and 5 git commands to generate.