Commit 8381549a authored by Florian Hölzl's avatar Florian Hölzl
Browse files

YELLOW

refs 862
parent 7f949f70
......@@ -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]);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment