org.eclipse.viatra.addon.viewers.runtime.util

## Class FormatParser

- java.lang.Object
- - org.eclipse.viatra.addon.viewers.runtime.util.FormatParser

-     public class FormatParser
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ANNOTATION_ID`
    `static java.lang.String` | `ARROW_SOURCE_END`
    `static java.lang.String` | `ARROW_TARGET_END`
    `static java.lang.String` | `COLOR`
    `static java.lang.String` | `LINE_COLOR`
    `static java.lang.String` | `LINE_STYLE`
    `static java.lang.String` | `LINE_WIDTH`
    `static java.lang.String` | `TEXT_COLOR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FormatParser()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.eclipse.swt.graphics.RGB` | `getColorFormatProperty(FormattableElement element, java.lang.String index)`
    `static int` | `getNumberProperty(FormattableElement element, java.lang.String index)` Returns a numeric format property.
    `static java.lang.String` | `getStringProperty(FormattableElement element, java.lang.String index)` Returns a string format property.
    `static boolean` | `isFormatted(FormattableElement element)`
    `static org.eclipse.swt.graphics.RGB` | `parseColor(java.lang.String colorString)`
    `static FormatSpecification` | `parseFormatAnnotation(PAnnotation format)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ANNOTATION_ID

          public static final java.lang.String ANNOTATION_ID

      See Also:
        Constant Field Values

    - #### COLOR

          public static final java.lang.String COLOR

      See Also:
        Constant Field Values

    - #### LINE_COLOR

          public static final java.lang.String LINE_COLOR

      See Also:
        Constant Field Values

    - #### TEXT_COLOR

          public static final java.lang.String TEXT_COLOR

      See Also:
        Constant Field Values

    - #### LINE_WIDTH

          public static final java.lang.String LINE_WIDTH

      See Also:
        Constant Field Values

    - #### LINE_STYLE

          public static final java.lang.String LINE_STYLE

      See Also:
        Constant Field Values

    - #### ARROW_SOURCE_END

          public static final java.lang.String ARROW_SOURCE_END

      See Also:
        Constant Field Values

    - #### ARROW_TARGET_END

          public static final java.lang.String ARROW_TARGET_END

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### FormatParser

          public FormatParser()

  - ### Method Detail

    - #### isFormatted

          public static boolean isFormatted(FormattableElement element)

    - #### parseFormatAnnotation

          public static FormatSpecification parseFormatAnnotation(PAnnotation format)

    - #### parseColor

          public static org.eclipse.swt.graphics.RGB parseColor(java.lang.String colorString)

    - #### getColorFormatProperty

          public static org.eclipse.swt.graphics.RGB getColorFormatProperty(FormattableElement element,
                                                                            java.lang.String index)

    - #### getNumberProperty

          public static int getNumberProperty(FormattableElement element,
                                              java.lang.String index)

      Returns a numeric format property. If the input is erroneous (e.g. non-existent or non-numeric properties), -1 is returned.
      Parameters:
        `index` -
      Returns:

    - #### getStringProperty

          public static java.lang.String getStringProperty(FormattableElement element,
                                                           java.lang.String index)

      Returns a string format property. If the input is erroneous (e.g. non-existent properties), null is returned.
      Parameters:
        `index` -
      Returns: