Class Annotations

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class Annotations extends GObject

Use this object to manage Annotations. Each View has a single annotation manager and it is guaranteed to be the same for the lifetime of View.

Add AnnotationProviders with addProvider(AnnotationProvider) to display all the annotations added to each AnnotationProvider.

Since:
5.18
  • Constructor Details

    • Annotations

      public Annotations(MemorySegment address)
      Create a Annotations instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • Annotations

      public Annotations()
      Create a new Annotations.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the Annotations class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected Annotations asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • addProvider

      public void addProvider(AnnotationProvider provider)
      Adds a new annotation provider.
      Parameters:
      provider - a GtkSourceAnnotationProvider.
    • removeProvider

      public boolean removeProvider(AnnotationProvider provider)
      Removes a provider.
      Parameters:
      provider - a GtkSourceAnnotationProvider.
      Returns:
      true if the provider was found and removed
    • onChanged

    • emitChanged

      public void emitChanged()
    • builder

      public static Annotations.Builder<? extends Annotations.Builder> builder()
      A Annotations.Builder object constructs a Annotations with the specified properties. Use the various set...() methods to set properties, and finish construction with Annotations.Builder.build().
      Returns:
      the builder object