The Closure Compiler uses the members of an interface to check if the interface is properly implemented. So, yes, I'd say we need the members emitted...
EdB On Thu, Dec 5, 2013 at 7:12 AM, <aha...@apache.org> wrote: > Don't bother emitting interface members. The way they were being emitted > were causing warnings from the closure compiler > > > Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo > Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/70683e5d > Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/70683e5d > Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/70683e5d > > Branch: refs/heads/develop > Commit: 70683e5d223538713c02eb02029f4e67686c0c7a > Parents: 30fd603 > Author: Alex Harui <aha...@apache.org> > Authored: Wed Dec 4 22:11:39 2013 -0800 > Committer: Alex Harui <aha...@apache.org> > Committed: Wed Dec 4 22:11:39 2013 -0800 > > ---------------------------------------------------------------------- > .../codegen/js/flexjs/JSFlexJSEmitter.java | 65 ++++++++++++++++++++ > 1 file changed, 65 insertions(+) > ---------------------------------------------------------------------- > > > http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/70683e5d/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java > ---------------------------------------------------------------------- > diff --git > a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java > > b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java > index a65335d..cd67c00 100644 > --- > a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java > +++ > b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java > @@ -197,6 +197,71 @@ public class JSFlexJSEmitter extends JSGoogEmitter > implements IJSFlexJSEmitter > } > > @Override > + public void emitInterface(IInterfaceNode node) > + { > + ICompilerProject project = getWalker().getProject(); > + > + getDoc().emitInterfaceDoc(node, project); > + > + String qname = node.getQualifiedName(); > + if (qname != null && !qname.equals("")) > + { > + write(qname); > + write(ASEmitterTokens.SPACE); > + writeToken(ASEmitterTokens.EQUAL); > + write(ASEmitterTokens.FUNCTION); > + write(ASEmitterTokens.PAREN_OPEN); > + write(ASEmitterTokens.PAREN_CLOSE); > + write(ASEmitterTokens.SPACE); > + write(ASEmitterTokens.BLOCK_OPEN); > + writeNewline(); > + write(ASEmitterTokens.BLOCK_CLOSE); > + write(ASEmitterTokens.SEMICOLON); > + } > + > + > + /* (aharui): is there any reason to emit members at all? > + final IDefinitionNode[] members = node.getAllMemberDefinitionNodes(); > + for (IDefinitionNode mnode : members) > + { > + boolean isAccessor = mnode.getNodeID() == ASTNodeID.GetterID > + || mnode.getNodeID() == ASTNodeID.SetterID; > + > + if (!isAccessor || !propertyNames.contains(qname)) > + { > + writeNewline(); > + > + write(qname); > + write(ASEmitterTokens.MEMBER_ACCESS); > + write(JSEmitterTokens.PROTOTYPE); > + write(ASEmitterTokens.MEMBER_ACCESS); > + write(mnode.getQualifiedName()); > + > + if (isAccessor && !propertyNames.contains(qname)) > + { > + propertyNames.add(qname); > + } > + else > + { > + write(ASEmitterTokens.SPACE); > + writeToken(ASEmitterTokens.EQUAL); > + write(ASEmitterTokens.FUNCTION); > + > + emitParameters(((IFunctionNode) > mnode).getParameterNodes()); > + > + write(ASEmitterTokens.SPACE); > + write(ASEmitterTokens.BLOCK_OPEN); > + writeNewline(); > + write(ASEmitterTokens.BLOCK_CLOSE); > + } > + > + write(ASEmitterTokens.SEMICOLON); > + } > + } > + */ > + } > + > + @Override > public void emitField(IVariableNode node) > { > IDefinition definition = getClassDefinition(node); > -- Ix Multimedia Software Jan Luykenstraat 27 3521 VB Utrecht T. 06-51952295 I. www.ixsoftware.nl