org.argouml.uml.generator
Class ParserDisplay

java.lang.Object
  extended byorg.argouml.uml.generator.Parser
      extended byorg.argouml.uml.generator.ParserDisplay

public class ParserDisplay
extends Parser

This class is responsible for the parsing of the text that the user entered on the display, i.e. the diagram. Consequently, the UML elements represented by the text are created or adapted.

There is a certain relation in namegiving with the class GeneratorDisplay, which generates a textual representation of UML elements for displaying on diagrams.


Nested Class Summary
(package private)  class ParserDisplay.ModelElementInfoList
          This class manages a list of UML modelelements that existed before and after the parseXxxxx() function was called.
 
Field Summary
private  Vector attributeCustomSep
          The vector of CustomSeparators to use when tokenizing attributes.
private  PropertySpecialString[] attributeSpecialStrings
          The array of special properties for attributes.
private static Logger LOG
          The standard error etc.
private  Vector operationCustomSep
          The vector of CustomSeparators to use when tokenizing attributes.
private  PropertySpecialString[] operationSpecialStrings
          The array of special properties for operations.
private  Vector parameterCustomSep
          The vector of CustomSeparators to use when tokenizing parameters.
static ParserDisplay SINGLETON
          The one and only ParserDisplay.
private static String VISIBILITYCHARS
          The character with a meaning as a visibility at the start of an attribute.
 
Constructor Summary
private ParserDisplay()
          Constructs the object contained in SINGLETON and initializes some instance variables.
 
Method Summary
private  Object buildNewCallAction(String s)
          This builds a CallAction with default attributes.
private  boolean compareMsgNumbers(String n1, String n2)
          Compares two message numbers with each other to see if they are equal, in the sense that they refer to the same position in a call tree.
private  int countParameters(Object bf)
          Counts the number of parameters that are not return values.
private  void delete(Object obj)
          This deletes modelelements, and swallows null without barking.
private  Collection filterWithActivator(Collection c, Object a)
          Finds the messages in Collection c that has message a as activator.
private  Collection findCandidateRoots(Collection c, Object a, Object veto)
          Finds the root candidates in a collection c, ie the messages in c that has the activator a (may be null) and has no predecessor with the same activator.
private  Object findMsg(Object r, String n)
          Finds the message in ClassifierRole r that has the message number written in n.
private static int findMsgOrderBreak(String s)
          Finds the break between message number and (possibly) message order.
private  Vector getOperation(Collection c, String name, int params)
          Finds the operations in Collection c with name name and params number of parameters.
private  Object getStereotype(Object obj, String name)
          Finds a stereotype named name either in the subtree of the model rooted at root, or in the the ProfileJava model.
private  Object getType(String name, Object defaultSpace)
          Finds the classifier associated with the type named in name.
private  Object getVisibility(String name)
          Finds a visibility for the visibility specified by name.
private  boolean hasMsgWithActivator(Object r, Object m)
          Examines a collection to see if any message has the given message as an activator.
private  int indexOfNextCheckedSemicolon(String s, int start)
          Checks for ';' in Strings or chars in ';' separated tokens in order to return an index to the next attribute or operation substring, -1 otherwise (a ';' inside a String or char delimiters is ignored).
private  void insertSuccessor(Object m, Object s, int p)
          Inserts message s as the p'th successor of message m.
private  boolean isBadPreMsg(Object ans, Object chld)
          Examines the call tree from chld to see if ans is an ancestor.
private  boolean isMsgNumberStartOf(String n1, String n2)
          Compares two message numbers n1, n2 with each other to determine if n1 specifies a the same position as n2 in a call tree or n1 specifies a position that is a father of the position specified by n2.
private  boolean isPredecessorMsg(Object pre, Object suc, int md)
          Examines the call tree from suc to see if pre is a predecessor.
 Object parseActionState(String s, Object actionState)
          An action state figure shows the action expression of the entry action according to the UML spec.
 void parseAttribute(String s, Object attr)
          Parse a line on the form:
visibility name [: type-expression] [= initial-value] If only one of visibility and name is given, then it is assumed to be the name and the visibility is left unchanged.
 void parseAttributeFig(Object cls, Object at, String text)
          Parse a string representing one ore more ';' separated attributes.
 void parseClassifierRole(Object cls, String s)
          Parses a ClassifierRole represented by the following line of the format:
baselist := [base] [, base]*
classifierRole := [name] [/ role] [: baselist]
 void parseComponentInstance(Object coi, String s)
          Parse a line of the form: "name : base-component".
private  void parseEffect(Object trans, String actions)
          Handle the Effect (Action) of a Transition.
 Object parseExtensionPoint(String text)
          Parse a string representing an extension point and return a new extension point.
 void parseExtensionPointFig(Object useCase, Object ep, String text)
          Parse an extension point.
private  void parseGuard(Object trans, String guard)
          Handle the Guard of a Transition.
 void parseMessage(Object mes, String s)
          Parse a Message textual description.
 void parseModelElement(Object me, String text)
          Parses a model element, ie reads a string on the format:
private static int parseMsgOrder(String s)
          Parses a message order specification.
 void parseNodeInstance(Object noi, String s)
          Parse a line of the form: "name : base-node".
 void parseObject(Object obj, String s)
          Parse a textual representatation of an Object, i.e.
 void parseObjectFlowState1(String s, Object objectFlowState)
          An objectFlowState is represented on a diagram by 2 strings: 1.
 void parseObjectFlowState2(String s, Object objectFlowState)
          An objectFlowState is represented on a diagram by 2 strings: 1.
 void parseOperation(String s, Object op)
          Parse a line of text and aligns the MOperation to the specification given.
 void parseOperationFig(Object cls, Object op, String text)
          Parse a string representing one ore more ';' separated operations.
private  void parseParamList(Object op, String param, int paramOffset)
          Parses a parameter list and aligns the parameter list in op to that specified in param.
 void parseStateBody(Object st, String s)
          Parse user input for state bodies and assign the individual lines to according actions or transistions.
private  void parseStateDoAction(Object st, String s)
          Parse a line of the form: "do /action" and create an action.
private  void parseStateEntryAction(Object st, String s)
          Parse a line of the form: "entry /action" and create an action.
private  void parseStateExitAction(Object st, String s)
          Parse a line of the form: "exit /action" and create an action.
 void parseStimulus(Object sti, String s)
          Parse a line of the form: "name: action".
 Object parseTransition(Object trans, String s)
          Parse a transition description line of the form:
private  void parseTrigger(Object trans, String trigger)
          Parse the Event that is the trigger of the given transition.
private  Object recFindStereotype(Object obj, Object root, String name)
          Recursively search a hive of a model for a stereotype with the name given in name.
private  void setParamKind(Object p, String s)
           
private  void setProperties(Object elem, Vector prop, PropertySpecialString[] spec)
          Applies a Vector of name value pairs of properties to a model element.
private  void setReturnParameter(Object op, Object type)
          Sets the return parameter of op to be of type type.
private  Object successor(Object r, int steps)
          Finds the steps'th successor of message r in the sense that it is a direct successor of r.
private  void updateAction(Object old, String s)
          Update an existing Action with a new Script.
private  Object walk(Object r, int steps, boolean strict)
          Finds the steps'th successor of r in the sense that it is a successor of a successor of r (steps times).
private  Object walkTree(Object root, Vector path)
          Walks a call tree from a root node following the directions given in path to a destination node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SINGLETON

public static final ParserDisplay SINGLETON
The one and only ParserDisplay.


LOG

private static final Logger LOG
The standard error etc. logger


attributeSpecialStrings

private PropertySpecialString[] attributeSpecialStrings
The array of special properties for attributes.


attributeCustomSep

private Vector attributeCustomSep
The vector of CustomSeparators to use when tokenizing attributes.


operationSpecialStrings

private PropertySpecialString[] operationSpecialStrings
The array of special properties for operations.


operationCustomSep

private Vector operationCustomSep
The vector of CustomSeparators to use when tokenizing attributes.


parameterCustomSep

private Vector parameterCustomSep
The vector of CustomSeparators to use when tokenizing parameters.


VISIBILITYCHARS

private static final String VISIBILITYCHARS
The character with a meaning as a visibility at the start of an attribute.

See Also:
Constant Field Values
Constructor Detail

ParserDisplay

private ParserDisplay()
Constructs the object contained in SINGLETON and initializes some instance variables.

See Also:
SINGLETON
Method Detail

parseExtensionPointFig

public void parseExtensionPointFig(Object useCase,
                                   Object ep,
                                   String text)
Parse an extension point.

The syntax is "name: location", "name:", "location" or "". The fields of the extension point are updated appropriately.

Parameters:
useCase - The use case that owns this extension point
ep - The extension point concerned
text - The text to parse

parseModelElement

public void parseModelElement(Object me,
                              String text)
                       throws ParseException
Parses a model element, ie reads a string on the format:
     [ << stereotype >>] [name]
 
and assigns the properties to the passed MModelElement.

Parameters:
me - The ModelElement text describes.
text - A String on the above format.
Throws:
ParseException - when it detects an error in the attribute string. See also ParseError.getErrorOffset().

indexOfNextCheckedSemicolon

private int indexOfNextCheckedSemicolon(String s,
                                        int start)
Checks for ';' in Strings or chars in ';' separated tokens in order to return an index to the next attribute or operation substring, -1 otherwise (a ';' inside a String or char delimiters is ignored).


parseOperationFig

public void parseOperationFig(Object cls,
                              Object op,
                              String text)
                       throws ParseException
Parse a string representing one ore more ';' separated operations. The case that a String or char contains a ';' (e.g. in an initializer) is handled, but not other occurences of ';'.

Parameters:
cls - Classifier The classifier the operation(s) belong to
op - Operation The operation on which the editing happened
text - The string to parse
Throws:
ParseException - for invalid input

parseAttributeFig

public void parseAttributeFig(Object cls,
                              Object at,
                              String text)
                       throws ParseException
Parse a string representing one ore more ';' separated attributes. The case that a String or char contains a ';' (e.g. in an initializer) is handled, but not other occurences of ';'.

Parameters:
cls - Classifier The classifier the attribute(s) belong to
at - Attribute The attribute on which the editing happened
text - The string to parse
Throws:
ParseException - for invalid input

parseExtensionPoint

public Object parseExtensionPoint(String text)
Parse a string representing an extension point and return a new extension point.

The syntax is "name: location", "name:", "location" or "". Note: If either field is blank, it will be set to null in the extension point. We break up the string into tokens at the ":". We must keep the ":" as a token, so we can distinguish between "name:" and "location". The number of tokens will distinguish our four cases.

TODO: This method needs to be replaced, since it by design cannot cope with the current design of the model component.

Specified by:
parseExtensionPoint in class Parser
Parameters:
text - The string to parse
Returns:
A new extension point, with fields set appropriately, or null if we are given null or a blank string. Note. The string ":" can be used to set both name and location to null.
See Also:
Parser.parseExtensionPoint(java.lang.String)

parseOperation

public void parseOperation(String s,
                           Object op)
                    throws ParseException
Parse a line of text and aligns the MOperation to the specification given. The line should be on the following form: All elements are optional and, if left unspecified, will preserve their old values.

A stereotype can be given between any element in the line on the form: <<stereotype>>

The following properties are recognized to have special meaning: abstract, concurrency, concurrent, guarded, leaf, query, root and sequential.

This syntax is compatible with the UML 1.3 spec.

(formerly visibility name (parameter list) : return-type-expression {property-string} ) (formerly 2nd: [visibility] [keywords] returntype name(params)[;] )

Specified by:
parseOperation in class Parser
Parameters:
s - The String to parse.
op - The MOperation to adjust to the spcification in s.
Throws:
ParseException - when it detects an error in the attribute string. See also ParseError.getErrorOffset().
See Also:
Parser.parseOperation(java.lang.String, java.lang.Object)

parseParamList

private void parseParamList(Object op,
                            String param,
                            int paramOffset)
                     throws ParseException
Parses a parameter list and aligns the parameter list in op to that specified in param. A parameter list generally has the following syntax:
 param := [inout] [name] [: type] [= initial value]
 list := [param] [, param]*
 
inout is optional and if omitted the old value preserved. If no value has been assigned, then in is assumed.
name , type and initial value are optional and if omitted the old value preserved.
type and initial value can be given in any order.
Unspecified properties is carried over by position, so if a parameter is inserted into the list, then it will inherit properties from the parameter that was there before for unspecified properties.

This syntax is compatible with the UML 1.3 specification.

Parameters:
op - The operation the parameter list belongs to.
param - The parameter list, without enclosing parentheses.
paramOffset - The offset to the beginning of the parameter list. Used for error reports.
Throws:
ParseException - when it detects an error in the attribute string. See also ParseError.getErrorOffset().

setReturnParameter

private void setReturnParameter(Object op,
                                Object type)
Sets the return parameter of op to be of type type. If there is none, one is created. If there are many, all but one are removed.


setParamKind

private void setParamKind(Object p,
                          String s)

parseAttribute

public void parseAttribute(String s,
                           Object attr)
                    throws ParseException
Parse a line on the form:
visibility name [: type-expression] [= initial-value]

The following properties are recognized to have special meaning: frozen.

This syntax is compatible with the UML 1.3 spec. (formerly: visibility name [multiplicity] : type-expression = initial-value {property-string} ) (2nd formerly: [visibility] [keywords] type name [= init] [;] )

Specified by:
parseAttribute in class Parser
Parameters:
s - The String to parse.
attr - The attribute to modify to comply with the instructions in s.
Throws:
ParseException - when it detects an error in the attribute string. See also ParseError.getErrorOffset().
See Also:
Parser.parseAttribute(java.lang.String, java.lang.Object)

getType

private Object getType(String name,
                       Object defaultSpace)
Finds the classifier associated with the type named in name.

Parameters:
name - The name of the type to get.
defaultSpace - The default name-space to place the type in.
Returns:
The classifier associated with the name.

getVisibility

private Object getVisibility(String name)
Finds a visibility for the visibility specified by name. If no known visibility can be deduced, private visibility is used.

Parameters:
name - The Java name of the visibility.
Returns:
A visibility corresponding to name.

setProperties

private void setProperties(Object elem,
                           Vector prop,
                           PropertySpecialString[] spec)
Applies a Vector of name value pairs of properties to a model element. The name is treated as the tag of a tagged value unless it is one of the PropertySpecialStrings, in which case the action of the PropertySpecialString is invoked.

Parameters:
elem - An model element to apply the properties to.
prop - A Vector with name, value pairs of properties.
spec - An array of PropertySpecialStrings to use.

recFindStereotype

private Object recFindStereotype(Object obj,
                                 Object root,
                                 String name)
Recursively search a hive of a model for a stereotype with the name given in name.

Parameters:
obj - The model element to be suitable for.
root - The model element to search from.
name - The name of the stereotype to search for.
Returns:
An stereotype named name, or null if none is found.

getStereotype

private Object getStereotype(Object obj,
                             String name)
Finds a stereotype named name either in the subtree of the model rooted at root, or in the the ProfileJava model.

TODO: Should create the stereotype under root if it isn't found.

Parameters:
obj - A MModelElements to find a suitable stereotype for.
name - The name of the stereotype to search for.
Returns:
A stereotype named name, or possibly null.

parseStateBody

public void parseStateBody(Object st,
                           String s)
                    throws ParseException
Parse user input for state bodies and assign the individual lines to according actions or transistions. The user input consists of multiple lines like:
action-label / action-expression
or the format of a regular transition - see parseTransition().

"action-label" stands for one of "entry", "do" and "exit". The words "entry", "do" and "exit" are case-independent.

Parameters:
st - The State object.
s - The string to parse.
Throws:
ParseException - when there is a syntax problem, e.g. non-matching brackets () or []

parseStateEntryAction

private void parseStateEntryAction(Object st,
                                   String s)
Parse a line of the form: "entry /action" and create an action. We do not need to check for the presence of the word "entry" - that is done by the caller.

Parameters:
st - the state object
s - the string to be parsed

parseStateExitAction

private void parseStateExitAction(Object st,
                                  String s)
Parse a line of the form: "exit /action" and create an action. We do not need to check for the presence of the word "exit" - that is done by the caller.

Parameters:
st - the state object
s - the string to be parsed

parseStateDoAction

private void parseStateDoAction(Object st,
                                String s)
Parse a line of the form: "do /action" and create an action. We do not need to check for the presence of the word "do" - that is done by the caller.

Parameters:
st - the state object
s - the string to be parsed

parseTransition

public Object parseTransition(Object trans,
                              String s)
                       throws ParseException
Parse a transition description line of the form:
    "event-signature [guard-condition] / action-expression".
 
If the last character of this line is a ";", then it is ignored.

The "event-signature" may be one of the 4 formats:

Remark: The UML standard does not make a distinction between the syntax of a CallEvent and SignalEvent: both may have parameters between (). For simplicity and user-friendlyness, we chose for this distinction. If a user wants parameters for a SignalEvent, then he may add them in the properties panels, but not on the diagram.

An alternative solution would be to create a CallEvent by default, and when editing an existing event, do not change the type.

TODO: This function fails when the event-signature contains a "[" or a "/".

Specified by:
parseTransition in class Parser
Parameters:
trans - the transition object to which this string applies
s - the string to be parsed
Returns:
the transition object
Throws:
ParseException - when no matching [] are found
See Also:
Parser.parseTransition(java.lang.Object, java.lang.String)

parseTrigger

private void parseTrigger(Object trans,
                          String trigger)
                   throws ParseException
Parse the Event that is the trigger of the given transition.

Parameters:
trans - the transition which is triggered by the given event
trigger - the given trigger
Throws:
ParseException

parseGuard

private void parseGuard(Object trans,
                        String guard)
Handle the Guard of a Transition.

We can distinct between 4 cases:
1. A guard is given. None exists yet.
2. The expression of the guard was present, but is altered.
3. A guard is not given. None exists yet.
4. The expression of the guard was present, but is removed.

The reaction in these cases should be:

  1. Create a new guard, set its name, language & expression, and hook it to the transition.
  2. Change the guard's expression. Leave the name & language untouched. See also issue 2742.
  3. Nop.
  4. Unhook and erase the existing guard.

Parameters:
trans - the UML element transition
guard - the string that represents the guard expression

parseEffect

private void parseEffect(Object trans,
                         String actions)
Handle the Effect (Action) of a Transition. We can distinct between 4 cases: 1. An effect is given. None exists yet. 2. The expression of the effect was present, but is altered. 3. An effect is not given. None exists yet. 4. The expression of the effect was present, but is removed. The reaction in these cases should be: 1. Create a new CallAction, set its name, language & expression, and hook it to the transition. 2. Change the effect's expression. Leave the actiontype, name & language untouched. 3. Nop. 4. Unhook and erase the existing effect.

Parameters:
actions - the string to be parsed
trans - the transition that causes the effect (actions)

parseClassifierRole

public void parseClassifierRole(Object cls,
                                String s)
                         throws ParseException
Parses a ClassifierRole represented by the following line of the format:
baselist := [base] [, base]*
classifierRole := [name] [/ role] [: baselist]

role and baselist can be given in any order.

This syntax is compatible with the UML 1.3 specification. (formerly: "name: base" )

Parameters:
cls - the classifier role to apply any changes to
s - the String to parse
Throws:
ParseException - when it detects an error in the attribute string. See also ParseError.getErrorOffset().

parseMessage

public void parseMessage(Object mes,
                         String s)
                  throws ParseException
Parse a Message textual description.

TODO: - This method is too complex, lets break it up. Parses a message line on the form:

 intno := integer|name
 seq := intno ['.' intno]*
 recurrance := '*'['//'] | '*'['//']'[' iteration ']' | '['
 condition ']'
 seqelem := {[intno] ['['recurrance']']}
 seq2 := seqelem ['.' seqelem]*
 ret_list := lvalue [',' lvalue]*
 arg_list := rvalue [',' rvalue]*
 message := [seq [',' seq]* '/'] seq2 ':' [ret_list :=] name ([arg_list])
 
Which is rather complex, so a few examples: This syntax is compatible with the UML 1.3 specification.

Actually, only a subset of this syntax is currently supported, and some is not even planned to be supported. The exceptions are intno, which allows a number possibly followed by a sequence of letters in the range 'a' - 'z', seqelem, which does not allow a recurrance, and message, which does allow one recurrance near seq2. (formerly: name: action )

Parameters:
mes - the MMessage to apply any changes to
s - the String to parse
Throws:
ParseException - when it detects an error in the attribute string. See also ParseError.getErrorOffset().

isBadPreMsg

private boolean isBadPreMsg(Object ans,
                            Object chld)
Examines the call tree from chld to see if ans is an ancestor.

Parameters:
ans - MMessage
chld - MMessage

isPredecessorMsg

private boolean isPredecessorMsg(Object pre,
                                 Object suc,
                                 int md)
Examines the call tree from suc to see if pre is a predecessor. This function is recursive and md specifies the maximum level of recursions allowed.

Parameters:
pre - MMessage
suc - MMessage

walkTree

private Object walkTree(Object root,
                        Vector path)
Walks a call tree from a root node following the directions given in path to a destination node. If the destination node cannot be reached, then null is returned.

Parameters:
root - The root of the call tree.
path - The path to walk in the call tree.
Returns:
The message at the end of path, or null.

hasMsgWithActivator

private boolean hasMsgWithActivator(Object r,
                                    Object m)
Examines a collection to see if any message has the given message as an activator.

Parameters:
r - MClassifierRole
m - MMessage

insertSuccessor

private void insertSuccessor(Object m,
                             Object s,
                             int p)
Inserts message s as the p'th successor of message m.

Parameters:
m - MMessage
s - MMessage

successor

private Object successor(Object r,
                         int steps)
Finds the steps'th successor of message r in the sense that it is a direct successor of r. Returns null if r has fewer successors.


walk

private Object walk(Object r,
                    int steps,
                    boolean strict)
Finds the steps'th successor of r in the sense that it is a successor of a successor of r (steps times). The first successor with the same activator as r is used in each step. If there are not enough successors, then struct determines the result. If struct is true, then null is returned, otherwise the last successor found.


findCandidateRoots

private Collection findCandidateRoots(Collection c,
                                      Object a,
                                      Object veto)
Finds the root candidates in a collection c, ie the messages in c that has the activator a (may be null) and has no predecessor with the same activator. If veto isn't null, then the message in veto will not be included in the Collection of candidates.

Parameters:
c - The collection.
a - The message.
veto - The veto message.
Returns:
The found roots.

filterWithActivator

private Collection filterWithActivator(Collection c,
                                       Object a)
Finds the messages in Collection c that has message a as activator.


findMsg

private Object findMsg(Object r,
                       String n)
Finds the message in ClassifierRole r that has the message number written in n. If it isn't found, null is returned.


compareMsgNumbers

private boolean compareMsgNumbers(String n1,
                                  String n2)
Compares two message numbers with each other to see if they are equal, in the sense that they refer to the same position in a call tree.


isMsgNumberStartOf

private boolean isMsgNumberStartOf(String n1,
                                   String n2)
Compares two message numbers n1, n2 with each other to determine if n1 specifies a the same position as n2 in a call tree or n1 specifies a position that is a father of the position specified by n2.


getOperation

private Vector getOperation(Collection c,
                            String name,
                            int params)
Finds the operations in Collection c with name name and params number of parameters. If no operation is found, one is created. The applicable operations are returned.

Parameters:
c - the collection of operations to be searched
name - the name of the operation to be found
params - the number of parameters of the operation to be found
Returns:
the sought operation

countParameters

private int countParameters(Object bf)
Counts the number of parameters that are not return values.


parseMsgOrder

private static int parseMsgOrder(String s)
Parses a message order specification.


findMsgOrderBreak

private static int findMsgOrderBreak(String s)
Finds the break between message number and (possibly) message order.


parseStimulus

public void parseStimulus(Object sti,
                          String s)
Parse a line of the form: "name: action".

Parameters:
sti - the stimulus object to which the string applies
s - the string to be parsed.

parseObject

public void parseObject(Object obj,
                        String s)
Parse a textual representatation of an Object, i.e. a line of the form:

Parameters:
obj - the UML Object to be parsed.
s - the string to be parsed.

parseNodeInstance

public void parseNodeInstance(Object noi,
                              String s)
Parse a line of the form: "name : base-node".

Parameters:
noi - the node instance on which the string applies.
s - the string to be parsed.

parseComponentInstance

public void parseComponentInstance(Object coi,
                                   String s)
Parse a line of the form: "name : base-component".

Parameters:
coi - the component instance on which the string applies.
s - the string to parse.

buildNewCallAction

private Object buildNewCallAction(String s)
This builds a CallAction with default attributes. But without Operation!

Parameters:
s - string representing the Script of the Action

updateAction

private void updateAction(Object old,
                          String s)
Update an existing Action with a new Script.

Parameters:
old - the Action
s - a string representing a new Script for the ActionExpression

delete

private void delete(Object obj)
This deletes modelelements, and swallows null without barking.

Parameters:
obj - the modelelement to be deleted

parseActionState

public Object parseActionState(String s,
                               Object actionState)
An action state figure shows the action expression of the entry action according to the UML spec.

Specified by:
parseActionState in class Parser
Parameters:
actionState - the input actionstate
s - the input string
Returns:
the actionstate
See Also:
Parser.parseActionState( java.lang.String, java.lang.Object)

parseObjectFlowState1

public void parseObjectFlowState1(String s,
                                  Object objectFlowState)
                           throws ParseException
An objectFlowState is represented on a diagram by 2 strings: 1. Classifier name 2. State name This function solely handles 1.

Parameters:
s - the string to be parsed
objectFlowState - the input object
Throws:
ParseException - when the input should be rejected (i.e. when the classifier does not exist)

parseObjectFlowState2

public void parseObjectFlowState2(String s,
                                  Object objectFlowState)
                           throws ParseException
An objectFlowState is represented on a diagram by 2 strings: 1. Classifier name 2. State name This function solely handles 2.

Parameters:
s - the string to be parsed
objectFlowState - the input object
Throws:
ParseException - when the input should be rejected (i.e. when the classifier or the state do not exist)


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook