blob: ab6f0610e5c25f62e159865b0a5168a4c5d03879 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
/*****************************************************************************
* Copyright (c) 2009 Atos Origin.
*
*
* 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:
* Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
*
*****************************************************************************/
package org.eclipse.papyrus.navigator.factory;
import java.util.List;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.navigator.CommonNavigator;
/**
* A factory for creating Action objects from org.eclipse.jface.action
*/
public interface IActionHandlerFactory {
/**
* Creates a new IActionHandler object.
*
* @param editingDomain
* the editing domain
*
* @return the list of created actions
*/
List<Action> createActions(EditingDomain editingDomain);
/**
* Gets the actions.
*
* @return the actions list
*/
List<Action> getActions();
/**
* Activate the action.
*
* @param activeViewPart
* the active view part
*/
void activate(CommonNavigator activeViewPart);
/**
* Deactivate the action.
*
* @param activeViewPart
* the active view part
*/
void deactivate(CommonNavigator activeViewPart);
/**
* Update action from the selection
*
* @param structuredSelection
* the structured selection
*/
void update(IStructuredSelection structuredSelection);
/**
* Adds the applicable actions to a part's action bars, including setting any global action
* handlers.
* <p>
* The default implementation does nothing.
* </p>
*
* @param actionBars
* the part's action bars
*/
void fillActionBars(IActionBars actionBars);
}
|