Commit | Line | Data |
---|---|---|
abfad0aa FC |
1 | /******************************************************************************* |
2 | * Copyright (c) 2009, 2010 Ericsson | |
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 | * Contributors: | |
10 | * Francois Chouinard - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.tmf.ui.views.project.handlers; | |
14 | ||
15 | import org.eclipse.core.commands.AbstractHandler; | |
16 | import org.eclipse.core.commands.ExecutionEvent; | |
17 | import org.eclipse.core.commands.ExecutionException; | |
18 | import org.eclipse.linuxtools.tmf.ui.views.project.model.TmfExperimentNode; | |
19 | import org.eclipse.swt.widgets.MessageBox; | |
20 | import org.eclipse.ui.PlatformUI; | |
21 | ||
22 | /** | |
23 | * <b><u>RenameExperimentHandler</u></b> | |
24 | * <p> | |
25 | * TODO: Implement me. Please. | |
26 | */ | |
27 | public class RenameExperimentHandler extends AbstractHandler { | |
28 | ||
29 | private TmfExperimentNode fExperiment = null; | |
30 | ||
31 | // ------------------------------------------------------------------------ | |
32 | // Validation | |
33 | // ------------------------------------------------------------------------ | |
34 | ||
9ccc6d01 | 35 | @Override |
abfad0aa FC |
36 | public boolean isEnabled() { |
37 | return (fExperiment != null); | |
38 | } | |
39 | ||
40 | // ------------------------------------------------------------------------ | |
41 | // Execution | |
42 | // ------------------------------------------------------------------------ | |
43 | ||
d4011df2 | 44 | @Override |
abfad0aa FC |
45 | public Object execute(ExecutionEvent event) throws ExecutionException { |
46 | ||
47 | MessageBox mb = new MessageBox(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()); | |
3b38ea61 FC |
48 | mb.setText("Rename Experiment"); //$NON-NLS-1$ |
49 | mb.setMessage("Not implemented yet"); //$NON-NLS-1$ | |
abfad0aa FC |
50 | mb.open(); |
51 | ||
52 | return null; | |
53 | } | |
54 | ||
55 | } |