Class Editor

java.lang.Object
com.vaadin.base.devserver.editor.Editor
Direct Known Subclasses:
JavaSourceModifier

public class Editor extends Object
  • Constructor Details

    • Editor

      public Editor()
  • Method Details

    • findLocalVariableOrField

      protected com.github.javaparser.ast.expr.SimpleName findLocalVariableOrField(com.github.javaparser.ast.CompilationUnit cu, int componentCreateLineNumber)
    • findMethodCalls

      protected List<com.github.javaparser.ast.expr.MethodCallExpr> findMethodCalls(com.github.javaparser.ast.stmt.BlockStmt parent, com.github.javaparser.ast.expr.SimpleName variableName)
    • findMethodCall

      protected com.github.javaparser.ast.stmt.ExpressionStmt findMethodCall(com.github.javaparser.ast.stmt.BlockStmt codeBlock, com.github.javaparser.ast.Node afterThis, com.github.javaparser.ast.expr.SimpleName leftHandSide, String string)
    • findStatement

      protected com.github.javaparser.ast.stmt.Statement findStatement(com.github.javaparser.ast.CompilationUnit cu, int lineNumber)
    • readFile

      protected String readFile(File file) throws IOException
      Throws:
      IOException
    • addComponent

      public int addComponent(File f, int referenceComponentCreateLineNumber, int referenceComponentAttachLineNumber, Where where, ComponentType componentType, String... constructorArguments)
    • addListener

      public int addListener(File f, int componentCreateLineNumber, int componentAttachLineNumber, String listenerType)
    • modifyClass

      public int modifyClass(File f, Function<com.github.javaparser.ast.CompilationUnit,List<Editor.Modification>> modifier)
    • setComponentAttribute

      public int setComponentAttribute(String className, int componentCreateLineNumber, int componentAttachLineNumber, ComponentType componentType, String methodName, String methodParam)
    • setComponentAttribute

      public int setComponentAttribute(File f, int componentCreateLineNumber, int componentAttachLineNumber, ComponentType componentType, String methodName, String methodParam)
    • addComponentAttribute

      public int addComponentAttribute(File f, int componentCreateLineNumber, int componentAttachLineNumber, ComponentType componentType, String methodName, String methodParam)
    • removeComponentAttribute

      public int removeComponentAttribute(File f, int componentCreateLineNumber, int componentAttachLineNumber, ComponentType componentType, String methodName, String methodParam)
    • parseSource

      protected com.github.javaparser.ast.CompilationUnit parseSource(String source)
    • getSourceFile

      public File getSourceFile(Class<?> cls)
    • getSourceFile

      public File getSourceFile(String className)