Skip to content

Package: DeleteActionBuilder

DeleteActionBuilder

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2015 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Johannes Faltermeier - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.spi.swt.treemasterdetail;
15:
16: import org.eclipse.emf.edit.domain.EditingDomain;
17: import org.eclipse.jface.action.Action;
18: import org.eclipse.jface.viewers.IStructuredSelection;
19:
20: /**
21: * The {@link #createDeleteAction(IStructuredSelection, EditingDomain)} method is called everytime a context menu is
22: * opened for the given selection.
23: *
24: * @author Johannes Faltermeier
25: * @since 1.8
26: *
27: */
28: public interface DeleteActionBuilder {
29:
30:         /**
31:          * This method creates an action which gets added to the context menu of elements in the TreeMasterDetail. The
32:          * action is supposed to delete the selected element.
33:          *
34:          * @param selection the tree viewer selection
35:          * @param editingDomain the editing domain
36:          * @return the action which will be added
37:          */
38:         Action createDeleteAction(IStructuredSelection selection, EditingDomain editingDomain);
39:
40: }