ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1377325 - in /ant/sandbox/antdsl/branches/import-experiment: ./ org.apache.ant.antdsl/ org.apache.ant.antdsl/src/org/apache/ant/antdsl/ org.apache.ant.antdsl/src/org/apache/ant/antdsl/expr/ org.apache.ant.antdsl/xtend-gen/org/apache/ant/an...
Date Sat, 25 Aug 2012 16:59:48 GMT
Author: hibou
Date: Sat Aug 25 16:59:47 2012
New Revision: 1377325

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

........
  r1377323 | hibou | 2012-08-25 18:58:29 +0200 (Sat, 25 Aug 2012) | 3 lines
  
  - add Ant sources, for easier debugging
  - use Ant 1.9 java 5 api
........

Modified:
    ant/sandbox/antdsl/branches/import-experiment/   (props changed)
    ant/sandbox/antdsl/branches/import-experiment/build.xml
    ant/sandbox/antdsl/branches/import-experiment/ivy-fixed.xml
    ant/sandbox/antdsl/branches/import-experiment/ivy.xml
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/   (props changed)
    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/FunctionCall.java
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/expr/IncompatibleTypeException.java
    ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/xtend-gen/org/apache/ant/antdsl/xtext/generator/
  (props changed)

Propchange: ant/sandbox/antdsl/branches/import-experiment/
------------------------------------------------------------------------------
  Merged /ant/sandbox/antdsl/trunk:r1377323

Propchange: ant/sandbox/antdsl/branches/import-experiment/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Aug 25 16:59:47 2012
@@ -1 +1 @@
-/ant/sandbox/antdsl/trunk:1-1375689
+/ant/sandbox/antdsl/trunk:1-1377323

Modified: ant/sandbox/antdsl/branches/import-experiment/build.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/build.xml?rev=1377325&r1=1377324&r2=1377325&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/build.xml (original)
+++ ant/sandbox/antdsl/branches/import-experiment/build.xml Sat Aug 25 16:59:47 2012
@@ -9,6 +9,7 @@
                 <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"
/>
+                <available file="${basedir}/build-deps/apache-ant-1.9.0alpha-src.zip"
/>
             </and>
         </condition>
         <mkdir dir="${user.home}/.ivy2/lib/" />
@@ -21,8 +22,9 @@
         <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" />
+        <get src="https://builds.apache.org/job/Ant_Nightly/lastSuccessfulBuild/artifact/trunk/distribution/source/apache-ant-1.9.0alpha-src.zip"
dest="${basedir}/build-deps/apache-ant-1.9.0alpha-src.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"
/>
+        <unzip src="${basedir}/build-deps/apache-ant-1.9.0alpha-src.zip" dest="${basedir}/build-deps/"
/>
     </target>
 
     <target name="init" depends="-download-build-deps">
@@ -55,6 +57,8 @@
         </path>
         <echo message="${toString:antruntime.classpath}" file=".antruntime.classpath"
/>
         <echo message="${toString:generate.classpath}" file=".generate.classpath" />
+        <copy file="${basedir}/build-deps/apache-ant-1.9.0alpha/lib/ant.jar" tofile="${basedir}/org.apache.ant.antdsl/lib/jars/ant-1.9.0alpha.jar"
/>
+        <jar destfile="${basedir}/org.apache.ant.antdsl/lib/sources/ant-1.9.0alpha.jar"
basedir="${basedir}/build-deps/apache-ant-1.9.0alpha/src/main" />
     </target>
 
     <target name="-do-update-deps" depends="init,ivy:configure">
@@ -69,11 +73,12 @@
     </target>
 
     <target name="clean-gen" description="Clean generate files">
-        <delete>
-            <fileset dir="${basedir}/org.apache.ant.antdsl/src-gen" includes="*"/>
-            <fileset dir="${basedir}/org.apache.ant.antdsl.ui/src-gen" includes="*"/>
-            <fileset dir="${basedir}/org.apache.ant.antdsl.tests/src-gen" includes="*"/>
-        </delete>
+        <delete dir="${basedir}/org.apache.ant.antdsl/src-gen" />
+        <delete dir="${basedir}/org.apache.ant.antdsl.ui/src-gen" />
+        <delete dir="${basedir}/org.apache.ant.antdsl.tests/src-gen" />
+        <mkdir dir="${basedir}/org.apache.ant.antdsl/src-gen" />
+        <mkdir dir="${basedir}/org.apache.ant.antdsl.ui/src-gen" />
+        <mkdir dir="${basedir}/org.apache.ant.antdsl.tests/src-gen" />
     </target>
 
     <target name="generate-antlr" depends="init" description="Generate the simple ANTLR
parser">

Modified: ant/sandbox/antdsl/branches/import-experiment/ivy-fixed.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/ivy-fixed.xml?rev=1377325&r1=1377324&r2=1377325&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/ivy-fixed.xml (original)
+++ ant/sandbox/antdsl/branches/import-experiment/ivy-fixed.xml Sat Aug 25 16:59:47 2012
@@ -4,7 +4,7 @@
 		module="ant-dsl"
 		revision="1.0.0"
 		status="integration"
-		publication="20120821193146"
+		publication="20120825184447"
 	/>
 	<configurations>
 		<conf name="default" visibility="public"/>
@@ -32,7 +32,7 @@
 	<publications>
 	</publications>
 	<dependencies>
-		<dependency org="bundle" name="org.eclipse.xtext" rev="2.3.1.v201208161042" force="true"
transitive="false" conf="use_org.apache.ant.antdsl.xtext.antdsl.util->default;use_org.apache.ant.antdsl.xtext.validation->default;use_org.eclipse.xtend2.lib->default;generate->default;use_org.eclipse.xtext.xbase.lib->default;use_org.apache.log4j->default;use_org.apache.ant.antdsl.xtext.parser.antlr->default;use_org.apache.ant.antdsl.xtext.parser.antlr.internal->default;use_org.apache.ant.antdsl.xtext.scoping->default;use_org.apache.ant.antdsl.xtext.formatting->default;default->default;use_org.apache.ant.antdsl.xtext.serializer->default;use_org.apache.ant.antdsl.xtext.antdsl->default;optional->default;use_org.apache.ant.antdsl.xtext.antdsl.impl->default;use_org.apache.ant.antdsl.xtext.generator->default;transitive-optional->default,optional,transitive-optional;use_org.apache.commons.logging->default;use_org.apache.ant.antdsl.xtext->default;use_org.apache.ant.antdsl.xtext.services->defau
 lt;antruntime->default"/>
+		<dependency org="bundle" name="org.eclipse.xtext" rev="2.3.1.v201208210947" force="true"
transitive="false" conf="use_org.apache.ant.antdsl.xtext.antdsl.util->default;use_org.apache.ant.antdsl.xtext.validation->default;use_org.eclipse.xtend2.lib->default;generate->default;use_org.eclipse.xtext.xbase.lib->default;use_org.apache.log4j->default;use_org.apache.ant.antdsl.xtext.parser.antlr->default;use_org.apache.ant.antdsl.xtext.parser.antlr.internal->default;use_org.apache.ant.antdsl.xtext.scoping->default;use_org.apache.ant.antdsl.xtext.formatting->default;default->default;use_org.apache.ant.antdsl.xtext.serializer->default;use_org.apache.ant.antdsl.xtext.antdsl->default;optional->default;use_org.apache.ant.antdsl.xtext.antdsl.impl->default;use_org.apache.ant.antdsl.xtext.generator->default;transitive-optional->default,optional,transitive-optional;use_org.apache.commons.logging->default;use_org.apache.ant.antdsl.xtext->default;use_org.apache.ant.antdsl.xtext.services->defau
 lt;antruntime->default"/>
 		<dependency org="bundle" name="org.apache.log4j" rev="1.2.15.v201012070815" force="true"
transitive="false" conf="use_org.apache.ant.antdsl.xtext.antdsl.util->default;use_org.apache.ant.antdsl.xtext.validation->default;use_org.eclipse.xtend2.lib->default;generate->default;use_org.eclipse.xtext.xbase.lib->default;use_org.apache.log4j->default;use_org.apache.ant.antdsl.xtext.parser.antlr->default;use_org.apache.ant.antdsl.xtext.parser.antlr.internal->default;use_org.apache.ant.antdsl.xtext.scoping->default;use_org.apache.ant.antdsl.xtext.formatting->default;default->default;use_org.apache.ant.antdsl.xtext.serializer->default;use_org.apache.ant.antdsl.xtext.antdsl->default;optional->default;use_org.apache.ant.antdsl.xtext.antdsl.impl->default;use_org.apache.ant.antdsl.xtext.generator->default;transitive-optional->default;use_org.apache.commons.logging->default;use_org.apache.ant.antdsl.xtext->default;use_org.apache.ant.antdsl.xtext.services->default;antruntime->default"/>
 		<dependency org="bundle" name="org.eclipse.xtext.util" rev="2.3.0.v201206120633" force="true"
transitive="false" conf="use_org.apache.ant.antdsl.xtext.antdsl.util->default;use_org.apache.ant.antdsl.xtext.validation->default;use_org.eclipse.xtend2.lib->default;generate->default;use_org.eclipse.xtext.xbase.lib->default;use_org.apache.log4j->default;use_org.apache.ant.antdsl.xtext.parser.antlr->default;use_org.apache.ant.antdsl.xtext.parser.antlr.internal->default;use_org.apache.ant.antdsl.xtext.scoping->default;use_org.apache.ant.antdsl.xtext.formatting->default;default->default;use_org.apache.ant.antdsl.xtext.serializer->default;use_org.apache.ant.antdsl.xtext.antdsl->default;optional->default;use_org.apache.ant.antdsl.xtext.antdsl.impl->default;use_org.apache.ant.antdsl.xtext.generator->default;transitive-optional->default,optional,transitive-optional;use_org.apache.commons.logging->default;use_org.apache.ant.antdsl.xtext->default;use_org.apache.ant.antdsl.xtext.services->
 default;antruntime->default"/>
 		<dependency org="bundle" name="org.eclipse.emf.ecore" rev="2.8.0.v20120606-0717" force="true"
transitive="false" conf="use_org.apache.ant.antdsl.xtext.antdsl.util->default;use_org.apache.ant.antdsl.xtext.validation->default;use_org.eclipse.xtend2.lib->default;generate->default;use_org.eclipse.xtext.xbase.lib->default;use_org.apache.log4j->default;use_org.apache.ant.antdsl.xtext.parser.antlr->default;use_org.apache.ant.antdsl.xtext.parser.antlr.internal->default;use_org.apache.ant.antdsl.xtext.scoping->default;use_org.apache.ant.antdsl.xtext.formatting->default;default->default;use_org.apache.ant.antdsl.xtext.serializer->default;use_org.apache.ant.antdsl.xtext.antdsl->default;optional->default;use_org.apache.ant.antdsl.xtext.antdsl.impl->default;use_org.apache.ant.antdsl.xtext.generator->default;transitive-optional->default,use_org.eclipse.emf.ecore,use_org.eclipse.emf.ecore.util;use_org.apache.commons.logging->default;use_org.apache.ant.antdsl.xtext->default;use_org.apache
 .ant.antdsl.xtext.services->default;antruntime->default"/>
@@ -62,7 +62,7 @@
 		<dependency org="bundle" name="org.eclipse.jface" rev="3.8.0.v20120521-2329" force="true"
transitive="false" conf="use_org.apache.ant.antdsl.xtext.antdsl.util->default;use_org.apache.ant.antdsl.xtext.validation->default;use_org.eclipse.xtend2.lib->default;generate->default;use_org.eclipse.xtext.xbase.lib->default;use_org.apache.log4j->default;use_org.apache.ant.antdsl.xtext.parser.antlr->default;use_org.apache.ant.antdsl.xtext.parser.antlr.internal->default;use_org.apache.ant.antdsl.xtext.scoping->default;use_org.apache.ant.antdsl.xtext.formatting->default;default->default;use_org.apache.ant.antdsl.xtext.serializer->default;use_org.apache.ant.antdsl.xtext.antdsl->default;optional->default;use_org.apache.ant.antdsl.xtext.antdsl.impl->default;use_org.apache.ant.antdsl.xtext.generator->default;transitive-optional->use_org.eclipse.jface.window,default,use_org.eclipse.jface.bindings.keys.formatting,use_org.eclipse.jface.dialogs,optional,transitive-optional,use_org.eclipse.jface
 .bindings,use_org.eclipse.jface.bindings.keys;use_org.apache.commons.logging->default;use_org.apache.ant.antdsl.xtext->default;use_org.apache.ant.antdsl.xtext.services->default;antruntime->default"/>
 		<dependency org="bundle" name="org.eclipse.swt" rev="3.100.0.v4233d" force="true" transitive="false"
conf="use_org.apache.ant.antdsl.xtext.antdsl.util->default;use_org.apache.ant.antdsl.xtext.validation->default;use_org.eclipse.xtend2.lib->default;generate->default;use_org.eclipse.xtext.xbase.lib->default;use_org.apache.log4j->default;use_org.apache.ant.antdsl.xtext.parser.antlr->default;use_org.apache.ant.antdsl.xtext.parser.antlr.internal->default;use_org.apache.ant.antdsl.xtext.scoping->default;use_org.apache.ant.antdsl.xtext.formatting->default;default->default;use_org.apache.ant.antdsl.xtext.serializer->default;use_org.apache.ant.antdsl.xtext.antdsl->default;optional->default;use_org.apache.ant.antdsl.xtext.antdsl.impl->default;use_org.apache.ant.antdsl.xtext.generator->default;transitive-optional->default;use_org.apache.commons.logging->default;use_org.apache.ant.antdsl.xtext->default;use_org.apache.ant.antdsl.xtext.services->default;antruntime->default"/>
 		<dependency org="bundle" name="org.eclipse.core.commands" rev="3.6.1.v20120521-2332"
force="true" transitive="false" conf="use_org.apache.ant.antdsl.xtext.antdsl.util->default;use_org.apache.ant.antdsl.xtext.validation->default;use_org.eclipse.xtend2.lib->default;generate->default;use_org.eclipse.xtext.xbase.lib->default;use_org.apache.log4j->default;use_org.apache.ant.antdsl.xtext.parser.antlr->default;use_org.apache.ant.antdsl.xtext.parser.antlr.internal->default;use_org.apache.ant.antdsl.xtext.scoping->default;use_org.apache.ant.antdsl.xtext.formatting->default;default->default;use_org.apache.ant.antdsl.xtext.serializer->default;use_org.apache.ant.antdsl.xtext.antdsl->default;optional->default;use_org.apache.ant.antdsl.xtext.antdsl.impl->default;use_org.apache.ant.antdsl.xtext.generator->default;transitive-optional->default,use_org.eclipse.core.commands.common,use_org.eclipse.core.commands;use_org.apache.commons.logging->default;use_org.apache.ant.antdsl.xtext->default;
 use_org.apache.ant.antdsl.xtext.services->default;antruntime->default"/>
-		<dependency org="bundle" name="org.eclipse.xtext.xbase" rev="2.3.1.v201208161042" force="true"
transitive="false" conf="generate->default;optional->default;transitive-optional->default,optional,transitive-optional"/>
+		<dependency org="bundle" name="org.eclipse.xtext.xbase" rev="2.3.1.v201208210947" force="true"
transitive="false" conf="generate->default;optional->default;transitive-optional->default,optional,transitive-optional"/>
 		<dependency org="bundle" name="org.eclipse.xtext.generator" rev="2.3.0.v201206120633"
force="true" transitive="false" conf="generate->default;optional->default;transitive-optional->default,optional,transitive-optional"/>
 		<dependency org="bundle" name="org.eclipse.emf.codegen.ecore" rev="2.8.0.v20120608-0554"
force="true" transitive="false" conf="generate->default;optional->default;transitive-optional->default,optional,transitive-optional"/>
 		<dependency org="bundle" name="org.eclipse.emf.mwe.utils" rev="1.2.1.v201206110920"
force="true" transitive="false" conf="generate->default,use_org.eclipse.emf.mwe.utils;optional->default,use_org.eclipse.emf.mwe.utils;transitive-optional->default,use_org.eclipse.emf.mwe.utils,optional,transitive-optional"/>

Modified: ant/sandbox/antdsl/branches/import-experiment/ivy.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/ivy.xml?rev=1377325&r1=1377324&r2=1377325&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/ivy.xml (original)
+++ ant/sandbox/antdsl/branches/import-experiment/ivy.xml Sat Aug 25 16:59:47 2012
@@ -8,10 +8,10 @@
     </configurations>
     <dependencies>
         <!-- 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.log4j" rev="1.2.15.v201012070815" conf="default->default"
/>
+        <dependency org="bundle" name="org.apache.commons.logging" rev="1.1.1.v201101211721"
conf="default->default" />
+        <dependency org="bundle" name="com.ibm.icu" rev="4.4.2.v20110823" conf="default->default"
/>
+        <dependency org="bundle" name="org.eclipse.ui.forms" rev="3.5.200.v20120521-2329"
conf="default->default" />
 
         <!-- some optional dependency we do need -->
         <dependency org="bundle" name="org.eclipse.emf.mwe2.lib" rev="2.2.0+" conf="generate->default"
/>

Propchange: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Aug 25 16:59:47 2012
@@ -1,4 +1,5 @@
 bin
 plugin.xml_gen
 .antlr-generator-3.2.0.jar
-ant.jar
+lib
+

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=1377325&r1=1377324&r2=1377325&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
Sat Aug 25 16:59:47 2012
@@ -21,6 +21,7 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.Hashtable;
@@ -30,6 +31,8 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Stack;
+import java.util.UUID;
 import java.util.Vector;
 
 import org.apache.ant.antdsl.expr.AntExpression;
@@ -42,17 +45,22 @@ import org.apache.tools.ant.MagicNames;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.ProjectComponent;
 import org.apache.tools.ant.ProjectHelper;
+import org.apache.tools.ant.ProjectHelperRepository;
 import org.apache.tools.ant.RuntimeConfigurable;
 import org.apache.tools.ant.Target;
 import org.apache.tools.ant.Task;
 import org.apache.tools.ant.UnknownElement;
 import org.apache.tools.ant.helper.AntXMLContext;
+import org.apache.tools.ant.taskdefs.Taskdef;
 import org.apache.tools.ant.taskdefs.condition.Condition;
+import org.apache.tools.ant.types.Path;
 import org.apache.tools.ant.types.Resource;
 import org.apache.tools.ant.types.resources.FileProvider;
 import org.apache.tools.ant.types.resources.URLProvider;
+import org.apache.tools.ant.types.resources.URLResource;
 import org.apache.tools.ant.util.FileUtils;
 import org.apache.tools.zip.ZipFile;
+import org.osgi.framework.BundleException;
 
 public abstract class AbstractAntDslProjectHelper extends ProjectHelper {
 
@@ -69,18 +77,17 @@ public abstract class AbstractAntDslProj
     }
 
     public void parse(Project project, Object source) throws BuildException {
-        @SuppressWarnings("unchecked")
         Vector<Object> stack = getImportStack();
         stack.addElement(source);
 
         AntDslContext context = null;
-        context = (AntDslContext) project.getReference(REFID_CONTEXT);
+        context = project.getReference(REFID_CONTEXT);
         if (context == null) {
             context = new AntDslContext(project);
             project.addReference(REFID_CONTEXT, context);
         }
 
-        FunctionRegistry functionRegistry = (FunctionRegistry) project.getReference(REFID_FUNCTION_REGISTRY);
+        FunctionRegistry functionRegistry = project.getReference(REFID_FUNCTION_REGISTRY);
         if (functionRegistry == null) {
             functionRegistry = new FunctionRegistry();
             project.addReference(REFID_FUNCTION_REGISTRY, functionRegistry);
@@ -114,12 +121,11 @@ public abstract class AbstractAntDslProj
             context.getImplicitTarget().execute();
 
             // resolve extensionOf attributes
-            for (Iterator i = getExtensionStack().iterator(); i.hasNext();) {
-                String[] extensionInfo = (String[]) i.next();
+            for (String[] extensionInfo : getExtensionStack()) {
                 String tgName = extensionInfo[0];
                 String name = extensionInfo[1];
                 OnMissingExtensionPoint missingBehaviour = OnMissingExtensionPoint.valueOf(extensionInfo[2]);
-                Hashtable projectTargets = project.getTargets();
+                Hashtable<String, Target> projectTargets = project.getTargets();
                 if (!projectTargets.containsKey(tgName)) {
                     String message = "can't add target " + name + " to extension-point "
+ tgName + " because the extension-point is unknown.";
                     if (missingBehaviour == OnMissingExtensionPoint.FAIL) {
@@ -333,7 +339,7 @@ public abstract class AbstractAntDslProj
         if (context.getCurrentTargets().get(name) != null) {
             throw new BuildException("Duplicate target '" + name + "'", target.getLocation());
         }
-        Hashtable projectTargets = project.getTargets();
+        Hashtable<String, Target> projectTargets = project.getTargets();
         boolean usedTarget = false;
         // If the name has not already been defined define it
         if (projectTargets.containsKey(name)) {
@@ -368,7 +374,7 @@ public abstract class AbstractAntDslProj
             throw new BuildException("onMissingExtensionPoint attribute cannot be specified
unless extensionOf is specified", target.getLocation());
         }
         if (extensionsOf != null) {
-            ProjectHelper helper = (ProjectHelper) context.getProject().getReference(ProjectHelper.PROJECTHELPER_REFERENCE);
+            ProjectHelper helper = context.getProject().getReference(ProjectHelper.PROJECTHELPER_REFERENCE);
             for (String extensionOf : extensionsOf) {
                 if (isInIncludeMode()) {
                     extensionOf = prefix + sep + extensionOf;
@@ -448,6 +454,17 @@ public abstract class AbstractAntDslProj
     }
 
     public AntExpression mapCallAntExpression(Project project, AntDslContext context, InnerElement
eInnerElement) {
+        ProjectComponent component = configureInnerElement(project, context, eInnerElement);
+        if (component == null) {
+            return null;
+        }
+        if (component instanceof Condition) {
+            return condition2Expression((Condition) component);
+        }
+        throw new BuildException("Unsupported type of ant expression call " + component.getClass().getName());
+    }
+
+    private ProjectComponent configureInnerElement(Project project, AntDslContext context,
InnerElement eInnerElement) {
         if (eInnerElement == null) {
             return null;
         }
@@ -462,10 +479,7 @@ public abstract class AbstractAntDslProj
 
         ProjectComponentContainer container = new ProjectComponentContainer();
         element.configure(container);
-        if (container.component instanceof Condition) {
-            return condition2Expression((Condition) container.component);
-        }
-        throw new BuildException("Unsupported type of ant expression call " + container.component.getClass().getName());
+        return container.component;
     }
 
     public static class ProjectComponentContainer {
@@ -507,7 +521,7 @@ public abstract class AbstractAntDslProj
         if (s == null) {
             return null;
         }
-        if (s.charAt(1) == '{' || s.charAt(1) == '`' ) {
+        if (s.charAt(1) == '{' || s.charAt(1) == '`') {
             // remove the lead $ and the enclosing characters
             s = s.substring(2, s.length() - 1);
         } else {

Modified: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/FunctionCall.java
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/FunctionCall.java?rev=1377325&r1=1377324&r2=1377325&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/FunctionCall.java
(original)
+++ ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/FunctionCall.java
Sat Aug 25 16:59:47 2012
@@ -163,7 +163,6 @@ public class FunctionCall extends Task i
             rc.setAttribute(entry.getKey(), entry.getValue());
         }
 
-        @SuppressWarnings("unchecked")
         Enumeration<RuntimeConfigurable> e = ue.getWrapper().getChildren();
         while (e.hasMoreElements()) {
             RuntimeConfigurable r = e.nextElement();
@@ -194,7 +193,6 @@ public class FunctionCall extends Task i
                     }
                     continue;
                 }
-                @SuppressWarnings("unchecked")
                 List<UnknownElement> list = presentElement.getChildren();
                 if (list != null) {
                     for (UnknownElement elem : list) {

Modified: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/expr/IncompatibleTypeException.java
URL: http://svn.apache.org/viewvc/ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/expr/IncompatibleTypeException.java?rev=1377325&r1=1377324&r2=1377325&view=diff
==============================================================================
--- ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/expr/IncompatibleTypeException.java
(original)
+++ ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/src/org/apache/ant/antdsl/expr/IncompatibleTypeException.java
Sat Aug 25 16:59:47 2012
@@ -21,6 +21,8 @@ import org.apache.tools.ant.BuildExcepti
 
 public class IncompatibleTypeException extends BuildException {
 
+    private static final long serialVersionUID = 1L;
+
     private final String name;
 
     private final String t1;

Propchange: ant/sandbox/antdsl/branches/import-experiment/org.apache.ant.antdsl/xtend-gen/org/apache/ant/antdsl/xtext/generator/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Aug 25 16:59:47 2012
@@ -0,0 +1 @@
+.AntDSLGenerator.java._trace



Mime
View raw message