KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > actions > AbstractRemoveActionDelegate


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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  *******************************************************************************/

11 package org.eclipse.debug.internal.ui.actions;
12
13
14 import org.eclipse.debug.ui.IDebugView;
15 import org.eclipse.ui.IViewPart;
16
17 /**
18  * Base implementation of the 'remove' action for a debug view
19  *
20  * This class is intended to be extended by clients
21  * @see {@link AbstractSelectionActionDelegate}
22  * @see {@link org.eclipse.ui.IViewActionDelegate}
23  * @see {@link org.eclipse.ui.IActionDelegate2}
24  *
25  */

26 public abstract class AbstractRemoveActionDelegate extends AbstractSelectionActionDelegate {
27     
28     /* (non-Javadoc)
29      * @see org.eclipse.debug.internal.ui.actions.selection.AbstractSelectionActionDelegate#init(org.eclipse.ui.IViewPart)
30      */

31     public void init(IViewPart view) {
32         super.init(view);
33         IDebugView debugView= (IDebugView)getView().getAdapter(IDebugView.class);
34         if (debugView != null) {
35             debugView.setAction(IDebugView.REMOVE_ACTION, getAction());
36         }
37     }
38     
39 }
40
Popular Tags