blob: 488b2414a17659b7ec74fb73c323b446c7eee6be [file] [log] [blame]
david_williamscfdb2cd2004-11-11 08:37:49 +00001/*******************************************************************************
2 * Copyright (c) 2001, 2004 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 * Jens Lukowski/Innoopract - initial renaming/restructuring
11 *
12 *******************************************************************************/
nitind13950662005-02-13 20:17:33 +000013package org.eclipse.wst.sse.ui.internal.properties;
david_williamscfdb2cd2004-11-11 08:37:49 +000014
15import org.eclipse.jface.action.Action;
david_williamsb9da93e2005-04-13 02:38:05 +000016import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
david_williamscfdb2cd2004-11-11 08:37:49 +000017import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImageHelper;
18import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImages;
david_williamscfdb2cd2004-11-11 08:37:49 +000019
20public class RemoveAction extends Action {
21 private ConfigurablePropertySheetPage fPage;
22
23 public RemoveAction(ConfigurablePropertySheetPage page) {
24 super();
25 fPage = page;
26 setText(getText());
27 setToolTipText(getText());
28 setImageDescriptor(EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_ELCL_DELETE));
29 setDisabledImageDescriptor(EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_DLCL_DELETE));
30 }
31
32 /**
33 * @see org.eclipse.jface.action.Action#getText()
34 */
35 public String getText() {
david_williamsb9da93e2005-04-13 02:38:05 +000036 return SSEUIMessages.RemoveAction_0; //$NON-NLS-1$
david_williamscfdb2cd2004-11-11 08:37:49 +000037 }
38
39 /**
40 * @see org.eclipse.jface.action.IAction#run()
41 */
42 public void run() {
43 fPage.remove();
44 }
45}