blob: 606650e84b18e9f91465ae55b8b366569b426b5c (
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
83
84
85
86
87
88
89
|
/*****************************************************************************
* Copyright (c) 2010 CEA LIST.
*
* 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:
* Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.service.palette;
import java.util.List;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.gef.EditPart;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.uml2.uml.Profile;
import org.w3c.dom.Node;
/**
* Interface implemented by actions run after or before palette creation
*/
public interface IAspectAction {
/**
* Initializes the action with some elements
*
* @param configurationNode
* the configuration {@link Node} that initialize the action
*/
public void init(Node configurationNode, IAspectActionProvider factory);
/**
* Runs post condition tests before runnning the action
*
* @return the status corresponding to the check
*/
public IStatus checkPreCondition();
/**
* Runs post condition tests after runnning the action
*
* @return the status corresponding to the check
*/
public IStatus checkPostCondition();
/**
* Returns the label displayed by this action
*
* @return the label displayed by this action
*/
public String getLabel();
/**
* Returns the image displayed by this action
*
* @return the image displayed by this action
*/
public Image getImage();
/**
* Creates the control where the action can be configured
*
* @param parent
* the composite parent of the created element(s)
* @return the control where the action can be configured
*/
public Control createConfigurationComposite(Composite parent, IPaletteEntryProxy entryProxy, List<Profile> appliedProfiles);
/**
* Serializes the current action configuration
*
* @param parentNode
* the configuration node where to place values
*/
public void save(Node parentNode);
/**
* Returns the id of the factory in charge of the creation of this action
*
* @return the id of the factory in charge of the creation of this action
*/
public String getFactoryId();
}
|