public class DesignTimeUtilsStub extends Object implements DesignTimeUtils
DesignTimeUtils
.Modifier and Type | Field and Description |
---|---|
static DesignTimeUtils |
EMPTY |
Constructor and Description |
---|
DesignTimeUtilsStub() |
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.
|
public static final DesignTimeUtils EMPTY
public void addDeclarations(IndentedWriter w)
DesignTimeUtils
addDeclarations
in interface DesignTimeUtils
public String getImplName(String implName)
DesignTimeUtils
getImplName
in interface DesignTimeUtils
public String getPath(Element element)
DesignTimeUtils
Element
.getPath
in interface DesignTimeUtils
public String getProvidedFactory(String typeName, String methodName, String args)
DesignTimeUtils
getProvidedFactory
in interface DesignTimeUtils
public String getProvidedField(String typeName, String fieldName)
DesignTimeUtils
getProvidedField
in interface DesignTimeUtils
public String getTemplateContent(String path)
DesignTimeUtils
*.ui.xml
template to parse,
or null
if not design time, or this template is not under
design.getTemplateContent
in interface DesignTimeUtils
public void handleUIObject(Statements writer, XMLElement elem, String fieldName)
DesignTimeUtils
UIObject
creation.handleUIObject
in interface DesignTimeUtils
public boolean isDesignTime()
DesignTimeUtils
true
if this template is under design now, so some of
UiBinder features should be disables. This includes assigning values into
"@UiField", processing "@UiHandler".isDesignTime
in interface DesignTimeUtils
public void putAttribute(XMLElement elem, String name, String value)
DesignTimeUtils
XMLElement
.putAttribute
in interface DesignTimeUtils
public void putAttribute(XMLElement elem, String name, String[] values)
DesignTimeUtils
XMLElement
.putAttribute
in interface DesignTimeUtils
public void rememberPathForElements(Document doc)
DesignTimeUtils
Element
s.rememberPathForElements
in interface DesignTimeUtils
public void writeAttributes(Statements writer)
DesignTimeUtils
writeAttributes
in interface DesignTimeUtils
Copyright © 2016. All rights reserved.