1 /**********************************************************************
2 * Copyright (c) 2016 EfficiOS Inc.
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 **********************************************************************/
10 package org
.eclipse
.tracecompass
.tmf
.ui
.views
;
12 import java
.text
.MessageFormat
;
14 import org
.eclipse
.jface
.action
.Action
;
15 import org
.eclipse
.jface
.action
.IAction
;
16 import org
.eclipse
.tracecompass
.internal
.tmf
.ui
.Messages
;
19 * Action to instantiate a new instance of views that support it.
20 * @author Jonathan Rajotte Julien
23 public class NewTmfViewAction
extends Action
{
26 * Creates a new <code>NewTmfViewAction</code>.
29 * The view for which the action is created
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()));