tmf: Update Javadoc throughout tmf.ui
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / handlers / OpenSDPagesDialog.java
1 /**********************************************************************
2 * Copyright (c) 2005, 2008 IBM Corporation and others.
3 * Copyright (c) 2011, 2012 Ericsson.
4 *
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
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.internal.tmf.ui.Activator;
18 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
19 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
20 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.dialogs.PagesDialog;
21 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDAdvancedPagingProvider;
22 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.SDMessages;
23
24 /**
25 * Action class implementation for paging.
26 *
27 * @version 1.0
28 * @author Bernd Hufmann
29 */
30 public class OpenSDPagesDialog extends Action {
31
32 // ------------------------------------------------------------------------
33 // Constants
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 * The sequence diagram view reference
45 */
46 protected SDView fView;
47 /**
48 * The advanced paging provider reference.
49 */
50 protected ISDAdvancedPagingProvider fProvider;
51
52 // ------------------------------------------------------------------------
53 // Constructors
54 // ------------------------------------------------------------------------
55 /**
56 * Constructor
57 *
58 * @param view The view reference
59 */
60 public OpenSDPagesDialog(SDView view, ISDAdvancedPagingProvider provider) {
61 super(SDMessages._44);
62 setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_GOTO_PAGE));
63 setId(ID);
64 fView = view;
65 fProvider = provider;
66 }
67
68 // ------------------------------------------------------------------------
69 // Operations
70 // ------------------------------------------------------------------------
71 /*
72 * (non-Javadoc)
73 * @see org.eclipse.jface.action.Action#run()
74 */
75 @Override
76 public void run() {
77 if (fView == null) {
78 return;
79 }
80 PagesDialog dialog = new PagesDialog(fView, fProvider);
81 dialog.open();
82 }
83 }
This page took 0.032827 seconds and 6 git commands to generate.