Class StyledDocumentUtilities

java.lang.Object
com.inductiveautomation.ignition.designer.util.StyledDocumentUtilities

public final class StyledDocumentUtilities extends Object
  • Method Details

    • findAttributeBoundary

      public static int findAttributeBoundary(StyledDocument document, int offset, Object attributeId, Object attributeValue, boolean isForward)
      Finds the boundary of the attribute value in the document.
      Parameters:
      offset - This is the offset to start searching from.
      attributeId - This is the attribute id to search for.
      attributeValue - This is the attribute value to search for.
      isForward - If true, search forward from the offset. If false, search backward.
      Returns:
      The offset of the start or end of the attribute value (start = backward, end = forward).
    • findElementsWithAttributes

      public static List<Element> findElementsWithAttributes(StyledDocument document, Object attributeId)
      Returns:
      a list of elements that have the given attributeId