All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.ui.actions.ActionDelegate Maven / Gradle / Ivy

Go to download

This plug-in contains the bulk of the Workbench implementation, and depends on JFace, SWT, and Core Runtime. It cannot be used independently from org.eclipse.ui. Workbench client plug-ins should not depend directly on this plug-in.

The newest version!
/*******************************************************************************
 * Copyright (c) 2000, 2006 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.ui.actions;

import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Event;
import org.eclipse.ui.IActionDelegate2;

/**
 * Abstract base implementation of IActionDelegate and
 * IActionDelegate2 for a client delegate action.
 * 

* Subclasses should reimplement runWithEvent or run * methods to do the action's work, and may reimplement * selectionChanged to react to selection changes in the workbench. *

*/ public abstract class ActionDelegate implements IActionDelegate2 { /** * The ActionDelegate implementation of this * IActionDelegate method does nothing. Subclasses may * reimplement. *

* Note: This method is not called directly by the proxy action. Only * by the default implementation of runWithEvent of this * abstract class. */ public void run(IAction action) { } /** * The ActionDelegate implementation of this * IActionDelegate method does nothing. Subclasses may * reimplement. */ public void selectionChanged(IAction action, ISelection selection) { } /** * The ActionDelegate implementation of this * IActionDelegate2 method does nothing. Subclasses may * reimplement. */ public void init(IAction action) { } /** * The ActionDelegate implementation of this * IActionDelegate2 method does nothing. Subclasses may * reimplement. */ public void dispose() { } /** * The ActionDelegate implementation of this * IActionDelegate2 method redirects to the run * method. Subclasses may reimplement. */ public void runWithEvent(IAction action, Event event) { run(action); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy