Class JavaSourceModifier
java.lang.Object
com.vaadin.base.devserver.editor.Editor
com.vaadin.base.devserver.themeeditor.JavaSourceModifier
- 
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.base.devserver.editor.Editor
Editor.Modification - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.github.javaparser.ast.comments.LineComment - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected com.github.javaparser.ast.stmt.StatementcreateAddClassNameStatement(com.github.javaparser.ast.expr.SimpleName scope, String className, boolean overlay) protected com.github.javaparser.ast.stmt.ExpressionStmtfindLocalClassNameStmt(com.github.javaparser.ast.CompilationUnit cu, Component component, boolean overlay) protected WherefindModificationWhere(com.github.javaparser.ast.CompilationUnit cu, Component component) protected com.github.javaparser.ast.Nodeprotected com.github.javaparser.ast.NodefindParentBlockNode(com.github.javaparser.ast.CompilationUnit cu, Component component) protected com.github.javaparser.ast.CompilationUnitgetCompilationUnit(Component component) protected ComponentgetComponent(VaadinSession session, int uiId, int nodeId) protected ComponentTracker.LocationgetLocalClassName(Integer uiId, Integer nodeId) Gets component local classname if exists.protected VaadinSessionprotected FilegetSourceFile(ComponentTracker.Location createLocation) protected FilegetSourceFolder(ComponentTracker.Location location) getSuggestedClassName(Integer uiId, Integer nodeId) Creates suggested local classname based on component tag.Gets tag name of given component.protected booleanhasOverlay(Component component) booleanisAccessible(Integer uiId, Integer nodeId) Checks if component can be accessed within source code.voidremoveLocalClassName(Component component, boolean overlay) voidremoveLocalClassName(Integer uiId, Integer nodeId) Removes local class name of given component.protected voidsetLocalClassName(Component component, String className, boolean overlay) voidsetLocalClassName(Integer uiId, Integer nodeId, String className) Adds local component class name if not already present, updates value otherwise.Methods inherited from class com.vaadin.base.devserver.editor.Editor
addComponent, addComponentAttribute, addListener, findLocalVariableOrField, findMethodCall, findMethodCalls, findStatement, getSourceFile, getSourceFile, modifyClass, parseSource, readFile, removeComponentAttribute, setComponentAttribute, setComponentAttribute 
- 
Field Details
- 
LOCAL_CLASSNAME_COMMENT
public static final com.github.javaparser.ast.comments.LineComment LOCAL_CLASSNAME_COMMENT 
 - 
 - 
Constructor Details
- 
JavaSourceModifier
 
 - 
 - 
Method Details
- 
setLocalClassName
Adds local component class name if not already present, updates value otherwise.- Parameters:
 uiId- uiId of target component's UInodeId- nodeIf of target componentclassName- className to be set
 - 
setLocalClassName
 - 
getTag
Gets tag name of given component.- Parameters:
 uiId- uiId of target component's UInodeId- nodeIf of target component- Returns:
 - tag name of given element
 
 - 
getLocalClassName
Gets component local classname if exists.- Parameters:
 uiId- uiId of target component's UInodeId- nodeIf of target component- Returns:
 - component local classname
 
 - 
removeLocalClassName
Removes local class name of given component.- Parameters:
 uiId- uiId of target component's UInodeId- nodeIf of target component
 - 
removeLocalClassName
 - 
isAccessible
Checks if component can be accessed within source code.- Parameters:
 uiId- uiId of target component's UInodeId- nodeIf of target component- Returns:
 - true if component is accessible, false otherwise
 
 - 
getSuggestedClassName
Creates suggested local classname based on component tag.- Parameters:
 uiId- uiId of target component's UInodeId- nodeIf of target component- Returns:
 - suggested local classname
 
 - 
getCreateLocation
 - 
getSession
 - 
getSourceFolder
 - 
createAddClassNameStatement
protected com.github.javaparser.ast.stmt.Statement createAddClassNameStatement(com.github.javaparser.ast.expr.SimpleName scope, String className, boolean overlay)  - 
getSourceFile
 - 
getComponent
 - 
getCompilationUnit
 - 
findLocalClassNameStmt
protected com.github.javaparser.ast.stmt.ExpressionStmt findLocalClassNameStmt(com.github.javaparser.ast.CompilationUnit cu, Component component, boolean overlay)  - 
findParentBlockNode
protected com.github.javaparser.ast.Node findParentBlockNode(com.github.javaparser.ast.CompilationUnit cu, Component component)  - 
findModificationWhere
 - 
findNode
protected com.github.javaparser.ast.Node findNode(com.github.javaparser.ast.CompilationUnit cu, Component component)  - 
hasOverlay
 
 -