ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1375694 - in /ant/sandbox/antdsl/branches/import-experiment: ./ doc/ org.apache.ant.antdsl.tests/ org.apache.ant.antdsl.tests/META-INF/ org.apache.ant.antdsl.ui/ org.apache.ant.antdsl/ org.apache.ant.antdsl/.launch/ org.apache.ant.antdsl/....
Date Tue, 21 Aug 2012 17:48:15 GMT
Author: hibou
Date: Tue Aug 21 17:48:14 2012
New Revision: 1375694

URL: http://svn.apache.org/viewvc?rev=1375694&view=rev
Log:
Merged revisions 1362288-1375689 via svnmerge from 
https://svn.apache.org/repos/asf/ant/sandbox/antdsl/trunk

........
  r1367311 | hibou | 2012-07-30 23:22:07 +0200 (Mon, 30 Jul 2012) | 9 lines
  
  - use AntExpression rather than String as attributes of tasks
  - rework macros so they can hold expressions:
    - regular arguments become local properties
    - no more @{} substitution
    - renamed to 'function' so avoid the confusion with xml style macros
  
  => needs ant trunk, the build needs to be rework
........
  r1367319 | hibou | 2012-07-30 23:34:15 +0200 (Mon, 30 Jul 2012) | 2 lines
  
  Update the generated plugin.xml
........
  r1367323 | hibou | 2012-07-30 23:37:22 +0200 (Mon, 30 Jul 2012) | 2 lines
  
  Update screenshot
........
  r1375628 | hibou | 2012-08-21 17:55:46 +0200 (Tue, 21 Aug 2012) | 3 lines
  
  - update to use Eclipse juno repository, so a new version of Xtext
  - less hack for the OSGi build, by using Ivy 2.4 and Ant 1.9
........
  r1375651 | hibou | 2012-08-21 18:37:17 +0200 (Tue, 21 Aug 2012) | 2 lines
  
  Remove generated files plugin.xml_gen and ignore them
........
  r1375652 | hibou | 2012-08-21 18:38:12 +0200 (Tue, 21 Aug 2012) | 2 lines
  
  Add new generated file
........
  r1375653 | hibou | 2012-08-21 18:39:03 +0200 (Tue, 21 Aug 2012) | 2 lines
  
  Improve dependency declaration
........
  r1375679 | hibou | 2012-08-21 19:36:40 +0200 (Tue, 21 Aug 2012) | 3 lines
  
  Fix dependencies of the generation targets.
  The build should work pretty well now.
........
  r1375682 | hibou | 2012-08-21 19:42:20 +0200 (Tue, 21 Aug 2012) | 2 lines
  
  Also copy the ant 1.9 jar into the AntDSL plugin for the build in Eclipse
........

Added:
    ant/sandbox/antdsl/branches/import-experiment/doc/antdsl.png
      - copied unchanged from r1375682, ant/sandbox/antdsl/trunk/doc/antdsl.png
    ant/sandbox/antdsl/branches/import-experiment/ivy-fixed.xml
      - copied unchanged from r1375682, ant/sandbox/antdsl/trunk/ivy-fixed.xml
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/.settings/
      - copied from r1375682, ant/sandbox/antdsl/trunk/org.apache.ant.antdsl/.settings/
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/FunctionCall.java
      - copied unchanged from r1375682, ant/sandbox/antdsl/trunk/org.apache.ant.antdsl/src/org/apache/ant/antdsl/FunctionCall.java
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/FunctionDef.java
      - copied unchanged from r1375682, ant/sandbox/antdsl/trunk/org.apache.ant.antdsl/src/org/apache/ant/antdsl/FunctionDef.java
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/xtend-gen/org/apache/ant/antdsl/xtext/generator/AntDSLGenerator.java
      - copied unchanged from r1375682, ant/sandbox/antdsl/trunk/org.apache.ant.antdsl/xtend-gen/org/apache/ant/antdsl/xtext/generator/AntDSLGenerator.java
Removed:
    ant/sandbox/antdsl/branches/import-experiment/doc/antdsl.jpeg
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl.ui/plugin.xml_gen
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/plugin.xml_gen
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/ExtensionPoint.java
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/Target.java
Modified:
    ant/sandbox/antdsl/branches/import-experiment/   (props changed)
    ant/sandbox/antdsl/branches/import-experiment/build.xml
    ant/sandbox/antdsl/branches/import-experiment/doc/index.html
    ant/sandbox/antdsl/branches/import-experiment/ivy.xml
    ant/sandbox/antdsl/branches/import-experiment/ivysettings.xml
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/   (props changed)
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl.tests/   (props changed)
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl.tests/META-INF/MANIFEST.MF
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl.ui/   (props changed)
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl.ui/plugin.xml
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/.classpath
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/.launch/AntDSL.launch
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/.launch/GenerateAntDSL.mwe2.launch
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/META-INF/MANIFEST.MF
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/plugin.xml
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/AbstractAntDslProjectHelper.java
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/AntDSL.g
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/expr/AntExpression.java
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/xtext/AntDSL.xtext
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/xtext/AntDslXTextProjectHelper.java
    ant/sandbox/antdsl/branches/import-experiment/test/build.ant

Propchange: ant/sandbox/antdsl/branches/import-experiment/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Aug 21 17:48:14 2012
@@ -1,3 +1,4 @@
 build
 lib
 build-deps
+*.classpath

Propchange: ant/sandbox/antdsl/branches/import-experiment/
------------------------------------------------------------------------------
    svn:mergeinfo = /ant/sandbox/antdsl/trunk:1367311-1375682

Propchange: ant/sandbox/antdsl/branches/import-experiment/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Aug 21 17:48:14 2012
@@ -1 +1 @@
-/ant/sandbox/antdsl/trunk:1-1362287
+/ant/sandbox/antdsl/trunk:1-1375689

Modified: ant/sandbox/antdsl/branches/import-experiment/build.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/build.xml?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/build.xml (original)
+++ ant/sandbox/antdsl/branches/import-experiment/build.xml Tue Aug 21 17:48:14 2012
@@ -1,6 +1,6 @@
 <project name="ant-dsl" xmlns:ivy="antlib:org.apache.ivy.ant">
 
-    <property name="ivy.version" value="2.3.0-rc1" />
+    <property name="ivy.version" value="2.4.0-alpha" />
 
     <target name="-check-build-deps">
         <condition property="build-deps.exist">
@@ -8,6 +8,7 @@
                 <available file="${basedir}/build-deps/antlr-3.4-complete.jar" />
                 <available file="${basedir}/build-deps/antlr3-task/ant-antlr3.jar" />
                 <available file="${basedir}/build-deps/ivy-${ivy.version}.jar" />
+                <available file="${basedir}/build-deps/apache-ant-1.9.0alpha-bin.zip" />
             </and>
         </condition>
         <mkdir dir="${user.home}/.ivy2/lib/" />
@@ -15,10 +16,13 @@
 
     <target name="-download-build-deps" depends="-check-build-deps" unless="build-deps.exist">
         <mkdir dir="${basedir}/build-deps" />
-        <get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar" dest="${basedir}/build-deps/ivy-${ivy.version}.jar" usetimestamp="true" />
+        <get src="https://builds.apache.org/pview/job/Ivy/lastSuccessfulBuild/artifact/trunk/build/artifact/jars/ivy.jar" dest="${basedir}/build-deps/ivy-${ivy.version}.jar" usetimestamp="true" />
         <get src="http://antlr.org/download/antlr-3.4-complete.jar" dest="${basedir}/build-deps/antlr-3.4-complete.jar" usetimestamp="true" />
         <get src="http://www.antlr.org/share/1169924912745/antlr3-task.zip" dest="${basedir}/build-deps/antlr3-task.zip" usetimestamp="true" />
         <unzip src="${basedir}/build-deps/antlr3-task.zip" dest="${basedir}/build-deps/" />
+        <get src="https://builds.apache.org/job/Ant_Nightly/lastSuccessfulBuild/artifact/trunk/distribution/binaries/apache-ant-1.9.0alpha-bin.zip" dest="${basedir}/build-deps/apache-ant-1.9.0alpha-bin.zip" usetimestamp="true" />
+        <unzip src="${basedir}/build-deps/apache-ant-1.9.0alpha-bin.zip" dest="${basedir}/build-deps/" />
+        <copy file="${basedir}/build-deps/apache-ant-1.9.0alpha/lib/ant.jar" tofile="${basedir}/org.apache.ant.antdsl/ant.jar" />
     </target>
 
     <target name="init" depends="-download-build-deps">
@@ -31,12 +35,35 @@
         <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${basedir}/build-deps/ivy-${ivy.version}.jar" />
     </target>
 
-    <target name="get-deps" depends="init" description="Download dependencies" >
+    <target name="ivy:configure" depends="init">
         <ivy:configure file="ivysettings.xml" />
-        <ivy:resolve file="ivy.xml" conf="*" />
-        <ivy:retrieve conf="*" pattern="${basedir}/lib/[artifact]_[revision].[ext]" sync="true" />
     </target>
 
+    <target name="get-deps" depends="init,ivy:configure" description="Download dependencies" >
+        <ivy:resolve file="ivy-fixed.xml" conf="*" uncompress="true" />
+        <!--ivy:retrieve conf="*" pattern="${basedir}/lib/[type]s/[artifact]_[revision](.[ext])" sync="true" uncompress="true" /-->
+        <ivy:cachepath pathid="antruntime.classpath.ivy" conf="antruntime" type="jar" uncompress="true" osgi="true" />
+        <ivy:cachepath pathid="generate.classpath.ivy" conf="generate" type="jar" uncompress="true" osgi="true" />
+        <!-- Now we need to hack since we the ant trunk to build -->
+        <path id="antruntime.classpath">
+            <fileset dir="build-deps/apache-ant-1.9.0alpha/lib" includes="*.jar" />
+            <path refid="antruntime.classpath.ivy" />
+        </path>
+        <path id="generate.classpath">
+            <fileset dir="build-deps/apache-ant-1.9.0alpha/lib" includes="*.jar" />
+            <path refid="generate.classpath.ivy" />
+        </path>
+        <echo message="${toString:antruntime.classpath}" file=".antruntime.classpath" />
+        <echo message="${toString:generate.classpath}" file=".generate.classpath" />
+    </target>
+
+    <target name="-do-update-deps" depends="init,ivy:configure">
+        <ivy:resolve file="ivy.xml" conf="*" uncompress="true" resolveId="antdsl-update-deps" />
+        <ivy:fixdeps tofile="ivy-fixed.xml" resolveId="antdsl-update-deps" />
+    </target>
+
+    <target name="update-deps" depends="-do-update-deps,get-deps" description="Update dependencies (to be called on ivy.xml chnage)" />
+
     <target name="clean" description="Clean build artifacts">
         <delete dir="${basedir}/build" />
     </target>
@@ -55,35 +82,20 @@
     </target>
 
     <target name="generate-xtext" description="Generate XText and Ecore files for the full plugin">
+        <loadpath pathid="generate.classpath" file=".generate.classpath" />
         <java classname="org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher" dir="${basedir}/org.apache.ant.antdsl" fork="true" failonerror="true">
             <classpath>
                 <pathelement path="${basedir}/org.apache.ant.antdsl/src/" />
-                <fileset dir="${basedir}/lib" includes="*.jar" />
+                <path refid="generate.classpath" />
             </classpath>
             <arg line="src/org/apache/ant/antdsl/xtext/GenerateAntDSL.mwe2" />
         </java>
     </target>
 
     <target name="build" description="Full build of a antdsl jar">
-        <!--copy todir="${basedir}/build">
-            <zipentry zipfile="${basedir}/lib/org.eclipse.jdt.core_3.7.3.v_OTDT_r202_201202051448.jar" name="jdtCompilerAdapter.jar" />
-        </copy>
-        <componentdef name="jdtCompilerAdapter" classname="org.eclipse.jdt.core.JDTCompilerAdapter">
-            <classpath>
-                <pathelement path="${basedir}/build/jdtCompilerAdapter.jar" />
-                <pathelement path="${basedir}/lib/org.eclipse.jdt.core_3.7.3.v_OTDT_r202_201202051448.jar" />
-            </classpath>
-        </componentdef-->
-        <unzip src="${basedir}/lib/org.apache.ant_1.8.2.v20120109-1030.jar" dest="${basedir}/build/ant" />
+        <loadpath pathid="antruntime.classpath" file=".antruntime.classpath" />
         <mkdir dir="${basedir}/build/classes" />
-        <javac srcdir="${basedir}/org.apache.ant.antdsl/src/:${basedir}/org.apache.ant.antdsl/src-gen/:${basedir}/org.apache.ant.antdsl/xtend-gen" destdir="${basedir}/build/classes" debug="on" includeantruntime="false" source="1.6" target="1.6">
-            <classpath>
-                <fileset dir="${basedir}/lib" includes="*.jar" />
-                <fileset dir="${basedir}/build/ant/lib/" includes="*.jar" />
-            </classpath>
-            <!--jdtCompilerAdapter />
-            <compilerarg line="-proceedOnError" /-->
-        </javac>
+        <javac srcdir="${basedir}/org.apache.ant.antdsl/src/:${basedir}/org.apache.ant.antdsl/src-gen/:${basedir}/org.apache.ant.antdsl/xtend-gen" destdir="${basedir}/build/classes" debug="on" includeantruntime="false" source="1.6" target="1.6" classpathref="antruntime.classpath" />
         <copy todir="${basedir}/build/classes">
             <fileset dir="${basedir}/org.apache.ant.antdsl/src">
                 <exclude name="*.java" />
@@ -100,10 +112,11 @@
     </target>
 
     <target name="test-xtext" description="Test the run of an antdsl file with Xtext-generated parser">
+        <loadpath pathid="antruntime.classpath" file=".antruntime.classpath" />
         <typedef classname="org.apache.ant.antdsl.xtext.AntDslXTextProjectHelper" name="antDslProjectHelper">
             <classpath>
-                <fileset dir="${basedir}/lib" includes="*.jar" />
                 <pathelement path="${basedir}/build/antdsl.jar" />
+                <path refid="antruntime.classpath" />
             </classpath>
         </typedef>
         <projecthelper>
@@ -113,10 +126,11 @@
     </target>
 
     <target name="test-antlr" description="Test the run of an antdsl file with Xtext-generated parser">
+        <loadpath pathid="antruntime.classpath" file=".antruntime.classpath" />
         <typedef classname="org.apache.ant.antdsl.antlr.AntDslAntlrProjectHelper" name="antDslProjectHelper">
             <classpath>
-                <fileset dir="${basedir}/lib" includes="*.jar" />
                 <pathelement path="${basedir}/build/antdsl.jar" />
+                <path refid="antruntime.classpath" />
             </classpath>
         </typedef>
         <projecthelper>
@@ -124,4 +138,21 @@
         </projecthelper>
         <ant antfile="test/build.ant" target="build" />
     </target>
+
+    <macrodef name="loadpath">
+        <attribute name="pathid" />
+        <attribute name="file" />
+        <sequential>
+            <path id="@{pathid}">
+                <resourcelist>
+                    <file file="@{file}" />
+                    <filterchain>
+                        <tokenfilter>
+                            <replacestring from="${path.separator}" to="${line.separator}"/>
+                        </tokenfilter>
+                    </filterchain>
+                </resourcelist>
+            </path>
+        </sequential>
+    </macrodef>
 </project>
\ No newline at end of file

Modified: ant/sandbox/antdsl/branches/import-experiment/doc/index.html
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/doc/index.html?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/doc/index.html (original)
+++ ant/sandbox/antdsl/branches/import-experiment/doc/index.html Tue Aug 21 17:48:14 2012
@@ -26,18 +26,18 @@ namespaces {
 
 {
     prop foo = "hello world!"
-    echo(message="${foo}")
+    echo(message = ${foo})
 }
 
-# Some documentation of the macro
-macrodef mymacro(arg t = "mymacro")
+# Some documentation of the function
+function myfunction(local t = "myfunction")
 {
-    echo(message = "@{t}")
+    echo(message = ${t})
 }
 
-macrodef mymacro2(arg dest, implicit element source)
+function myfunction2(local dest, implicit element source)
 {
-    copy(todir = "@{dest}" {
+    copy(todir = ${dest}, {
         source()
     })
 }
@@ -57,24 +57,24 @@ target notexecuted
 target build
     depends dep, notexecuted
 {
-    copy(file = "${basedir}/test/build.ant", tofile = "${basedir}/build/test/build.ant.copy")
+    copy(file = ${basedir} + "/test/build.ant", tofile = ${basedir} + "/build/test/build.ant.copy")
     // some comment
-    jar(file = "${basedir}/build/test/my.jar" {
-        fileset(dir="${basedir}/test", includes="*.ant")
+    jar(file = ${basedir} + "/build/test/my.jar" {
+        fileset(dir = ${basedir} + "/test", includes = "*.ant")
     })
-    mymacro()
-    mymacro(t = "simple macro")
+    myfunction()
+    myfunction(t = "simple function")
     /*
      * Some multiline comment 
      */
-    if (available(file = "${basedir}/test/build.ant")) {
-        mymacro2(dest = "${basedir}/build/test/dest", {
-            fileset(dir = "${basedir}", includes="build.*")
+    if (available(file = ${basedir} + "/test/build.ant")) {
+        myfunction2(dest = ${basedir} + "/build/test/dest", {
+            fileset(dir = ${basedir}, includes = "build.*")
         })
     } else {
         fail(message = "fail !")
     }
-    if (isset(property = "foo") && !isset(property = "notsetproperty")) {
+    if (isset(property = "foo") &amp;&amp; !isset(property = "notsetproperty")) {
         echo(message = "test ok")
     } else {
         fail(message = "fail !")
@@ -84,16 +84,17 @@ target build
     echo(message = "test encoding\nline")
 
     local test = "hello" + ' ' + "world !"
-    echo(message = "${test}")
+    echo(message = ${test})
     local test2 = ((12345 + 6789) % 98765 == 12.4f)
-    echo(message = "${test2}")
+    echo(message = ${test2})
+    echo(message = eval("${test2}"))
 }
 </pre>
 </p>
 
 <p>
 Here are a screenshot of the Eclipse plugin:
-<center><img src="antdsl.jpeg" /></center>
+<center><img src="antdsl.png" /></center>
 </p>
 
 <h2>Build</h2>

Modified: ant/sandbox/antdsl/branches/import-experiment/ivy.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/ivy.xml?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/ivy.xml (original)
+++ ant/sandbox/antdsl/branches/import-experiment/ivy.xml Tue Aug 21 17:48:14 2012
@@ -1,56 +1,31 @@
 <ivy-module version="2.0">
-    <info organisation="org.apache.ant" module="ant-dsl" />
+    <info organisation="org.apache.ant" module="ant-dsl">
+        <extends organisation="bundle" module="org.apache.ant.antdsl" revision="1.0.0" location="org.apache.ant.antdsl/META-INF/MANIFEST.MF"/>
+    </info>
     <configurations>
-        <conf name="default" extends="antruntime" />
-        <conf name="antruntime" />
-        <conf name="generate" extends="antruntime" />
+        <conf name="antruntime" extends="default" />
+        <conf name="generate" extends="optional" />
     </configurations>
     <dependencies>
-        <!--dependency org="bundle" name="org.eclipse.xtext" rev="2.2.1.v201112130541" conf="default->default" /-->
-        <dependency org="bundle" name="org.apache.ant" rev="1.8.2.v20120109-1030" conf="antruntime->default" transitive="false" />
-        <!--dependency org="bundle" name="org.eclipse.equinox.launcher" rev="1.2.0.v20110502" conf="default->default" /-->
-        <dependency org="bundle" name="org.eclipse.emf.mwe2.launch" rev="2.2.0.v201112071250" conf="antruntime->default" transitive="false" />
-        
-        <dependency org="bundle" name="org.eclipse.xtext" rev="2.2.1.v201112130541" conf="antruntime->default" transitive="false" />
-        <dependency org="bundle" name="com.google.guava" rev="10.0.1.1" conf="antruntime->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.emf.ecore" rev="2.7.0.v20120127-1122" conf="antruntime->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.emf.ecore.xmi" rev="2.7.0.v20120127-1122" conf="antruntime->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.emf.common" rev="2.7.0.v20120127-1122" conf="antruntime->default" transitive="false" />
-        <dependency org="bundle" name="com.google.inject" rev="3.0.0.no_aop" conf="antruntime->default" transitive="false" />
-        <dependency org="bundle" name="org.apache.log4j" rev="1.2.15.v201012070815" conf="antruntime->default" transitive="false" />
-        <dependency org="bundle" name="javax.inject" rev="1.0.0.v20091030" conf="antruntime->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.xtext.util" rev="2.2.1.v201112130541" conf="antruntime->default" transitive="false" />
-        <dependency org="bundle" name="org.antlr.runtime" rev="3.2.0.v201101311130" conf="antruntime->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.xtext.common.types" rev="2.2.1.v201112130541" conf="antruntime->default" transitive="false" />
+        <!-- ambiguity fix -->
+        <dependency org="bundle" name="org.apache.log4j" rev="1.2.15.v201012070815" conf="*->default" />
+        <dependency org="bundle" name="org.apache.commons.logging" rev="1.1.1.v201101211721" conf="*->default" />
+        <dependency org="bundle" name="com.ibm.icu" rev="4.4.2.v20110823" conf="*->default" />
+        <dependency org="bundle" name="org.eclipse.ui.forms" rev="3.5.200.v20120521-2329" conf="*->default" />
 
-        <dependency org="bundle" name="org.apache.commons.cli" rev="1.2.0.v201105210650" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.emf.mwe2.language" rev="2.2.0.v201112071250" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.emf.mwe2.runtime" rev="2.2.0.v201112070431" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.emf.mwe.utils" rev="1.2.1.v201112070431" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.emf.mwe.core" rev="1.2.1.v201112070431" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="org.apache.commons.logging" rev="1.0.4.v201101211617" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.xtext.generator" rev="2.2.1.v201112130541" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.xpand" rev="1.1.0.v201108020519" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.xtend" rev="1.1.0.v201108020519" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.emf.codegen.ecore" rev="2.7.0.v20110913-1156" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.xtext.xbase" rev="2.2.1.v201112130541" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.emf.codegen" rev="2.6.0.v20120130-0943" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.xtext.xbase.lib" rev="2.2.1.v201112130541" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="de.itemis.xtext.antlr" rev="2.0.0.v201108011202" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="com.ibm.icu" rev="4.4.2.v20110823" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.xtend2.lib" rev="2.2.1.v201112130541" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="org.antlr.generator" rev="3.2.0.v201108011202" conf="generate->default" transitive="false" />
-        <dependency org="bundle" name="org.eclipse.emf.mwe2.lib" rev="2.2.0.v201112070431" conf="generate->default" transitive="false" />
-        
-        <!--dependency org="bundle" name="org.eclipse.jdt.core" rev="3.7.3.v20120119-1537" conf="default->default" transitive="false" /-->
+        <!-- some optional dependency we do need -->
+        <dependency org="bundle" name="org.eclipse.emf.mwe2.lib" rev="2.2.0+" conf="generate->default" />
 
-        <exclude org="package" module="org.eclipse.swt.accessibility2" />
-        <exclude org="package" module="org.mozilla.xpcom" />
-        <exclude org="package" module="javax.crypto" />
-        <exclude org="package" module="javax.crypto.spec" />
-        <exclude org="package" module="javax.security.auth" />
-        <exclude org="package" module="javax.security.auth.callback" />
-        <exclude org="package" module="javax.security.auth.login" />
-        <exclude org="package" module="javax.security.auth.spi" />
+        <!-- provided -->
+        <exclude org="package" module="javax.xml.parsers" />
+        <exclude org="package" module="javax.xml.transform" />
+        <exclude org="package" module="javax.xml.transform.dom" />
+        <exclude org="package" module="javax.xml.transform.stream" />
+        <exclude org="package" module="org.xml.sax" />
+        <exclude org="package" module="org.xml.sax.helpers" />
+        <exclude org="package" module="org.xml.sax.ext" />
+        <exclude org="package" module="org.w3c.dom" />
+        <exclude org="package" module="org.w3c.dom.events" />
+        <exclude org="package" module="javax.annotation" />
     </dependencies>
 </ivy-module>

Modified: ant/sandbox/antdsl/branches/import-experiment/ivysettings.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/ivysettings.xml?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/ivysettings.xml (original)
+++ ant/sandbox/antdsl/branches/import-experiment/ivysettings.xml Tue Aug 21 17:48:14 2012
@@ -5,17 +5,17 @@
     <property name="caches.basedir" value="${ivy.default.ivy.user.dir}/repo-caches" />
 
     <caches resolutionCacheDir="${ivy.default.ivy.user.dir}/resolution-cache">
-        <cache name="eclipse-indigo" basedir="${caches.basedir}/eclipse-indigo" />
+        <cache name="eclipse-juno" basedir="${caches.basedir}/eclipse-juno" />
         <cache name="xtext" basedir="${caches.basedir}/xtext" />
     </caches>
 
     <resolvers>
 
-        <updatesite name="eclipse-indigo" url="http://download.eclipse.org/releases/indigo" cache="eclipse-indigo" requirementStrategy="first" />
+        <updatesite name="eclipse-juno" url="http://download.eclipse.org/releases/juno" cache="eclipse-juno" requirementStrategy="first" />
         <updatesite name="xtext" url="http://download.itemis.com/updates/releases" cache="xtext" requirementStrategy="first" />
 
         <chain name="all" returnFirst="true">
-            <resolver ref="eclipse-indigo" />
+            <resolver ref="eclipse-juno" />
             <resolver ref="xtext" />
         </chain>
 

Propchange: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Aug 21 17:48:14 2012
@@ -1 +1,4 @@
 bin
+plugin.xml_gen
+.antlr-generator-3.2.0.jar
+ant.jar

Propchange: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl.tests/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Aug 21 17:48:14 2012
@@ -1 +1,2 @@
 bin
+plugin.xml_gen

Modified: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl.tests/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl.tests/META-INF/MANIFEST.MF?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl.tests/META-INF/MANIFEST.MF (original)
+++ ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl.tests/META-INF/MANIFEST.MF Tue Aug 21 17:48:14 2012
@@ -1,18 +1,25 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: org.apache.ant.antdsl.tests
-Bundle-Vendor: My Company
-Bundle-Version: 1.0.0
-Bundle-SymbolicName: org.apache.ant.antdsl.tests; singleton:=true
-Bundle-ActivationPolicy: lazy
-Require-Bundle: org.apache.ant.antdsl,
- org.apache.ant.antdsl.ui,
- org.eclipse.core.runtime,
- org.eclipse.xtext,
- org.eclipse.xtext.junit4,
- org.eclipse.xtext.ui.junit,
- org.junit4,
- org.eclipse.ui.workbench;resolution:=optional
-Import-Package: org.apache.log4j,
- org.apache.commons.logging
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.apache.ant.antdsl.tests
+Bundle-Vendor: My Company
+Bundle-Version: 1.0.0
+Bundle-SymbolicName: org.apache.ant.antdsl.tests; singleton:=true
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.apache.ant.antdsl,
+ org.apache.ant.antdsl.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.xtext,
+ org.eclipse.xtext.junit4,
+ org.eclipse.xtext.ui.junit,
+ org.junit4,
+ org.eclipse.ui.workbench;resolution:=optional
+Import-Package: org.apache.log4j,
+ org.apache.commons.logging,
+ org.junit.runner;version="4.5.0",
+ org.junit.runner.manipulation;version="4.5.0",
+ org.junit.runner.notification;version="4.5.0",
+ org.junit.runners;version="4.5.0",
+ org.junit.runners.model;version="4.5.0",
+ org.hamcrest.core
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.apache.ant.antdsl.xtext

Propchange: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl.ui/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Aug 21 17:48:14 2012
@@ -1 +1,2 @@
 bin
+plugin.xml_gen

Modified: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl.ui/plugin.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl.ui/plugin.xml?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl.ui/plugin.xml (original)
+++ ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl.ui/plugin.xml Tue Aug 21 17:48:14 2012
@@ -23,42 +23,42 @@
     <extension
             point="org.eclipse.ui.editors">
         <editor
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
             contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
             default="true"
             extensions="ant"
-            id="org.apache.ant.antdsl.AntDSL"
+            id="org.apache.ant.antdsl.xtext.AntDSL"
             name="AntDSL Editor">
         </editor>
     </extension>
     <extension
         point="org.eclipse.ui.handlers">
         <handler
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
             commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
             <activeWhen>
                 <reference
-                    definitionId="org.apache.ant.antdsl.AntDSL.Editor.opened">
+                    definitionId="org.apache.ant.antdsl.xtext.AntDSL.Editor.opened">
                 </reference>
             </activeWhen>
         </handler>
         <handler
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
-            commandId="org.apache.ant.antdsl.AntDSL.validate">
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
+            commandId="org.apache.ant.antdsl.xtext.AntDSL.validate">
          <activeWhen>
             <reference
-                    definitionId="org.apache.ant.antdsl.AntDSL.Editor.opened">
+                    definitionId="org.apache.ant.antdsl.xtext.AntDSL.Editor.opened">
             </reference>
          </activeWhen>
       </handler>
     </extension>
     <extension point="org.eclipse.core.expressions.definitions">
-        <definition id="org.apache.ant.antdsl.AntDSL.Editor.opened">
+        <definition id="org.apache.ant.antdsl.xtext.AntDSL.Editor.opened">
             <and>
                 <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
                 <with variable="activeEditor">
                     <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" 
-                        value="org.apache.ant.antdsl.AntDSL" 
+                        value="org.apache.ant.antdsl.xtext.AntDSL" 
                         forcePluginActivation="true"/>
                 </with>        
             </and>
@@ -67,33 +67,33 @@
     <extension
             point="org.eclipse.ui.preferencePages">
         <page
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
-            id="org.apache.ant.antdsl.AntDSL"
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+            id="org.apache.ant.antdsl.xtext.AntDSL"
             name="AntDSL">
-            <keywordReference id="org.apache.ant.antdsl.ui.keyword_AntDSL"/>
+            <keywordReference id="org.apache.ant.antdsl.xtext.ui.keyword_AntDSL"/>
         </page>
         <page
-            category="org.apache.ant.antdsl.AntDSL"
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
-            id="org.apache.ant.antdsl.AntDSL.coloring"
+            category="org.apache.ant.antdsl.xtext.AntDSL"
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
+            id="org.apache.ant.antdsl.xtext.AntDSL.coloring"
             name="Syntax Coloring">
-            <keywordReference id="org.apache.ant.antdsl.ui.keyword_AntDSL"/>
+            <keywordReference id="org.apache.ant.antdsl.xtext.ui.keyword_AntDSL"/>
         </page>
         <page
-            category="org.apache.ant.antdsl.AntDSL"
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
-            id="org.apache.ant.antdsl.AntDSL.templates"
+            category="org.apache.ant.antdsl.xtext.AntDSL"
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
+            id="org.apache.ant.antdsl.xtext.AntDSL.templates"
             name="Templates">
-            <keywordReference id="org.apache.ant.antdsl.ui.keyword_AntDSL"/>
+            <keywordReference id="org.apache.ant.antdsl.xtext.ui.keyword_AntDSL"/>
         </page>
     </extension>
     <extension
             point="org.eclipse.ui.propertyPages">
         <page
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
-            id="org.apache.ant.antdsl.AntDSL"
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+            id="org.apache.ant.antdsl.xtext.AntDSL"
             name="AntDSL">
-            <keywordReference id="org.apache.ant.antdsl.ui.keyword_AntDSL"/>
+            <keywordReference id="org.apache.ant.antdsl.xtext.ui.keyword_AntDSL"/>
             <enabledWhen>
 	            <adapt type="org.eclipse.core.resources.IProject"/>
 			</enabledWhen>
@@ -103,14 +103,14 @@
     <extension
         point="org.eclipse.ui.keywords">
         <keyword
-            id="org.apache.ant.antdsl.ui.keyword_AntDSL"
+            id="org.apache.ant.antdsl.xtext.ui.keyword_AntDSL"
             label="AntDSL"/>
     </extension>
     <extension
          point="org.eclipse.ui.commands">
       <command
             description="Trigger expensive validation"
-            id="org.apache.ant.antdsl.AntDSL.validate"
+            id="org.apache.ant.antdsl.xtext.AntDSL.validate"
             name="Validate">
       </command>
     </extension>
@@ -118,12 +118,12 @@
         <menuContribution
             locationURI="popup:#TextEditorContext?after=group.edit">
              <command
-                 commandId="org.apache.ant.antdsl.AntDSL.validate"
+                 commandId="org.apache.ant.antdsl.xtext.AntDSL.validate"
                  style="push"
                  tooltip="Trigger expensive validation">
             <visibleWhen checkEnabled="false">
                 <reference
-                    definitionId="org.apache.ant.antdsl.AntDSL.Editor.opened">
+                    definitionId="org.apache.ant.antdsl.xtext.AntDSL.Editor.opened">
                 </reference>
             </visibleWhen>
          </command>  
@@ -133,7 +133,7 @@
 		<menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
 			<command commandId="org.eclipse.xtext.ui.editor.FindReferences">
 				<visibleWhen checkEnabled="false">
-                	<reference definitionId="org.apache.ant.antdsl.AntDSL.Editor.opened">
+                	<reference definitionId="org.apache.ant.antdsl.xtext.AntDSL.Editor.opened">
                 	</reference>
             	</visibleWhen>
 			</command>
@@ -141,11 +141,11 @@
 	</extension>
 	<extension point="org.eclipse.ui.handlers">
 	    <handler
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
             commandId="org.eclipse.xtext.ui.editor.FindReferences">
             <activeWhen>
                 <reference
-                    definitionId="org.apache.ant.antdsl.AntDSL.Editor.opened">
+                    definitionId="org.apache.ant.antdsl.xtext.AntDSL.Editor.opened">
                 </reference>
             </activeWhen>
         </handler>
@@ -156,43 +156,65 @@
 	<extension
 		point="org.eclipse.emf.ecore.extension_parser">
 		<parser
-			class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
+			class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
 			type="ant">
 		</parser>
 	</extension>
 	<extension point="org.eclipse.xtext.extension_resourceServiceProvider">
         <resourceServiceProvider
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
             uriExtension="ant">
         </resourceServiceProvider>
     </extension>
 
 
+    <!-- marker definitions for org.apache.ant.antdsl.xtext.AntDSL -->
+    <extension
+            id="antdsl.check.fast"
+            name="AntDSL Problem"
+            point="org.eclipse.core.resources.markers">
+        <super type="org.eclipse.xtext.ui.check.fast"/>
+        <persistent value="true"/>
+    </extension>
+    <extension
+            id="antdsl.check.normal"
+            name="AntDSL Problem"
+            point="org.eclipse.core.resources.markers">
+        <super type="org.eclipse.xtext.ui.check.normal"/>
+        <persistent value="true"/>
+    </extension>
+    <extension
+            id="antdsl.check.expensive"
+            name="AntDSL Problem"
+            point="org.eclipse.core.resources.markers">
+        <super type="org.eclipse.xtext.ui.check.expensive"/>
+        <persistent value="true"/>
+    </extension>
 
    <extension
          point="org.eclipse.xtext.builder.participant">
       <participant
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant">
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant">
       </participant>
    </extension>
    <extension
             point="org.eclipse.ui.preferencePages">
         <page
-            category="org.apache.ant.antdsl.AntDSL"
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
-            id="org.apache.ant.antdsl.AntDSL.compiler.preferencePage"
+            category="org.apache.ant.antdsl.xtext.AntDSL"
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+            id="org.apache.ant.antdsl.xtext.AntDSL.compiler.preferencePage"
             name="Compiler">
-            <keywordReference id="org.apache.ant.antdsl.ui.keyword_AntDSL"/>
+            <keywordReference id="org.apache.ant.antdsl.xtext.ui.keyword_AntDSL"/>
         </page>
     </extension>
     <extension
             point="org.eclipse.ui.propertyPages">
         <page
-            category="org.apache.ant.antdsl.AntDSL"
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
-            id="org.apache.ant.antdsl.AntDSL.compiler.propertyPage"
+            category="org.apache.ant.antdsl.xtext.AntDSL"
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+            id="org.apache.ant.antdsl.xtext.AntDSL.compiler.propertyPage"
             name="Compiler">
-            <keywordReference id="org.apache.ant.antdsl.ui.keyword_AntDSL"/>
+            <keywordReference id="org.apache.ant.antdsl.xtext.ui.keyword_AntDSL"/>
             <enabledWhen>
 	            <adapt type="org.eclipse.core.resources.IProject"/>
 			</enabledWhen>
@@ -204,11 +226,11 @@
 	<extension
 		point="org.eclipse.ui.handlers">
 		<handler 
-			class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
+			class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
 			commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
 			<activeWhen>
 				<reference
-					definitionId="org.apache.ant.antdsl.AntDSL.Editor.opened">
+					definitionId="org.apache.ant.antdsl.xtext.AntDSL.Editor.opened">
 				</reference>
 			</activeWhen>
 		</handler>
@@ -228,26 +250,47 @@
 				style="push"
 				tooltip="Open Quick Outline">
 				<visibleWhen checkEnabled="false">
-					<reference definitionId="org.apache.ant.antdsl.AntDSL.Editor.opened"/>
+					<reference definitionId="org.apache.ant.antdsl.xtext.AntDSL.Editor.opened"/>
 				</visibleWhen>
 			</command>
 		</menuContribution>
 	</extension>
-   <!-- quickfix marker resolution generator -->
-   <extension
-         point="org.eclipse.ui.ide.markerResolution">
-      <markerResolutionGenerator
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator">
-      </markerResolutionGenerator>
-   </extension>
+    <!-- quickfix marker resolution generator for org.apache.ant.antdsl.xtext.AntDSL -->
+    <extension
+            point="org.eclipse.ui.ide.markerResolution">
+        <markerResolutionGenerator
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+            markerType="org.apache.ant.antdsl.xtext.ui.antdsl.check.fast">
+            <attribute
+                name="FIXABLE_KEY"
+                value="true">
+            </attribute>
+        </markerResolutionGenerator>
+        <markerResolutionGenerator
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+            markerType="org.apache.ant.antdsl.xtext.ui.antdsl.check.normal">
+            <attribute
+                name="FIXABLE_KEY"
+                value="true">
+            </attribute>
+        </markerResolutionGenerator>
+        <markerResolutionGenerator
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+            markerType="org.apache.ant.antdsl.xtext.ui.antdsl.check.expensive">
+            <attribute
+                name="FIXABLE_KEY"
+                value="true">
+            </attribute>
+        </markerResolutionGenerator>
+    </extension>
    	<!-- Rename Refactoring -->
 	<extension point="org.eclipse.ui.handlers">
 		<handler 
-			class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.IRenameElementHandler"
+			class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.IRenameElementHandler"
 			commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
 			<activeWhen>
 				<reference
-					definitionId="org.apache.ant.antdsl.AntDSL.Editor.opened">
+					definitionId="org.apache.ant.antdsl.xtext.AntDSL.Editor.opened">
 				</reference>
 			</activeWhen>
 		</handler>
@@ -259,7 +302,7 @@
                style="push">
             <visibleWhen checkEnabled="false">
                <reference
-                     definitionId="org.apache.ant.antdsl.AntDSL.Editor.opened">
+                     definitionId="org.apache.ant.antdsl.xtext.AntDSL.Editor.opened">
                </reference>
             </visibleWhen>
          </command>
@@ -267,29 +310,29 @@
    </extension>
    <extension point="org.eclipse.ui.preferencePages">
 	    <page
-	        category="org.apache.ant.antdsl.AntDSL"
-	        class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
-	        id="org.apache.ant.antdsl.AntDSL.refactoring"
+	        category="org.apache.ant.antdsl.xtext.AntDSL"
+	        class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
+	        id="org.apache.ant.antdsl.xtext.AntDSL.refactoring"
 	        name="Refactoring">
-	        <keywordReference id="org.apache.ant.antdsl.ui.keyword_AntDSL"/>
+	        <keywordReference id="org.apache.ant.antdsl.xtext.ui.keyword_AntDSL"/>
 	    </page>
 	</extension>
 
   <extension point="org.eclipse.compare.contentViewers">
-    <viewer id="org.apache.ant.antdsl.AntDSL.compare.contentViewers"
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
+    <viewer id="org.apache.ant.antdsl.xtext.AntDSL.compare.contentViewers"
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
             extensions="ant">
     </viewer>
   </extension>
   <extension point="org.eclipse.compare.contentMergeViewers">
-    <viewer id="org.apache.ant.antdsl.AntDSL.compare.contentMergeViewers"
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
+    <viewer id="org.apache.ant.antdsl.xtext.AntDSL.compare.contentMergeViewers"
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
             extensions="ant" label="AntDSL Compare">
      </viewer>
   </extension>
   <extension point="org.eclipse.ui.editors.documentProviders">
-    <provider id="org.apache.ant.antdsl.AntDSL.editors.documentProviders"
-            class="org.apache.ant.antdsl.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
+    <provider id="org.apache.ant.antdsl.xtext.AntDSL.editors.documentProviders"
+            class="org.apache.ant.antdsl.xtext.ui.AntDSLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
             extensions="ant">
     </provider>
   </extension>

Modified: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/.classpath
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/.classpath?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
Binary files - no diff available.

Modified: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/.launch/AntDSL.launch
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/.launch/AntDSL.launch?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
Binary files - no diff available.

Modified: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/.launch/GenerateAntDSL.mwe2.launch
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/.launch/GenerateAntDSL.mwe2.launch?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
Binary files - no diff available.

Modified: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/META-INF/MANIFEST.MF?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/META-INF/MANIFEST.MF (original)
+++ ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/META-INF/MANIFEST.MF Tue Aug 21 17:48:14 2012
@@ -5,8 +5,8 @@ Bundle-Vendor: Apache Software Fundation
 Bundle-Version: 1.0.0
 Bundle-SymbolicName: org.apache.ant.antdsl; singleton:=true
 Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.xtext;bundle-version="2.1.0";visibility:=reexport,
- org.eclipse.xtext.xbase;bundle-version="2.1.0";resolution:=optional;visibility:=reexport,
+Require-Bundle: org.eclipse.xtext;bundle-version="2.3.1";visibility:=reexport,
+ org.eclipse.xtext.xbase;bundle-version="2.3.1";resolution:=optional;visibility:=reexport,
  org.apache.log4j;bundle-version="1.2.15";visibility:=reexport,
  org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional;visibility:=reexport,
  org.eclipse.xtext.generator;resolution:=optional,

Modified: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/plugin.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/plugin.xml?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/plugin.xml (original)
+++ ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/plugin.xml Tue Aug 21 17:48:14 2012
@@ -23,9 +23,9 @@
   <extension point="org.eclipse.emf.ecore.generated_package">
     <package 
        uri = "http://www.apache.org/ant/AntDSL" 
-       class = "org.apache.ant.antdsl.AntdslPackage"
-       genModel = "org/apache/ant/antdsl/AntDSL.genmodel" /> 
-	
+       class = "org.apache.ant.antdsl.xtext.antdsl.AntdslPackage"
+       genModel = "org/apache/ant/antdsl/xtext/AntDSL.genmodel" /> 
+    
   </extension>
 
 

Modified: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/AbstractAntDslProjectHelper.java
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/AbstractAntDslProjectHelper.java?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/AbstractAntDslProjectHelper.java (original)
+++ ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/AbstractAntDslProjectHelper.java Tue Aug 21 17:48:14 2012
@@ -389,7 +389,7 @@ public abstract class AbstractAntDslProj
     }
 
     public UnknownElement mapUnknown(Project project, AntDslContext context, InnerElement innerElement, boolean innerUnknown) {
-        RuntimeConfigurable parentWrapper = context.currentWrapper();
+        RuntimeConfigurable parentWrapper = (RuntimeConfigurable) context.currentWrapper();
         Object parent = null;
 
         if (parentWrapper != null) {
@@ -427,7 +427,7 @@ public abstract class AbstractAntDslProj
         RuntimeConfigurable wrapper = new RuntimeConfigurable(element, element.getTaskName());
 
         if (innerElement.attributes != null) {
-            for (Entry<String, String> att : innerElement.attributes.entrySet()) {
+            for (Entry<String, AntExpression> att : innerElement.attributes.entrySet()) {
                 wrapper.setAttribute(att.getKey(), att.getValue());
             }
         }
@@ -485,7 +485,7 @@ public abstract class AbstractAntDslProj
 
         public String name;
 
-        public LinkedHashMap<String, String> attributes;
+        public LinkedHashMap<String, AntExpression> attributes;
 
         public List<InnerElement> children;
     }

Modified: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/AntDSL.g
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/AntDSL.g?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/AntDSL.g (original)
+++ ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/AntDSL.g Tue Aug 21 17:48:14 2012
@@ -26,16 +26,13 @@ package org.apache.ant.antdsl.antlr;
 
 import org.apache.ant.antdsl.*;
 import org.apache.ant.antdsl.AbstractAntDslProjectHelper.InnerElement;
+import org.apache.ant.antdsl.FunctionDef.LocalProperty;
+import org.apache.ant.antdsl.FunctionDef.NestedSequential;
+import org.apache.ant.antdsl.FunctionDef.TemplateElement;
 import org.apache.ant.antdsl.IfTask.ConditionnalSequential;
-import org.apache.ant.antdsl.Target;
-import org.apache.ant.antdsl.ExtensionPoint;
 import org.apache.ant.antdsl.expr.*;
 import org.apache.tools.ant.*;
 import org.apache.tools.ant.taskdefs.*;
-import org.apache.tools.ant.taskdefs.MacroDef.Attribute;
-import org.apache.tools.ant.taskdefs.MacroDef.NestedSequential;
-import org.apache.tools.ant.taskdefs.MacroDef.TemplateElement;
-import org.apache.tools.ant.taskdefs.MacroDef.Text;
 import org.apache.tools.ant.taskdefs.condition.*;
 import java.util.LinkedHashMap;
 }
@@ -72,7 +69,7 @@ project:
     { for (Task t : tl) { context.getImplicitTarget().addTask(t); } }
     (   target
       | extensionPoint
-      | macrodef
+      | funcdef
     )*
 ;
 
@@ -126,13 +123,13 @@ nsName returns [Pair<String, String> ns 
     (n=identifier { ns.first = n; } ':')? n=identifier { ns.second = n; }
 ;
 
-arguments returns [LinkedHashMap<String, String> args = new LinkedHashMap<String, String>();]:
+arguments returns [LinkedHashMap<String, AntExpression> args = new LinkedHashMap<String, AntExpression>();]:
     arg=argument { args.put(arg.first, arg.second); }
     (',' arg=argument { args.put(arg.first, arg.second); } )*
 ;
 
-argument returns [Pair<String, String> arg = new Pair<String, String>()]:
-    n=identifier { arg.first = n; } '=' v=stringLiteral { arg.second = v; }
+argument returns [Pair<String, AntExpression> arg = new Pair<String, AntExpression>()]:
+    n=identifier { arg.first = n; } '=' v=expr { arg.second = v; }
 ;
 
 innerElements returns [List<InnerElement> ies = new ArrayList<InnerElement>()]:
@@ -188,56 +185,46 @@ conditionedTasks returns [ConditionnalSe
     tl=taskList { for (Task t : tl) { seq.addTask(t); } }
 ;
 
-macrodef returns [MacroDef macroDef = new MacroDef()]:
-    ( d=doc { macroDef.setDescription(d); } )?
-    'macrodef' n=identifier { macroDef.setName(n); }
-    '(' ( atts=attributes
-          {  for (Object att : atts) {
-                if (att instanceof Attribute) {
-                    macroDef.addConfiguredAttribute((Attribute) att);
-                } else if (att instanceof Text) {
-                    macroDef.addConfiguredText((Text) att);
-                } else if (att instanceof TemplateElement) {
-                    macroDef.addConfiguredElement((TemplateElement) att);
+funcdef returns [FunctionDef funcDef = new FunctionDef()]:
+    ( d=doc { funcDef.setDescription(d); } )?
+    'function' n=identifier { funcDef.setName(n); }
+    '(' ( args=funcArguments
+          {  for (Object arg : args) {
+                if (arg instanceof LocalProperty) {
+                    funcDef.addConfiguredLocalProperty((LocalProperty) arg);
+                } else if (arg instanceof TemplateElement) {
+                    funcDef.addConfiguredElement((TemplateElement) arg);
                 } else {
-                    throw new IllegalArgumentException("Unsupported macro attribute " + att.getClass().getName());
+                    throw new IllegalArgumentException("Unsupported function argument " + arg.getClass().getName());
                 }
              }
           } )? ')'
     tl=taskList
     {
-        NestedSequential seq = macroDef.createSequential();
+        NestedSequential seq = funcDef.createSequential();
         for (Task t : tl) { seq.addTask(t); }
-        macroDef.setProject(project);
-        macroDef.execute();
+        funcDef.setProject(project);
+        funcDef.execute();
     }
 ;
 
-attributes returns [List atts = new ArrayList()]:
-    att=attribute { atts.add(att); }
-    (',' att=attribute { atts.add(att); } )*
+funcArguments returns [List args = new ArrayList()]:
+    arg=funcArgument { args.add(arg); }
+    (',' arg=funcArgument { args.add(arg); } )*
 ;
 
-attribute returns [Object att]:
-      aatt=argAttribute { att = aatt; }
-    | tatt=textAttribute { att = tatt; }
-    | eatt=elementAttribute  { att = eatt; }
+funcArgument returns [Object arg]:
+      lparg=localPropFuncArgument { arg = lparg; }
+    | earg=elementFuncArgument  { arg = earg; }
 ;
 
-argAttribute returns [Attribute att = new Attribute()]:
-    'arg'
-    n=identifier { att.setName(n); }
-    ('=' d=stringLiteral { att.setDefault(d); } )?
-;
-
-textAttribute returns [Text text = new Text()]:
-    ('optional' { text.setOptional(true); } )?
-    ('trimmed' { text.setTrim(true); } )?
-    'text'
-    n=identifier { text.setName(n); }
+localPropFuncArgument returns [LocalProperty localProp = new LocalProperty()]:
+    'local'
+    n=identifier { localProp.setName(n); }
+    ('=' d=expr { localProp.setDefault(d); } )?
 ;
 
-elementAttribute returns [TemplateElement element = new TemplateElement()]:
+elementFuncArgument returns [TemplateElement element = new TemplateElement()]:
     ('optional' { element.setOptional(true); } )?
     ('implicit' { element.setImplicit(true); } )?
     'element'

Modified: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/expr/AntExpression.java
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/expr/AntExpression.java?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/expr/AntExpression.java (original)
+++ ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/expr/AntExpression.java Tue Aug 21 17:48:14 2012
@@ -17,9 +17,10 @@
  */
 package org.apache.ant.antdsl.expr;
 
+import org.apache.tools.ant.Evaluable;
 import org.apache.tools.ant.Project;
 
-public abstract class AntExpression {
+public abstract class AntExpression implements Evaluable {
 
     private Project project;
 

Modified: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/xtext/AntDSL.xtext
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/xtext/AntDSL.xtext?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/xtext/AntDSL.xtext (original)
+++ ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/xtext/AntDSL.xtext Tue Aug 21 17:48:14 2012
@@ -30,7 +30,7 @@ EProject:
     )
     ('namespaces' '{' namespaces+=ENamespace* '}')?
     tasks=ETaskLists?
-    (targets+=ETarget | extensionPoints+=EExtensionPoint | macrodDefs+=EMacrodef)*
+    (targets+=ETarget | extensionPoints+=EExtensionPoint | functionDefs+=EFunctionDef)*
 ;
 
 ENamespace:
@@ -79,7 +79,7 @@ EArguments:
 ;
 
 EArgument:
-    name=Identifier '=' value=StringLiteral
+    name=Identifier '=' value=EExpr
 ;
 
 EInnerElements:
@@ -115,30 +115,26 @@ EConditionedTasks:
 ;
 
 ////////////////
-// Macro
+// Functions
 ////////////////
 
-EMacrodef:
-    description=DOC? 'macrodef' name=Identifier '(' attributes=EAttributes? ')' tasks=ETaskLists
+EFunctionDef:
+    description=DOC? 'function' name=Identifier '(' arguments=EFuncArguments? ')' tasks=ETaskLists
 ;
 
-EAttributes:
-    attributes+=EAttribute (',' attributes+=EAttribute)*
+EFuncArguments:
+    arguments+=EFuncArgument (',' arguments+=EFuncArgument)*
 ;
 
-EAttribute:
-    EArgAttribute | ETextAttribute | EElementAttribute
+EFuncArgument:
+    ELocalPropertyFuncArgument | EElementFuncArgument
 ;
 
-EArgAttribute:
-    'arg' name=Identifier ('=' default=StringLiteral)?
+ELocalPropertyFuncArgument:
+    'local' name=Identifier ('=' default=EExpr)?
 ;
 
-ETextAttribute:
-    (optional ?= 'optional')? (trimmed ?= 'trimmed')? 'text' name=Identifier
-;
-
-EElementAttribute:
+EElementFuncArgument:
     (optional ?= 'optional')? (implicit ?= 'implicit')? 'element' name=Identifier
 ;
 

Modified: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/xtext/AntDslXTextProjectHelper.java
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/xtext/AntDslXTextProjectHelper.java?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/xtext/AntDslXTextProjectHelper.java (original)
+++ ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/xtext/AntDslXTextProjectHelper.java Tue Aug 21 17:48:14 2012
@@ -30,10 +30,12 @@ import org.apache.ant.antdsl.AntDslConte
 import org.apache.ant.antdsl.AssignLocalTask;
 import org.apache.ant.antdsl.AssignPropertyTask;
 import org.apache.ant.antdsl.AssignReferenceTask;
-import org.apache.ant.antdsl.ExtensionPoint;
+import org.apache.ant.antdsl.FunctionDef;
+import org.apache.ant.antdsl.FunctionDef.LocalProperty;
+import org.apache.ant.antdsl.FunctionDef.NestedSequential;
+import org.apache.ant.antdsl.FunctionDef.TemplateElement;
 import org.apache.ant.antdsl.IfTask;
 import org.apache.ant.antdsl.IfTask.ConditionnalSequential;
-import org.apache.ant.antdsl.Target;
 import org.apache.ant.antdsl.expr.AddAntExpression;
 import org.apache.ant.antdsl.expr.AndAntExpression;
 import org.apache.ant.antdsl.expr.AntExpression;
@@ -62,11 +64,8 @@ import org.apache.ant.antdsl.expr.Ternar
 import org.apache.ant.antdsl.expr.VariableAntExpression;
 import org.apache.ant.antdsl.xtext.antdsl.EAdditiveExpr;
 import org.apache.ant.antdsl.xtext.antdsl.EAndExpr;
-import org.apache.ant.antdsl.xtext.antdsl.EArgAttribute;
 import org.apache.ant.antdsl.xtext.antdsl.EArgument;
 import org.apache.ant.antdsl.xtext.antdsl.EArguments;
-import org.apache.ant.antdsl.xtext.antdsl.EAttribute;
-import org.apache.ant.antdsl.xtext.antdsl.EAttributes;
 import org.apache.ant.antdsl.xtext.antdsl.EBooleanLiteralExpr;
 import org.apache.ant.antdsl.xtext.antdsl.EBranch;
 import org.apache.ant.antdsl.xtext.antdsl.ECharacterLiteralExpr;
@@ -75,20 +74,23 @@ import org.apache.ant.antdsl.xtext.antds
 import org.apache.ant.antdsl.xtext.antdsl.EConditionnalExclusiveOrExpr;
 import org.apache.ant.antdsl.xtext.antdsl.EConditionnalInclusiveOrExpr;
 import org.apache.ant.antdsl.xtext.antdsl.EDecimalLiteralExpr;
-import org.apache.ant.antdsl.xtext.antdsl.EElementAttribute;
+import org.apache.ant.antdsl.xtext.antdsl.EElementFuncArgument;
 import org.apache.ant.antdsl.xtext.antdsl.EEqualityExpr;
 import org.apache.ant.antdsl.xtext.antdsl.EExclusiveOrExpr;
 import org.apache.ant.antdsl.xtext.antdsl.EExpr;
 import org.apache.ant.antdsl.xtext.antdsl.EExtensionPoint;
 import org.apache.ant.antdsl.xtext.antdsl.EFloatingPointLiteralExpr;
+import org.apache.ant.antdsl.xtext.antdsl.EFuncArgument;
+import org.apache.ant.antdsl.xtext.antdsl.EFuncArguments;
 import org.apache.ant.antdsl.xtext.antdsl.EFuncExpr;
+import org.apache.ant.antdsl.xtext.antdsl.EFunctionDef;
 import org.apache.ant.antdsl.xtext.antdsl.EHexLiteralExpr;
 import org.apache.ant.antdsl.xtext.antdsl.EInclusiveOrExpr;
 import org.apache.ant.antdsl.xtext.antdsl.EInnerElement;
 import org.apache.ant.antdsl.xtext.antdsl.EInnerElements;
 import org.apache.ant.antdsl.xtext.antdsl.EInstanceOfExpr;
 import org.apache.ant.antdsl.xtext.antdsl.ELocalAssignment;
-import org.apache.ant.antdsl.xtext.antdsl.EMacrodef;
+import org.apache.ant.antdsl.xtext.antdsl.ELocalPropertyFuncArgument;
 import org.apache.ant.antdsl.xtext.antdsl.EMultiplicativeExpr;
 import org.apache.ant.antdsl.xtext.antdsl.ENamespace;
 import org.apache.ant.antdsl.xtext.antdsl.ENullExpr;
@@ -104,17 +106,13 @@ import org.apache.ant.antdsl.xtext.antds
 import org.apache.ant.antdsl.xtext.antdsl.ETask;
 import org.apache.ant.antdsl.xtext.antdsl.ETaskLists;
 import org.apache.ant.antdsl.xtext.antdsl.ETernaryExpr;
-import org.apache.ant.antdsl.xtext.antdsl.ETextAttribute;
 import org.apache.ant.antdsl.xtext.antdsl.EUnaryExpr;
 import org.apache.ant.antdsl.xtext.antdsl.EVariableExpr;
 import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.ExtensionPoint;
 import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Target;
 import org.apache.tools.ant.Task;
-import org.apache.tools.ant.taskdefs.MacroDef;
-import org.apache.tools.ant.taskdefs.MacroDef.Attribute;
-import org.apache.tools.ant.taskdefs.MacroDef.NestedSequential;
-import org.apache.tools.ant.taskdefs.MacroDef.TemplateElement;
-import org.apache.tools.ant.taskdefs.MacroDef.Text;
 import org.apache.tools.ant.taskdefs.Sequential;
 import org.apache.tools.ant.taskdefs.condition.And;
 import org.apache.tools.ant.taskdefs.condition.Not;
@@ -171,10 +169,10 @@ public class AntDslXTextProjectHelper ex
             }
         }
 
-        EList<EMacrodef> macros = eProject.getMacrodDefs();
-        if (macros != null) {
-            for (EMacrodef macro : macros) {
-                mapMacro(project, context, macro);
+        EList<EFunctionDef> efuncs = eProject.getFunctionDefs();
+        if (efuncs != null) {
+            for (EFunctionDef efunc : efuncs) {
+                mapFunction(project, context, efunc);
             }
         }
         ETaskLists tasks = eProject.getTasks();
@@ -191,47 +189,40 @@ public class AntDslXTextProjectHelper ex
         }
     }
 
-    private void mapMacro(Project project, AntDslContext context, EMacrodef emacro) {
-        MacroDef macroDef = new MacroDef();
-        macroDef.setDescription(emacro.getDescription());
-        macroDef.setName(readIdentifier(emacro.getName()));
-        EAttributes eatts = emacro.getAttributes();
-        if (eatts != null) {
-            for (EAttribute eatt : eatts.getAttributes()) {
-                if (eatt instanceof EArgAttribute) {
-                    EArgAttribute eargatt = (EArgAttribute) eatt;
-                    Attribute att = new Attribute();
-                    att.setName(readIdentifier(eargatt.getName()));
-                    att.setDefault(readString(eargatt.getDefault()));
-                    macroDef.addConfiguredAttribute(att);
-                } else if (eatt instanceof ETextAttribute) {
-                    ETextAttribute etextatt = (ETextAttribute) eatt;
-                    Text text = new Text();
-                    text.setName(readIdentifier(etextatt.getName()));
-                    text.setTrim(etextatt.isTrimmed());
-                    text.setOptional(etextatt.isOptional());
-                    macroDef.addConfiguredText(text);
-                } else if (eatt instanceof EElementAttribute) {
-                    EElementAttribute eelematt = (EElementAttribute) eatt;
+    private void mapFunction(Project project, AntDslContext context, EFunctionDef efunc) {
+        FunctionDef funcDef = new FunctionDef();
+        funcDef.setDescription(efunc.getDescription());
+        funcDef.setName(readIdentifier(efunc.getName()));
+        EFuncArguments eargs = efunc.getArguments();
+        if (eargs != null) {
+            for (EFuncArgument earg : eargs.getArguments()) {
+                if (earg instanceof ELocalPropertyFuncArgument) {
+                    ELocalPropertyFuncArgument elocalpropatt = (ELocalPropertyFuncArgument) earg;
+                    LocalProperty localProp = new LocalProperty();
+                    localProp.setName(readIdentifier(elocalpropatt.getName()));
+                    localProp.setDefault(mapExpr(project, context, elocalpropatt.getDefault()));
+                    funcDef.addConfiguredLocalProperty(localProp);
+                } else if (earg instanceof EElementFuncArgument) {
+                    EElementFuncArgument eelemarg = (EElementFuncArgument) earg;
                     TemplateElement element = new TemplateElement();
-                    element.setImplicit(eelematt.isImplicit());
-                    element.setOptional(eelematt.isOptional());
-                    element.setName(readIdentifier(eelematt.getName()));
-                    macroDef.addConfiguredElement(element);
+                    element.setImplicit(eelemarg.isImplicit());
+                    element.setOptional(eelemarg.isOptional());
+                    element.setName(readIdentifier(eelemarg.getName()));
+                    funcDef.addConfiguredElement(element);
                 } else {
-                    throw new IllegalArgumentException("Unsupported macro attribute " + eatt.getClass().getName());
+                    throw new IllegalArgumentException("Unsupported function argument " + earg.getClass().getName());
                 }
             }
         }
-        ETaskLists etasks = emacro.getTasks();
+        ETaskLists etasks = efunc.getTasks();
         if (etasks != null) {
-            NestedSequential seq = macroDef.createSequential();
+            NestedSequential seq = funcDef.createSequential();
             for (ETask etask : etasks.getTasks()) {
                 seq.addTask(mapTask(project, context, etask));
             }
         }
-        macroDef.setProject(project);
-        macroDef.execute();
+        funcDef.setProject(project);
+        funcDef.execute();
     }
 
     private Target mapTarget(Project project, AntDslContext context, ETarget eTarget) {
@@ -300,7 +291,7 @@ public class AntDslXTextProjectHelper ex
         }
         if (eTask instanceof EInnerElement) {
             EInnerElement eInnerElement = (EInnerElement) eTask;
-            return mapUnknown(project, context, mapInnerElement(eInnerElement), false);
+            return mapUnknown(project, context, mapInnerElement(project, context, eInnerElement), false);
         }
         if (eTask instanceof EBranch) {
             EBranch eBranch = (EBranch) eTask;
@@ -342,7 +333,7 @@ public class AntDslXTextProjectHelper ex
         throw new IllegalStateException("Unknown task type " + eTask.getClass().getName());
     }
 
-    private InnerElement mapInnerElement(EInnerElement eInnerElement) {
+    private InnerElement mapInnerElement(Project project, AntDslContext context, EInnerElement eInnerElement) {
         if (eInnerElement == null) {
             return null;
         }
@@ -352,9 +343,9 @@ public class AntDslXTextProjectHelper ex
 
         EArguments arguments = eInnerElement.getArguments();
         if (arguments != null) {
-            innerElement.attributes = new LinkedHashMap<String, String>();
+            innerElement.attributes = new LinkedHashMap<String, AntExpression>();
             for (EArgument argument : arguments.getArguments()) {
-                innerElement.attributes.put(readIdentifier(argument.getName()), readString(argument.getValue()));
+                innerElement.attributes.put(readIdentifier(argument.getName()), mapExpr(project, context, argument.getValue()));
             }
         }
 
@@ -362,7 +353,7 @@ public class AntDslXTextProjectHelper ex
         if (inners != null) {
             innerElement.children = new ArrayList<InnerElement>();
             for (EInnerElement inner : inners.getElements()) {
-                innerElement.children.add(mapInnerElement(inner));
+                innerElement.children.add(mapInnerElement(project, context, inner));
             }
         }
 
@@ -596,7 +587,7 @@ public class AntDslXTextProjectHelper ex
         }
         if (eexpr instanceof EInnerElement) {
             EInnerElement elemExpr = (EInnerElement) eexpr;
-            return mapCallAntExpression(project, context, mapInnerElement(elemExpr));
+            return mapCallAntExpression(project, context, mapInnerElement(project, context, elemExpr));
         }
         if (eexpr instanceof EHexLiteralExpr) {
             EHexLiteralExpr eint = (EHexLiteralExpr) eexpr;

Modified: ant/sandbox/antdsl/branches/import-experiment/test/build.ant
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/test/build.ant?rev=1375694&r1=1375693&r2=1375694&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/test/build.ant (original)
+++ ant/sandbox/antdsl/branches/import-experiment/test/build.ant Tue Aug 21 17:48:14 2012
@@ -7,18 +7,18 @@ namespaces {
 
 {
     prop foo = "hello world!"
-    echo(message="${foo}")
+    echo(message = ${foo})
 }
 
-# Some documentation of the macro
-macrodef mymacro(arg t = "mymacro")
+# Some documentation of the function
+function myfunction(local t = "myfunction")
 {
-    echo(message = "@{t}")
+    echo(message = ${t})
 }
 
-macrodef mymacro2(arg dest, implicit element source)
+function myfunction2(local dest, implicit element source)
 {
-    copy(todir = "@{dest}" {
+    copy(todir = ${dest}, {
         source()
     })
 }
@@ -38,19 +38,19 @@ target notexecuted
 target build
     depends dep, notexecuted
 {
-    copy(file = "${basedir}/test/build.ant", tofile = "${basedir}/build/test/build.ant.copy")
+    copy(file = ${basedir} + "/test/build.ant", tofile = ${basedir} + "/build/test/build.ant.copy")
     // some comment
-    jar(file = "${basedir}/build/test/my.jar" {
-        fileset(dir="${basedir}/test", includes="*.ant")
+    jar(file = ${basedir} + "/build/test/my.jar" {
+        fileset(dir = ${basedir} + "/test", includes = "*.ant")
     })
-    mymacro()
-    mymacro(t = "simple macro")
+    myfunction()
+    myfunction(t = "simple function")
     /*
      * Some multiline comment 
      */
-    if (available(file = "${basedir}/test/build.ant")) {
-        mymacro2(dest = "${basedir}/build/test/dest", {
-            fileset(dir = "${basedir}", includes="build.*")
+    if (available(file = ${basedir} + "/test/build.ant")) {
+        myfunction2(dest = ${basedir} + "/build/test/dest", {
+            fileset(dir = ${basedir}, includes = "build.*")
         })
     } else {
         fail(message = "fail !")
@@ -65,7 +65,8 @@ target build
     echo(message = "test encoding\nline")
 
     local test = "hello" + ' ' + "world !"
-    echo(message = "${test}")
+    echo(message = ${test})
     local test2 = ((12345 + 6789) % 98765 == 12.4f)
-    echo(message = "${test2}")
+    echo(message = ${test2})
+    echo(message = eval("${test2}"))
 }



Mime
View raw message