Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
af3
AF3
Commits
8381549a
Commit
8381549a
authored
Aug 01, 2012
by
Florian Hölzl
Browse files
YELLOW
refs 862
parent
7f949f70
Changes
1
Hide whitespace changes
Inline
Side-by-side
org.fortiss.af3.state.ui/trunk/src/org/fortiss/af3/state/ui/utils/StateCompletionProposalUtils.java
View file @
8381549a
...
...
@@ -28,6 +28,7 @@ import static org.fortiss.af3.state.ui.utils.StateFieldAssistUtils.getEnclosingA
import
java.util.ArrayList
;
import
org.eclipse.emf.ecore.EObject
;
import
org.fortiss.af3.state.model.State
;
import
org.fortiss.af3.state.model.TransitionSegmentSpecification
;
...
...
@@ -37,40 +38,32 @@ import org.fortiss.af3.state.model.TransitionSegmentSpecification;
* @author doebber
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash:
AA275B9870E6C9CE1A9127EAB8085B31
* @ConQAT.Rating YELLOW Hash:
3D654CA31150C9A01F3C685ABCE54B67
*/
public
class
StateCompletionProposalUtils
{
/** Creates the proposals for the "guard" input text field. */
public
static
String
[]
createGuardProposals
(
TransitionSegmentSpecification
specification
)
{
ArrayList
<
String
>
prop
=
getDataStateVariables
(
getEnclosingAutomaton
(
specification
));
prop
.
addAll
(
getInputPortNames
(
getEnclosingComponent
(
specification
)));
prop
.
addAll
(
getOutputPortNames
(
getEnclosingComponent
(
specification
)));
prop
.
addAll
(
getFunctions
(
specification
));
prop
.
addAll
(
getAllConstructors
(
specification
,
true
));
prop
.
addAll
(
getPrimitiveValues
());
return
prop
.
toArray
(
new
String
[
0
]);
return
createActionProposalsImpl
(
specification
);
}
/** Creates the proposals for the "actions" input text field. */
public
static
String
[]
createActionsProposals
(
TransitionSegmentSpecification
specification
)
{
ArrayList
<
String
>
prop
=
getDataStateVariables
(
getEnclosingAutomaton
(
specification
));
prop
.
addAll
(
getInputPortNames
(
getEnclosingComponent
(
specification
)));
prop
.
addAll
(
getOutputPortNames
(
getEnclosingComponent
(
specification
)));
prop
.
addAll
(
getFunctions
(
specification
));
prop
.
addAll
(
getAllConstructors
(
specification
,
true
));
prop
.
addAll
(
getPrimitiveValues
());
return
prop
.
toArray
(
new
String
[
0
]);
return
createActionProposalsImpl
(
specification
);
}
// TODO this method is clone of the createActionsProposals
/** Creates the proposals for the "idle actions" input text field. */
public
static
String
[]
createIdleActionsProposals
(
State
state
)
{
ArrayList
<
String
>
prop
=
getDataStateVariables
(
getEnclosingAutomaton
(
state
));
prop
.
addAll
(
getInputPortNames
(
getEnclosingComponent
(
state
)));
prop
.
addAll
(
getOutputPortNames
(
getEnclosingComponent
(
state
)));
prop
.
addAll
(
getFunctions
(
state
));
prop
.
addAll
(
getAllConstructors
(
state
,
true
));
return
createActionProposalsImpl
(
state
);
}
/** Creates the action proposals. */
private
static
String
[]
createActionProposalsImpl
(
EObject
obj
)
{
ArrayList
<
String
>
prop
=
getDataStateVariables
(
getEnclosingAutomaton
(
obj
));
prop
.
addAll
(
getInputPortNames
(
getEnclosingComponent
(
obj
)));
prop
.
addAll
(
getOutputPortNames
(
getEnclosingComponent
(
obj
)));
prop
.
addAll
(
getFunctions
(
obj
));
prop
.
addAll
(
getAllConstructors
(
obj
,
true
));
prop
.
addAll
(
getPrimitiveValues
());
return
prop
.
toArray
(
new
String
[
0
]);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment