blob: 1b90c78681b589678ecd375336f905baa7ce657e (
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
/*****************************************************************************
* Copyright (c) 2014 Cedric Dumoulin.
*
*
* 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:
* Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
*
*****************************************************************************/
package org.eclipse.papyrus.uml.profile.drafter.ui.model;
import org.eclipse.papyrus.uml.profile.drafter.commands.CompoundCommand;
import org.eclipse.papyrus.uml.profile.drafter.commands.ValueProxy;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Stereotype;
/**
* @author dumoulin
*
*/
public class CommandBuilderVisitor extends SimpleModelVisitor {
/**
* The resulting command build by this visitor.
*/
protected CompoundCommand compoundCommand;
/**
* The shared value containing the current stereotype
*/
protected ValueProxy<Stereotype> curStereotype;
/**
* The shared value associated to the latest encountered {@link PropertyModel}.
*
*/
protected ValueProxy<Property> curProperty;
/**
* The shared value associated to the latest encountered Property Value.
* TODO : set the right type !!
*
*/
protected ValueProxy<Property> curPropertyValue;
/**
* Flag indicating if the commands should be executed.
*/
private boolean isExecutionRequested = false;
/**
* Constructor.
*
*/
public CommandBuilderVisitor() {
compoundCommand = new CompoundCommand();
}
/**
* @see org.eclipse.papyrus.uml.profile.drafter.ui.model.IModelVisitor#visit(org.eclipse.papyrus.uml.profile.drafter.ui.model.StereoptypeModel)
*
* @param model
*/
@Override
public void doVisit(StereoptypeModel model) {
// TODO Auto-generated method stub
}
/**
* @see org.eclipse.papyrus.uml.profile.drafter.ui.model.IModelVisitor#visit(org.eclipse.papyrus.uml.profile.drafter.ui.model.PropertyModel)
*
* @param model
*/
@Override
public void doVisit(PropertyModel model) {
// TODO Auto-generated method stub
}
/**
* @see org.eclipse.papyrus.uml.profile.drafter.ui.model.IModelVisitor#visit(org.eclipse.papyrus.uml.profile.drafter.ui.model.MetaclassModel)
*
* @param model
*/
@Override
public void doVisit(MetaclassModel model) {
// TODO Auto-generated method stub
}
/**
* @see org.eclipse.papyrus.uml.profile.drafter.ui.model.IModelVisitor#visit(org.eclipse.papyrus.uml.profile.drafter.ui.model.ExtendedStereotypeModel)
*
* @param model
*/
@Override
public void doVisit(ExtendedStereotypeModel model) {
// TODO Auto-generated method stub
}
/**
* Return true if the command should be executed (ie if there is some modifications requested).
*
* @return true if the command should be executed. False, if there is no modification requested.
*
*/
public boolean isExecutionRequested() {
// TODO Auto-generated method stub
return isExecutionRequested;
}
}
|