Class ComponentSourceFinder

java.lang.Object
com.vaadin.copilot.ComponentSourceFinder

public class ComponentSourceFinder extends Object
Finds the source location of a component in the project.
  • Constructor Details

    • ComponentSourceFinder

      public ComponentSourceFinder(ProjectManager projectManager)
      Creates a new instance of the finder.
      Parameters:
      projectManager - the project manager to use
  • Method Details

    • findTypeAndSourceLocation

      public ComponentTypeAndSourceLocation findTypeAndSourceLocation(elemental.json.JsonObject component)
      Finds the source location of a component.
      Parameters:
      component - the component to find, defined by uiId and nodeId in the given JSON object
      Returns:
      the source location of the component
    • findTypeAndSourceLocation

      public ComponentTypeAndSourceLocation findTypeAndSourceLocation(elemental.json.JsonObject component, boolean includeChildren)
      Finds the source location of a component.
      Parameters:
      component - the component to find, defined by uiId and nodeId in the given JSON object
      Returns:
      the source location of the component
    • findTypeAndSourceLocation

      public ComponentTypeAndSourceLocation findTypeAndSourceLocation(int uiId, int nodeId)
      Finds the source location of a component.
      Parameters:
      uiId - the uiId of the component
      nodeId - the nodeId of the component
      Returns:
      the source location of the component
    • findTypeAndSourceLocation

      public ComponentTypeAndSourceLocation findTypeAndSourceLocation(int uiId, int nodeId, boolean includeChildren)
      Finds the source location of a component.
      Parameters:
      uiId - the uiId of the component
      nodeId - the nodeId of the component
      includeChildren - whether to include children in the search
      Returns:
      the source location of the component