Annotation Interface DemoSource


This annotation is used for configuring the source code URL in a TabbedDemo. If no value or clazz is specified, and the demo view is annotated with GithubLink, then the source URL defaults to the location of the annotated class under src/test/java and the branch is determined from the value of GithubBranch in the demo view class (if the annotation is present) or the containing package of the demo view class. If the source URL is defaulted and no GithubBranch annotation is present either in the demo view class or its containing package, then the branch defaults to master.
Author:
Javier Godoy / Flowing Code
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The caption of the source tab (displayed if several sources are provided).
    The class to display, if different from the annotated class.
    The language used to format the sources.
    Source code position in the layout
    A link to the source code, if different from the annotated class.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
  • Field Details

  • Element Details

    • value

      String value
      A link to the source code, if different from the annotated class.

      It is an error if both value and clazz() are specified.

      Default:
      "__GITHUB__"
    • clazz

      Class<?> clazz
      The class to display, if different from the annotated class.

      It is an error if both value() and clazz are specified.

      Default:
      com.flowingcode.vaadin.addons.demo.DemoSource.class
    • caption

      String caption
      The caption of the source tab (displayed if several sources are provided). Default to the file name.
      Default:
      "__DEFAULT__"
    • language

      String language
      The language used to format the sources. By default the language is inferred from the file extension.
      Default:
      "__DEFAULT__"
    • sourcePosition

      SourcePosition sourcePosition
      Source code position in the layout
      Default:
      SECONDARY