Introduce "New view" action for views based on TmfView
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / tmf / ui / views / NewTmfViewAction.java
CommitLineData
c389833c
JR
1/**********************************************************************
2 * Copyright (c) 2016 EfficiOS Inc.
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 **********************************************************************/
9
10package org.eclipse.tracecompass.tmf.ui.views;
11
12import java.text.MessageFormat;
13
14import org.eclipse.jface.action.Action;
15import org.eclipse.jface.action.IAction;
16import org.eclipse.tracecompass.internal.tmf.ui.Messages;
17
18/**
19 * Action to instantiate a new instance of views that support it.
20 * @author Jonathan Rajotte Julien
21 * @since 2.2
22 */
23public class NewTmfViewAction extends Action {
24
25 /**
26 * Creates a new <code>NewTmfViewAction</code>.
27 *
28 * @param view
29 * The view for which the action is created
30 */
31 public NewTmfViewAction(TmfView view) {
32 super(MessageFormat.format(Messages.TmfView_NewTmfViewNameText, view.getTitle().toLowerCase()), IAction.AS_PUSH_BUTTON);
33 setToolTipText(MessageFormat.format(Messages.TmfView_NewTmfViewToolTipText, view.getTitle()));
34 }
35}
This page took 0.025162 seconds and 5 git commands to generate.