public interface DesignTimeUtils
Modifier and Type | Method and Description |
---|---|
void |
addDeclarations(IndentedWriter w)
Adds declarations for design time artifacts.
|
String |
getImplName(String implName)
Returns the name of "Impl", unique each time if it is design time.
|
String |
getPath(Element element)
Returns the path of given
Element . |
String |
getProvidedFactory(String typeName,
String methodName,
String args)
Returns the source to access "@UiFactory" method.
|
String |
getProvidedField(String typeName,
String fieldName)
Returns the source to access "@UiField(provided)" instance of some object.
|
String |
getTemplateContent(String path)
Returns the design time content of
*.ui.xml template to parse,
or null if not design time, or this template is not under
design. |
void |
handleUIObject(Statements writer,
XMLElement elem,
String fieldName)
Notifies tool about
UIObject creation. |
boolean |
isDesignTime()
Returns
true if this template is under design now, so some of
UiBinder features should be disables. |
void |
putAttribute(XMLElement elem,
String name,
String value)
Remembers value of attribute, for given
XMLElement . |
void |
putAttribute(XMLElement elem,
String name,
String[] values)
Remembers value of attribute, for given
XMLElement . |
void |
rememberPathForElements(Document doc)
Fills with paths for given and child
Element
s. |
void |
writeAttributes(Statements writer)
Writes remembered values of attributes.
|
void addDeclarations(IndentedWriter w)
String getImplName(String implName)
String getProvidedFactory(String typeName, String methodName, String args)
String getProvidedField(String typeName, String fieldName)
String getTemplateContent(String path)
*.ui.xml
template to parse,
or null
if not design time, or this template is not under
design.void handleUIObject(Statements writer, XMLElement elem, String fieldName)
UIObject
creation.boolean isDesignTime()
true
if this template is under design now, so some of
UiBinder features should be disables. This includes assigning values into
"@UiField", processing "@UiHandler".void putAttribute(XMLElement elem, String name, String value)
XMLElement
.void putAttribute(XMLElement elem, String name, String[] values)
XMLElement
.void rememberPathForElements(Document doc)
Element
s.void writeAttributes(Statements writer)
Copyright © 2016. All rights reserved.