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

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

There is a newer version: 3.108.0.v20160602-1232
Show 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. */ @Override public void run(IAction action) { } /** * The ActionDelegate implementation of this * IActionDelegate method does nothing. Subclasses may * reimplement. */ @Override public void selectionChanged(IAction action, ISelection selection) { } /** * The ActionDelegate implementation of this * IActionDelegate2 method does nothing. Subclasses may * reimplement. */ @Override public void init(IAction action) { } /** * The ActionDelegate implementation of this * IActionDelegate2 method does nothing. Subclasses may * reimplement. */ @Override public void dispose() { } /** * The ActionDelegate implementation of this * IActionDelegate2 method redirects to the run * method. Subclasses may reimplement. */ @Override public void runWithEvent(IAction action, Event event) { run(action); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy