org.argouml.notation.providers.uml
Class EnumerationLiteralNotationUml

java.lang.Object
  extended by org.argouml.notation.NotationProvider
      extended by org.argouml.notation.providers.EnumerationLiteralNotation
          extended by org.argouml.notation.providers.uml.EnumerationLiteralNotationUml

public class EnumerationLiteralNotationUml
extends EnumerationLiteralNotation

The notation for an Enumeration Literal.

The supported notation is:

     [ "<<" stereotype ">>" ] name [ ";" name ]*
 
This means:

As explained in issue 5000, the real implemented BNF is something like:

     ["<<" stereotype ["," stereotype]* ">>"] name [ ";" ["<<" stereotype ["," stereotype]* ">>"] name]*
 


Constructor Summary
EnumerationLiteralNotationUml(java.lang.Object enumLiteral)
          The constructor.
 
Method Summary
 java.lang.String getParsingHelp()
           
 void parse(java.lang.Object modelElement, java.lang.String text)
          Parses the given text, and adapts the modelElement and maybe related elements accordingly.
protected  void parseEnumerationLiteral(java.lang.String text, java.lang.Object literal)
           
protected  void parseEnumerationLiteralFig(java.lang.Object enumeration, java.lang.Object literal, java.lang.String text)
          Parse a string representing one or more ";" separated enumeration literals.
 java.lang.String toString(java.lang.Object modelElement, NotationSettings settings)
          Generate a string representation for the given model element.
 
Methods inherited from class org.argouml.notation.providers.EnumerationLiteralNotation
initialiseListener
 
Methods inherited from class org.argouml.notation.NotationProvider
addElementListener, addElementListener, addElementListener, cleanListener, formatNameList, formatNameList, removeAllElementListeners, removeElementListener, updateListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumerationLiteralNotationUml

public EnumerationLiteralNotationUml(java.lang.Object enumLiteral)
The constructor.

Parameters:
enumLiteral - the UML element
Method Detail

getParsingHelp

public java.lang.String getParsingHelp()
Specified by:
getParsingHelp in class NotationProvider
Returns:
a i18 key that represents a help string giving an explanation to the user of the syntax

parse

public void parse(java.lang.Object modelElement,
                  java.lang.String text)
Description copied from class: NotationProvider
Parses the given text, and adapts the modelElement and maybe related elements accordingly.

Specified by:
parse in class NotationProvider
Parameters:
modelElement - the modelelement to adapt
text - the string given by the user to be parsed to adapt the model

parseEnumerationLiteralFig

protected void parseEnumerationLiteralFig(java.lang.Object enumeration,
                                          java.lang.Object literal,
                                          java.lang.String text)
                                   throws java.text.ParseException
Parse a string representing one or more ";" separated enumeration literals.

Parameters:
enumeration - the enumeration that the literal belongs to
literal - the literal on which the editing will happen
text - the string to parse
Throws:
java.text.ParseException - for invalid input - so that the right message may be shown to the user

parseEnumerationLiteral

protected void parseEnumerationLiteral(java.lang.String text,
                                       java.lang.Object literal)
                                throws java.text.ParseException
Throws:
java.text.ParseException

toString

public java.lang.String toString(java.lang.Object modelElement,
                                 NotationSettings settings)
Description copied from class: NotationProvider
Generate a string representation for the given model element.

Specified by:
toString in class NotationProvider
Parameters:
modelElement - the base UML element
settings - settings that control rendering of the text
Returns:
the string written in the correct notation


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook