public void emitField(IVariableNode node)
{
IDefinition definition = getClassDefinition(node);
IDefinition def = null;
IExpressionNode enode = node.getVariableTypeNode();//getAssignedValueNode();
if (enode != null)
{
if (project == null)
project = getWalker().getProject();
def = enode.resolveType(project);
}
getDoc().emitFieldDoc(node, def);
IDefinition ndef = node.getDefinition();
ModifiersSet modifierSet = ndef.getModifiers();
String root = "";
if (modifierSet != null && !modifierSet.hasModifier(ASModifier.STATIC))
{
root = JSEmitterTokens.PROTOTYPE.getToken();
root += ASEmitterTokens.MEMBER_ACCESS.getToken();
}
if (definition == null)
definition = ndef.getContainingScope().getDefinition();
write(definition.getQualifiedName()
+ ASEmitterTokens.MEMBER_ACCESS.getToken() + root
+ node.getName());
IExpressionNode vnode = node.getAssignedValueNode();
if (vnode != null)
{
write(ASEmitterTokens.SPACE);
writeToken(ASEmitterTokens.EQUAL);
getWalker().walk(vnode);