Class Editor
java.lang.Object
com.vaadin.copilot.plugins.themeeditor.Editor
- Direct Known Subclasses:
CopilotEditor
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintaddComponent(File f, int referenceComponentCreateLineNumber, int referenceComponentAttachLineNumber, Where where, ComponentType componentType, String... constructorArguments) intaddComponentAttribute(File f, int componentCreateLineNumber, int componentAttachLineNumber, ComponentType componentType, String methodName, String methodParam) intaddListener(File f, int componentCreateLineNumber, int componentAttachLineNumber, String listenerType) protected com.github.javaparser.ast.expr.SimpleNamefindLocalVariableOrField(com.github.javaparser.ast.CompilationUnit cu, int componentCreateLineNumber) protected com.github.javaparser.ast.stmt.ExpressionStmtfindMethodCall(com.github.javaparser.ast.stmt.BlockStmt codeBlock, com.github.javaparser.ast.Node afterThis, com.github.javaparser.ast.expr.SimpleName leftHandSide, String string) protected List<com.github.javaparser.ast.expr.MethodCallExpr> findMethodCalls(com.github.javaparser.ast.stmt.BlockStmt parent, com.github.javaparser.ast.expr.SimpleName variableName) protected com.github.javaparser.ast.stmt.StatementfindStatement(com.github.javaparser.ast.CompilationUnit cu, int lineNumber) getSourceFile(Class<?> cls) getSourceFile(String className) intmodifyClass(File f, Function<com.github.javaparser.ast.CompilationUnit, List<Editor.Modification>> modifier) protected com.github.javaparser.ast.CompilationUnitparseSource(String source) protected StringintremoveComponentAttribute(File f, int componentCreateLineNumber, int componentAttachLineNumber, ComponentType componentType, String methodName, String methodParam) intsetComponentAttribute(File f, int componentCreateLineNumber, int componentAttachLineNumber, ComponentType componentType, String methodName, String methodParam) intsetComponentAttribute(String className, int componentCreateLineNumber, int componentAttachLineNumber, ComponentType componentType, String methodName, String methodParam)
-
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
- Throws:
IOException
-
addComponent
public int addComponent(File f, int referenceComponentCreateLineNumber, int referenceComponentAttachLineNumber, Where where, ComponentType componentType, String... constructorArguments) -
addListener
-
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
-
getSourceFile
-
getSourceFile
-