Change 20091123-hqm-G by [email protected] on 2009-11-23 00:24:18 EST
    in /Users/hqm/openlaszlo/trunk6
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: support mixins on instances

New Features:

Bugs Fixed: LPP-8602 Allow with="" on instances declarations

Technical Reviewer: ptw
QA Reviewer: max
Doc Reviewer: (pending)

Documentation:

Release Notes:

mixins are supported now on instances as well as classes, e.g.,

   <mixin name="textmixin">
       <attribute name="foo" value="bar" type="text"/>
   </mixin>

   <text name="mixinstance" with="textmixin">
       <attribute name="text" value="${this.foo}"/>
   </text>

Overview:


Details:


schema/lfc-undeclared.lzx: Moved the "with" atribute down from <class> to <node>
beause instances can now have mixins

ViewCompiler.java: add updateSchema method, so that instances with mixins will
call the ClassModel machinery to add the needed interstitial classes to the app.
This is done by rewriting the instance as a <anonymous extends="tagclass"> 
instance,
and then ClassModel and NodeModel have been modified to know how to deal with 
these
'class-like instances'

Also removed call to the class inlining code that is no longer used in
the compiler.

ViewSchema.java: add an explicit arg to say if we're defining a public class or 
a
private (anonymous instance) one

NodeModel.java: Make getParentClassModel know about 'anonymous' instance calls 

Compiler.java: remove some of the class inlining code that has not worked in 
forever

DebugCompiler.java: remove class inlining code

ClassModel.java: make the ClassModel constructor accept a <anonymous> tag that 
has mixins, and build the
interstitial classes just like for a <class> that has mixins.

Tests:

test/lztest/lztest-mixins.lzx added to the "ant lztest" suite

test/smoke/mixin-simple.lzx

test/smoke/smokecheck.lzx

testcase from bug (uncomment the commented out region)

Files:
M       test/lztest/rhino.txt
A       test/lztest/lztest-mixins.lzx
A       test/smoke/mixin-simple.lzx
M       WEB-INF/lps/schema/lfc-undeclared.lzx
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewCompiler.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/ToplevelCompiler.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/DebugCompiler.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20091123-hqm-G.tar

_______________________________________________
Laszlo-reviews mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews

Reply via email to