david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 1 | /******************************************************************************* |
| 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 | *******************************************************************************/ |
nitind | 1395066 | 2005-02-13 20:17:33 +0000 | [diff] [blame] | 13 | package org.eclipse.wst.sse.ui.internal.properties; |
david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 14 | |
| 15 | import org.eclipse.jface.action.Action; |
david_williams | b9da93e | 2005-04-13 02:38:05 +0000 | [diff] [blame^] | 16 | import org.eclipse.wst.sse.ui.internal.SSEUIMessages; |
david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 17 | import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImageHelper; |
| 18 | import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImages; |
david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 19 | |
| 20 | public 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_williams | b9da93e | 2005-04-13 02:38:05 +0000 | [diff] [blame^] | 36 | return SSEUIMessages.RemoveAction_0; //$NON-NLS-1$ |
david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | /** |
| 40 | * @see org.eclipse.jface.action.IAction#run() |
| 41 | */ |
| 42 | public void run() { |
| 43 | fPage.remove(); |
| 44 | } |
| 45 | } |