4 spaces in place of tabulations
authorNicolas Lalevee <hibou@apache.org>
Tue, 22 Feb 2011 15:09:30 +0000 (15:09 +0000)
committerNicolas Lalevee <hibou@apache.org>
Tue, 22 Feb 2011 15:09:30 +0000 (15:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/easyant/easyant4e/trunk@1073358 13f79535-47bb-0310-9956-ffa450edef68

63 files changed:
org.apache.easyant4e.releng/build-files/allElements.xml
org.apache.easyant4e.releng/build-files/automatedTests/run-tests.properties
org.apache.easyant4e.releng/build-files/automatedTests/run-tests.xml
org.apache.easyant4e.releng/build-files/build.properties
org.apache.easyant4e.releng/build-files/build_rcp.properties
org.apache.easyant4e.releng/build-files/build_shared.xml
org.apache.easyant4e.releng/build-files/customTargets.xml
org.apache.easyant4e.releng/build-files/fetchSvnAll.xml
org.apache.easyant4e.releng/build-files/postBuild.xml
org.apache.easyant4e.releng/build-files/subversionSupport.xml
org.apache.easyant4e.releng/build.properties
org.apache.easyant4e.releng/build.xml
org.apache.easyant4e.releng/build_local.properties
org.apache.easyant4e.releng/build_shared.xml
org.apache.easyant4e.tests/datas/simplejavaproject/module.ivy
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/AbstractEasyAntTest.java
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EasyAntAllTests.java
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EasyantCoreServiceTest.java
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EasyantProjectServiceTest.java
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/EclipseProjectBuilder.java
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/ExtensionRegistryTest.java
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/ImportProjectTest.java
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/StartupTest.java
org.apache.easyant4e.tests/src/org/apache/easyant4e/tests/TestPlugin.java
org.apache.easyant4e/plugin.xml
org.apache.easyant4e/src/ivysettings-remote.xml
org.apache.easyant4e/src/ivysettings.xml
org.apache.easyant4e/src/org/apache/easyant4e/Activator.java
org.apache.easyant4e/src/org/apache/easyant4e/EasyAntConstants.java
org.apache.easyant4e/src/org/apache/easyant4e/EasyAntPlugin.java
org.apache.easyant4e/src/org/apache/easyant4e/Startup.java
org.apache.easyant4e/src/org/apache/easyant4e/builders/EasyAntBuilder.java
org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsole.java
org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleFactory.java
org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleImpl.java
org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsolePageParticipant.java
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/RepositoryInstaller.java
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/model/EasyAntModuleDescriptorExtension.java
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifeCycleContentProvider.java
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifecycleBlock.java
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifecycleLabelProvider.java
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildPage.java
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/PhaseDetailsPage.java
org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/TargetDetailsPage.java
org.apache.easyant4e/src/org/apache/easyant4e/modules/EasyAnt4EclipseModule.java
org.apache.easyant4e/src/org/apache/easyant4e/modules/EasyAntCoreModule.java
org.apache.easyant4e/src/org/apache/easyant4e/natures/AddEasyAntNatureAction.java
org.apache.easyant4e/src/org/apache/easyant4e/natures/AddEasyAntNatureOperation.java
org.apache.easyant4e/src/org/apache/easyant4e/natures/EasyAntNature.java
org.apache.easyant4e/src/org/apache/easyant4e/natures/RemoveEasyAntNatureAction.java
org.apache.easyant4e/src/org/apache/easyant4e/natures/RemoveEasyAntNatureOperation.java
org.apache.easyant4e/src/org/apache/easyant4e/providers/ImageProvider.java
org.apache.easyant4e/src/org/apache/easyant4e/providers/ImageProviderImpl.java
org.apache.easyant4e/src/org/apache/easyant4e/services/EasyantCoreService.java
org.apache.easyant4e/src/org/apache/easyant4e/services/EasyantCoreServiceImpl.java
org.apache.easyant4e/src/org/apache/easyant4e/services/EasyantProjectService.java
org.apache.easyant4e/src/org/apache/easyant4e/services/EasyantProjectServiceImpl.java
org.apache.easyant4e/src/org/apache/easyant4e/wizards/EasyAntImportWizard.java
org.apache.easyant4e/src/org/apache/easyant4e/wizards/EasyAntImportWizardPage.java
org.apache.easyant4e/src/org/apache/easyant4e/wizards/ProjectRecord.java
quality/checkstyle/checkstyle-suppress.xml
quality/checkstyle/checkstyle-text.xsl
quality/checkstyle/checkstyle-xdoc.xsl

index 24abb20..f850ea7 100644 (file)
 -->
 <project name="allElements delegation and assemble customTargets.xml">
 <!-- FILE WILL BE OVERWRITTEN WHEN GENERATED -->
-       <target name="allElementsExceptSvnFetch" unless="is.svn.fetch">
-               <antcall target="norcpbuild"/>
-               <antcall target="rcpbuild"/>
+    <target name="allElementsExceptSvnFetch" unless="is.svn.fetch">
+        <antcall target="norcpbuild"/>
+        <antcall target="rcpbuild"/>
+    </target>
+    
+    <target name="norcpbuild" unless="build.container.feature">
+        <ant antfile="${genericTargets}" target="${target}">
+            <property name="type" value="feature" />
+            <property name="id" value="org.apache.easyant4e.feature" />
+        </ant>
+        
     </target>
-       
-       <target name="norcpbuild" unless="build.container.feature">
-               <ant antfile="${genericTargets}" target="${target}">
-                       <property name="type" value="feature" />
-                       <property name="id" value="org.apache.easyant4e.feature" />
-               </ant>
-               
-       </target>
 
-       <target name="rcpbuild" if="build.container.feature">
-               <ant antfile="${genericTargets}" target="${target}">
-                       <property name="type" value="feature" />
-                       <property name="id" value="org.eclipse.pde.build.container.feature" />
-               </ant>
-       </target>
-       
-       <!-- generated assemble targets -->          
-       <target name="assemble.org.apache.easyant4e.feature">
-               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">
-                       <property name="zipargs" value="" />
-               </ant>
-       </target>
+    <target name="rcpbuild" if="build.container.feature">
+        <ant antfile="${genericTargets}" target="${target}">
+            <property name="type" value="feature" />
+            <property name="id" value="org.eclipse.pde.build.container.feature" />
+        </ant>
+    </target>
+    
+    <!-- generated assemble targets -->      
+    <target name="assemble.org.apache.easyant4e.feature">
+        <ant antfile="${assembleScriptName}" dir="${buildDirectory}">
+            <property name="zipargs" value="" />
+        </ant>
+    </target>
 
-       
-       <!-- assmble targets for RCP build -->  
-       <target name="assemble.org.eclipse.pde.build.container.feature.win32.win32.x86">
-               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
-                       <property name="archiveName" value="${archiveNamePrefix}-win32.win32.x86.zip"/>
-               </ant>
-       </target>
-       <target name="assemble.org.eclipse.pde.build.container.feature.linux.gtk.x86">
-               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
-                       <property name="archiveName" value="${archiveNamePrefix}-linux.gtk.x86.zip"/>
-               </ant>
-       </target>
-       <target name="assemble.org.eclipse.pde.build.container.feature.linux.gtk.ppc">
-               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
-                       <property name="archiveName" value="${archiveNamePrefix}-linux.gtk.ppc.zip"/>
-               </ant>
-       </target>
-       <target name="assemble.org.eclipse.pde.build.container.feature.linux.gtk.x86_64">
-               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
-                       <property name="archiveName" value="${archiveNamePrefix}-linux.gtk.x86_64.zip"/>
-               </ant>
-       </target>
-       <target name="assemble.org.eclipse.pde.build.container.feature.linux.motif.x86">
-               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
-                       <property name="archiveName" value="${archiveNamePrefix}-linux.motif.x86.zip"/>
-               </ant>
-       </target>
-       <target name="assemble.org.eclipse.pde.build.container.feature.solaris.motif.sparc">
-               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
-                       <property name="archiveName" value="${archiveNamePrefix}-solaris.motif.sparc.zip"/>
-               </ant>
-       </target>
-       <target name="assemble.org.eclipse.pde.build.container.feature.solaris.gtk.sparc">
-               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
-                       <property name="archiveName" value="${archiveNamePrefix}-solaris.gtk.sparc.zip"/>
-               </ant>
-       </target>
-       <target name="assemble.org.eclipse.pde.build.container.feature.aix.motif.ppc">
-               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
-                       <property name="archiveName" value="${archiveNamePrefix}-aix.motif.ppc.zip"/>
-               </ant>
-       </target>
-       <target name="assemble.org.eclipse.pde.build.container.feature.hpux.motif.PA_RISC">
-               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
-                       <property name="archiveName" value="${archiveNamePrefix}-hpux.motif.PA_RISC.zip"/>
-               </ant>
-       </target>
-       <target name="assemble.org.eclipse.pde.build.container.feature.macosx.carbon.ppc">
-               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
-                       <property name="archiveName" value="${archiveNamePrefix}-macosx.carbon.ppc.zip"/>
-               </ant>
-       </target>
-       <target name="assemble.org.eclipse.pde.build.container.feature.macosx.carbon.x86">
-               <ant antfile="${assembleScriptName}" dir="${buildDirectory}">                   
-                       <property name="archiveName" value="${archiveNamePrefix}-macosx.carbon.x86.zip"/>
-               </ant>
-       </target>       
-</project>
\ No newline at end of file
+    
+    <!-- assmble targets for RCP build -->  
+    <target name="assemble.org.eclipse.pde.build.container.feature.win32.win32.x86">
+        <ant antfile="${assembleScriptName}" dir="${buildDirectory}">           
+            <property name="archiveName" value="${archiveNamePrefix}-win32.win32.x86.zip"/>
+        </ant>
+    </target>
+    <target name="assemble.org.eclipse.pde.build.container.feature.linux.gtk.x86">
+        <ant antfile="${assembleScriptName}" dir="${buildDirectory}">           
+            <property name="archiveName" value="${archiveNamePrefix}-linux.gtk.x86.zip"/>
+        </ant>
+    </target>
+    <target name="assemble.org.eclipse.pde.build.container.feature.linux.gtk.ppc">
+        <ant antfile="${assembleScriptName}" dir="${buildDirectory}">           
+            <property name="archiveName" value="${archiveNamePrefix}-linux.gtk.ppc.zip"/>
+        </ant>
+    </target>
+    <target name="assemble.org.eclipse.pde.build.container.feature.linux.gtk.x86_64">
+        <ant antfile="${assembleScriptName}" dir="${buildDirectory}">           
+            <property name="archiveName" value="${archiveNamePrefix}-linux.gtk.x86_64.zip"/>
+        </ant>
+    </target>
+    <target name="assemble.org.eclipse.pde.build.container.feature.linux.motif.x86">
+        <ant antfile="${assembleScriptName}" dir="${buildDirectory}">           
+            <property name="archiveName" value="${archiveNamePrefix}-linux.motif.x86.zip"/>
+        </ant>
+    </target>
+    <target name="assemble.org.eclipse.pde.build.container.feature.solaris.motif.sparc">
+        <ant antfile="${assembleScriptName}" dir="${buildDirectory}">           
+            <property name="archiveName" value="${archiveNamePrefix}-solaris.motif.sparc.zip"/>
+        </ant>
+    </target>
+    <target name="assemble.org.eclipse.pde.build.container.feature.solaris.gtk.sparc">
+        <ant antfile="${assembleScriptName}" dir="${buildDirectory}">           
+            <property name="archiveName" value="${archiveNamePrefix}-solaris.gtk.sparc.zip"/>
+        </ant>
+    </target>
+    <target name="assemble.org.eclipse.pde.build.container.feature.aix.motif.ppc">
+        <ant antfile="${assembleScriptName}" dir="${buildDirectory}">           
+            <property name="archiveName" value="${archiveNamePrefix}-aix.motif.ppc.zip"/>
+        </ant>
+    </target>
+    <target name="assemble.org.eclipse.pde.build.container.feature.hpux.motif.PA_RISC">
+        <ant antfile="${assembleScriptName}" dir="${buildDirectory}">           
+            <property name="archiveName" value="${archiveNamePrefix}-hpux.motif.PA_RISC.zip"/>
+        </ant>
+    </target>
+    <target name="assemble.org.eclipse.pde.build.container.feature.macosx.carbon.ppc">
+        <ant antfile="${assembleScriptName}" dir="${buildDirectory}">           
+            <property name="archiveName" value="${archiveNamePrefix}-macosx.carbon.ppc.zip"/>
+        </ant>
+    </target>
+    <target name="assemble.org.eclipse.pde.build.container.feature.macosx.carbon.x86">
+        <ant antfile="${assembleScriptName}" dir="${buildDirectory}">           
+            <property name="archiveName" value="${archiveNamePrefix}-macosx.carbon.x86.zip"/>
+        </ant>
+    </target>   
+</project>
index 8aceafe..10fc266 100644 (file)
@@ -86,7 +86,7 @@ autotestsuite.class.exclusions=
 # only necessary if you want to use the Eclipse test framework to run your test. If you
 # run the tests with the autotestsuite (i.e. you use the include/exclude filters below)
 # this property is not being used.
-# @category testHidden 
+# @category testHidden  
 test.library.xml=${test.eclipseExtensionDirectory}/plugins/org.eclipse.test_3.1.0/library.xml
 
 # Enablement for code coverage.
@@ -103,4 +103,4 @@ pluginbuilder.coverage.inclusionfilter=
 
 # Place for runtime data.
 # @category coverageHidden
-emma.coverage.output=${buildDirectory}/coverage.ec
\ No newline at end of file
+emma.coverage.output=${buildDirectory}/coverage.ec
index b35793f..ec5dcbe 100644 (file)
    limitations under the License.
 -->
 <project name="Run automated Tests" default="run" basedir=".">
-       <taskdef resource="org/pluginbuilder/anttasks/pluginbuildertasks.properties" classpath="../pluginbuilder-anttasks.jar" />
-       <typedef resource="org/pluginbuilder/anttasks/pluginbuildertypes.properties" classpath="../pluginbuilder-anttasks.jar" />
+    <taskdef resource="org/pluginbuilder/anttasks/pluginbuildertasks.properties" classpath="../pluginbuilder-anttasks.jar" />
+    <typedef resource="org/pluginbuilder/anttasks/pluginbuildertypes.properties" classpath="../pluginbuilder-anttasks.jar" />
 
-       <GetHostName />
-       <property file="../../build_${hostname}.properties" />
-       <property file="../../build_local.properties" />
-       <property file="run-tests.properties" />
-       <property name="test.eclipse.host.eclipse" value="${test.eclipse.host}/eclipse" />
+    <GetHostName />
+    <property file="../../build_${hostname}.properties" />
+    <property file="../../build_local.properties" />
+    <property file="run-tests.properties" />
+    <property name="test.eclipse.host.eclipse" value="${test.eclipse.host}/eclipse" />
 
-       <import file="../build_shared.xml" />
-       
-       <condition property="is.emma">
-               <equals arg1="${pluginbuilder.is.runcoverage}" arg2="true"/>
-       </condition>
-       
-       <target name="-init" depends="-emmaInit">
-               <antcall target="-unpackEclipse"/>
-               <antcall target="-installEclipseExtensionLocation"/>
-               <antcall target="umAddSite" />
-               <!-- Useful for debugging 
-               <antcall target="umListFeaturesSite" />
-               -->
-       </target>
+    <import file="../build_shared.xml" />
+    
+    <condition property="is.emma">
+        <equals arg1="${pluginbuilder.is.runcoverage}" arg2="true"/>
+    </condition>
+    
+    <target name="-init" depends="-emmaInit">
+        <antcall target="-unpackEclipse"/>
+        <antcall target="-installEclipseExtensionLocation"/>
+        <antcall target="umAddSite" />
+        <!-- Useful for debugging 
+        <antcall target="umListFeaturesSite" />
+        -->
+    </target>
 
-       <target name="-installEclipseExtensionLocation">
-               <echo message="Installing plug-ins for testing into eclipse extension location" />
-               <mkdir dir="${test.eclipseExtensionDirectory}"/>
-               <condition property="buildResultZipDest" value="${test.eclipseExtensionDirectory}/.." else="${test.eclipseExtensionDirectory}">
-                       <equals arg1="${archivePrefix}" arg2="eclipse" />
-               </condition>
-               <unzip dest="${buildResultZipDest}">
-                       <fileset dir="${buildDirectory}" includes="${buildType}-**/*.zip" excludes="**/${archiveNamePrefix}-*"/>
-               </unzip>
-               <antcall target="-emmaInstrument"/>
-               <unzip dest="${test.eclipseExtensionDirectory}/..">
-                       <fileset dir="." includes="eclipse-test-framework*.zip" />
-               </unzip>
-               <unzip dest="${test.eclipseExtensionDirectory}">
-                       <fileset dir="." includes="org.pluginbuilder.autotestsuite*.zip" />
-               </unzip>
-               <echo file="${test.eclipseExtensionDirectory}/.eclipseextension">id=org.eclipse.platform
+    <target name="-installEclipseExtensionLocation">
+        <echo message="Installing plug-ins for testing into eclipse extension location" />
+        <mkdir dir="${test.eclipseExtensionDirectory}"/>
+        <condition property="buildResultZipDest" value="${test.eclipseExtensionDirectory}/.." else="${test.eclipseExtensionDirectory}">
+            <equals arg1="${archivePrefix}" arg2="eclipse" />
+        </condition>
+        <unzip dest="${buildResultZipDest}">
+            <fileset dir="${buildDirectory}" includes="${buildType}-**/*.zip" excludes="**/${archiveNamePrefix}-*"/>
+        </unzip>
+        <antcall target="-emmaInstrument"/>
+        <unzip dest="${test.eclipseExtensionDirectory}/..">
+            <fileset dir="." includes="eclipse-test-framework*.zip" />
+        </unzip>
+        <unzip dest="${test.eclipseExtensionDirectory}">
+            <fileset dir="." includes="org.pluginbuilder.autotestsuite*.zip" />
+        </unzip>
+        <echo file="${test.eclipseExtensionDirectory}/.eclipseextension">id=org.eclipse.platform
 name=Eclipse Platform
 version=3.1.0</echo>
-       </target>
+    </target>
 
-       <target name="-unpackEclipse" unless="isEclipseInstallationAvailable">
-               <antcall target="unpack.eclipse">
-                       <param name="eclipse.installation.dir" value="${test.eclipse.host.eclipse}"/>
-                       <param name="eclipse.local.tar.non.server" value="${test.eclipse.zip}"/>
-               </antcall>
-       </target>
+    <target name="-unpackEclipse" unless="isEclipseInstallationAvailable">
+        <antcall target="unpack.eclipse">
+            <param name="eclipse.installation.dir" value="${test.eclipse.host.eclipse}"/>
+            <param name="eclipse.local.tar.non.server" value="${test.eclipse.zip}"/>
+        </antcall>
+    </target>
 
-       <!-- Example target which demonstrates how to run a test suite with the Eclipse test fwk.
-               Note that it is not needed if you use the autotestsuite
+    <!-- Example target which demonstrates how to run a test suite with the Eclipse test fwk.
+        Note that it is not needed if you use the autotestsuite
 
-       <target name="-runTestSuite" description="Should be called from allTests.xml only">
-               <ant target="core-test" antfile="${test.library.xml}" dir="${test.eclipse.host.eclipse}">
-                       --><!-- inject additional properties for Eclipse startup with data-dir property --><!--
-                       <property name="data-dir" value="${test.workspace} -clean -dev ${basedir}/emma.jar" />
-               <property name="plugin-name" value="org.rssowl.core.tests" />
-               <property name="classname" value="org.rssowl.core.tests.AllTests" />
-                       <property name="eclipse-home" value="${test.eclipse.host.eclipse}" />
-                       <property name="extraVMargs" value="-Demma.coverage.out.file=${emma.coverage.output}" />
-               </ant>
-       </target>
-       
-       <target name="run" depends="-init,-runTestSuite,-emmaReport" description="Run manually defined tests and create a report.">
-               <antcall target="umRemoveSite" />
-               <delete dir="${test.result.dir}" />
-               <mkdir dir="${test.result.dir}/xml" />
-               --><!-- collect creates an aggregated report file in ${test.eclipse.host} --><!--
-               <ant target="collect" antfile="${test.library.xml}" dir="${test.eclipse.host.eclipse}">
-                       <property name="includes" value="*.xml" />
-                       <property name="output-file" value="${test.aggregated.report}" />
-               </ant>
-               <copy file="${test.eclipse.host.eclipse}/${test.aggregated.report}" todir="${test.result.dir}/xml" />
-               
-               <BundleFileLocator eclipseInstallationRoot="${test.eclipseExtensionDirectory}" bundleId="org.pluginbuilder.autotestsuite.application" filePath="JUNIT.XSL" property="junit.xsl.file" />
-               <style style="${junit.xsl.file}" basedir="${test.result.dir}/xml" destdir="${test.result.dir}/html" />
+    <target name="-runTestSuite" description="Should be called from allTests.xml only">
+        <ant target="core-test" antfile="${test.library.xml}" dir="${test.eclipse.host.eclipse}">
+            --><!-- inject additional properties for Eclipse startup with data-dir property --><!--
+            <property name="data-dir" value="${test.workspace} -clean -dev ${basedir}/emma.jar" />
+            <property name="plugin-name" value="org.rssowl.core.tests" />
+            <property name="classname" value="org.rssowl.core.tests.AllTests" />
+            <property name="eclipse-home" value="${test.eclipse.host.eclipse}" />
+            <property name="extraVMargs" value="-Demma.coverage.out.file=${emma.coverage.output}" />
+        </ant>
+    </target>
+    
+    <target name="run" depends="-init,-runTestSuite,-emmaReport" description="Run manually defined tests and create a report.">
+        <antcall target="umRemoveSite" />
+        <delete dir="${test.result.dir}" />
+        <mkdir dir="${test.result.dir}/xml" />
+        --><!-- collect creates an aggregated report file in ${test.eclipse.host} --><!--
+        <ant target="collect" antfile="${test.library.xml}" dir="${test.eclipse.host.eclipse}">
+            <property name="includes" value="*.xml" />
+            <property name="output-file" value="${test.aggregated.report}" />
+        </ant>
+        <copy file="${test.eclipse.host.eclipse}/${test.aggregated.report}" todir="${test.result.dir}/xml" />
+        
+        <BundleFileLocator eclipseInstallationRoot="${test.eclipseExtensionDirectory}" bundleId="org.pluginbuilder.autotestsuite.application" filePath="JUNIT.XSL" property="junit.xsl.file" />
+        <style style="${junit.xsl.file}" basedir="${test.result.dir}/xml" destdir="${test.result.dir}/html" />
 
-               <antcall target="-checkTestResultFileForErrors"/>
-       </target>
-       -->
-       
-       <target name="run" depends="-init,-runAutoTests,-emmaReport" description="Run all tests using the autotestsuite and create xml and html reports.">
-               <antcall target="umRemoveSite" />
-               <junitreport todir="${test.result.dir}/xml" tofile="${test.aggregated.report}">
-                       <fileset dir="${test.result.dir}/xml">
-                               <include name="*.xml" />
-                       </fileset>
-               </junitreport>
+        <antcall target="-checkTestResultFileForErrors"/>
+    </target>
+    -->
+    
+    <target name="run" depends="-init,-runAutoTests,-emmaReport" description="Run all tests using the autotestsuite and create xml and html reports.">
+        <antcall target="umRemoveSite" />
+        <junitreport todir="${test.result.dir}/xml" tofile="${test.aggregated.report}">
+            <fileset dir="${test.result.dir}/xml">
+                <include name="*.xml" />
+            </fileset>
+        </junitreport>
 
-               <BundleFileLocator eclipseInstallationRoot="${test.eclipseExtensionDirectory}" bundleId="org.pluginbuilder.autotestsuite.application" filePath="JUNIT.XSL" property="junit.xsl.file" />
+        <BundleFileLocator eclipseInstallationRoot="${test.eclipseExtensionDirectory}" bundleId="org.pluginbuilder.autotestsuite.application" filePath="JUNIT.XSL" property="junit.xsl.file" />
 
-               <style style="${junit.xsl.file}" basedir="${test.result.dir}/xml" includes="${test.aggregated.report}" destdir="${test.result.dir}/html" />
-       </target>
-       
-       <target name="-markErrorOrFailure" if="isErrorOrFailure">
-               <!-- Write Message to stderr and continue the build. Do not let the build fail so that 
-                    other tasks which come afterwards can be completed. E.g. packaging might take place
-                    after test execution -->
-               <echo level="error" message="TESTS FAILED"/>
-       </target>
-       
-       <target name="-checkTestResultFileForErrors" unless="isErrorOrFailure" description="Check test result file for errors. Not needed for autotestsuite where the return status is used to signal a failed build."> 
-               <echo message="Checke auf Fehler: ${test.aggregated.report}"/>
+        <style style="${junit.xsl.file}" basedir="${test.result.dir}/xml" includes="${test.aggregated.report}" destdir="${test.result.dir}/html" />
+    </target>
+    
+    <target name="-markErrorOrFailure" if="isErrorOrFailure">
+        <!-- Write Message to stderr and continue the build. Do not let the build fail so that 
+             other tasks which come afterwards can be completed. E.g. packaging might take place
+             after test execution -->
+        <echo level="error" message="TESTS FAILED"/>
+    </target>
+    
+    <target name="-checkTestResultFileForErrors" unless="isErrorOrFailure" description="Check test result file for errors. Not needed for autotestsuite where the return status is used to signal a failed build."> 
+        <echo message="Checke auf Fehler: ${test.aggregated.report}"/>
 
         <condition property="isErrorOrFailure">
                 <hasErrorOrFailure reportFile="${test.result.dir}/xml/${test.aggregated.report}" />
         </condition>
 
         <antcall target="-markErrorOrFailure" />        
-       </target>
+    </target>
 
-       <target name="-runAutoTests">
-               <mkdir dir="${test.result.dir}/xml"/>
-               <BundleFileLocator eclipseInstallationRoot="${test.eclipse.host.eclipse}" bundleId="org.eclipse.equinox.launcher" property="equinoxjar" />
-               <condition property="optJvmArg" else="-DdummyVar=NotOnMac" value="-XstartOnFirstThread">
-                       <os family="mac"/>
-               </condition>
-               <condition property="testApplication" else="" value="-testApplication ${autotest.testapplication}">
-                       <isset property="autotest.testapplication"/>
-               </condition>
-               <java fork="true" dir="." logError="true" classname="org.eclipse.core.launcher.Main" resultproperty="autotestsuite.result"> 
+    <target name="-runAutoTests">
+        <mkdir dir="${test.result.dir}/xml"/>
+        <BundleFileLocator eclipseInstallationRoot="${test.eclipse.host.eclipse}" bundleId="org.eclipse.equinox.launcher" property="equinoxjar" />
+        <condition property="optJvmArg" else="-DdummyVar=NotOnMac" value="-XstartOnFirstThread">
+            <os family="mac"/>
+        </condition>
+        <condition property="testApplication" else="" value="-testApplication ${autotest.testapplication}">
+            <isset property="autotest.testapplication"/>
+        </condition>
+        <java fork="true" dir="." logError="true" classname="org.eclipse.core.launcher.Main" resultproperty="autotestsuite.result"> 
 
-                       <arg line="-application org.pluginbuilder.autotestsuite.application.autoTestApplication ${testApplication}" />
-                       <arg line="-data ${test.workspace}" />
-                       <arg line="-os ${os}" />
-                       <arg line="-ws ${ws}" />
-                       <arg line="-arch ${arch}" />
-                       <arg line="-clean" />
-                       <arg line="-consolelog" />
-                       <arg line="-dev ${basedir}/emma.jar" />
-                       
-                       <jvmarg value="-Demma.coverage.out.file=${emma.coverage.output}"/>
-                       <jvmarg value="${optJvmArg}"/>
-                       <jvmarg value="-Xmx512m"/>
-                       
-                       <sysproperty key="autotestsuite.results.directory" value="${test.result.dir}/xml" />
-                       <sysproperty key="autotest.debug" value="${autotestsuite.trace}" />
-                       <sysproperty key="autotestsuite.headless" value="${autotestsuite.headless}" />
-                       <sysproperty key="autotestsuite.plugin.inclusions" value="${autotestsuite.plugin.inclusions}" />
-                       <sysproperty key="autotestsuite.plugin.exclusions" value="${autotestsuite.plugin.exclusions}|^org.eclipse.test$" />
-                       <sysproperty key="autotestsuite.class.inclusions" value="${autotestsuite.class.inclusions}" />
-                       <sysproperty key="autotestsuite.class.exclusions" value="${autotestsuite.class.exclusions}" />
-                       
-                       <classpath>
-                               <pathelement location="${equinoxjar}" />
-                       </classpath>
-               </java>
-               <condition property="isErrorOrFailure">
-                       <not>
-                               <equals arg1="${autotestsuite.result}" arg2="0"/>
-                       </not>
-               </condition>
-       
-               <antcall target="-markErrorOrFailure"/>
-       </target>
+            <arg line="-application org.pluginbuilder.autotestsuite.application.autoTestApplication ${testApplication}" />
+            <arg line="-data ${test.workspace}" />
+            <arg line="-os ${os}" />
+            <arg line="-ws ${ws}" />
+            <arg line="-arch ${arch}" />
+            <arg line="-clean" />
+            <arg line="-consolelog" />
+            <arg line="-dev ${basedir}/emma.jar" />
+            
+            <jvmarg value="-Demma.coverage.out.file=${emma.coverage.output}"/>
+            <jvmarg value="${optJvmArg}"/>
+            <jvmarg value="-Xmx512m"/>
+            
+            <sysproperty key="autotestsuite.results.directory" value="${test.result.dir}/xml" />
+            <sysproperty key="autotest.debug" value="${autotestsuite.trace}" />
+            <sysproperty key="autotestsuite.headless" value="${autotestsuite.headless}" />
+            <sysproperty key="autotestsuite.plugin.inclusions" value="${autotestsuite.plugin.inclusions}" />
+            <sysproperty key="autotestsuite.plugin.exclusions" value="${autotestsuite.plugin.exclusions}|^org.eclipse.test$" />
+            <sysproperty key="autotestsuite.class.inclusions" value="${autotestsuite.class.inclusions}" />
+            <sysproperty key="autotestsuite.class.exclusions" value="${autotestsuite.class.exclusions}" />
+            
+            <classpath>
+                <pathelement location="${equinoxjar}" />
+            </classpath>
+        </java>
+        <condition property="isErrorOrFailure">
+            <not>
+                <equals arg1="${autotestsuite.result}" arg2="0"/>
+            </not>
+        </condition>
+    
+        <antcall target="-markErrorOrFailure"/>
+    </target>
 
-       <target name="umAddSite">
-               <echo message="Adding Extension Site to ${test.eclipse.host}. Might fail if extension already exists."/>
-               <!-- the addSite calls fails if the extension site already exists (for example because it was not removed properly
-                    from a previous build. Nonetheless the tests can proceed --> 
-               <antcall target="updateManager">        
-                       <param name="updateManagerCommand" value="addSite"/>
-                       <param name="updateManagerCommandParam" value="-from"/>
-                       <param name="updateManagerCommandSiteUrl" value="${test.eclipseExtensionDirectory}"/>
-                       <param name="updateManagerCommandFailOnError" value="false"/>
-               </antcall>
-       </target>
-       
-       <target name="umRemoveSite">
-               <!--  This command might fail if the Extension Site has never been added or was properly removed before. -->
-               <echo message="Removing Extension Site from ${test.eclipse.host}."/>
-               
-               <antcall target="updateManager">        
-                       <param name="updateManagerCommand" value="removeSite"/>
-                       <param name="updateManagerCommandParam" value="-to"/>
-                       <param name="updateManagerCommandSiteUrl" value="${test.eclipseExtensionDirectory}"/>
-                       <param name="updateManagerCommandFailOnError" value="false"/>
-               </antcall>
-       </target>
-       
-       <target name="umListFeaturesSite">
-               <antcall target="updateManager">        
-                       <param name="updateManagerCommand" value="listFeatures"/>
-                       <param name="updateManagerCommandParam" value="-from"/>
-                       <param name="updateManagerCommandSiteUrl" value="${test.eclipseExtensionDirectory}"/>
-                       <param name="updateManagerCommandFailOnError" value="false"/>
-               </antcall>
+    <target name="umAddSite">
+        <echo message="Adding Extension Site to ${test.eclipse.host}. Might fail if extension already exists."/>
+        <!-- the addSite calls fails if the extension site already exists (for example because it was not removed properly
+             from a previous build. Nonetheless the tests can proceed --> 
+        <antcall target="updateManager">    
+            <param name="updateManagerCommand" value="addSite"/>
+            <param name="updateManagerCommandParam" value="-from"/>
+            <param name="updateManagerCommandSiteUrl" value="${test.eclipseExtensionDirectory}"/>
+            <param name="updateManagerCommandFailOnError" value="false"/>
+        </antcall>
+    </target>
+    
+    <target name="umRemoveSite">
+        <!--  This command might fail if the Extension Site has never been added or was properly removed before. -->
+        <echo message="Removing Extension Site from ${test.eclipse.host}."/>
+        
+        <antcall target="updateManager">    
+            <param name="updateManagerCommand" value="removeSite"/>
+            <param name="updateManagerCommandParam" value="-to"/>
+            <param name="updateManagerCommandSiteUrl" value="${test.eclipseExtensionDirectory}"/>
+            <param name="updateManagerCommandFailOnError" value="false"/>
+        </antcall>
+    </target>
+    
+    <target name="umListFeaturesSite">
+        <antcall target="updateManager">    
+            <param name="updateManagerCommand" value="listFeatures"/>
+            <param name="updateManagerCommandParam" value="-from"/>
+            <param name="updateManagerCommandSiteUrl" value="${test.eclipseExtensionDirectory}"/>
+            <param name="updateManagerCommandFailOnError" value="false"/>
+        </antcall>
 
-       </target>
-       
-       <target name="updateManager">
-               <BundleFileLocator eclipseInstallationRoot="${test.eclipse.host.eclipse}" bundleId="org.eclipse.equinox.launcher" property="equinoxjar" />      
-               <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="${updateManagerCommandFailOnError}">
-                       <arg value="-ws" />
-                       <arg value="${ws}" />
-                       <arg value="-os" />
-                       <arg value="${os}" />                   
-                       <arg value="-application" />
-                       <arg value="org.eclipse.update.core.standaloneUpdate" />
-                       <arg value="-command" />
-                       <arg value="${updateManagerCommand}" />
-                       <arg value="${updateManagerCommandParam}" />
-                       <arg value="${updateManagerCommandSiteUrl}" />
+    </target>
+    
+    <target name="updateManager">
+        <BundleFileLocator eclipseInstallationRoot="${test.eclipse.host.eclipse}" bundleId="org.eclipse.equinox.launcher" property="equinoxjar" />  
+        <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="${updateManagerCommandFailOnError}">
+            <arg value="-ws" />
+            <arg value="${ws}" />
+            <arg value="-os" />
+            <arg value="${os}" />           
+            <arg value="-application" />
+            <arg value="org.eclipse.update.core.standaloneUpdate" />
+            <arg value="-command" />
+            <arg value="${updateManagerCommand}" />
+            <arg value="${updateManagerCommandParam}" />
+            <arg value="${updateManagerCommandSiteUrl}" />
 
-                       <classpath>
-                               <pathelement location="${equinoxjar}" />
-                       </classpath>
-                       
-               </java>
-       </target>
-       
-       
-       
-       <target name="-emmaInit" if="is.emma">
-               <path id='emma.lib' >
-                       <fileset dir='.' includes='*.jar' />
-               </path>
-               <taskdef resource='emma_ant.properties' classpathref='emma.lib' />
-       </target>
-       
-       <target name="-emmaReport" if="is.emma">                
-               <mkdir dir="${test.result.dir}/coverage" />
-               <emma enabled="${pluginbuilder.is.runcoverage}">
-                       <report encoding="UTF-8">
-                               <fileset dir="${buildDirectory}" includes="*.emma"/>
-                               <fileset file="${emma.coverage.output}"/>
-                           <html outfile="${test.result.dir}/coverage/coverage.html" />
+            <classpath>
+                <pathelement location="${equinoxjar}" />
+            </classpath>
+            
+        </java>
+    </target>
+    
+    
+    
+    <target name="-emmaInit" if="is.emma">
+        <path id='emma.lib' >
+            <fileset dir='.' includes='*.jar' />
+        </path>
+        <taskdef resource='emma_ant.properties' classpathref='emma.lib' />
+    </target>
+    
+    <target name="-emmaReport" if="is.emma">        
+        <mkdir dir="${test.result.dir}/coverage" />
+        <emma enabled="${pluginbuilder.is.runcoverage}">
+            <report encoding="UTF-8">
+                <fileset dir="${buildDirectory}" includes="*.emma"/>
+                <fileset file="${emma.coverage.output}"/>
+                <html outfile="${test.result.dir}/coverage/coverage.html" />
 
-                               <sourcepath>
-                                       <dirset dir="${buildDirectory}/plugins">
-                                       </dirset>
-                               </sourcepath>
-                               
-                       </report>
-               </emma>
-       </target>
+                <sourcepath>
+                    <dirset dir="${buildDirectory}/plugins">
+                    </dirset>
+                </sourcepath>
+                
+            </report>
+        </emma>
+    </target>
 
-       <target name="-emmaInstrument" if="is.emma">
-               <!-- <emma enabled="${pluginbuilder.is.runcoverage}"> -->
-               <emma>
-                       <instr verbosity="info" metadatafile="${buildDirectory}/metadata.emma" mode="overwrite">
-                               <instrpath>
-                                       <fileset dir="${test.eclipseExtensionDirectory}" includes="**/*.jar" excludes="**/emma*.jar"/>
-                                       <dirset dir="${test.eclipseExtensionDirectory}/plugins" includes="*" />
-                               </instrpath>
-                               <!-- http://emma.sourceforge.net/reference/ch02s06s02.html#filtersyntax.ANT -->
-                       <filter includes="${pluginbuilder.coverage.inclusionfilter}" excludes="${pluginbuilder.coverage.exclusionfilter}" />
-                       </instr>
-               </emma> 
-       </target>
+    <target name="-emmaInstrument" if="is.emma">
+        <!-- <emma enabled="${pluginbuilder.is.runcoverage}"> -->
+        <emma>
+            <instr verbosity="info" metadatafile="${buildDirectory}/metadata.emma" mode="overwrite">
+                <instrpath>
+                    <fileset dir="${test.eclipseExtensionDirectory}" includes="**/*.jar" excludes="**/emma*.jar"/>
+                    <dirset dir="${test.eclipseExtensionDirectory}/plugins" includes="*" />
+                </instrpath>
+                <!-- http://emma.sourceforge.net/reference/ch02s06s02.html#filtersyntax.ANT -->
+                <filter includes="${pluginbuilder.coverage.inclusionfilter}" excludes="${pluginbuilder.coverage.exclusionfilter}" />
+            </instr>
+        </emma> 
+    </target>
 </project>
index c246386..986c764 100644 (file)
@@ -42,7 +42,7 @@ collectingFolder=${archivePrefix}
 #The list can only contain the configuration for which the desired format is different than zip.
 # E.g. win32,win32,x86 - antZip
 #archivesFormat=
-       
+    
 # Set to true for Jnlp generation
 # @category jnlp
 # @type Boolean
@@ -66,7 +66,7 @@ collectingFolder=${archivePrefix}
 # Set to ${configs} in order to filter the content of the generated jnlp files based on the configuration being built
 # @category jnlp
 # @type enum values=${configs} 
-# jnlp.configs=                        
+# jnlp.configs=         
 
 # Check if you want to sign jars
 # @type Boolean
@@ -222,4 +222,4 @@ p2.artifact.repo.name=EasyAnt For Eclipse Update Site
 # @category hidden
 p2.flavor=tooling
 # @category hidden
-p2.publish.artifacts=true
\ No newline at end of file
+p2.publish.artifacts=true
index 9b8846d..7ff7ecc 100644 (file)
@@ -49,4 +49,4 @@ build.container.feature=true
 
 # Set the root path in the platform specific packages
 # @category packaging
-# archivePrefix=
\ No newline at end of file
+# archivePrefix=
index 6b092fd..39d8625 100644 (file)
@@ -15,7 +15,7 @@
    limitations under the License.
 -->
 <project name="Shared build targets">
-       <!-- the following properties must be set from the calling script 
+    <!-- the following properties must be set from the calling script 
     <property name="eclipse.installation.dir" value="${buildDirectory}"/>
     <property name="eclipse.local.tar.non.server" value="${test.eclipse.zip}"/>
     eclipse.download.cache,pluginbuilder.eclipse.url
     <property name="pluginbuilder.additional.feature.urls" value="featureurl1,featureurl2"/>
     -->
     
-       <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${buildHome}/build-files/ant-contrib.jar" />
-       
-       <target name="unpack.eclipse">
-               <condition property="unpack.eclipse">
-                       <not>
-                               <available type="dir" file="${eclipse.installation.dir}"/>
-                       </not>
-               </condition>
-               <antcall target="-unpack.eclipse.ifnecessary"/>
-       </target>    
+    <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${buildHome}/build-files/ant-contrib.jar" />
     
-       <!-- call either with or feature.url or pluginbuilder.eclipse.url
-                sets property archive.location to the archive path in download cache.
-        -->
-       <target name="-set.archive.location" if="pluginbuilder.is.server">
-               <!-- set default, useful for server where pluginbuilder.eclipse.url.default can be specified in build_local.properties --> 
-               <property name="pluginbuilder.eclipse.url" value="${pluginbuilder.eclipse.url.default}"/>
-               <condition property="archive.url" value="${feature.url}" else="${pluginbuilder.eclipse.url}">
-                               <isset property="feature.url"/>
-               </condition>
-               <mkdir dir="${eclipse.download.cache}"/>
-               <tempfile destdir="${eclipse.download.cache}" property="tmp.file" suffix=".txt" prefix="downloadurl"/>          
-               <echo file="${tmp.file}" message="${archive.url}"/>
-               <checksum file="${tmp.file}" property="pluginbuilder.eclipse.url.checksum"/>
-               <delete file="${tmp.file}"/>
-               <property name="archive.location" value="${eclipse.download.cache}/${pluginbuilder.eclipse.url.checksum}"/>
-               <!-- <echo message="${archive.location} is archive location for ${archive.url}"/> -->
-       </target>
-       
-       <target name="-set.eclipse.local.tar.server" if="pluginbuilder.is.server" depends="-set.archive.location">
-               <property name="eclipse.local.tar" value="${archive.location}"/>
-       </target>
-       
-       <target name="-set.eclipse.local.tar.non.server" unless="pluginbuilder.is.server">
-               <property name="eclipse.local.tar" value="${eclipse.local.tar.non.server}"/>
-       </target>
-       
-       <target name="-get.archive.ifnecessary" unless="eclipse.is.downloaded">
-               <condition property="archive.url" value="${feature.url}" else="${pluginbuilder.eclipse.url}">
-                               <isset property="feature.url"/>
-               </condition>
-               <get src="${archive.url}" dest="${archive.location}" />         
-       </target>
-       
-       <target name="-get.archive" depends="-set.archive.location" if="pluginbuilder.is.server">
-               <condition property="eclipse.is.downloaded">
-                       <available file="${archive.location}" property="${eclipse.is.downloaded}"/>
-               </condition>            
-               <antcall target="-get.archive.ifnecessary"/> 
-       </target>
-       
-       <target name="-get.features" if="pluginbuilder.is.server" >
-               <property name="pluginbuilder.feature.urls" value="${pluginbuilder.feature.urls.default}"/>
-               <foreach list="${pluginbuilder.feature.urls}" param="feature.url" delimiter="," target="-get.archive" inheritall="true"/>
-       </target>
-       
-       <target name="-unpack.features" if="pluginbuilder.is.server">
-               <property name="pluginbuilder.feature.urls" value="${pluginbuilder.feature.urls.default}"/>
-               <foreach list="${pluginbuilder.feature.urls}" param="feature.url" delimiter="," target="-unpack.feature" inheritall="true"/>
-       </target>
-       
-       <target name="-unpack.feature" depends="-set.archive.location">
-               <property name="tempunziplocation" value="${buildDirectory}/tmpunzip"/>
-               <delete dir="${tempunziplocation}" failonerror="false"/>
-               <mkdir dir="${tempunziplocation}"/>
-               <unzip src="${archive.location}" overwrite="true" dest="${tempunziplocation}"/>
-               <condition property="moveroot" value="${tempunziplocation}/eclipse" else="${tempunziplocation}">
-                               <available file="${tempunziplocation}/eclipse" type="dir"/>
-               </condition>
-               <move todir="${eclipse.installation.dir}" includeemptydirs="true">
-                       <fileset dir="${moveroot}" includes="**"/>
-               </move>
-       </target>
-                       
-       <target name="-unpack.eclipse.ifnecessary" if="unpack.eclipse">
-               <antcall target="-get.archive"/>
-               <condition property="is.windows">
-                 <os family="windows"/>
-               </condition>
-               <antcall target="-unpack.eclipse.windows"/>
-               <antcall target="-unpack.eclipse.linux"/>
-               <antcall target="-get.features"/>
-               <antcall target="-unpack.features"/>
-       </target>
-       
-       <target name="-unpack.eclipse.windows" if="is.windows" depends="-set.eclipse.local.tar.server,-set.eclipse.local.tar.non.server">
-               <unzip src="${eclipse.local.tar}" overwrite="true" dest="${eclipse.installation.dir}/.."/>              
-       </target>
-       
-       <target name="-unpack.eclipse.linux" unless="is.windows" depends="-set.eclipse.local.tar.server,-set.eclipse.local.tar.non.server">
-               <untar src="${eclipse.local.tar}" overwrite="true" dest="${eclipse.installation.dir}/.." compression="gzip"/>           
-       </target>
-       
-       <target name="test">
-               <property name="buildDirectory" value="C:/Temp/tst"/>
-               <mkdir dir="${buildDirectory}"/>
-               <property name="eclipse.download.cache" value="C:/Temp/downloadcache"/>
-               <property name="pluginbuilder.is.server" value="true"/>
-               <property name="pluginbuilder.eclipse.url" value="http://mirror.yoxos-eclipse-distribution.de/eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/eclipse-PDE-3.2.2.zip"/>
-               
-               <property name="eclipse.installation.dir" value="C:/Temp/eclipse_root/eclipse"/>
-               <delete dir="${eclipse.installation.dir}" failonerror="false"/>
-               <property name="pluginbuilder.feature.urls" value="http://self.pluginbuilder.org/0.2.0/org.pluginbuilder.feature-0.2.0.20070218PRD.zip,http://mirror.yoxos-eclipse-distribution.de/eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/eclipse-examples-3.2.2.zip"/>
-               <antcall target="unpack.eclipse"/>
-       </target>
-       
-</project>
\ No newline at end of file
+    <target name="unpack.eclipse">
+        <condition property="unpack.eclipse">
+            <not>
+                <available type="dir" file="${eclipse.installation.dir}"/>
+            </not>
+        </condition>
+        <antcall target="-unpack.eclipse.ifnecessary"/>
+    </target>    
+    
+    <!-- call either with or feature.url or pluginbuilder.eclipse.url
+         sets property archive.location to the archive path in download cache.
+     -->
+    <target name="-set.archive.location" if="pluginbuilder.is.server">
+        <!-- set default, useful for server where pluginbuilder.eclipse.url.default can be specified in build_local.properties --> 
+        <property name="pluginbuilder.eclipse.url" value="${pluginbuilder.eclipse.url.default}"/>
+        <condition property="archive.url" value="${feature.url}" else="${pluginbuilder.eclipse.url}">
+                <isset property="feature.url"/>
+        </condition>
+        <mkdir dir="${eclipse.download.cache}"/>
+        <tempfile destdir="${eclipse.download.cache}" property="tmp.file" suffix=".txt" prefix="downloadurl"/>      
+        <echo file="${tmp.file}" message="${archive.url}"/>
+        <checksum file="${tmp.file}" property="pluginbuilder.eclipse.url.checksum"/>
+        <delete file="${tmp.file}"/>
+        <property name="archive.location" value="${eclipse.download.cache}/${pluginbuilder.eclipse.url.checksum}"/>
+        <!-- <echo message="${archive.location} is archive location for ${archive.url}"/> -->
+    </target>
+    
+    <target name="-set.eclipse.local.tar.server" if="pluginbuilder.is.server" depends="-set.archive.location">
+        <property name="eclipse.local.tar" value="${archive.location}"/>
+    </target>
+    
+    <target name="-set.eclipse.local.tar.non.server" unless="pluginbuilder.is.server">
+        <property name="eclipse.local.tar" value="${eclipse.local.tar.non.server}"/>
+    </target>
+    
+    <target name="-get.archive.ifnecessary" unless="eclipse.is.downloaded">
+        <condition property="archive.url" value="${feature.url}" else="${pluginbuilder.eclipse.url}">
+                <isset property="feature.url"/>
+        </condition>
+        <get src="${archive.url}" dest="${archive.location}" />     
+    </target>
+    
+    <target name="-get.archive" depends="-set.archive.location" if="pluginbuilder.is.server">
+        <condition property="eclipse.is.downloaded">
+            <available file="${archive.location}" property="${eclipse.is.downloaded}"/>
+        </condition>        
+        <antcall target="-get.archive.ifnecessary"/> 
+    </target>
+    
+    <target name="-get.features" if="pluginbuilder.is.server" >
+        <property name="pluginbuilder.feature.urls" value="${pluginbuilder.feature.urls.default}"/>
+        <foreach list="${pluginbuilder.feature.urls}" param="feature.url" delimiter="," target="-get.archive" inheritall="true"/>
+    </target>
+    
+    <target name="-unpack.features" if="pluginbuilder.is.server">
+        <property name="pluginbuilder.feature.urls" value="${pluginbuilder.feature.urls.default}"/>
+        <foreach list="${pluginbuilder.feature.urls}" param="feature.url" delimiter="," target="-unpack.feature" inheritall="true"/>
+    </target>
+    
+    <target name="-unpack.feature" depends="-set.archive.location">
+        <property name="tempunziplocation" value="${buildDirectory}/tmpunzip"/>
+        <delete dir="${tempunziplocation}" failonerror="false"/>
+        <mkdir dir="${tempunziplocation}"/>
+        <unzip src="${archive.location}" overwrite="true" dest="${tempunziplocation}"/>
+        <condition property="moveroot" value="${tempunziplocation}/eclipse" else="${tempunziplocation}">
+                <available file="${tempunziplocation}/eclipse" type="dir"/>
+        </condition>
+        <move todir="${eclipse.installation.dir}" includeemptydirs="true">
+            <fileset dir="${moveroot}" includes="**"/>
+        </move>
+    </target>
+            
+    <target name="-unpack.eclipse.ifnecessary" if="unpack.eclipse">
+        <antcall target="-get.archive"/>
+        <condition property="is.windows">
+          <os family="windows"/>
+        </condition>
+        <antcall target="-unpack.eclipse.windows"/>
+        <antcall target="-unpack.eclipse.linux"/>
+        <antcall target="-get.features"/>
+        <antcall target="-unpack.features"/>
+    </target>
+    
+    <target name="-unpack.eclipse.windows" if="is.windows" depends="-set.eclipse.local.tar.server,-set.eclipse.local.tar.non.server">
+        <unzip src="${eclipse.local.tar}" overwrite="true" dest="${eclipse.installation.dir}/.."/>      
+    </target>
+    
+    <target name="-unpack.eclipse.linux" unless="is.windows" depends="-set.eclipse.local.tar.server,-set.eclipse.local.tar.non.server">
+        <untar src="${eclipse.local.tar}" overwrite="true" dest="${eclipse.installation.dir}/.." compression="gzip"/>       
+    </target>
+    
+    <target name="test">
+        <property name="buildDirectory" value="C:/Temp/tst"/>
+        <mkdir dir="${buildDirectory}"/>
+        <property name="eclipse.download.cache" value="C:/Temp/downloadcache"/>
+        <property name="pluginbuilder.is.server" value="true"/>
+        <property name="pluginbuilder.eclipse.url" value="http://mirror.yoxos-eclipse-distribution.de/eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/eclipse-PDE-3.2.2.zip"/>
+        
+        <property name="eclipse.installation.dir" value="C:/Temp/eclipse_root/eclipse"/>
+        <delete dir="${eclipse.installation.dir}" failonerror="false"/>
+        <property name="pluginbuilder.feature.urls" value="http://self.pluginbuilder.org/0.2.0/org.pluginbuilder.feature-0.2.0.20070218PRD.zip,http://mirror.yoxos-eclipse-distribution.de/eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/eclipse-examples-3.2.2.zip"/>
+        <antcall target="unpack.eclipse"/>
+    </target>
+    
+</project>
index 6ed77c4..68934ac 100644 (file)
    limitations under the License.
 -->
 <project name="Build specific targets and properties" default="noDefault">
-       <condition property="isNightlyBuild">
-               <equals arg1="${buildType}" arg2="N" />
-       </condition>
-       <condition property="isNightlyOrIntegrationBuild">
-               <or>
-                       <equals arg1="${buildType}" arg2="N" />
-                       <equals arg1="${buildType}" arg2="I" />
-               </or>
-       </condition>
-       
-       <property file="${buildHome}/pluginbuilder.config" />
-       
-       <property file="${buildDirectory}/version.properties" />
-       <property name="buildLabel" value="${buildType}-${version.full}" />
-       <property name="buildId" value="${version.full}" />
-       
-       <condition property="isCVSOrCopy" value="true">
-               <or>
-                       <equals arg1="${pluginbuilder.is.cvs}" arg2="true"/>
-                       <equals arg1="${pluginbuilder.is.copy}" arg2="true"/>
-               </or>
-       </condition>
-       <condition property="isSVN" value="true">
-               <equals arg1="${pluginbuilder.is.svn}" arg2="true"/>
-       </condition>
-       <condition property="isRunTests" value="true">
-               <equals arg1="${pluginbuilder.is.runtests}" arg2="true"/>
-       </condition>
-       
-       
-       <target name="allElements">
-               <condition property="isFetch" value="true">
-                       <equals arg1="${target}" arg2="fetchElement"/>
-               </condition>
-           <condition property="is.svn.fetch" value="true">
-                       <and>
-                               <equals arg1="${target}" arg2="fetchElement"/>
-                               <equals arg1="${pluginbuilder.is.svn}" arg2="true"/>
-                       </and>
-           </condition>
-       
-               <antcall target="allElementsExceptSvnFetch"/>
-               <antcall target="fetchSubversion"/>
-       </target>
-       
-       <import file="allElements.xml"/>
-       <import file="subversionSupport.xml"/>
-       
-       
-       <!-- ===================================================================== -->
-       <!-- Check out map files from correct repository -->
-       <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
-       <!-- ===================================================================== -->
-       <target name="getMapFiles" if="isCVSOrCopy">
-               <echo message="Copying map files."/>
-               <copy todir="${buildDirectory}/maps">
-                       <fileset dir="${buildHome}/maps" includes="*.map"></fileset>
-               </copy>
-       </target>
-       
-       <!-- ===================================================================== -->
-       <!-- Steps to do before setup -->
-       <!-- ===================================================================== -->
-       <target name="preSetup">        
-       </target>
-       <!-- ===================================================================== -->
-       <!-- Steps to do after setup but before starting the build proper -->
-       <!-- ===================================================================== -->
-       <target name="postSetup">
-       </target>
-       <!-- ===================================================================== -->
-       <!-- Steps to do before fetching the build elements -->
-       <!-- ===================================================================== -->
-       <target name="preFetch">
-       </target>
-       <!-- ===================================================================== -->
-       <!-- Steps to do after fetching the build elements -->
-       <!-- ===================================================================== -->
-       <target name="postFetch">
-               <condition property="is.fetch" value="true">
-                       <available file="${buildDirectory}/plugins"/>
-               </condition>
-               <fail unless="is.fetch" message="There was no plug-in fetched. Was the configuration generated? Is the repository correct?"/>
-               <antcall target="replaceVersions"/>             
-       </target>
-       
-       <target name="replaceVersions">
-               <fail unless="version.full" message="Property version.full must be set" />
-               <fail unless="version.qualifier" message="Property version.qualifier must be set" />
-       
-               <echo message="Updating versions in feature and plugin manifests. Full version: ${version.full}, qualifier: ${version.qualifier}"/>
-               <replaceregexp
+    <condition property="isNightlyBuild">
+        <equals arg1="${buildType}" arg2="N" />
+    </condition>
+    <condition property="isNightlyOrIntegrationBuild">
+        <or>
+            <equals arg1="${buildType}" arg2="N" />
+            <equals arg1="${buildType}" arg2="I" />
+        </or>
+    </condition>
+    
+    <property file="${buildHome}/pluginbuilder.config" />
+    
+    <property file="${buildDirectory}/version.properties" />
+    <property name="buildLabel" value="${buildType}-${version.full}" />
+    <property name="buildId" value="${version.full}" />
+    
+    <condition property="isCVSOrCopy" value="true">
+        <or>
+            <equals arg1="${pluginbuilder.is.cvs}" arg2="true"/>
+            <equals arg1="${pluginbuilder.is.copy}" arg2="true"/>
+        </or>
+    </condition>
+    <condition property="isSVN" value="true">
+        <equals arg1="${pluginbuilder.is.svn}" arg2="true"/>
+    </condition>
+    <condition property="isRunTests" value="true">
+        <equals arg1="${pluginbuilder.is.runtests}" arg2="true"/>
+    </condition>
+    
+    
+    <target name="allElements">
+        <condition property="isFetch" value="true">
+            <equals arg1="${target}" arg2="fetchElement"/>
+        </condition>
+        <condition property="is.svn.fetch" value="true">
+            <and>
+                <equals arg1="${target}" arg2="fetchElement"/>
+                <equals arg1="${pluginbuilder.is.svn}" arg2="true"/>
+            </and>
+        </condition>
+    
+        <antcall target="allElementsExceptSvnFetch"/>
+        <antcall target="fetchSubversion"/>
+    </target>
+    
+    <import file="allElements.xml"/>
+    <import file="subversionSupport.xml"/>
+    
+    
+    <!-- ===================================================================== -->
+    <!-- Check out map files from correct repository -->
+    <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
+    <!-- ===================================================================== -->
+    <target name="getMapFiles" if="isCVSOrCopy">
+        <echo message="Copying map files."/>
+        <copy todir="${buildDirectory}/maps">
+            <fileset dir="${buildHome}/maps" includes="*.map"></fileset>
+        </copy>
+    </target>
+    
+    <!-- ===================================================================== -->
+    <!-- Steps to do before setup -->
+    <!-- ===================================================================== -->
+    <target name="preSetup">    
+    </target>
+    <!-- ===================================================================== -->
+    <!-- Steps to do after setup but before starting the build proper -->
+    <!-- ===================================================================== -->
+    <target name="postSetup">
+    </target>
+    <!-- ===================================================================== -->
+    <!-- Steps to do before fetching the build elements -->
+    <!-- ===================================================================== -->
+    <target name="preFetch">
+    </target>
+    <!-- ===================================================================== -->
+    <!-- Steps to do after fetching the build elements -->
+    <!-- ===================================================================== -->
+    <target name="postFetch">
+        <condition property="is.fetch" value="true">
+            <available file="${buildDirectory}/plugins"/>
+        </condition>
+        <fail unless="is.fetch" message="There was no plug-in fetched. Was the configuration generated? Is the repository correct?"/>
+        <antcall target="replaceVersions"/>     
+    </target>
+    
+    <target name="replaceVersions">
+        <fail unless="version.full" message="Property version.full must be set" />
+        <fail unless="version.qualifier" message="Property version.qualifier must be set" />
+    
+        <echo message="Updating versions in feature and plugin manifests. Full version: ${version.full}, qualifier: ${version.qualifier}"/>
+        <replaceregexp
             match="(&lt;feature[^&gt;]*version=)&quot;0.0.0&quot;"
             replace="\1&quot;${version.full}&quot;"
-                       byline="false"
-                       flags="s">
-                         <fileset dir="${buildDirectory}/features" includes="**/feature.xml"/>
-               </replaceregexp>
-               <replaceregexp
+            byline="false"
+            flags="s">
+              <fileset dir="${buildDirectory}/features" includes="**/feature.xml"/>
+        </replaceregexp>
+        <replaceregexp
             match="(&lt;feature[^&gt;]*version=&quot;.*)qualifier&quot;"
             replace="\1${version.qualifier}&quot;"
-                       byline="false"
-                       flags="s">
-                         <fileset dir="${buildDirectory}/features" includes="**/feature.xml"/>
-               </replaceregexp>
-               <!-- in a manual build started with export from the feature.xml, there is no
-                       need to replace the versions in the plugin.xml files if they are set to 0.0.0,
-                       but here it needs to be -->
-               <replace dir="${buildDirectory}/plugins">
-                       <include name="**/plugin.xml"/>
-                       <replacefilter token="0.0.0" value="${version.full}" />
-               </replace>
-               <replace dir="${buildDirectory}/plugins">
-                       <include name="**/META-INF/MANIFEST.MF"/>
-                       <replacefilter token="Bundle-Version: 0.0.0" value="Bundle-Version: ${version.full}" />
-                       <replacefilter token="qualifier" value="${version.qualifier}" />
-               </replace>      
-       </target>       
-       <!-- ===================================================================== -->
-       <!-- Steps to do before generating the build scripts. -->
-       <!-- ===================================================================== -->
-       <target name="preGenerate">
-               <!-- fail unless="featureVersion" message="Property featureVersion must be set.
-                Either directly or in case of a nightly build with nightlyBuildFeatureVersionPrefix." />
-                -->
-       </target>
-       <!-- ===================================================================== -->
-       <!-- Steps to do after generating the build scripts. -->
-       <!-- ===================================================================== -->
-       <target name="postGenerate">
-       </target>
-       <!-- ===================================================================== -->
-       <!-- Steps to do before running the build.xmls for the elements being built. -->
-       <!-- ===================================================================== -->
-       <target name="preProcess">
-       </target>
-       <!-- ===================================================================== -->
-       <!-- Steps to do after running the build.xmls for the elements being built. -->
-       <!-- ===================================================================== -->
-       <target name="postProcess">
-       </target>
-       <!-- ===================================================================== -->
-       <!-- Steps to do before running assemble. -->
-       <!-- ===================================================================== -->
-       <target name="preAssemble">
-       </target>
-       <!-- ===================================================================== -->
-       <!-- Steps to do after  running assemble. -->
-       <!-- ===================================================================== -->
-       <target name="postAssemble">
-       </target>
-       <!-- ===================================================================== -->
-       <!-- Steps to do before/after packaging RCP. -->
-       <!-- ===================================================================== -->
-       <target name="prePackage">
-       </target>
-       
-       <target name="postPackage">
-               <!-- copy build results for rcp build -->
-               <copy todir="${buildResultsDirectory}" flatten="true">
-                       <fileset dir="${buildDirectory}" includes="${buildType}-**/*.zip" />
-               </copy>
-       </target>
+            byline="false"
+            flags="s">
+              <fileset dir="${buildDirectory}/features" includes="**/feature.xml"/>
+        </replaceregexp>
+        <!-- in a manual build started with export from the feature.xml, there is no
+            need to replace the versions in the plugin.xml files if they are set to 0.0.0,
+            but here it needs to be -->
+        <replace dir="${buildDirectory}/plugins">
+            <include name="**/plugin.xml"/>
+            <replacefilter token="0.0.0" value="${version.full}" />
+        </replace>
+        <replace dir="${buildDirectory}/plugins">
+            <include name="**/META-INF/MANIFEST.MF"/>
+            <replacefilter token="Bundle-Version: 0.0.0" value="Bundle-Version: ${version.full}" />
+            <replacefilter token="qualifier" value="${version.qualifier}" />
+        </replace>  
+    </target>   
+    <!-- ===================================================================== -->
+    <!-- Steps to do before generating the build scripts. -->
+    <!-- ===================================================================== -->
+    <target name="preGenerate">
+        <!-- fail unless="featureVersion" message="Property featureVersion must be set.
+         Either directly or in case of a nightly build with nightlyBuildFeatureVersionPrefix." />
+         -->
+    </target>
+    <!-- ===================================================================== -->
+    <!-- Steps to do after generating the build scripts. -->
+    <!-- ===================================================================== -->
+    <target name="postGenerate">
+    </target>
+    <!-- ===================================================================== -->
+    <!-- Steps to do before running the build.xmls for the elements being built. -->
+    <!-- ===================================================================== -->
+    <target name="preProcess">
+    </target>
+    <!-- ===================================================================== -->
+    <!-- Steps to do after running the build.xmls for the elements being built. -->
+    <!-- ===================================================================== -->
+    <target name="postProcess">
+    </target>
+    <!-- ===================================================================== -->
+    <!-- Steps to do before running assemble. -->
+    <!-- ===================================================================== -->
+    <target name="preAssemble">
+    </target>
+    <!-- ===================================================================== -->
+    <!-- Steps to do after  running assemble. -->
+    <!-- ===================================================================== -->
+    <target name="postAssemble">
+    </target>
+    <!-- ===================================================================== -->
+    <!-- Steps to do before/after packaging RCP. -->
+    <!-- ===================================================================== -->
+    <target name="prePackage">
+    </target>
+    
+    <target name="postPackage">
+        <!-- copy build results for rcp build -->
+        <copy todir="${buildResultsDirectory}" flatten="true">
+            <fileset dir="${buildDirectory}" includes="${buildType}-**/*.zip" />
+        </copy>
+    </target>
 
-       <!-- ===================================================================== -->
-       <!-- Steps to do after the build is done. -->
-       <!-- ===================================================================== -->
-       <property name="buildResultsDirectory" value="${buildDirectory}/results" />
-       <target name="postBuild" depends="-prepareBuildResultsDirectory" unless="no.postBuild">
-               <antcall target="runTests"/>
-               <copy todir="${buildResultsDirectory}" flatten="true">
-                       <fileset dir="${buildDirectory}" includes="${buildType}-**/*.zip" />
-               </copy>
-               <condition property="is.External.Postbuild">
-                       <available file="${buildHome}/build-files/postBuild.xml"/>
-               </condition>
-               <antcall target="callExternalPostBuild"/>
-       </target>
-       <!-- ===================================================================== -->
-       <!-- Run tests. -->
-       <!-- ===================================================================== -->
-       <target name="runTests" if="isRunTests">
-               <property name="automatedTestsHome" location="${buildHome}/build-files/automatedTests"/>
+    <!-- ===================================================================== -->
+    <!-- Steps to do after the build is done. -->
+    <!-- ===================================================================== -->
+    <property name="buildResultsDirectory" value="${buildDirectory}/results" />
+    <target name="postBuild" depends="-prepareBuildResultsDirectory" unless="no.postBuild">
+        <antcall target="runTests"/>
+        <copy todir="${buildResultsDirectory}" flatten="true">
+            <fileset dir="${buildDirectory}" includes="${buildType}-**/*.zip" />
+        </copy>
+        <condition property="is.External.Postbuild">
+            <available file="${buildHome}/build-files/postBuild.xml"/>
+        </condition>
+        <antcall target="callExternalPostBuild"/>
+    </target>
+    <!-- ===================================================================== -->
+    <!-- Run tests. -->
+    <!-- ===================================================================== -->
+    <target name="runTests" if="isRunTests">
+        <property name="automatedTestsHome" location="${buildHome}/build-files/automatedTests"/>
 
-               <ant antfile="${automatedTestsHome}/run-tests.xml" target="run" dir="${automatedTestsHome}">
-                       <property name="test.result.dir" value="${buildResultsDirectory}/testresults"/>
-               </ant>
-       </target>       
-       <!--======================================================-->
-       <!-- Gather build results  -->
-       <!-- ==================================================== -->
-       <target name="-prepareBuildResultsDirectory">
-               <echo message="Creating ${buildResultsDirectory}" />
-               <mkdir dir="${buildResultsDirectory}" />        
-       </target>
+        <ant antfile="${automatedTestsHome}/run-tests.xml" target="run" dir="${automatedTestsHome}">
+            <property name="test.result.dir" value="${buildResultsDirectory}/testresults"/>
+        </ant>
+    </target>   
+    <!--======================================================-->
+    <!-- Gather build results  -->
+    <!-- ==================================================== -->
+    <target name="-prepareBuildResultsDirectory">
+        <echo message="Creating ${buildResultsDirectory}" />
+        <mkdir dir="${buildResultsDirectory}" />    
+    </target>
 
-       <!--======================================================-->
-       <!-- Call External post build file if available -->
-       <!-- ==================================================== -->
-       <target name="callExternalPostBuild" if="is.External.Postbuild">
-               <ant antfile="${buildHome}/build-files/postBuild.xml"/>
-       </target>
-       
-       <target name="noDefault">
-               <echo message="You must specify a target when invoking this file" />
-       </target>
+    <!--======================================================-->
+    <!-- Call External post build file if available -->
+    <!-- ==================================================== -->
+    <target name="callExternalPostBuild" if="is.External.Postbuild">
+        <ant antfile="${buildHome}/build-files/postBuild.xml"/>
+    </target>
+    
+    <target name="noDefault">
+        <echo message="You must specify a target when invoking this file" />
+    </target>
 </project>
index 58acbd3..855a606 100644 (file)
@@ -18,4 +18,4 @@
   <target name="fetch.svn.all">
     <!-- use pluginbuilder editor to change content -->
   </target>
-</project>
\ No newline at end of file
+</project>
index 5ca0abe..146d705 100644 (file)
    limitations under the License.
 -->
 <project name="Run as part of postBuild" default="main">
-       <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${buildHome}/build-files/ant-contrib.jar" />
-       <taskdef resource="org/pluginbuilder/anttasks/pluginbuildertasks.properties" classpath="${buildHome}/build-files/pluginbuilder-anttasks.jar" />
-       
-       
+    <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${buildHome}/build-files/ant-contrib.jar" />
+    <taskdef resource="org/pluginbuilder/anttasks/pluginbuildertasks.properties" classpath="${buildHome}/build-files/pluginbuilder-anttasks.jar" />
+    
+    
     <target name="main">
-       <property name="UpdateSiteStagingLocation" value="${buildDirectory}/tmpUpdateSite/updateSite"/>
-       <property name="UpdateSiteFinalLocation" value="${buildResultsDirectory}/../updateSite"/>
-       <property name="siteXmlFile" value="${UpdateSiteStagingLocation}/site.xml"/>
-       
+        <property name="UpdateSiteStagingLocation" value="${buildDirectory}/tmpUpdateSite/updateSite"/>
+        <property name="UpdateSiteFinalLocation" value="${buildResultsDirectory}/../updateSite"/>
+        <property name="siteXmlFile" value="${UpdateSiteStagingLocation}/site.xml"/>
+        
         <antcall target="-generateUpdateSite"/>
-       <antcall target="-createNightlyBuildSiteXml"/>
-       <zip destfile="${buildResultsDirectory}/updateSite-${version.full}.zip" basedir="${UpdateSiteStagingLocation}"/>
-       <antcall target="deleteSiteXml"/>
-       <copy todir="${UpdateSiteFinalLocation}">
-               <fileset dir="${UpdateSiteStagingLocation}" includes="**"/>
-       </copy>
-       <delete dir="${UpdateSiteStagingLocation}/../.." includes="tmpUpdateSite/**" includeemptydirs="true"/>
-       <antcall target="-p2"/>
+        <antcall target="-createNightlyBuildSiteXml"/>
+        <zip destfile="${buildResultsDirectory}/updateSite-${version.full}.zip" basedir="${UpdateSiteStagingLocation}"/>
+        <antcall target="deleteSiteXml"/>
+        <copy todir="${UpdateSiteFinalLocation}">
+            <fileset dir="${UpdateSiteStagingLocation}" includes="**"/>
+        </copy>
+        <delete dir="${UpdateSiteStagingLocation}/../.." includes="tmpUpdateSite/**" includeemptydirs="true"/>
+        <antcall target="-p2"/>
+    </target>
+    
+    <target name="deleteSiteXml" unless="isNightlyBuild">
+        <!-- in release builds the site.xml should not be overwritten, so older version can survive -->
+        <delete file="${siteXmlFile}"/>
     </target>
-       
-       <target name="deleteSiteXml" unless="isNightlyBuild">
-               <!-- in release builds the site.xml should not be overwritten, so older version can survive -->
-               <delete file="${siteXmlFile}"/>
-       </target>
     
     <!--======================================================-->
     <!-- UpdateSite Export target, to be called from allElements  -->
@@ -55,9 +55,9 @@
         <mkdir dir="${UpdateSiteStagingLocation}"/>
         <mkdir dir="${UpdateSiteStagingLocation}/features"/>
         <mkdir dir="${UpdateSiteStagingLocation}/plugins"/>
-       <condition property="jarProcessor.sign" value="true">
-               <istrue value="${signJars}"/>
-       </condition>
+        <condition property="jarProcessor.sign" value="true">
+            <istrue value="${signJars}"/>
+        </condition>
         <!-- Build the jar files -->
         <ant antfile="${builder}/customTargets.xml" target="allElements">
             <property name="genericTargets" value="${builder}/postBuild.xml"/>
         <antcall target="-createNightlyBuildSiteXml"/>
         <delete dir="${buildDirectory}/temp.updatesite"/>
     </target>
-       
+    
     <target name="-createNightlyBuildSiteXml">
-       <echo>${siteXmlFile}</echo>
+        <echo>${siteXmlFile}</echo>
         <echo file="${siteXmlFile}">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
 &lt;site&gt;
-               &lt;description&gt;${updateSiteDescription}&lt;/description&gt;
+        &lt;description&gt;${updateSiteDescription}&lt;/description&gt;
 </echo>
-       <foreach list="${pluginbuilder.features}" delimiter="," target="-appendFeatureElement" param="featureId" inheritall="true"/> 
-        <echo file="${siteXmlFile}" append="true">             &lt;category-def name=&quot;${updateSiteCategoryName}&quot;
+        <foreach list="${pluginbuilder.features}" delimiter="," target="-appendFeatureElement" param="featureId" inheritall="true"/> 
+        <echo file="${siteXmlFile}" append="true">      &lt;category-def name=&quot;${updateSiteCategoryName}&quot;
             label=&quot;${updateSiteCategoryLabel}&quot;&gt;
-               &lt;/category-def&gt;
+        &lt;/category-def&gt;
 &lt;/site&gt;</echo>
     </target>
 
-       <target name="-appendFeatureElement">
-               <!-- we can not rely on ${version.full} at this point since people could use
-                       a fix feature id like 0.5.0.qualifier. ${version.full} would only work if
-                       the feature were set to 0.0.0 --> 
-               <loadfile property="featurexml" srcfile="${buildDirectory}/features/${featureId}/feature.xml"/>
-               <SetRegex input="${featurexml}" match="^.*&lt;feature.+?version=&quot;(.+?)&quot;.*$" property="realFeatureVersion" value="\1" />
-       <echo file="${siteXmlFile}" append="true">              &lt;feature 
-               url=&quot;features/${featureId}_${realFeatureVersion}.jar&quot; 
-               id=&quot;${featureId}&quot; 
-               version=&quot;${realFeatureVersion}&quot;&gt; 
-       &lt;category name=&quot;${updateSiteCategoryName}&quot;/&gt; 
-               &lt;/feature&gt;
-</echo>        
+    <target name="-appendFeatureElement">
+        <!-- we can not rely on ${version.full} at this point since people could use
+            a fix feature id like 0.5.0.qualifier. ${version.full} would only work if
+            the feature were set to 0.0.0 --> 
+        <loadfile property="featurexml" srcfile="${buildDirectory}/features/${featureId}/feature.xml"/>
+        <SetRegex input="${featurexml}" match="^.*&lt;feature.+?version=&quot;(.+?)&quot;.*$" property="realFeatureVersion" value="\1" />
+        <echo file="${siteXmlFile}" append="true">      &lt;feature 
+        url=&quot;features/${featureId}_${realFeatureVersion}.jar&quot; 
+        id=&quot;${featureId}&quot; 
+        version=&quot;${realFeatureVersion}&quot;&gt; 
+        &lt;category name=&quot;${updateSiteCategoryName}&quot;/&gt; 
+        &lt;/feature&gt;
+</echo>     
     </target>
-       
-       <target name="-p2">
-               <condition property="is.p2" value="true">
-                               <equals  arg1="${generate.p2.metadata}" arg2="true"/>
-               </condition>
-               <property name="p2archive" value="${buildResultsDirectory}/p2-repository-${version.full}.zip"/>
-               <antcall target="-createP2Archive"/>
-               <antcall target="-createP2UpdateSite"/>
-       </target>
-               
-       <target name="-createP2Archive" if="is.p2">
-               <pathconvert property="repodir">
-                       <resources>
-                             <url url="${p2.metadata.repo}"/>
-                       </resources>
-                       <map from="file:" to=""/>
-               </pathconvert>
-               <zip destfile="${p2archive}" basedir="${repodir}"/>
-       </target>
-       
-       <target name="-createP2UpdateSite" if="is.p2">
-               <property name="p2updatesite" value="${buildResultsDirectory}/../p2-updateSite"/>
-               <delete dir="${p2updatesite}"/>
-               <mkdir dir="${p2updatesite}"/>
-               <unzip src="${p2archive}" dest="${p2updatesite}"/>
-       </target>
-       
+    
+    <target name="-p2">
+        <condition property="is.p2" value="true">
+                <equals  arg1="${generate.p2.metadata}" arg2="true"/>
+        </condition>
+        <property name="p2archive" value="${buildResultsDirectory}/p2-repository-${version.full}.zip"/>
+        <antcall target="-createP2Archive"/>
+        <antcall target="-createP2UpdateSite"/>
+    </target>
+        
+    <target name="-createP2Archive" if="is.p2">
+        <pathconvert property="repodir">
+            <resources>
+                  <url url="${p2.metadata.repo}"/>
+            </resources>
+            <map from="file:" to=""/>
+        </pathconvert>
+        <zip destfile="${p2archive}" basedir="${repodir}"/>
+    </target>
+    
+    <target name="-createP2UpdateSite" if="is.p2">
+        <property name="p2updatesite" value="${buildResultsDirectory}/../p2-updateSite"/>
+        <delete dir="${p2updatesite}"/>
+        <mkdir dir="${p2updatesite}"/>
+        <unzip src="${p2archive}" dest="${p2updatesite}"/>
+    </target>
+    
 </project>
index 84ae0cf..3ef0b62 100644 (file)
 -->
 <project name="to be included into customTargets.xml">
 
-       <import file="fetchSvnAll.xml"/>
+    <import file="fetchSvnAll.xml"/>
 
-       <path id="project.classpath">
-               <pathelement location="${buildHome}/build-files/svn/svnant.jar"/>
-               <pathelement location="${buildHome}/build-files/svn/svnClientAdapter.jar"/>
-       </path>
-       
-       <target name="fetchSubversion" if="is.svn.fetch">
-                <taskdef resource="svntask.properties" classpathref="project.classpath"/>
-                <property name="fetchTag" value="HEAD"/>
-                <antcall target="fetch.svn.all"/>
-       </target>
+    <path id="project.classpath">
+        <pathelement location="${buildHome}/build-files/svn/svnant.jar"/>
+        <pathelement location="${buildHome}/build-files/svn/svnClientAdapter.jar"/>
+    </path>
+    
+    <target name="fetchSubversion" if="is.svn.fetch">
+         <taskdef resource="svntask.properties" classpathref="project.classpath"/>
+         <property name="fetchTag" value="HEAD"/>
+         <antcall target="fetch.svn.all"/>
+    </target>
     
     <target name="svn.co">
-       <property name="target.dir" value="${element.id}"/>
-       <condition property="svn.url" value="${pluginbuilder.svn.url}" else="${url}">
-               <isset property="pluginbuilder.svn.url"/>
-       </condition>
-       <svn javahl="false" username="${pluginbuilder.svn.user}" password="${pluginbuilder.svn.password}">
-                       <checkout revision="${fetchTag}" url="${svn.url}/${project.name}" destPath="${buildDirectory}/${target}/${target.dir}" />
-               </svn>          
-       </target>  
+        <property name="target.dir" value="${element.id}"/>
+        <condition property="svn.url" value="${pluginbuilder.svn.url}" else="${url}">
+            <isset property="pluginbuilder.svn.url"/>
+        </condition>
+        <svn javahl="false" username="${pluginbuilder.svn.user}" password="${pluginbuilder.svn.password}">
+            <checkout revision="${fetchTag}" url="${svn.url}/${project.name}" destPath="${buildDirectory}/${target}/${target.dir}" />
+        </svn>      
+    </target>  
 
-</project>
\ No newline at end of file
+</project>
index fdf3bf4..039ab70 100644 (file)
@@ -42,7 +42,7 @@ collectingFolder=${archivePrefix}
 #The list can only contain the configuration for which the desired format is different than zip.
 # E.g. win32,win32,x86 - antZip
 #archivesFormat=
-       
+    
 # Set to true for Jnlp generation
 # @category jnlp
 # @type Boolean
@@ -66,7 +66,7 @@ collectingFolder=${archivePrefix}
 # Set to ${configs} in order to filter the content of the generated jnlp files based on the configuration being built
 # @category jnlp
 # @type enum values=${configs} 
-# jnlp.configs=                        
+# jnlp.configs=         
 
 # Check if you want to sign jars
 # @type Boolean
@@ -222,4 +222,4 @@ p2.artifact.repo.name=Artifact Repo Name
 # @category hidden
 p2.flavor=tooling
 # @category hidden
-p2.publish.artifacts=true
\ No newline at end of file
+p2.publish.artifacts=true
index 483b341..6bafbdc 100644 (file)
       If you modify this script it is likely that the build will not work on the server
 -->
 <project name="Build Facade" default="main">
-       <taskdef resource="org/pluginbuilder/anttasks/pluginbuildertasks.properties" classpath="build-files/pluginbuilder-anttasks.jar" />
-       
-       <GetHostName />
-       <property file="build_${hostname}.properties" />
-       <property file="build_local.properties" />
-       <property name="eclipse.installation.dir" value="${eclipseDir}"/>
-       <import file="build-files/build_shared.xml"/>
-       
-       <target name="-properties">             
-               
-               <!-- versioning -->
-               <property name="build.version" value="HEAD"/>
-               <property name="releaseConfigFile" value="releases/${build.version}.properties"/>
-               <condition property="releaseConfigFile.exists">
-                       <available file="${releaseConfigFile}"/>
-               </condition>
-               <fail message="Could not read release config file: ${releaseConfigFile}" unless="releaseConfigFile.exists"/>
-               <property file="${releaseConfigFile}" />
+    <taskdef resource="org/pluginbuilder/anttasks/pluginbuildertasks.properties" classpath="build-files/pluginbuilder-anttasks.jar" />
+    
+    <GetHostName />
+    <property file="build_${hostname}.properties" />
+    <property file="build_local.properties" />
+    <property name="eclipse.installation.dir" value="${eclipseDir}"/>
+    <import file="build-files/build_shared.xml"/>
+    
+    <target name="-properties">     
+        
+        <!-- versioning -->
+        <property name="build.version" value="HEAD"/>
+        <property name="releaseConfigFile" value="releases/${build.version}.properties"/>
+        <condition property="releaseConfigFile.exists">
+            <available file="${releaseConfigFile}"/>
+        </condition>
+        <fail message="Could not read release config file: ${releaseConfigFile}" unless="releaseConfigFile.exists"/>
+        <property file="${releaseConfigFile}" />
 
-               <tstamp>
-                     <format property="version.qualifier" pattern="yyyyMMddHHmm" timezone="GMT" unit="minute"/>
-               </tstamp>
-               
-               <property name="buildTypePresentation" value=""/>
-               <property name="version.full" value="${version}.${version.qualifier}${buildTypePresentation}"/>
+        <tstamp>
+              <format property="version.qualifier" pattern="yyyyMMddHHmm" timezone="GMT" unit="minute"/>
+        </tstamp>
+        
+        <property name="buildTypePresentation" value=""/>
+        <property name="version.full" value="${version}.${version.qualifier}${buildTypePresentation}"/>
 
-               <!-- includes -->
-               <GetHostName />
-               <property file="build_${hostname}.properties" />
-               <property file="build_local.properties" />
-               <property file="pluginbuilder.config" />
-               
-               <!-- set defaults -->
-               <property name="buildTarget" value="main"/>
-               <property name="verboseAnt" value="-Ddummy=true"/>
-               
-               <!-- check if clean should be called -->
-               <condition property="is.clean">
-                       <or>
-                               <equals arg1="main" arg2="${buildTarget}" trim="true"/>
-                               <equals arg1="fetch" arg2="${buildTarget}" trim="true"/>
-                       </or>
-               </condition>
-               
-               <condition property="no.rcp.build" value="true">
-                       <not>
-                               <equals arg1="${pluginbuilder.is.rcpbuild}" arg2="true"/>
-                       </not>
-               </condition>
-                               
-       </target>
-               
-       <target name="-prepare.build.host">
+        <!-- includes -->
+        <GetHostName />
+        <property file="build_${hostname}.properties" />
+        <property file="build_local.properties" />
+        <property file="pluginbuilder.config" />
+        
+        <!-- set defaults -->
+        <property name="buildTarget" value="main"/>
+        <property name="verboseAnt" value="-Ddummy=true"/>
+        
+        <!-- check if clean should be called -->
+        <condition property="is.clean">
+            <or>
+                <equals arg1="main" arg2="${buildTarget}" trim="true"/>
+                <equals arg1="fetch" arg2="${buildTarget}" trim="true"/>
+            </or>
+        </condition>
+        
+        <condition property="no.rcp.build" value="true">
+            <not>
+                <equals arg1="${pluginbuilder.is.rcpbuild}" arg2="true"/>
+            </not>
+        </condition>
+                
+    </target>
+        
+    <target name="-prepare.build.host">
 
-               <antcall target="unpack.eclipse"/>
-               
-               <available type="dir" file="${eclipseDir}/plugins" property="eclipseDir.plugins.exists"/>
-               <fail message="Could not find directory ${eclipseDir}/plugins. Please check eclipseDir in build_local.properties" unless="eclipseDir.plugins.exists"/>
-               
-               <!-- determine buildfiles -->
-               <BundleFileLocator eclipseInstallationRoot="${eclipseDir}" bundleId="org.eclipse.pde.build" filePath="scripts/build.xml" property="regularbuildfile" />         
-               <dirname file="${regularbuildfile}" property="scriptdir"/>
-               <property name="productbuildfile" value="${scriptdir}/productBuild/productBuild.xml"/>
-       
-               <!-- determine launcher -->
-               <BundleFileLocator eclipseInstallationRoot="${eclipseDir}" bundleId="org.eclipse.equinox.launcher" property="equinoxjar" />             
+        <antcall target="unpack.eclipse"/>
+        
+        <available type="dir" file="${eclipseDir}/plugins" property="eclipseDir.plugins.exists"/>
+        <fail message="Could not find directory ${eclipseDir}/plugins. Please check eclipseDir in build_local.properties" unless="eclipseDir.plugins.exists"/>
+        
+        <!-- determine buildfiles -->
+        <BundleFileLocator eclipseInstallationRoot="${eclipseDir}" bundleId="org.eclipse.pde.build" filePath="scripts/build.xml" property="regularbuildfile" />     
+        <dirname file="${regularbuildfile}" property="scriptdir"/>
+        <property name="productbuildfile" value="${scriptdir}/productBuild/productBuild.xml"/>
+    
+        <!-- determine launcher -->
+        <BundleFileLocator eclipseInstallationRoot="${eclipseDir}" bundleId="org.eclipse.equinox.launcher" property="equinoxjar" />     
 
-       </target>
-       
-       <target name="-clean" if="is.clean">
-               <echo level="info" message="Cleaning directory ${buildDirectory}"/>
-               <delete dir="${buildDirectory}" verbose="false"/>
-               <mkdir dir="${buildDirectory}"/>
-       </target>
-       
-       <target name="-build" depends="-properties,-clean,-prepare.build.host">
-               <condition property="no.rcp.build" value="true">
-                       <not>
-                               <equals arg1="${pluginbuilder.is.rcpbuild}" arg2="true"/>
-                       </not>
-               </condition>
-               <antcall target="-build.internal">
-                       <param name="buildfile" value="${regularbuildfile}"/>
-           </antcall>
-               <!-- build rcp omitting fetch -->
-               <property name="buildSystemProperty.skipFetch" value="true"/>
-               <antcall target="-build.rcp.internal"/>
-       </target>
-       
-       <target name="-build.rcp.internal" unless="no.rcp.build">
-               <property prefix="buildSystemProperty." file="${buildHome}/build-files/build_rcp.properties"/>
-               <antcall target="-checkProductProperty"/>
-               <antcall target="-build.internal"> 
-                       <param name="buildfile" value="${productbuildfile}"/>
-               </antcall>
-       </target>
+    </target>
+    
+    <target name="-clean" if="is.clean">
+        <echo level="info" message="Cleaning directory ${buildDirectory}"/>
+        <delete dir="${buildDirectory}" verbose="false"/>
+        <mkdir dir="${buildDirectory}"/>
+    </target>
+    
+    <target name="-build" depends="-properties,-clean,-prepare.build.host">
+        <condition property="no.rcp.build" value="true">
+            <not>
+                <equals arg1="${pluginbuilder.is.rcpbuild}" arg2="true"/>
+            </not>
+        </condition>
+        <antcall target="-build.internal">
+            <param name="buildfile" value="${regularbuildfile}"/>
+        </antcall>
+        <!-- build rcp omitting fetch -->
+        <property name="buildSystemProperty.skipFetch" value="true"/>
+        <antcall target="-build.rcp.internal"/>
+    </target>
+    
+    <target name="-build.rcp.internal" unless="no.rcp.build">
+        <property prefix="buildSystemProperty." file="${buildHome}/build-files/build_rcp.properties"/>
+        <antcall target="-checkProductProperty"/>
+        <antcall target="-build.internal"> 
+            <param name="buildfile" value="${productbuildfile}"/>
+        </antcall>
+    </target>
 
-       <target name="-checkProductProperty">
-               <condition property="isProductSet">
-                       <and>
-                               <isset property="buildSystemProperty.product"/>
-                               <not><equals arg1="${product}" arg2=""/></not>
-                       </and>
-               </condition>
-               <fail message="Building an RCP application requires a Product Configuration file to be specified ('product' property)." unless="isProductSet"/>
-       </target>
-       
-       <target name="rcp" depends="-properties,-clean,-prepare.build.host" description="Build RCP only">
-               <fail message="Please enable and configure an RCP build in the Plug-in Builder Editor before calling this target." if="no.rcp.build"/>
-               <antcall target="-build.rcp.internal"/>
-       </target>
+    <target name="-checkProductProperty">
+        <condition property="isProductSet">
+            <and>
+                <isset property="buildSystemProperty.product"/>
+                <not><equals arg1="${product}" arg2=""/></not>
+            </and>
+        </condition>
+        <fail message="Building an RCP application requires a Product Configuration file to be specified ('product' property)." unless="isProductSet"/>
+    </target>
+    
+    <target name="rcp" depends="-properties,-clean,-prepare.build.host" description="Build RCP only">
+        <fail message="Please enable and configure an RCP build in the Plug-in Builder Editor before calling this target." if="no.rcp.build"/>
+        <antcall target="-build.rcp.internal"/>
+    </target>
 
-       <target name="-build.internal">
-               <property name="buildResultsDirectory" value="${buildDirectory}/results" />
-               
-               <java classname="org.eclipse.equinox.launcher.Main" fork="true" 
-                       failonerror="true" errorproperty="build.stderr">
-                       <arg value="-ws" />
-                       <arg value="${ws}" />
-                       <arg value="-os" />
-                       <arg value="${os}" />
-                       <arg value="-application" />
-                       <arg value="org.eclipse.ant.core.antRunner" />
-                       <arg value="-buildfile" />
-                       <arg value="${buildfile}" />
-                       <arg value="${buildTarget}" />
-                       <arg value="-data" />
-                       <arg value="${buildDirectory}/workspace" />
-                       <arg value="${verboseAnt}"/>
-                       <jvmarg value="-Dbasews=${ws}" />
-                       <jvmarg value="-Dbaseos=${os}" />
-                       <jvmarg value="-Dbasearch=${arch}" />
-                       <jvmarg value="-Dbuilder=${buildHome}/build-files" />
-                       <jvmarg value="-DjavacFailOnError=true"/>
-                       <jvmarg value="-DbuildDirectory=${buildDirectory}"/>
-                       <jvmarg value="-DbuildResultsDirectory=${buildResultsDirectory}"/>
-                       <jvmarg value="-DbaseLocation=${eclipseDir}"/>
-                       <jvmarg value="-DbuildHome=${buildHome}"/>
-                       <jvmarg value="-Dversion.full=${version.full}"/>
-                       <jvmarg value="-Dversion.qualifier=${version.qualifier}${buildTypePresentation}"/>
-                       <jvmarg value="-DbuildType=${buildType}"/>
-                       <jvmarg value="-DfetchTag=${fetchTag}"/>
-                       <jvmarg value="-DbuildProperties=${buildHome}/build-files/build.properties"/>
+    <target name="-build.internal">
+        <property name="buildResultsDirectory" value="${buildDirectory}/results" />
+        
+        <java classname="org.eclipse.equinox.launcher.Main" fork="true" 
+            failonerror="true" errorproperty="build.stderr">
+            <arg value="-ws" />
+            <arg value="${ws}" />
+            <arg value="-os" />
+            <arg value="${os}" />
+            <arg value="-application" />
+            <arg value="org.eclipse.ant.core.antRunner" />
+            <arg value="-buildfile" />
+            <arg value="${buildfile}" />
+            <arg value="${buildTarget}" />
+            <arg value="-data" />
+            <arg value="${buildDirectory}/workspace" />
+            <arg value="${verboseAnt}"/>
+            <jvmarg value="-Dbasews=${ws}" />
+            <jvmarg value="-Dbaseos=${os}" />
+            <jvmarg value="-Dbasearch=${arch}" />
+            <jvmarg value="-Dbuilder=${buildHome}/build-files" />
+            <jvmarg value="-DjavacFailOnError=true"/>
+            <jvmarg value="-DbuildDirectory=${buildDirectory}"/>
+            <jvmarg value="-DbuildResultsDirectory=${buildResultsDirectory}"/>
+            <jvmarg value="-DbaseLocation=${eclipseDir}"/>
+            <jvmarg value="-DbuildHome=${buildHome}"/>
+            <jvmarg value="-Dversion.full=${version.full}"/>
+            <jvmarg value="-Dversion.qualifier=${version.qualifier}${buildTypePresentation}"/>
+            <jvmarg value="-DbuildType=${buildType}"/>
+            <jvmarg value="-DfetchTag=${fetchTag}"/>
+            <jvmarg value="-DbuildProperties=${buildHome}/build-files/build.properties"/>
 
-                       <classpath>
-                               <pathelement location="${equinoxjar}" />
-                       </classpath>
-                       
-                       <syspropertyset>
-                               <propertyset>
-                                       <propertyref prefix="buildSystemProperty"/>
-                                       <mapper type="glob" from="buildSystemProperty.*" to="*"/>
-                               </propertyset>
-                       </syspropertyset>
-               </java>
-               
-               <!-- save stderr for scrutinizing later -->
-               <echo file="${buildDirectory}/stderr.txt">${build.stderr}</echo>
-               
-               <echo taskname="stderr">${build.stderr}</echo>
-               
-               <condition property="is.build.error" value="true">
-                       <contains string="${build.stderr}" substring="BUILD FAILED"/>
-               </condition>
-               <!-- Note that the fail task throws an exception which will be intercepted
-                    from calling antcalls. During that processing the status will 
-                    be lost and set to 1. Therefor ethe processing of TESTS FAILED which should 
-                    return an exit status of 2 can only take place in main targets. --> 
-               <fail message="PDE Build failed" if="is.build.error" status="1"/>
+            <classpath>
+                <pathelement location="${equinoxjar}" />
+            </classpath>
+            
+            <syspropertyset>
+                <propertyset>
+                    <propertyref prefix="buildSystemProperty"/>
+                    <mapper type="glob" from="buildSystemProperty.*" to="*"/>
+                </propertyset>
+            </syspropertyset>
+        </java>
+        
+        <!-- save stderr for scrutinizing later -->
+        <echo file="${buildDirectory}/stderr.txt">${build.stderr}</echo>
+        
+        <echo taskname="stderr">${build.stderr}</echo>
+        
+        <condition property="is.build.error" value="true">
+            <contains string="${build.stderr}" substring="BUILD FAILED"/>
+        </condition>
+        <!-- Note that the fail task throws an exception which will be intercepted
+             from calling antcalls. During that processing the status will 
+             be lost and set to 1. Therefor ethe processing of TESTS FAILED which should 
+             return an exit status of 2 can only take place in main targets. --> 
+        <fail message="PDE Build failed" if="is.build.error" status="1"/>
 
-       </target>
-       
-       <target name="main-cc"
-                       description="This target is suited to be run from cruisecontrol. The property 'label' is expected to be set from cruisecontrol.">
-               <!-- Note that pluginbuilder also provides an EclipseLabelIncrementer which creates Eclipse version labels.
-                       see http://www.pluginbuilder.org/faq.html -->
-               <property name="version.full" value="${label}"/> 
-               <SetRegex input="${label}" match=".+\..+\..+\.(.*)" property="version.qualifier" value="\1" />
-               <antcall target="-build"/>
-       </target>
-       
-       <target name="main" description="Run the main target of customTargets.xml. Return status 0,1,2 for Success, Build Failure and Test Failure">
-               <property name="buildTarget" value="main"/>
-               <antcall target="-build"/>
+    </target>
+    
+    <target name="main-cc"
+            description="This target is suited to be run from cruisecontrol. The property 'label' is expected to be set from cruisecontrol.">
+        <!-- Note that pluginbuilder also provides an EclipseLabelIncrementer which creates Eclipse version labels.
+            see http://www.pluginbuilder.org/faq.html -->
+        <property name="version.full" value="${label}"/> 
+        <SetRegex input="${label}" match=".+\..+\..+\.(.*)" property="version.qualifier" value="\1" />
+        <antcall target="-build"/>
+    </target>
+    
+    <target name="main" description="Run the main target of customTargets.xml. Return status 0,1,2 for Success, Build Failure and Test Failure">
+        <property name="buildTarget" value="main"/>
+        <antcall target="-build"/>
 
-               <!-- this must be done in a top level target because otherwise the 
-                    status would not get throuhg. If fail is called somewhere within
-                    an antcall the created exception will be caught which would result
-                    in a return status of 1 -->
-               <loadfile srcFile="${buildDirectory}/stderr.txt" property="build.stderr"/>
-               <condition property="is.tests.failed" value="true">
-                       <contains string="${build.stderr}" substring="TESTS FAILED"/>
-               </condition>
-               <fail message="Tests failed" if="is.tests.failed" status="2"/>          
-       </target>
+        <!-- this must be done in a top level target because otherwise the 
+             status would not get throuhg. If fail is called somewhere within
+             an antcall the created exception will be caught which would result
+             in a return status of 1 -->
+        <loadfile srcFile="${buildDirectory}/stderr.txt" property="build.stderr"/>
+        <condition property="is.tests.failed" value="true">
+            <contains string="${build.stderr}" substring="TESTS FAILED"/>
+        </condition>
+        <fail message="Tests failed" if="is.tests.failed" status="2"/>      
+    </target>
 
-       <target name="fetch" description="Run the fetch target of customTargets.xml.">
-               <property name="buildTarget" value="fetch"/>
-               <antcall target="-build"/>
-       </target>       
-       
-       <target name="generate" description="Run the generate target of customTargets.xml.">
-               <property name="buildTarget" value="generate"/>
-               <antcall target="-build"/>
-       </target>
-       
-       <target name="process" description="Run the process target of customTargets.xml.">
-               <property name="buildTarget" value="process"/>
-               <antcall target="-build"/>
-       </target>
-                       
-       <target name="assemble" description="Run the assemble target of customTargets.xml.">
-               <property name="buildTarget" value="assemble"/>
-               <antcall target="-build"/>
-       </target>
-       
-       <target name="postBuild" description="Run the postBuild target of customTargets.xml.">
-               <property name="buildTarget" value="postBuild"/>
-               <antcall target="-build"/>
-               <!-- see main for a description why this must take place here. It is very ugly -->
-               <loadfile srcFile="${buildDirectory}/stderr.txt" property="build.stderr"/>
-               <condition property="is.tests.failed" value="true">
-                       <contains string="${build.stderr}" substring="TESTS FAILED"/>
-               </condition>
-               <fail message="Tests failed" if="is.tests.failed" status="2"/>
-       </target>
-       
-       <target name="buildProperties" description="Print out derived properties for the current build." depends="-properties">
-               <fail message="You have to set the property 'buildPropertiesFile' if calling buildProperties" unless="buildPropertiesFile"/>
-               <condition property="subdir" value="nightly" else="releases">
-                       <equals arg1="${buildType}" arg2="N"/>
-               </condition>
-               <echo file="${buildPropertiesFile}">relativeServerResultsDir: ${subdir}
+    <target name="fetch" description="Run the fetch target of customTargets.xml.">
+        <property name="buildTarget" value="fetch"/>
+        <antcall target="-build"/>
+    </target>   
+    
+    <target name="generate" description="Run the generate target of customTargets.xml.">
+        <property name="buildTarget" value="generate"/>
+        <antcall target="-build"/>
+    </target>
+    
+    <target name="process" description="Run the process target of customTargets.xml.">
+        <property name="buildTarget" value="process"/>
+        <antcall target="-build"/>
+    </target>
+            
+    <target name="assemble" description="Run the assemble target of customTargets.xml.">
+        <property name="buildTarget" value="assemble"/>
+        <antcall target="-build"/>
+    </target>
+    
+    <target name="postBuild" description="Run the postBuild target of customTargets.xml.">
+        <property name="buildTarget" value="postBuild"/>
+        <antcall target="-build"/>
+        <!-- see main for a description why this must take place here. It is very ugly -->
+        <loadfile srcFile="${buildDirectory}/stderr.txt" property="build.stderr"/>
+        <condition property="is.tests.failed" value="true">
+            <contains string="${build.stderr}" substring="TESTS FAILED"/>
+        </condition>
+        <fail message="Tests failed" if="is.tests.failed" status="2"/>
+    </target>
+    
+    <target name="buildProperties" description="Print out derived properties for the current build." depends="-properties">
+        <fail message="You have to set the property 'buildPropertiesFile' if calling buildProperties" unless="buildPropertiesFile"/>
+        <condition property="subdir" value="nightly" else="releases">
+            <equals arg1="${buildType}" arg2="N"/>
+        </condition>
+        <echo file="${buildPropertiesFile}">relativeServerResultsDir: ${subdir}
 version.full: ${version.full}
 version.qualifier: ${version.qualifier}</echo>
-       </target>
+    </target>
 
-</project>
\ No newline at end of file
+</project>
index 16e35dc..30a1e29 100644 (file)
@@ -38,4 +38,4 @@ ws=gtk
 
 # Environment for both the Eclipse build and test host. Determines basearch.
 # @category localsettings
-arch=x86
\ No newline at end of file
+arch=x86
index 6b092fd..39d8625 100644 (file)
@@ -15,7 +15,7 @@
    limitations under the License.
 -->
 <project name="Shared build targets">
-       <!-- the following properties must be set from the calling script 
+    <!-- the following properties must be set from the calling script 
     <property name="eclipse.installation.dir" value="${buildDirectory}"/>
     <property name="eclipse.local.tar.non.server" value="${test.eclipse.zip}"/>
     eclipse.download.cache,pluginbuilder.eclipse.url
     <property name="pluginbuilder.additional.feature.urls" value="featureurl1,featureurl2"/>
     -->
     
-       <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${buildHome}/build-files/ant-contrib.jar" />
-       
-       <target name="unpack.eclipse">
-               <condition property="unpack.eclipse">
-                       <not>
-                               <available type="dir" file="${eclipse.installation.dir}"/>
-                       </not>
-               </condition>
-               <antcall target="-unpack.eclipse.ifnecessary"/>
-       </target>    
+    <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${buildHome}/build-files/ant-contrib.jar" />
     
-       <!-- call either with or feature.url or pluginbuilder.eclipse.url
-                sets property archive.location to the archive path in download cache.
-        -->
-       <target name="-set.archive.location" if="pluginbuilder.is.server">
-               <!-- set default, useful for server where pluginbuilder.eclipse.url.default can be specified in build_local.properties --> 
-               <property name="pluginbuilder.eclipse.url" value="${pluginbuilder.eclipse.url.default}"/>
-               <condition property="archive.url" value="${feature.url}" else="${pluginbuilder.eclipse.url}">
-                               <isset property="feature.url"/>
-               </condition>
-               <mkdir dir="${eclipse.download.cache}"/>
-               <tempfile destdir="${eclipse.download.cache}" property="tmp.file" suffix=".txt" prefix="downloadurl"/>          
-               <echo file="${tmp.file}" message="${archive.url}"/>
-               <checksum file="${tmp.file}" property="pluginbuilder.eclipse.url.checksum"/>
-               <delete file="${tmp.file}"/>
-               <property name="archive.location" value="${eclipse.download.cache}/${pluginbuilder.eclipse.url.checksum}"/>
-               <!-- <echo message="${archive.location} is archive location for ${archive.url}"/> -->
-       </target>
-       
-       <target name="-set.eclipse.local.tar.server" if="pluginbuilder.is.server" depends="-set.archive.location">
-               <property name="eclipse.local.tar" value="${archive.location}"/>
-       </target>
-       
-       <target name="-set.eclipse.local.tar.non.server" unless="pluginbuilder.is.server">
-               <property name="eclipse.local.tar" value="${eclipse.local.tar.non.server}"/>
-       </target>
-       
-       <target name="-get.archive.ifnecessary" unless="eclipse.is.downloaded">
-               <condition property="archive.url" value="${feature.url}" else="${pluginbuilder.eclipse.url}">
-                               <isset property="feature.url"/>
-               </condition>
-               <get src="${archive.url}" dest="${archive.location}" />         
-       </target>
-       
-       <target name="-get.archive" depends="-set.archive.location" if="pluginbuilder.is.server">
-               <condition property="eclipse.is.downloaded">
-                       <available file="${archive.location}" property="${eclipse.is.downloaded}"/>
-               </condition>            
-               <antcall target="-get.archive.ifnecessary"/> 
-       </target>
-       
-       <target name="-get.features" if="pluginbuilder.is.server" >
-               <property name="pluginbuilder.feature.urls" value="${pluginbuilder.feature.urls.default}"/>
-               <foreach list="${pluginbuilder.feature.urls}" param="feature.url" delimiter="," target="-get.archive" inheritall="true"/>
-       </target>
-       
-       <target name="-unpack.features" if="pluginbuilder.is.server">
-               <property name="pluginbuilder.feature.urls" value="${pluginbuilder.feature.urls.default}"/>
-               <foreach list="${pluginbuilder.feature.urls}" param="feature.url" delimiter="," target="-unpack.feature" inheritall="true"/>
-       </target>
-       
-       <target name="-unpack.feature" depends="-set.archive.location">
-               <property name="tempunziplocation" value="${buildDirectory}/tmpunzip"/>
-               <delete dir="${tempunziplocation}" failonerror="false"/>
-               <mkdir dir="${tempunziplocation}"/>
-               <unzip src="${archive.location}" overwrite="true" dest="${tempunziplocation}"/>
-               <condition property="moveroot" value="${tempunziplocation}/eclipse" else="${tempunziplocation}">
-                               <available file="${tempunziplocation}/eclipse" type="dir"/>
-               </condition>
-               <move todir="${eclipse.installation.dir}" includeemptydirs="true">
-                       <fileset dir="${moveroot}" includes="**"/>
-               </move>
-       </target>
-                       
-       <target name="-unpack.eclipse.ifnecessary" if="unpack.eclipse">
-               <antcall target="-get.archive"/>
-               <condition property="is.windows">
-                 <os family="windows"/>
-               </condition>
-               <antcall target="-unpack.eclipse.windows"/>
-               <antcall target="-unpack.eclipse.linux"/>
-               <antcall target="-get.features"/>
-               <antcall target="-unpack.features"/>
-       </target>
-       
-       <target name="-unpack.eclipse.windows" if="is.windows" depends="-set.eclipse.local.tar.server,-set.eclipse.local.tar.non.server">
-               <unzip src="${eclipse.local.tar}" overwrite="true" dest="${eclipse.installation.dir}/.."/>              
-       </target>
-       
-       <target name="-unpack.eclipse.linux" unless="is.windows" depends="-set.eclipse.local.tar.server,-set.eclipse.local.tar.non.server">
-               <untar src="${eclipse.local.tar}" overwrite="true" dest="${eclipse.installation.dir}/.." compression="gzip"/>           
-       </target>
-       
-       <target name="test">
-               <property name="buildDirectory" value="C:/Temp/tst"/>
-               <mkdir dir="${buildDirectory}"/>
-               <property name="eclipse.download.cache" value="C:/Temp/downloadcache"/>
-               <property name="pluginbuilder.is.server" value="true"/>
-               <property name="pluginbuilder.eclipse.url" value="http://mirror.yoxos-eclipse-distribution.de/eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/eclipse-PDE-3.2.2.zip"/>
-               
-               <property name="eclipse.installation.dir" value="C:/Temp/eclipse_root/eclipse"/>
-               <delete dir="${eclipse.installation.dir}" failonerror="false"/>
-               <property name="pluginbuilder.feature.urls" value="http://self.pluginbuilder.org/0.2.0/org.pluginbuilder.feature-0.2.0.20070218PRD.zip,http://mirror.yoxos-eclipse-distribution.de/eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/eclipse-examples-3.2.2.zip"/>
-               <antcall target="unpack.eclipse"/>
-       </target>
-       
-</project>
\ No newline at end of file
+    <target name="unpack.eclipse">
+        <condition property="unpack.eclipse">
+            <not>
+                <available type="dir" file="${eclipse.installation.dir}"/>
+            </not>
+        </condition>
+        <antcall target="-unpack.eclipse.ifnecessary"/>
+    </target>    
+    
+    <!-- call either with or feature.url or pluginbuilder.eclipse.url
+         sets property archive.location to the archive path in download cache.
+     -->
+    <target name="-set.archive.location" if="pluginbuilder.is.server">
+        <!-- set default, useful for server where pluginbuilder.eclipse.url.default can be specified in build_local.properties --> 
+        <property name="pluginbuilder.eclipse.url" value="${pluginbuilder.eclipse.url.default}"/>
+        <condition property="archive.url" value="${feature.url}" else="${pluginbuilder.eclipse.url}">
+                <isset property="feature.url"/>
+        </condition>
+        <mkdir dir="${eclipse.download.cache}"/>
+        <tempfile destdir="${eclipse.download.cache}" property="tmp.file" suffix=".txt" prefix="downloadurl"/>      
+        <echo file="${tmp.file}" message="${archive.url}"/>
+        <checksum file="${tmp.file}" property="pluginbuilder.eclipse.url.checksum"/>
+        <delete file="${tmp.file}"/>
+        <property name="archive.location" value="${eclipse.download.cache}/${pluginbuilder.eclipse.url.checksum}"/>
+        <!-- <echo message="${archive.location} is archive location for ${archive.url}"/> -->
+    </target>
+    
+    <target name="-set.eclipse.local.tar.server" if="pluginbuilder.is.server" depends="-set.archive.location">
+        <property name="eclipse.local.tar" value="${archive.location}"/>
+    </target>
+    
+    <target name="-set.eclipse.local.tar.non.server" unless="pluginbuilder.is.server">
+        <property name="eclipse.local.tar" value="${eclipse.local.tar.non.server}"/>
+    </target>
+    
+    <target name="-get.archive.ifnecessary" unless="eclipse.is.downloaded">
+        <condition property="archive.url" value="${feature.url}" else="${pluginbuilder.eclipse.url}">
+                <isset property="feature.url"/>
+        </condition>
+        <get src="${archive.url}" dest="${archive.location}" />     
+    </target>
+    
+    <target name="-get.archive" depends="-set.archive.location" if="pluginbuilder.is.server">
+        <condition property="eclipse.is.downloaded">
+            <available file="${archive.location}" property="${eclipse.is.downloaded}"/>
+        </condition>        
+        <antcall target="-get.archive.ifnecessary"/> 
+    </target>
+    
+    <target name="-get.features" if="pluginbuilder.is.server" >
+        <property name="pluginbuilder.feature.urls" value="${pluginbuilder.feature.urls.default}"/>
+        <foreach list="${pluginbuilder.feature.urls}" param="feature.url" delimiter="," target="-get.archive" inheritall="true"/>
+    </target>
+    
+    <target name="-unpack.features" if="pluginbuilder.is.server">
+        <property name="pluginbuilder.feature.urls" value="${pluginbuilder.feature.urls.default}"/>
+        <foreach list="${pluginbuilder.feature.urls}" param="feature.url" delimiter="," target="-unpack.feature" inheritall="true"/>
+    </target>
+    
+    <target name="-unpack.feature" depends="-set.archive.location">
+        <property name="tempunziplocation" value="${buildDirectory}/tmpunzip"/>
+        <delete dir="${tempunziplocation}" failonerror="false"/>
+        <mkdir dir="${tempunziplocation}"/>
+        <unzip src="${archive.location}" overwrite="true" dest="${tempunziplocation}"/>
+        <condition property="moveroot" value="${tempunziplocation}/eclipse" else="${tempunziplocation}">
+                <available file="${tempunziplocation}/eclipse" type="dir"/>
+        </condition>
+        <move todir="${eclipse.installation.dir}" includeemptydirs="true">
+            <fileset dir="${moveroot}" includes="**"/>
+        </move>
+    </target>
+            
+    <target name="-unpack.eclipse.ifnecessary" if="unpack.eclipse">
+        <antcall target="-get.archive"/>
+        <condition property="is.windows">
+          <os family="windows"/>
+        </condition>
+        <antcall target="-unpack.eclipse.windows"/>
+        <antcall target="-unpack.eclipse.linux"/>
+        <antcall target="-get.features"/>
+        <antcall target="-unpack.features"/>
+    </target>
+    
+    <target name="-unpack.eclipse.windows" if="is.windows" depends="-set.eclipse.local.tar.server,-set.eclipse.local.tar.non.server">
+        <unzip src="${eclipse.local.tar}" overwrite="true" dest="${eclipse.installation.dir}/.."/>      
+    </target>
+    
+    <target name="-unpack.eclipse.linux" unless="is.windows" depends="-set.eclipse.local.tar.server,-set.eclipse.local.tar.non.server">
+        <untar src="${eclipse.local.tar}" overwrite="true" dest="${eclipse.installation.dir}/.." compression="gzip"/>       
+    </target>
+    
+    <target name="test">
+        <property name="buildDirectory" value="C:/Temp/tst"/>
+        <mkdir dir="${buildDirectory}"/>
+        <property name="eclipse.download.cache" value="C:/Temp/downloadcache"/>
+        <property name="pluginbuilder.is.server" value="true"/>
+        <property name="pluginbuilder.eclipse.url" value="http://mirror.yoxos-eclipse-distribution.de/eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/eclipse-PDE-3.2.2.zip"/>
+        
+        <property name="eclipse.installation.dir" value="C:/Temp/eclipse_root/eclipse"/>
+        <delete dir="${eclipse.installation.dir}" failonerror="false"/>
+        <property name="pluginbuilder.feature.urls" value="http://self.pluginbuilder.org/0.2.0/org.pluginbuilder.feature-0.2.0.20070218PRD.zip,http://mirror.yoxos-eclipse-distribution.de/eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/eclipse-examples-3.2.2.zip"/>
+        <antcall target="unpack.eclipse"/>
+    </target>
+    
+</project>
index 2bbaa8f..c94b557 100644 (file)
    limitations under the License.
 -->
 <ivy-module version="2.0" xmlns:ea="http://www.easyant.org"> 
-       <info organisation="org.apache.easyant" module="simplejavaproject" status="integration" >
-               <ea:build type="org.apache.easyant.buildtypes#build-std-java;0.2">
-                       <ea:property name="run.main.classname" value="org.apache.easyant.example.Example"/>
-                       <ea:plugin module="org.apache.easyant.plugins#run-java;0.1" as="run"/>
-               </ea:build>
-       </info>
+    <info organisation="org.apache.easyant" module="simplejavaproject" status="integration" >
+        <ea:build type="org.apache.easyant.buildtypes#build-std-java;0.2">
+            <ea:property name="run.main.classname" value="org.apache.easyant.example.Example"/>
+            <ea:plugin module="org.apache.easyant.plugins#run-java;0.1" as="run"/>
+        </ea:build>
+    </info>
 </ivy-module>
index 1fc2310..a1c7aef 100644 (file)
@@ -42,48 +42,48 @@ import org.junit.Before;
 import com.google.inject.Inject;
 
 public abstract class AbstractEasyAntTest {
-       protected IProject testProject;
-       protected IJavaProject testJavaProject;
-       
-       @Inject
-       EasyantCoreService coreService;
-       
-       @Inject
-       EasyantProjectService projectService;
-       
-       @Before
-       public void setUp() throws Exception {
-               EasyAntPlugin easyAntPlugin = Activator.getEasyAntPlugin();
-               assertNotNull(easyAntPlugin);
-               easyAntPlugin.injectMembers(this);
-               assertNotNull(coreService);
-               assertNotNull(projectService);
-               
-               //System.out.println("setUp");
-               String testProjectName = "TestProject";
-               this.testProject = EclipseProjectBuilder.createProject(testProjectName);
-           assertNotNull(testProject);
-           IFile testModuleDesc = EclipseProjectBuilder.createModuleDescriptorFile(testProject, "org.apache.easyant");
-           assertNotNull(testModuleDesc);
-           assertTrue(testModuleDesc.exists());
-           
-           String testJavaProjectName = "TestJavaProject";
-           this.testJavaProject = EclipseProjectBuilder.createJavaProject(testJavaProjectName);
-           assertNotNull(testProject);
-           IFile testJavaModuleDesc = EclipseProjectBuilder.createModuleDescriptorFile(testJavaProject.getProject(), "org.apache.easyant");
-           assertNotNull(testJavaModuleDesc);
-           assertTrue(testJavaModuleDesc.exists());       
-       }
-       
-       @After
-       public void tearDown() throws CoreException {
-               if(this.testProject!=null){
-                       EclipseProjectBuilder.deleteProject(testProject);
-                       this.testProject = null;
-               }
-               if(this.testJavaProject!=null){
-                       EclipseProjectBuilder.deleteProject(testJavaProject.getProject());
-                       this.testJavaProject = null;                    
-               }
-       }
+    protected IProject testProject;
+    protected IJavaProject testJavaProject;
+    
+    @Inject
+    EasyantCoreService coreService;
+    
+    @Inject
+    EasyantProjectService projectService;
+    
+    @Before
+    public void setUp() throws Exception {
+        EasyAntPlugin easyAntPlugin = Activator.getEasyAntPlugin();
+        assertNotNull(easyAntPlugin);
+        easyAntPlugin.injectMembers(this);
+        assertNotNull(coreService);
+        assertNotNull(projectService);
+        
+        //System.out.println("setUp");
+        String testProjectName = "TestProject";
+        this.testProject = EclipseProjectBuilder.createProject(testProjectName);
+        assertNotNull(testProject);
+        IFile testModuleDesc = EclipseProjectBuilder.createModuleDescriptorFile(testProject, "org.apache.easyant");
+        assertNotNull(testModuleDesc);
+        assertTrue(testModuleDesc.exists());
+        
+        String testJavaProjectName = "TestJavaProject";
+        this.testJavaProject = EclipseProjectBuilder.createJavaProject(testJavaProjectName);
+        assertNotNull(testProject);
+        IFile testJavaModuleDesc = EclipseProjectBuilder.createModuleDescriptorFile(testJavaProject.getProject(), "org.apache.easyant");
+        assertNotNull(testJavaModuleDesc);
+        assertTrue(testJavaModuleDesc.exists());       
+    }
+    
+    @After
+    public void tearDown() throws CoreException {
+        if(this.testProject!=null){
+            EclipseProjectBuilder.deleteProject(testProject);
+            this.testProject = null;
+        }
+        if(this.testJavaProject!=null){
+            EclipseProjectBuilder.deleteProject(testJavaProject.getProject());
+            this.testJavaProject = null;            
+        }
+    }
 }
index d7ca41b..5ec3cae 100644 (file)
@@ -23,11 +23,11 @@ import org.junit.runners.Suite.SuiteClasses;
 
 @RunWith(Suite.class)
 @SuiteClasses(value = { 
-               ImportProjectTest.class,
-               StartupTest.class, 
-               EasyantCoreServiceTest.class,
-               EasyantProjectServiceTest.class 
-               
+        ImportProjectTest.class,
+        StartupTest.class, 
+        EasyantCoreServiceTest.class,
+        EasyantProjectServiceTest.class 
+        
 })
 public class EasyAntAllTests {
 
index 9045909..53a368b 100644 (file)
@@ -32,46 +32,46 @@ import org.junit.Test;
 public class EasyantCoreServiceTest extends AbstractEasyAntTest {
 
 /*
-       @Test
-       public void testGetIvyInstance() {
-               Ivy ivy = coreService.getIvyInstance(testProject);
-               assertNotNull(ivy);
-       }
+    @Test
+    public void testGetIvyInstance() {
+        Ivy ivy = coreService.getIvyInstance(testProject);
+        assertNotNull(ivy);
+    }
 */
 
-       @Test
-       public void testGetPluginsRepositoryPath() {
-               String pluginsRepositoryPath = coreService.getPluginsRepositoryPath();
-               assertNotNull(pluginsRepositoryPath);
-               String pluginPath = System.getProperty("user.home") + "/.easyant/repository";
-               assertEquals(pluginPath, pluginsRepositoryPath);
-       }
+    @Test
+    public void testGetPluginsRepositoryPath() {
+        String pluginsRepositoryPath = coreService.getPluginsRepositoryPath();
+        assertNotNull(pluginsRepositoryPath);
+        String pluginPath = System.getProperty("user.home") + "/.easyant/repository";
+        assertEquals(pluginPath, pluginsRepositoryPath);
+    }
 
-       @Test
-       public void testInstallPluginsRepository() {
-               String pluginsRepositoryPath = coreService.getPluginsRepositoryPath();
-               File pluginsRepositoryDir = new File(pluginsRepositoryPath);
-               assertTrue(deleteDirectory(pluginsRepositoryDir));
-               assertFalse(pluginsRepositoryDir.exists());
-               coreService.installPluginsRepository();
-               assertTrue(pluginsRepositoryDir.exists());
-       }
+    @Test
+    public void testInstallPluginsRepository() {
+        String pluginsRepositoryPath = coreService.getPluginsRepositoryPath();
+        File pluginsRepositoryDir = new File(pluginsRepositoryPath);
+        assertTrue(deleteDirectory(pluginsRepositoryDir));
+        assertFalse(pluginsRepositoryDir.exists());
+        coreService.installPluginsRepository();
+        assertTrue(pluginsRepositoryDir.exists());
+    }
 
-       private boolean deleteDirectory(File path) {
-               boolean resultat = true;
+    private boolean deleteDirectory(File path) {
+        boolean resultat = true;
 
-               if (path.exists()) {
-                       File[] files = path.listFiles();
-                       for (int i = 0; i < files.length; i++) {
-                               if (files[i].isDirectory()) {
-                                       resultat &= deleteDirectory(files[i]);
-                               } else {
-                                       resultat &= files[i].delete();
-                               }
-                       }
-               }
-               resultat &= path.delete();
-               return (resultat);
-       }
+        if (path.exists()) {
+            File[] files = path.listFiles();
+            for (int i = 0; i < files.length; i++) {
+                if (files[i].isDirectory()) {
+                    resultat &= deleteDirectory(files[i]);
+                } else {
+                    resultat &= files[i].delete();
+                }
+            }
+        }
+        resultat &= path.delete();
+        return (resultat);
+    }
 
 }
index 6154552..3fa1b64 100644 (file)
@@ -34,83 +34,83 @@ import org.junit.Test;
 public class EasyantProjectServiceTest extends AbstractEasyAntTest {
 
 /*
-       @Test
-       public void testGetIvyInstance() {
-               Ivy ivy = projectService.getIvyInstance(testProject);
-               assertNotNull(ivy);
-       }
+    @Test
+    public void testGetIvyInstance() {
+        Ivy ivy = projectService.getIvyInstance(testProject);
+        assertNotNull(ivy);
+    }
 */
-       
-       // @Test
-       // public void testAddNature(){
-       // assertFalse(projectService.hasEasyAntNature(testProject));
-       // projectService.addNature(testProject);
-       // assertTrue(projectService.hasEasyAntNature(testProject));
-       // assertFalse(projectService.hasEasyAntBuilder(testProject));
-       // }
-       //      
-       // @Test
-       // public void testRemoveNature(){
-       // assertFalse(projectService.hasEasyAntNature(testProject));
-       // projectService.addNature(testProject);
-       // assertTrue(projectService.hasEasyAntNature(testProject));
-       // assertFalse(projectService.hasEasyAntBuilder(testProject));
-       // projectService.removeNature(testProject);
-       // assertFalse(projectService.hasEasyAntNature(testProject));
-       // assertFalse(projectService.hasEasyAntBuilder(testProject));
-       // }
+    
+    // @Test
+    // public void testAddNature(){
+    // assertFalse(projectService.hasEasyAntNature(testProject));
+    // projectService.addNature(testProject);
+    // assertTrue(projectService.hasEasyAntNature(testProject));
+    // assertFalse(projectService.hasEasyAntBuilder(testProject));
+    // }
+    //  
+    // @Test
+    // public void testRemoveNature(){
+    // assertFalse(projectService.hasEasyAntNature(testProject));
+    // projectService.addNature(testProject);
+    // assertTrue(projectService.hasEasyAntNature(testProject));
+    // assertFalse(projectService.hasEasyAntBuilder(testProject));
+    // projectService.removeNature(testProject);
+    // assertFalse(projectService.hasEasyAntNature(testProject));
+    // assertFalse(projectService.hasEasyAntBuilder(testProject));
+    // }
 
-       @Test
-       public void testAddNatureOnJavaProject() {
-               IProject javaProject = testJavaProject.getProject();
-               assertFalse(projectService.hasEasyAntNature(javaProject));
-               assertFalse(projectService.hasEasyAntBuilder(javaProject));
-               projectService.addNature(javaProject);
-               assertTrue(projectService.hasEasyAntNature(javaProject));
-               assertTrue(projectService.hasEasyAntBuilder(javaProject));
-               // TODO check classpath and source folder
-       }
+    @Test
+    public void testAddNatureOnJavaProject() {
+        IProject javaProject = testJavaProject.getProject();
+        assertFalse(projectService.hasEasyAntNature(javaProject));
+        assertFalse(projectService.hasEasyAntBuilder(javaProject));
+        projectService.addNature(javaProject);
+        assertTrue(projectService.hasEasyAntNature(javaProject));
+        assertTrue(projectService.hasEasyAntBuilder(javaProject));
+        // TODO check classpath and source folder
+    }
 
-       @Test
-       public void testRemoveNatureOnJavaProject() {
-               IProject javaProject = testJavaProject.getProject();
-               assertFalse(projectService.hasEasyAntNature(javaProject));
-               projectService.addNature(javaProject);
-               assertTrue(projectService.hasEasyAntNature(javaProject));
-               assertTrue(projectService.hasEasyAntBuilder(javaProject));
-               projectService.removeNature(javaProject);
-               assertFalse(projectService.hasEasyAntNature(javaProject));
-               assertFalse(projectService.hasEasyAntBuilder(javaProject));
-               // TODO check classpath and source folder
-       }
+    @Test
+    public void testRemoveNatureOnJavaProject() {
+        IProject javaProject = testJavaProject.getProject();
+        assertFalse(projectService.hasEasyAntNature(javaProject));
+        projectService.addNature(javaProject);
+        assertTrue(projectService.hasEasyAntNature(javaProject));
+        assertTrue(projectService.hasEasyAntBuilder(javaProject));
+        projectService.removeNature(javaProject);
+        assertFalse(projectService.hasEasyAntNature(javaProject));
+        assertFalse(projectService.hasEasyAntBuilder(javaProject));
+        // TODO check classpath and source folder
+    }
 
-       @Test
-       public void testGetPhases() {
-               IProject javaProject = testJavaProject.getProject();
-               IFile ivyFile = javaProject.getFile("module.ivy");
-               assertNotNull(ivyFile);
-               List<PhaseReport> phases = projectService.getPhases(ivyFile);
-               assertNotNull(phases);          
-               assertTrue("nb phases:" + phases.size(), phases.size() > 0);
-       }
+    @Test
+    public void testGetPhases() {
+        IProject javaProject = testJavaProject.getProject();
+        IFile ivyFile = javaProject.getFile("module.ivy");
+        assertNotNull(ivyFile);
+        List<PhaseReport> phases = projectService.getPhases(ivyFile);
+        assertNotNull(phases);      
+        assertTrue("nb phases:" + phases.size(), phases.size() > 0);
+    }
 
-       @Test
-       public void testGetTargets() {
-               IProject javaProject = testJavaProject.getProject();
-               IFile ivyFile = javaProject.getFile("module.ivy");
-               assertNotNull(ivyFile);
-               List<TargetReport> targets = projectService.getTargets(ivyFile);
-               assertNotNull(targets);         
-               assertTrue("nb targets:" + targets.size(), targets.size() > 0);
-       }
+    @Test
+    public void testGetTargets() {
+        IProject javaProject = testJavaProject.getProject();
+        IFile ivyFile = javaProject.getFile("module.ivy");
+        assertNotNull(ivyFile);
+        List<TargetReport> targets = projectService.getTargets(ivyFile);
+        assertNotNull(targets);     
+        assertTrue("nb targets:" + targets.size(), targets.size() > 0);
+    }
 
-       @Test
-       public void testRunBuild() {
-               try {
-                       projectService.runBuild(testJavaProject.getProject(), "compile", EasyAntConstants.ANT_LOGLEVEL_DEBUG, null);
-               } catch (Exception e) {
-                       fail(e.getMessage());
-               }
-       }
+    @Test
+    public void testRunBuild() {
+        try {
+            projectService.runBuild(testJavaProject.getProject(), "compile", EasyAntConstants.ANT_LOGLEVEL_DEBUG, null);
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
 
 }
index 81f25f0..245fbb1 100644 (file)
@@ -43,206 +43,208 @@ import org.eclipse.jdt.launching.JavaRuntime;
  */
 public class EclipseProjectBuilder {
 
-       // private IProject project;
-       // private IJavaProject javaProject;
-       // private IPackageFragmentRoot sourceFolder;
-
-       public EclipseProjectBuilder() throws CoreException {
-               // IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
-               // project = root.getProject("TestProject");
-               // project.create(null);
-               // project.open(null);
-               // javaProject = JavaCore.create(project);
-               //
-               // IFolder binFolder = createBinFolder();
-               //
-               // setJavaNature();
-               // javaProject.setRawClasspath(new IClasspathEntry[0], null);
-               //
-               // createOutputFolder(binFolder);
-               // addSystemLibraries();
-       }
-
-       public static IProject createProject(String name) throws CoreException {
-               IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
-               IProject project = root.getProject(name);
-               project.create(null);
-               project.open(null);
-               return project;
-       }
-
-       public static IJavaProject createJavaProject(String name) throws CoreException {
-               IProject project = createProject(name);
-               IJavaProject javaProject = JavaCore.create(project);
-               addJavaNature(project);
-               javaProject.setRawClasspath(new IClasspathEntry[0], null);
-               createOutputFolder(javaProject);
-               addSystemLibraries(javaProject);
-               return javaProject;
-       }
-
-       private static void addJavaNature(IProject project) throws CoreException {
-               IProjectDescription description = project.getDescription();
-               description.setNatureIds(new String[] { JavaCore.NATURE_ID });
-               project.setDescription(description, null);
-       }
-
-       private static void createOutputFolder(IJavaProject javaProject) throws CoreException {
-               IFolder binFolder = createBinFolder(javaProject.getProject());
-               IPath outputLocation = binFolder.getFullPath();
-               javaProject.setOutputLocation(outputLocation, null);
-       }
-
-       private static IFolder createBinFolder(IProject project) throws CoreException {
-               IFolder binFolder = project.getFolder("bin");
-               binFolder.create(false, true, null);
-               return binFolder;
-       }
-
-       private static void addSystemLibraries(IJavaProject javaProject) throws JavaModelException {
-               IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
-               IClasspathEntry[] newEntries = new IClasspathEntry[oldEntries.length + 1];
-               System.arraycopy(oldEntries, 0, newEntries, 0, oldEntries.length);
-               newEntries[oldEntries.length] = JavaRuntime.getDefaultJREContainerEntry();
-               javaProject.setRawClasspath(newEntries, null);
-       }
-
-       public static IFile createModuleDescriptorFile(IProject project, String org) throws CoreException {
-               IFile moduleDescFile = project.getFile("module.ivy");
-               String content = "" 
-                               + "<ivy-module version=\"2.0\" xmlns:ea=\"http://www.easyant.org\">"
-                               + "  <info organisation=\"" + org + "\" module=\"" + project.getName() + "\" status=\"integration\" >"
-                               + "    <description>project description</description>" 
-                               + "    <ea:build type=\"org.apache.easyant.buildtypes#build-std-java;0.2\" />"
-                               + "  </info>" 
-                               + "</ivy-module>";
-               InputStream in = new ByteArrayInputStream(content.getBytes());
-               moduleDescFile.create(in, true, null);
-               return moduleDescFile;
-       }
-
-       public static void deleteProject(IProject project) throws CoreException {
-               // waitForIndexer();
-               deleteProject(project, true);
-       }
-       
-       public static void deleteProject(IProject project, boolean deleteContent) throws CoreException {
-               // waitForIndexer();
-               project.delete(deleteContent, true, new NullProgressMonitor());
-       }
-
-       // public IJavaProject getJavaProject() {
-       // return javaProject;
-       // }
-
-       // public void addJar(String plugin, String jar) throws
-       // MalformedURLException,
-       // IOException, JavaModelException {
-       // Path result = findFileInPlugin(plugin, jar);
-       // IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
-       // IClasspathEntry[] newEntries = new IClasspathEntry[oldEntries.length +
-       // 1];
-       // System.arraycopy(oldEntries, 0, newEntries, 0, oldEntries.length);
-       // newEntries[oldEntries.length] = JavaCore.newLibraryEntry(result, null,
-       // null);
-       // javaProject.setRawClasspath(newEntries, null);
-       // }
-       //
-       // public IPackageFragment createPackage(String name) throws CoreException {
-       // if (sourceFolder == null)
-       // sourceFolder = createSourceFolder();
-       // return sourceFolder.createPackageFragment(name, false, null);
-       // }
-       //
-       // public IType createType(IPackageFragment pack, String cuName, String
-       // source)
-       // throws JavaModelException {
-       // StringBuffer buf = new StringBuffer();
-       // buf.append("package " + pack.getElementName() + ";\n");
-       // buf.append("\n");
-       // buf.append(source);
-       // ICompilationUnit cu = pack.createCompilationUnit(cuName,
-       // buf.toString(), false, null);
-       // return cu.getTypes()[0];
-       // }
-       //
-       // /**
-       // * Wait for autobuild notification to occur, that is
-       // * for the autbuild to finish.
-       // */
-       // public void waitForAutoBuild() {
-       // boolean wasInterrupted = false;
-       // do {
-       // try {
-       // Platform.getJobManager().join(
-       // ResourcesPlugin.FAMILY_AUTO_BUILD, null);
-       // wasInterrupted = false;
-       // } catch (OperationCanceledException e) {
-       // throw (e);
-       // } catch (InterruptedException e) {
-       // wasInterrupted = true;
-       // }
-       // } while (wasInterrupted);
-       // }
-       //
-       // public void dispose() throws CoreException {
-       // waitForIndexer();
-       // project.delete(true, true, null);
-       // }
-       //
-
-       //
-       // public IFolder createXmlFolder() throws CoreException {
-       // IFolder xmlFolder = project.getFolder("xml");
-       // if (!xmlFolder.exists()) {
-       // xmlFolder.create(false, true, null);
-       // }
-       // return xmlFolder;
-       // }
-       //
-
-       //
-       // private IPackageFragmentRoot createSourceFolder() throws CoreException {
-       // IFolder folder = project.getFolder("src");
-       // folder.create(false, true, null);
-       // IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(folder);
-       //
-       // IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
-       // IClasspathEntry[] newEntries = new IClasspathEntry[oldEntries.length +
-       // 1];
-       // System.arraycopy(oldEntries, 0, newEntries, 0, oldEntries.length);
-       // newEntries[oldEntries.length] = JavaCore.newSourceEntry(root.getPath());
-       // javaProject.setRawClasspath(newEntries, null);
-       // return root;
-       // }
-       //
-
-       // private Path findFileInPlugin(String plugin, String file)
-       // throws MalformedURLException, IOException {
-       // IPluginRegistry registry = Platform.getPluginRegistry();
-       // IPluginDescriptor descriptor = registry.getPluginDescriptor(plugin);
-       // URL pluginURL = descriptor.getInstallURL();
-       // URL jarURL = new URL(pluginURL, file);
-       // URL localJarURL = Platform.asLocalURL(jarURL);
-       // return new Path(localJarURL.getPath());
-       // }
-       //
-       // private void waitForIndexer() throws JavaModelException {
-       // new SearchEngine().searchAllTypeNames(ResourcesPlugin.getWorkspace(),
-       // null, null, IJavaSearchConstants.EXACT_MATCH,
-       // IJavaSearchConstants.CASE_SENSITIVE,
-       // IJavaSearchConstants.CLASS, SearchEngine
-       // .createJavaSearchScope(new IJavaElement[0]),
-       // new ITypeNameRequestor() {
-       // public void acceptClass(char[] packageName,
-       // char[] simpleTypeName, char[][] enclosingTypeNames,
-       // String path) {
-       // }
-       //
-       // public void acceptInterface(char[] packageName,
-       // char[] simpleTypeName, char[][] enclosingTypeNames,
-       // String path) {
-       // }
-       // }, IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null);
-       // }
+    // private IProject project;
+    // private IJavaProject javaProject;
+    // private IPackageFragmentRoot sourceFolder;
+
+    public EclipseProjectBuilder() throws CoreException {
+        // IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+        // project = root.getProject("TestProject");
+        // project.create(null);
+        // project.open(null);
+        // javaProject = JavaCore.create(project);
+        //
+        // IFolder binFolder = createBinFolder();
+        //
+        // setJavaNature();
+        // javaProject.setRawClasspath(new IClasspathEntry[0], null);
+        //
+        // createOutputFolder(binFolder);
+        // addSystemLibraries();
+    }
+
+    public static IProject createProject(String name) throws CoreException {
+        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+        IProject project = root.getProject(name);
+        project.create(null);
+        project.open(null);
+        return project;
+    }
+
+    public static IJavaProject createJavaProject(String name) throws CoreException {
+        IProject project = createProject(name);
+        IJavaProject javaProject = JavaCore.create(project);
+        addJavaNature(project);
+        javaProject.setRawClasspath(new IClasspathEntry[0], null);
+        createOutputFolder(javaProject);
+        addSystemLibraries(javaProject);
+        return javaProject;
+    }
+
+    private static void addJavaNature(IProject project) throws CoreException {
+        IProjectDescription description = project.getDescription();
+        description.setNatureIds(new String[] { JavaCore.NATURE_ID });
+        project.setDescription(description, null);
+    }
+
+    private static void createOutputFolder(IJavaProject javaProject) throws CoreException {
+        IFolder binFolder = createBinFolder(javaProject.getProject());
+        IPath outputLocation = binFolder.getFullPath();
+        javaProject.setOutputLocation(outputLocation, null);
+    }
+
+    private static IFolder createBinFolder(IProject project) throws CoreException {
+        IFolder binFolder = project.getFolder("bin");
+        binFolder.create(false, true, null);
+        return binFolder;
+    }
+
+    private static void addSystemLibraries(IJavaProject javaProject) throws JavaModelException {
+        IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
+        IClasspathEntry[] newEntries = new IClasspathEntry[oldEntries.length + 1];
+        System.arraycopy(oldEntries, 0, newEntries, 0, oldEntries.length);
+        newEntries[oldEntries.length] = JavaRuntime.getDefaultJREContainerEntry();
+        javaProject.setRawClasspath(newEntries, null);
+    }
+
+    public static IFile createModuleDescriptorFile(IProject project, String org) throws CoreException {
+        IFile moduleDescFile = project.getFile("module.ivy");
+        String content = "" 
+                + "<ivy-module version=\"2.0\" xmlns:ea=\"http://www.easyant.org\">"
+                + "  <info organisation=\"" + org + "\" module=\"" + project.getName() + "\" status=\"integration\" >"
+                + "    <description>project description</description>" 
+                + "    <ea:build type=\"org.apache.easyant.buildtypes#build-std-java;0.2\" />"
+                + "  </info>" 
+                + "</ivy-module>";
+        InputStream in = new ByteArrayInputStream(content.getBytes());
+        moduleDescFile.create(in, true, null);
+        return moduleDescFile;
+    }
+
+    public static void deleteProject(IProject project) throws CoreException {
+        // waitForIndexer();
+        deleteProject(project, true);
+    }
+    
+    public static void deleteProject(IProject project, boolean deleteContent) throws CoreException {
+        // waitForIndexer();
+        project.delete(deleteContent, true, new NullProgressMonitor());
+    }
+
+    // public IJavaProject getJavaProject() {
+    // return javaProject;
+    // }
+
+    // public void addJar(String plugin, String jar) throws
+    // MalformedURLException,
+    // IOException, JavaModelException {
+    // Path result = findFileInPlugin(plugin, jar);
+    // IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
+    // IClasspathEntry[] newEntries = new IClasspathEntry[oldEntries.length +
+    // 1];
+    // System.arraycopy(oldEntries, 0, newEntries, 0, oldEntries.length);
+    // newEntries[oldEntries.length] = JavaCore.newLibraryEntry(result, null,
+    // null);
+    // javaProject.setRawClasspath(newEntries, null);
+    // }
+    //
+    // public IPackageFragment createPackage(String name) throws CoreException {
+    // if (sourceFolder == null)
+    // sourceFolder = createSourceFolder();
+    // return sourceFolder.createPackageFragment(name, false, null);
+    // }
+    //
+    // public IType createType(IPackageFragment pack, String cuName, String
+    // source)
+    // throws JavaModelException {
+    // StringBuffer buf = new StringBuffer();
+    // buf.append("package " + pack.getElementName() + ";
+");
+    // buf.append("
+");
+    // buf.append(source);
+    // ICompilationUnit cu = pack.createCompilationUnit(cuName,
+    // buf.toString(), false, null);
+    // return cu.getTypes()[0];
+    // }
+    //
+    // /**
+    // * Wait for autobuild notification to occur, that is
+    // * for the autbuild to finish.
+    // */
+    // public void waitForAutoBuild() {
+    // boolean wasInterrupted = false;
+    // do {
+    // try {
+    // Platform.getJobManager().join(
+    // ResourcesPlugin.FAMILY_AUTO_BUILD, null);
+    // wasInterrupted = false;
+    // } catch (OperationCanceledException e) {
+    // throw (e);
+    // } catch (InterruptedException e) {
+    // wasInterrupted = true;
+    // }
+    // } while (wasInterrupted);
+    // }
+    //
+    // public void dispose() throws CoreException {
+    // waitForIndexer();
+    // project.delete(true, true, null);
+    // }
+    //
+
+    //
+    // public IFolder createXmlFolder() throws CoreException {
+    // IFolder xmlFolder = project.getFolder("xml");
+    // if (!xmlFolder.exists()) {
+    // xmlFolder.create(false, true, null);
+    // }
+    // return xmlFolder;
+    // }
+    //
+
+    //
+    // private IPackageFragmentRoot createSourceFolder() throws CoreException {
+    // IFolder folder = project.getFolder("src");
+    // folder.create(false, true, null);
+    // IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(folder);
+    //
+    // IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
+    // IClasspathEntry[] newEntries = new IClasspathEntry[oldEntries.length +
+    // 1];
+    // System.arraycopy(oldEntries, 0, newEntries, 0, oldEntries.length);
+    // newEntries[oldEntries.length] = JavaCore.newSourceEntry(root.getPath());
+    // javaProject.setRawClasspath(newEntries, null);
+    // return root;
+    // }
+    //
+
+    // private Path findFileInPlugin(String plugin, String file)
+    // throws MalformedURLException, IOException {
+    // IPluginRegistry registry = Platform.getPluginRegistry();
+    // IPluginDescriptor descriptor = registry.getPluginDescriptor(plugin);
+    // URL pluginURL = descriptor.getInstallURL();
+    // URL jarURL = new URL(pluginURL, file);
+    // URL localJarURL = Platform.asLocalURL(jarURL);
+    // return new Path(localJarURL.getPath());
+    // }
+    //
+    // private void waitForIndexer() throws JavaModelException {
+    // new SearchEngine().searchAllTypeNames(ResourcesPlugin.getWorkspace(),
+    // null, null, IJavaSearchConstants.EXACT_MATCH,
+    // IJavaSearchConstants.CASE_SENSITIVE,
+    // IJavaSearchConstants.CLASS, SearchEngine
+    // .createJavaSearchScope(new IJavaElement[0]),
+    // new ITypeNameRequestor() {
+    // public void acceptClass(char[] packageName,
+    // char[] simpleTypeName, char[][] enclosingTypeNames,
+    // String path) {
+    // }
+    //
+    // public void acceptInterface(char[] packageName,
+    // char[] simpleTypeName, char[][] enclosingTypeNames,
+    // String path) {
+    // }
+    // }, IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null);
+    // }
 }
index 0133748..d3e2c69 100644 (file)
@@ -31,50 +31,50 @@ import org.junit.Test;
 
 public class ExtensionRegistryTest {
 
-       @Test
-       public void testRemoveExtension() {
-               IExtensionRegistry reg = RegistryFactory.getRegistry();         
-               
-               //assertNull(reg.getExtension("org.apache.ivyde.eclipse.ui.actions.ResolveAction"));
-               //assertNull(reg.getExtension("org.eclipse.ui.popupMenus","org.apache.ivyde.eclipse.ui.actions.ResolveAction"));
-               //assertNull(reg.getExtension("org.eclipse.ui","popupMenus","org.apache.ivyde.eclipse.ui.actions.ResolveAction"));
+    @Test
+    public void testRemoveExtension() {
+        IExtensionRegistry reg = RegistryFactory.getRegistry();     
+        
+        //assertNull(reg.getExtension("org.apache.ivyde.eclipse.ui.actions.ResolveAction"));
+        //assertNull(reg.getExtension("org.eclipse.ui.popupMenus","org.apache.ivyde.eclipse.ui.actions.ResolveAction"));
+        //assertNull(reg.getExtension("org.eclipse.ui","popupMenus","org.apache.ivyde.eclipse.ui.actions.ResolveAction"));
 
-               IDynamicExtensionRegistry reg2 = (IDynamicExtensionRegistry)reg;
-               for(IContributor contributor : reg2.getAllContributors()){                      
-                       if("org.apache.ivyde.eclipse".equals(contributor.getName())){
-                               System.out.println("--> contributor "+contributor);
-                               reg2.removeContributor(contributor, ((ExtensionRegistry) reg2).getTemporaryUserToken());
-                               System.out.println("--> remove all extensions ");
-                       }
-               }               
-               
-//             IExtension[] extensions = reg.getExtensions("org.apache.ivyde.eclipse");
-//             assertNotNull(extensions);
-//             for(IExtension extension:extensions){
-//                     if("org.eclipse.ui.popupMenus".equals(extension.getExtensionPointUniqueIdentifier())){
-//                             reg.removeExtension(extension, ((ExtensionRegistry) reg).getTemporaryUserToken());
-//                     }
-//                     System.out.println(extension.getNamespaceIdentifier() +" - "+extension.getExtensionPointUniqueIdentifier());                    
-//                     final IConfigurationElement[] configElements = extension.getConfigurationElements();
-//             for (IConfigurationElement element:configElements) {
-//                     System.out.println("\t--> "+element.getName()+" : "+element.getAttribute("id"));                                
-//             }                       
-//             }
-               
-       
-       }
+        IDynamicExtensionRegistry reg2 = (IDynamicExtensionRegistry)reg;
+        for(IContributor contributor : reg2.getAllContributors()){          
+            if("org.apache.ivyde.eclipse".equals(contributor.getName())){
+                System.out.println("--> contributor "+contributor);
+                reg2.removeContributor(contributor, ((ExtensionRegistry) reg2).getTemporaryUserToken());
+                System.out.println("--> remove all extensions ");
+            }
+        }       
+        
+//      IExtension[] extensions = reg.getExtensions("org.apache.ivyde.eclipse");
+//      assertNotNull(extensions);
+//      for(IExtension extension:extensions){
+//          if("org.eclipse.ui.popupMenus".equals(extension.getExtensionPointUniqueIdentifier())){
+//              reg.removeExtension(extension, ((ExtensionRegistry) reg).getTemporaryUserToken());
+//          }
+//          System.out.println(extension.getNamespaceIdentifier() +" - "+extension.getExtensionPointUniqueIdentifier());            
+//          final IConfigurationElement[] configElements = extension.getConfigurationElements();
+//          for (IConfigurationElement element:configElements) {
+//              System.out.println("\t--> "+element.getName()+" : "+element.getAttribute("id"));                    
+//          }               
+//      }
+        
+    
+    }
 
-//     private void removeExtension(String extensionPointId, String extensionId) {
-//             IExtensionRegistry reg = RegistryFactory.getRegistry();
-//             IExtension extension = reg.getExtension(extensionPointId, extensionId);
-//             if (extension != null) {
-//                     reg.removeExtension(extension, getUserToken());
-//             }
-//     }
+//  private void removeExtension(String extensionPointId, String extensionId) {
+//      IExtensionRegistry reg = RegistryFactory.getRegistry();
+//      IExtension extension = reg.getExtension(extensionPointId, extensionId);
+//      if (extension != null) {
+//          reg.removeExtension(extension, getUserToken());
+//      }
+//  }
 //
-//     private Object getUserToken() {
-//             IExtensionRegistry registry = RegistryFactory.getRegistry();
-//             // return null; // require -Declipse.registry.nulltoken=true
-//             return ((ExtensionRegistry) registry).getTemporaryUserToken();
-//     }
+//  private Object getUserToken() {
+//      IExtensionRegistry registry = RegistryFactory.getRegistry();
+//      // return null; // require -Declipse.registry.nulltoken=true
+//      return ((ExtensionRegistry) registry).getTemporaryUserToken();
+//  }
 }
index 28a654f..9f5b398 100644 (file)
@@ -56,104 +56,104 @@ import org.junit.Test;
 import com.google.inject.Inject;
 
 public class ImportProjectTest{
-       @Inject
-       EasyantProjectService projectService;
-       
-       @Before
-       public void setUp() throws Exception {
-               EasyAntPlugin easyAntPlugin = Activator.getEasyAntPlugin();
-               assertNotNull(easyAntPlugin);
-               easyAntPlugin.injectMembers(this);
-               assertNotNull(projectService);
-       }       
-       
-       IProject simpleJavaProject;
-       @Test
-       public void testImportSimpleProject() throws Exception {
-               final String projectName = "simplejavaproject";
-               IProjectDescription description = Activator.getEasyAntPlugin().getPluginWorkspace().newProjectDescription(projectName);
-               assertNotNull(description);
-               URL url = getClass().getResource("/datas/"+projectName);
-               assertNotNull(url);
-               String filePath = url.getFile();
-               assertNotNull(filePath);
-               //String testWorkspacePath = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
-               
-               IPath projectLocation = getSimpleJavaProjectLocation(filePath);
-               assertNotNull(projectLocation);
-               description.setLocation(projectLocation);
-               final String comment = projectName+ " description";
-               description.setComment(comment);
-               String[] newNatures= {};
-               description.setNatureIds(newNatures);   
-       
-               Thread.sleep(2000);
-               Shell messageShell = PlatformUI.getWorkbench().getDisplay().getActiveShell();
-               assertNotNull(messageShell);
-               simpleJavaProject = projectService.importProject(description, messageShell, new NullProgressMonitor());
-               assertNotNull(simpleJavaProject);
-               assertTrue(simpleJavaProject.exists());
-               assertTrue(simpleJavaProject.isOpen());
-               assertEquals(projectName, simpleJavaProject.getName());
-               try {
-                       assertEquals(comment, simpleJavaProject.getDescription().getComment());
-               } catch (CoreException e) {
-                       fail(e.getMessage());
-               }
-               assertTrue(projectService.hasEasyAntNature(simpleJavaProject));
-               
-               //Assert source folders
-               assertTrue(simpleJavaProject.hasNature(JavaCore.NATURE_ID));    
-               IJavaProject javaProject = (IJavaProject)simpleJavaProject.getNature(JavaCore.NATURE_ID);
-               assertNotNull(javaProject);
-               List<IClasspathEntry> entries = new ArrayList<IClasspathEntry>();
-               entries.addAll(Arrays.asList(javaProject.getRawClasspath()));
-               assertTrue(entries.size()>0);
-               boolean srcMainJavaSourceFolderFound=false;
-               boolean srcTestJavaSourceFolderFound=false;
-               boolean srcMainResourcesSourceFolderFound=false;
-               boolean srcTestResourcesSourceFolderFound=false;
-               for(IClasspathEntry entry:entries){
-                       if(IClasspathEntry.CPE_SOURCE==entry.getEntryKind()){
-                               String path = entry.getPath().toOSString();
-                               assertNotNull(path);
-                               if("/simplejavaproject/src/main/java".equals(path)){
-                                       srcMainJavaSourceFolderFound=true;
-                               }else if("/simplejavaproject/src/test/java".equals(path)){
-                                       srcTestJavaSourceFolderFound=true;
-                               }else if("/simplejavaproject/src/main/resources".equals(path)){
-                                       srcMainResourcesSourceFolderFound=true;
-                               }else if("/simplejavaproject/src/test/resources".equals(path)){
-                                       srcTestResourcesSourceFolderFound=true;
-                               }
-                       }
-               }
-               assertTrue(srcMainJavaSourceFolderFound);
-               assertTrue(srcTestJavaSourceFolderFound);
-               assertTrue(srcMainResourcesSourceFolderFound);
-               assertTrue(srcTestResourcesSourceFolderFound);
-               
-               //TODO assert classpath
-               //org.eclipse.jdt.launching.JRE_CONTAINER
-               //org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/module.ivy/*
-       }
-       
-       private IPath getSimpleJavaProjectLocation(String projectPath){
-               IPluginModelBase model = PluginRegistry.findModel(TestPlugin.PLUGIN_ID);
-               assertNotNull(model);
-               IPath projectLocation=null;
-               if (model != null && model.getInstallLocation() != null) {
-                       File modelNode = new File(model.getInstallLocation());
-                       String pluginPath = modelNode.getAbsolutePath();
-                       projectLocation = new Path(pluginPath + "/" + projectPath);
-               }
-               return projectLocation;
-       }
+    @Inject
+    EasyantProjectService projectService;
+    
+    @Before
+    public void setUp() throws Exception {
+        EasyAntPlugin easyAntPlugin = Activator.getEasyAntPlugin();
+        assertNotNull(easyAntPlugin);
+        easyAntPlugin.injectMembers(this);
+        assertNotNull(projectService);
+    }   
+    
+    IProject simpleJavaProject;
+    @Test
+    public void testImportSimpleProject() throws Exception {
+        final String projectName = "simplejavaproject";
+        IProjectDescription description = Activator.getEasyAntPlugin().getPluginWorkspace().newProjectDescription(projectName);
+        assertNotNull(description);
+        URL url = getClass().getResource("/datas/"+projectName);
+        assertNotNull(url);
+        String filePath = url.getFile();
+        assertNotNull(filePath);
+        //String testWorkspacePath = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
+        
+        IPath projectLocation = getSimpleJavaProjectLocation(filePath);
+        assertNotNull(projectLocation);
+        description.setLocation(projectLocation);
+        final String comment = projectName+ " description";
+        description.setComment(comment);
+        String[] newNatures= {};
+        description.setNatureIds(newNatures);   
+    
+        Thread.sleep(2000);
+        Shell messageShell = PlatformUI.getWorkbench().getDisplay().getActiveShell();
+        assertNotNull(messageShell);
+        simpleJavaProject = projectService.importProject(description, messageShell, new NullProgressMonitor());
+        assertNotNull(simpleJavaProject);
+        assertTrue(simpleJavaProject.exists());
+        assertTrue(simpleJavaProject.isOpen());
+        assertEquals(projectName, simpleJavaProject.getName());
+        try {
+            assertEquals(comment, simpleJavaProject.getDescription().getComment());
+        } catch (CoreException e) {
+            fail(e.getMessage());
+        }
+        assertTrue(projectService.hasEasyAntNature(simpleJavaProject));
+        
+        //Assert source folders
+        assertTrue(simpleJavaProject.hasNature(JavaCore.NATURE_ID));    
+        IJavaProject javaProject = (IJavaProject)simpleJavaProject.getNature(JavaCore.NATURE_ID);
+        assertNotNull(javaProject);
+        List<IClasspathEntry> entries = new ArrayList<IClasspathEntry>();
+        entries.addAll(Arrays.asList(javaProject.getRawClasspath()));
+        assertTrue(entries.size()>0);
+        boolean srcMainJavaSourceFolderFound=false;
+        boolean srcTestJavaSourceFolderFound=false;
+        boolean srcMainResourcesSourceFolderFound=false;
+        boolean srcTestResourcesSourceFolderFound=false;
+        for(IClasspathEntry entry:entries){
+            if(IClasspathEntry.CPE_SOURCE==entry.getEntryKind()){
+                String path = entry.getPath().toOSString();
+                assertNotNull(path);
+                if("/simplejavaproject/src/main/java".equals(path)){
+                    srcMainJavaSourceFolderFound=true;
+                }else if("/simplejavaproject/src/test/java".equals(path)){
+                    srcTestJavaSourceFolderFound=true;
+                }else if("/simplejavaproject/src/main/resources".equals(path)){
+                    srcMainResourcesSourceFolderFound=true;
+                }else if("/simplejavaproject/src/test/resources".equals(path)){
+                    srcTestResourcesSourceFolderFound=true;
+                }
+            }
+        }
+        assertTrue(srcMainJavaSourceFolderFound);
+        assertTrue(srcTestJavaSourceFolderFound);
+        assertTrue(srcMainResourcesSourceFolderFound);
+        assertTrue(srcTestResourcesSourceFolderFound);
+        
+        //TODO assert classpath
+        //org.eclipse.jdt.launching.JRE_CONTAINER
+        //org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/module.ivy/*
+    }
+    
+    private IPath getSimpleJavaProjectLocation(String projectPath){
+        IPluginModelBase model = PluginRegistry.findModel(TestPlugin.PLUGIN_ID);
+        assertNotNull(model);
+        IPath projectLocation=null;
+        if (model != null && model.getInstallLocation() != null) {
+            File modelNode = new File(model.getInstallLocation());
+            String pluginPath = modelNode.getAbsolutePath();
+            projectLocation = new Path(pluginPath + "/" + projectPath);
+        }
+        return projectLocation;
+    }
 
-       @After
-       public void tearDown() throws CoreException {
-               if(simpleJavaProject!=null){
-                       EclipseProjectBuilder.deleteProject(simpleJavaProject,false);
-               }
-       }
+    @After
+    public void tearDown() throws CoreException {
+        if(simpleJavaProject!=null){
+            EclipseProjectBuilder.deleteProject(simpleJavaProject,false);
+        }
+    }
 }
index 163d2d8..9250b31 100644 (file)
@@ -30,48 +30,48 @@ import org.eclipse.ui.views.navigator.ResourceNavigator;
 import org.junit.Test;
 
 public class StartupTest extends AbstractEasyAntTest{
-       
-       @Test
-       public void testActivatorStartup() {
-               EasyAntPlugin easyAntPlugin = Activator.getEasyAntPlugin(); 
-               assertNotNull(easyAntPlugin);
-       }
+    
+    @Test
+    public void testActivatorStartup() {
+        EasyAntPlugin easyAntPlugin = Activator.getEasyAntPlugin(); 
+        assertNotNull(easyAntPlugin);
+    }
 
-       @Test
-       public void testEasyAntCoreServiceInit() {
-               assertNotNull(coreService);                     
-       }
-       
-       @Test
-       public void testEasyAntProjectServiceInit() {
-               assertNotNull(projectService);                                  
-       }
-               
-       @Test
-       public void testGetCurrentProject() {           
-               ResourceNavigator resourceNavigator = getResourceNavigator();
-               assertNotNull(resourceNavigator);
-               
-               resourceNavigator.selectReveal(new StructuredSelection(testProject));
-               IProject project1 = Activator.getEasyAntPlugin().getCurrentProject();
-               assertNotNull(project1);
-               assertEquals(testProject, project1);
-               
-               resourceNavigator.selectReveal(new StructuredSelection(testJavaProject));
-               IProject project2 = Activator.getEasyAntPlugin().getCurrentProject();
-               assertNotNull(project2);
-               assertEquals(testJavaProject.getProject(), project2);
-       }
-       
-       private ResourceNavigator getResourceNavigator(){
-               ResourceNavigator navigator = null;
-               try {
-                       navigator = (ResourceNavigator) PlatformUI.getWorkbench()
-                               .getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.ui.views.ResourceNavigator");
-               } catch (PartInitException e) {
-                       throw new RuntimeException(e);
-               }       
-               return navigator;
-       }
-       
+    @Test
+    public void testEasyAntCoreServiceInit() {
+        assertNotNull(coreService);         
+    }
+    
+    @Test
+    public void testEasyAntProjectServiceInit() {
+        assertNotNull(projectService);                  
+    }
+        
+    @Test
+    public void testGetCurrentProject() {           
+        ResourceNavigator resourceNavigator = getResourceNavigator();
+        assertNotNull(resourceNavigator);
+        
+        resourceNavigator.selectReveal(new StructuredSelection(testProject));
+        IProject project1 = Activator.getEasyAntPlugin().getCurrentProject();
+        assertNotNull(project1);
+        assertEquals(testProject, project1);
+        
+        resourceNavigator.selectReveal(new StructuredSelection(testJavaProject));
+        IProject project2 = Activator.getEasyAntPlugin().getCurrentProject();
+        assertNotNull(project2);
+        assertEquals(testJavaProject.getProject(), project2);
+    }
+    
+    private ResourceNavigator getResourceNavigator(){
+        ResourceNavigator navigator = null;
+        try {
+            navigator = (ResourceNavigator) PlatformUI.getWorkbench()
+                .getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.ui.views.ResourceNavigator");
+        } catch (PartInitException e) {
+            throw new RuntimeException(e);
+        }   
+        return navigator;
+    }
+    
 }
index 7ff3b70..29c6b62 100644 (file)
@@ -25,43 +25,43 @@ import org.osgi.framework.BundleContext;
  */
 public class TestPlugin extends AbstractUIPlugin {
 
-       // The plug-in ID
-       public static final String PLUGIN_ID = "org.apache.easyant4e.tests";
+    // The plug-in ID
+    public static final String PLUGIN_ID = "org.apache.easyant4e.tests";
 
-       // The shared instance
-       private static TestPlugin plugin;
-       
-       /**
-        * The constructor
-        */
-       public TestPlugin() {
-       }
+    // The shared instance
+    private static TestPlugin plugin;
+    
+    /**
+     * The constructor
+     */
+    public TestPlugin() {
+    }
 
-       /*
-        * (non-Javadoc)
-        * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
-        */
-       public void start(BundleContext context) throws Exception {
-               super.start(context);
-               plugin = this;
-       }
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+     */
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        plugin = this;
+    }
 
-       /*
-        * (non-Javadoc)
-        * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
-        */
-       public void stop(BundleContext context) throws Exception {
-               plugin = null;
-               super.stop(context);
-       }
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
 
-       /**
-        * Returns the shared instance
-        *
-        * @return the shared instance
-        */
-       public static TestPlugin getDefault() {
-               return plugin;
-       }
+    /**
+     * Returns the shared instance
+     *
+     * @return the shared instance
+     */
+    public static TestPlugin getDefault() {
+        return plugin;
+    }
 
 }
index 87b7df7..fd3c7bb 100644 (file)
    limitations under the License.
 -->
 <plugin>
-       <extension 
-               point="org.eclipse.core.resources.natures" id="EasyAntNature" name="EasyAntNature">
-               <runtime>
-               <run class="org.apache.easyant4e.natures.EasyAntNature" /> 
-       </runtime>
-       </extension>
+    <extension 
+        point="org.eclipse.core.resources.natures" id="EasyAntNature" name="EasyAntNature">
+        <runtime>
+            <run class="org.apache.easyant4e.natures.EasyAntNature" /> 
+        </runtime>
+    </extension>
    
    <extension point="org.eclipse.core.resources.builders" id="EasyAntBuilder" name="EasyAntBuilder">
       <builder>
    </extension>
 
    <extension point="org.eclipse.ui.console.consoleFactories">
-         <consoleFactory 
-            label="EasyAnt Console"
-            class="org.apache.easyant4e.console.EasyAntConsoleFactory"
-            icon="icons/full/obj16/ant_buildfile.gif">
-         </consoleFactory>
-       </extension>
+      <consoleFactory 
+         label="EasyAnt Console"
+         class="org.apache.easyant4e.console.EasyAntConsoleFactory"
+         icon="icons/full/obj16/ant_buildfile.gif">
+      </consoleFactory>
+    </extension>
 
-       <extension
+    <extension
           point="org.eclipse.ui.startup">
        <startup
              class="org.apache.easyant4e.Startup"></startup>
     </extension>
     -->
 <!--
-       <extension
+    <extension
        point="org.eclipse.ui.console.consolePageParticipants">
     <consolePageParticipant
           class="org.apache.easyant4e.console.EasyAntConsolePageParticipant"
index 9be5b1d..77b817b 100644 (file)
    limitations under the License.
 -->
 <ivysettings>
-       <settings defaultResolver="main"/>      
-       <property name="easyant.repo.url" value="http://repository.easyant.org"/>
-       <!-- Directory use by ivy retreive in order to store modules (plugins and build types) -->
-       <property name="easyant.modules.dir" value="${user.home}/.easyant/modules"/>    
-       <resolvers>
-               <filesystem name="local">
-                       <ivy pattern="${easyant.modules.dir}/[organisation]/[module]/[revision]/[module].ivy" />                        
-                       <artifact pattern="${easyant.modules.dir}/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>
-               </filesystem>
-               <!-- EasyAnt modules -->
-               <url name="easyant-modules">
-                       <ivy pattern="${easyant.repo.url}/modules/[organisation]/[module]/[revision]/[module].ivy" />                   
-                       <artifact pattern="${easyant.repo.url}/modules/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>                    
-               </url>
-               <!-- External required libraries -->
-               <url name="easyant-shared">
-                       <ivy pattern="${easyant.repo.url}/shared/[organisation]/[module]/[revision]/[module].ivy" />
-                       <artifact pattern="${easyant.repo.url}/shared/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>             
-               </url>
-               <chain name="main" returnFirst="true">
-                       <resolver ref="local"/>
-                       <resolver ref="easyant-modules" />
-                       <resolver ref="easyant-shared" />
-               </chain>                
-       </resolvers>    
+    <settings defaultResolver="main"/>  
+    <property name="easyant.repo.url" value="http://repository.easyant.org"/>
+    <!-- Directory use by ivy retreive in order to store modules (plugins and build types) -->
+    <property name="easyant.modules.dir" value="${user.home}/.easyant/modules"/>    
+    <resolvers>
+        <filesystem name="local">
+            <ivy pattern="${easyant.modules.dir}/[organisation]/[module]/[revision]/[module].ivy" />            
+            <artifact pattern="${easyant.modules.dir}/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>
+        </filesystem>
+        <!-- EasyAnt modules -->
+        <url name="easyant-modules">
+            <ivy pattern="${easyant.repo.url}/modules/[organisation]/[module]/[revision]/[module].ivy" />           
+            <artifact pattern="${easyant.repo.url}/modules/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>            
+        </url>
+        <!-- External required libraries -->
+        <url name="easyant-shared">
+            <ivy pattern="${easyant.repo.url}/shared/[organisation]/[module]/[revision]/[module].ivy" />
+            <artifact pattern="${easyant.repo.url}/shared/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>     
+        </url>
+        <chain name="main" returnFirst="true">
+            <resolver ref="local"/>
+            <resolver ref="easyant-modules" />
+            <resolver ref="easyant-shared" />
+        </chain>        
+    </resolvers>    
 </ivysettings>
index fe73a8e..816e9f5 100644 (file)
    limitations under the License.
 -->
 <ivysettings>
-       <settings defaultResolver="main"/>
-       <caches useOrigin="true" defaultCacheDir="${user.home}/.easyant/easyant-cache" />
-       <!-- Directory use by ivy retreive in order to store modules (plugins and build types) -->
-       <property name="easyant.repo.dir" value="${user.home}/.easyant/easyant-repository"/>
-       <resolvers>
-               <!-- EasyAnt modules -->
-               <filesystem name="easyant-modules">
-                       <ivy pattern="${easyant.repo.dir}/modules/[organisation]/[module]/[revision]/[module].ivy"/>
-                       <artifact pattern="${easyant.repo.dir}/modules/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>
-               </filesystem>
-               <!-- External required libraries -->
-               <filesystem name="easyant-shared">
-                       <ivy pattern="${easyant.repo.dir}/shared/[organisation]/[module]/[revision]/[module].ivy"/>
-                       <artifact pattern="${easyant.repo.dir}/shared/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>
-               </filesystem>
-               <chain name="main" returnFirst="true">
-                       <resolver ref="easyant-modules"/>
-                       <resolver ref="easyant-shared"/>
-               </chain>
-       </resolvers>
-</ivysettings>
\ No newline at end of file
+    <settings defaultResolver="main"/>
+    <caches useOrigin="true" defaultCacheDir="${user.home}/.easyant/easyant-cache" />
+    <!-- Directory use by ivy retreive in order to store modules (plugins and build types) -->
+    <property name="easyant.repo.dir" value="${user.home}/.easyant/easyant-repository"/>
+    <resolvers>
+        <!-- EasyAnt modules -->
+        <filesystem name="easyant-modules">
+            <ivy pattern="${easyant.repo.dir}/modules/[organisation]/[module]/[revision]/[module].ivy"/>
+            <artifact pattern="${easyant.repo.dir}/modules/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>
+        </filesystem>
+        <!-- External required libraries -->
+        <filesystem name="easyant-shared">
+            <ivy pattern="${easyant.repo.dir}/shared/[organisation]/[module]/[revision]/[module].ivy"/>
+            <artifact pattern="${easyant.repo.dir}/shared/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>
+        </filesystem>
+        <chain name="main" returnFirst="true">
+            <resolver ref="easyant-modules"/>
+            <resolver ref="easyant-shared"/>
+        </chain>
+    </resolvers>
+</ivysettings>
index a0f230a..34ce73a 100644 (file)
@@ -33,86 +33,86 @@ import com.google.inject.Inject;
  */
 public class Activator extends AbstractUIPlugin {
 
-       private EasyAntPlugin easyAntPlugin;
-       private EasyAntCoreModule easyAntCoreModule;
-       private EasyAnt4EclipseModule easyAnt4EclipseModule;
+    private EasyAntPlugin easyAntPlugin;
+    private EasyAntCoreModule easyAntCoreModule;
+    private EasyAnt4EclipseModule easyAnt4EclipseModule;
 
-       private EasyantCoreService easyantCoreService;
-       
-       @Inject
-       public void setEasyantCoreService(EasyantCoreService easyantCoreService) {
-               this.easyantCoreService = easyantCoreService;
-       }
+    private EasyantCoreService easyantCoreService;
+    
+    @Inject
+    public void setEasyantCoreService(EasyantCoreService easyantCoreService) {
+        this.easyantCoreService = easyantCoreService;
+    }
 
-       public static final String PLUGIN_ID = "org.apache.easyant4e";
+    public static final String PLUGIN_ID = "org.apache.easyant4e";
 
-       // The shared instance.
-       private static Activator plugin;
-       
+    // The shared instance.
+    private static Activator plugin;
+    
 
-       /**
-        * Create an activator and a EasyAntModule
-        
-        */
-       public Activator() {
-               super();
-               if (plugin == null) {
-                       plugin = this;
-                       this.easyAntCoreModule = new EasyAntCoreModule();
-                       this.easyAnt4EclipseModule = new EasyAnt4EclipseModule();
-               }
-       }
+    /**
+     * Create an activator and a EasyAntModule
+     * 
+     */
+    public Activator() {
+        super();
+        if (plugin == null) {
+            plugin = this;
+            this.easyAntCoreModule = new EasyAntCoreModule();
+            this.easyAnt4EclipseModule = new EasyAnt4EclipseModule();
+        }
+    }
 
-       @Override
-       public void start(BundleContext context) throws Exception {
-               super.start(context);
-               initializeEasyAntPlugin();              
-               easyantCoreService.installPluginsRepository();
-               Activator.getDefault().getLog().log(
-                               new Status(IStatus.INFO, Activator.PLUGIN_ID, 0, "EasyAnt For Eclipse started", null));
-       }
+    @Override
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        initializeEasyAntPlugin();      
+        easyantCoreService.installPluginsRepository();
+        Activator.getDefault().getLog().log(
+                new Status(IStatus.INFO, Activator.PLUGIN_ID, 0, "EasyAnt For Eclipse started", null));
+    }
 
-       @Override
-       public void stop(BundleContext context) throws Exception {
-               Activator.getDefault().getLog().log(
-                               new Status(IStatus.INFO, Activator.PLUGIN_ID, 0, "EasyAnt For Eclipse shutdown", null));
-               plugin = null;
-               super.stop(context);
-       }
+    @Override
+    public void stop(BundleContext context) throws Exception {
+        Activator.getDefault().getLog().log(
+                new Status(IStatus.INFO, Activator.PLUGIN_ID, 0, "EasyAnt For Eclipse shutdown", null));
+        plugin = null;
+        super.stop(context);
+    }
 
-       /**
-        * Returns the shared instance.
-        
-        * @return the plugin instance
-        */
-       public static Activator getDefault() {
-               return plugin;
-       }
+    /**
+     * Returns the shared instance.
+     * 
+     * @return the plugin instance
+     */
+    public static Activator getDefault() {
+        return plugin;
+    }
 
-       /**
-        * Returns the EasyAnt Plugin instance.
-        
-        * @return the EasyAnt plugin instance
-        */
-       public static EasyAntPlugin getEasyAntPlugin() {
-               return getDefault().getEasyAntPluginInstance();
-       }
+    /**
+     * Returns the EasyAnt Plugin instance.
+     * 
+     * @return the EasyAnt plugin instance
+     */
+    public static EasyAntPlugin getEasyAntPlugin() {
+        return getDefault().getEasyAntPluginInstance();
+    }
 
-       /**
-        * Returns the EasyAntPlugin instance.
-        */
-       private EasyAntPlugin getEasyAntPluginInstance() {
-               if (easyAntPlugin == null) {
-                       initializeEasyAntPlugin();
-               }
-               return easyAntPlugin;
-       }
+    /**
+     * Returns the EasyAntPlugin instance.
+     */
+    private EasyAntPlugin getEasyAntPluginInstance() {
+        if (easyAntPlugin == null) {
+            initializeEasyAntPlugin();
+        }
+        return easyAntPlugin;
+    }
 
-       private void initializeEasyAntPlugin() {
-               if (easyAntPlugin == null) {
-                       easyAntPlugin = new EasyAntPlugin(easyAntCoreModule, easyAnt4EclipseModule);
-                       easyAntPlugin.injectMembers(this);
-               }
-       }
-               
+    private void initializeEasyAntPlugin() {
+        if (easyAntPlugin == null) {
+            easyAntPlugin = new EasyAntPlugin(easyAntCoreModule, easyAnt4EclipseModule);
+            easyAntPlugin.injectMembers(this);
+        }
+    }
+        
 }
index b576a35..4dc0b72 100644 (file)
@@ -19,34 +19,34 @@ package org.apache.easyant4e;
 
 public interface EasyAntConstants {
 
-       
-       public static final String IVY_MODULE_TAG = "ivy-module";
-       public static final String IVY_INFO_TAG = "info";
-       //public static final String IVY_DESCRIPTION_TAG = "description";
-
-       public static final String EASYANT_TAG = "ea:build";
-       public static final String EASYANT_TYPE_ATTR = "type";
-
-       public static final String EASYANT_PROPERTY_TAG = "ea:property";
-       public static final String EASYANT_PROPERTY_NAME_ATTR = "name";
-       public static final String EASYANT_PROPERTY_VALUE_ATTR = "value";
-       public static final String EASYANT_PROPERTY_FILE_ATTR = "file";
-
-       public static final String EASYANT_PLUGIN_TAG = "ea:plugin";
-       public static final String EASYANT_PLUGIN_MODULE_ATTR = "module";
-       public static final String EASYANT_PLUGIN_AS_ATTR = "as";
-       public static final String EASYANT_PLUGIN_MODE_ATTR = "mode";
-       public static final String EASYANT_PLUGIN_MODE_INCLUDE = "include";
-       public static final String EASYANT_PLUGIN_MODE_IMPORT = "import";
-       public static final String EASYANT_PLUGIN_MANDATORY_ATTR = "mandatory";
-
-       public static final String EASYANT_BUILD_TYPES_ORG = "org.apache.easyant.buildtypes";
-       public static final String EASYANT_BUILD_PLUGINS_ORG = "org.apache.easyant.plugins";
-
-       public static final String PLUGINS_SETTINGS = "ivysettings.xml";
-       
-       //Ant log level
-       public static final int ANT_LOGLEVEL_ERR = 0;
+    
+    public static final String IVY_MODULE_TAG = "ivy-module";
+    public static final String IVY_INFO_TAG = "info";
+    //public static final String IVY_DESCRIPTION_TAG = "description";
+
+    public static final String EASYANT_TAG = "ea:build";
+    public static final String EASYANT_TYPE_ATTR = "type";
+
+    public static final String EASYANT_PROPERTY_TAG = "ea:property";
+    public static final String EASYANT_PROPERTY_NAME_ATTR = "name";
+    public static final String EASYANT_PROPERTY_VALUE_ATTR = "value";
+    public static final String EASYANT_PROPERTY_FILE_ATTR = "file";
+
+    public static final String EASYANT_PLUGIN_TAG = "ea:plugin";
+    public static final String EASYANT_PLUGIN_MODULE_ATTR = "module";
+    public static final String EASYANT_PLUGIN_AS_ATTR = "as";
+    public static final String EASYANT_PLUGIN_MODE_ATTR = "mode";
+    public static final String EASYANT_PLUGIN_MODE_INCLUDE = "include";
+    public static final String EASYANT_PLUGIN_MODE_IMPORT = "import";
+    public static final String EASYANT_PLUGIN_MANDATORY_ATTR = "mandatory";
+
+    public static final String EASYANT_BUILD_TYPES_ORG = "org.apache.easyant.buildtypes";
+    public static final String EASYANT_BUILD_PLUGINS_ORG = "org.apache.easyant.plugins";
+
+    public static final String PLUGINS_SETTINGS = "ivysettings.xml";
+    
+    //Ant log level
+    public static final int ANT_LOGLEVEL_ERR = 0;
     public static final int ANT_LOGLEVEL_WARN = 1;
     public static final int ANT_LOGLEVEL_INFO = 2;
     public static final int ANT_LOGLEVEL_VERBOSE = 3;
index e95769a..500e8c2 100644 (file)
@@ -36,118 +36,118 @@ import com.google.inject.Module;
 
 public class EasyAntPlugin {
 
-       private final Injector injector;
-
-       public EasyAntPlugin(Module... modules) {
-               injector = Guice.createInjector(modules);
-               injectMembers(this);
-       }
-
-       public void injectMembers(Object instance) {
-               injector.injectMembers(instance);
-       }
-
-       /**
-        * Return the {@link EasyantCoreService}.
-        */
-       /*public EasyantCoreService getEasyantCoreService() {
-               return getInstance(EasyantCoreService.class);
-       }*/
-
-       /**
-        * Return the {@link EasyantProjectService}.
-        */
-       /*
-       public EasyantProjectService getEasyantProjectService() {
-               return getInstance(EasyantProjectService.class);
-       }*/
-
-       public IProject getCurrentProject() {
-               try {
-                       return getSelectedProject();
-               } catch (CoreException e) {
-                       log(e);
-               }
-               return null;
-       }
-
-       // private IJavaProject getJavaProject() throws CoreException {
-       // IProject project = getSelectedProject();
-       // IJavaProject javaProject=null;
-       // if(project.hasNature(JavaCore.NATURE_ID)){
-       // javaProject = (IJavaProject)project.getNature(JavaCore.NATURE_ID);
-       // }
-       // return javaProject;
-       //}
-
-       private IProject getSelectedProject() throws CoreException {
-               IProject project = null;
-               Object selectedResource = getSelectedResource();
-               if (selectedResource instanceof IResource) {
-                       IResource resource = (IResource) selectedResource;
-                       project = resource.getProject();
-               } else if (selectedResource instanceof ClassPathContainer) {
-                       // FIXME maybe use Adaptable and WorkbenchAdapter to resolve project
-                       // container
-                       project = ((ClassPathContainer) selectedResource).getJavaProject().getProject();
-               }
-               return project;
-       }
-
-       private Object getSelectedResource() {
-               IStructuredSelection selection = getStructuredSelection();
-               if (selection != null) {
-                       Object element = selection.getFirstElement();
-                       return element;
-               }
-               return null;
-       }
-
-       private IStructuredSelection getStructuredSelection() {
-               ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService()
-                               .getSelection();
-               if (selection instanceof IStructuredSelection) {
-                       IStructuredSelection ss = (IStructuredSelection) selection;
-                       return ss;
-               }
-               return null;
-       }
-
-       public void log(int severity, String message) {
-               log(severity, message, null);
-       }
-
-       public void log(int severity, String message, Throwable e) {
-               log(new Status(severity, Activator.PLUGIN_ID, 0, message, e));
-       }
-
-       public void log(CoreException e) {
-               log(e.getStatus().getSeverity(), "EasyAnt For Eclipse - Internal Error", e);
-       }
-
-       public void log(IStatus status) {
-               Activator.getDefault().getLog().log(status);
-       }
-
-       /**
-        * Return the workspace used by the workbench
-        
-        * This method is internal to the workbench and must not be called by any
-        * plugins.
-        */
-       public IWorkspace getPluginWorkspace() {
-               return ResourcesPlugin.getWorkspace();
-       }
-
-       /**
-        * Get instances from the injector.
-        
-        * @param type
-        *            the type to get an instance of
-        * @return the instance
-        */
-       public <T> T getInstance(Class<T> type) {
-               return injector.getInstance(type);
-       }
+    private final Injector injector;
+
+    public EasyAntPlugin(Module... modules) {
+        injector = Guice.createInjector(modules);
+        injectMembers(this);
+    }
+
+    public void injectMembers(Object instance) {
+        injector.injectMembers(instance);
+    }
+
+    /**
+     * Return the {@link EasyantCoreService}.
+     */
+    /*public EasyantCoreService getEasyantCoreService() {
+        return getInstance(EasyantCoreService.class);
+    }*/
+
+    /**
+     * Return the {@link EasyantProjectService}.
+     */
+    /*
+    public EasyantProjectService getEasyantProjectService() {
+        return getInstance(EasyantProjectService.class);
+    }*/
+
+    public IProject getCurrentProject() {
+        try {
+            return getSelectedProject();
+        } catch (CoreException e) {
+            log(e);
+        }
+        return null;
+    }
+
+    // private IJavaProject getJavaProject() throws CoreException {
+    // IProject project = getSelectedProject();
+    // IJavaProject javaProject=null;
+    // if(project.hasNature(JavaCore.NATURE_ID)){
+    // javaProject = (IJavaProject)project.getNature(JavaCore.NATURE_ID);
+    // }
+    // return javaProject;
+    //}
+
+    private IProject getSelectedProject() throws CoreException {
+        IProject project = null;
+        Object selectedResource = getSelectedResource();
+        if (selectedResource instanceof IResource) {
+            IResource resource = (IResource) selectedResource;
+            project = resource.getProject();
+        } else if (selectedResource instanceof ClassPathContainer) {
+            // FIXME maybe use Adaptable and WorkbenchAdapter to resolve project
+            // container
+            project = ((ClassPathContainer) selectedResource).getJavaProject().getProject();
+        }
+        return project;
+    }
+
+    private Object getSelectedResource() {
+        IStructuredSelection selection = getStructuredSelection();
+        if (selection != null) {
+            Object element = selection.getFirstElement();
+            return element;
+        }
+        return null;
+    }
+
+    private IStructuredSelection getStructuredSelection() {
+        ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService()
+                .getSelection();
+        if (selection instanceof IStructuredSelection) {
+            IStructuredSelection ss = (IStructuredSelection) selection;
+            return ss;
+        }
+        return null;
+    }
+
+    public void log(int severity, String message) {
+        log(severity, message, null);
+    }
+
+    public void log(int severity, String message, Throwable e) {
+        log(new Status(severity, Activator.PLUGIN_ID, 0, message, e));
+    }
+
+    public void log(CoreException e) {
+        log(e.getStatus().getSeverity(), "EasyAnt For Eclipse - Internal Error", e);
+    }
+
+    public void log(IStatus status) {
+        Activator.getDefault().getLog().log(status);
+    }
+
+    /**
+     * Return the workspace used by the workbench
+     * 
+     * This method is internal to the workbench and must not be called by any
+     * plugins.
+     */
+    public IWorkspace getPluginWorkspace() {
+        return ResourcesPlugin.getWorkspace();
+    }
+
+    /**
+     * Get instances from the injector.
+     * 
+     * @param type
+     *            the type to get an instance of
+     * @return the instance
+     */
+    public <T> T getInstance(Class<T> type) {
+        return injector.getInstance(type);
+    }
 
 }
index ef9e8da..a533099 100644 (file)
@@ -27,33 +27,33 @@ import org.eclipse.ui.IStartup;
 // http://wiki.eclipse.org/FAQ_How_do_I_make_my_plug-in_dynamic_enabled%3F
 public class Startup implements IStartup {
 
-       public void earlyStartup() {
-               //TODO add aspect to kill 
-               //ExtensionRegistry -> private boolean checkReadWriteAccess(Object key, boolean persist) {
-               
-//             System.out.println("--- clean IvyDE extension");
-//             IExtensionRegistry reg = RegistryFactory.getRegistry();
-//             IExtension[] extensions = reg.getExtensions("org.apache.ivyde.eclipse");                
-//             for (IExtension extension : extensions) {
-//                     if ("org.eclipse.ui.popupMenus".equals(extension.getExtensionPointUniqueIdentifier())) {
-//                             System.out.println("--> remove "+extension);
-//                             try{
-//                                     reg.removeExtension(extension, getUserToken());
-//                             }catch(Exception e){
-//                                     e.printStackTrace();
-//                             }
-//                             System.out.println("--> extension removed!");
-//                             break;
-//                     }
-//             }
-       }
+    public void earlyStartup() {
+        //TODO add aspect to kill 
+        //ExtensionRegistry -> private boolean checkReadWriteAccess(Object key, boolean persist) {
+        
+//      System.out.println("--- clean IvyDE extension");
+//      IExtensionRegistry reg = RegistryFactory.getRegistry();
+//      IExtension[] extensions = reg.getExtensions("org.apache.ivyde.eclipse");        
+//      for (IExtension extension : extensions) {
+//          if ("org.eclipse.ui.popupMenus".equals(extension.getExtensionPointUniqueIdentifier())) {
+//              System.out.println("--> remove "+extension);
+//              try{
+//                  reg.removeExtension(extension, getUserToken());
+//              }catch(Exception e){
+//                  e.printStackTrace();
+//              }
+//              System.out.println("--> extension removed!");
+//              break;
+//          }
+//      }
+    }
 
-       /*
-       private Object getUserToken() {
-               IExtensionRegistry registry = RegistryFactory.getRegistry();
-               //return null; // require -Declipse.registry.nulltoken=true
-               return ((ExtensionRegistry) registry).getTemporaryUserToken();
-       }
+    /*
+    private Object getUserToken() {
+        IExtensionRegistry registry = RegistryFactory.getRegistry();
+        //return null; // require -Declipse.registry.nulltoken=true
+        return ((ExtensionRegistry) registry).getTemporaryUserToken();
+    }
 */
-       
+    
 }
index 3b90fea..f7d20c9 100644 (file)
@@ -40,61 +40,61 @@ import com.google.inject.Inject;
  */
 public class EasyAntBuilder extends IncrementalProjectBuilder {
 
-       private IProgressMonitor monitor;
+    private IProgressMonitor monitor;
 
-       private EasyantProjectService easyantProjectService;
-               
-       public EasyAntBuilder(){
-               Activator.getEasyAntPlugin().injectMembers(this);
-       }
-       
-       @Inject
-       public void setEasyantProjectService(EasyantProjectService easyantProjectService) {
-               this.easyantProjectService = easyantProjectService;
-       }
-       
-       @SuppressWarnings("unchecked")
-       @Override
-       protected IProject[] build(final int kind, final Map args, final IProgressMonitor monitor) throws CoreException {
-               this.monitor = monitor;
-               if (!getProject().exists()) {
-                       return new IProject[] {};
-               } else {
-                       try {
-                               if (FULL_BUILD == kind) {
-                                       doBuild();
-                               } else { // FIXME maybe check INCREMENTAL_BUILD or AUTO_BUILD
-                                       IResourceDelta delta = getDelta(getProject());
-                                       if (delta == null) {
-                                               doBuild();
-                                       } else {
-                                               doBuild(delta);
-                                       }
-                               }
-                       } catch (OperationCanceledException e) {
-                               Activator.getEasyAntPlugin().log(IStatus.CANCEL, "EasyAnt build canceled", e);
-                       }
-                       return null;
-               }
-       }
+    private EasyantProjectService easyantProjectService;
+        
+    public EasyAntBuilder(){
+        Activator.getEasyAntPlugin().injectMembers(this);
+    }
+    
+    @Inject
+    public void setEasyantProjectService(EasyantProjectService easyantProjectService) {
+        this.easyantProjectService = easyantProjectService;
+    }
+    
+    @SuppressWarnings("unchecked")
+    @Override
+    protected IProject[] build(final int kind, final Map args, final IProgressMonitor monitor) throws CoreException {
+        this.monitor = monitor;
+        if (!getProject().exists()) {
+            return new IProject[] {};
+        } else {
+            try {
+                if (FULL_BUILD == kind) {
+                    doBuild();
+                } else { // FIXME maybe check INCREMENTAL_BUILD or AUTO_BUILD
+                    IResourceDelta delta = getDelta(getProject());
+                    if (delta == null) {
+                        doBuild();
+                    } else {
+                        doBuild(delta);
+                    }
+                }
+            } catch (OperationCanceledException e) {
+                Activator.getEasyAntPlugin().log(IStatus.CANCEL, "EasyAnt build canceled", e);
+            }
+            return null;
+        }
+    }
 
-       protected void doBuild() throws CoreException {
-               IWorkspaceRunnable buildOperation = createBuildOperation(); 
-               buildOperation.run(monitor);
-       }
+    protected void doBuild() throws CoreException {
+        IWorkspaceRunnable buildOperation = createBuildOperation(); 
+        buildOperation.run(monitor);
+    }
 
-       protected void doBuild(IResourceDelta delta) throws CoreException {
-               doBuild();
-       }
-       
-       private IWorkspaceRunnable createBuildOperation(){
-               // TODO maybe use WorkspaceModifyOperation
-               return new IWorkspaceRunnable(){                        
-                       public void run(IProgressMonitor monitor) throws CoreException {
-                               // TODO call good target
-                               easyantProjectService.runBuild(getProject(), "compile", EasyAntConstants.ANT_LOGLEVEL_WARN, monitor);
-                       }                       
-               };
-       }
+    protected void doBuild(IResourceDelta delta) throws CoreException {
+        doBuild();
+    }
+    
+    private IWorkspaceRunnable createBuildOperation(){
+        // TODO maybe use WorkspaceModifyOperation
+        return new IWorkspaceRunnable(){            
+            public void run(IProgressMonitor monitor) throws CoreException {
+                // TODO call good target
+                easyantProjectService.runBuild(getProject(), "compile", EasyAntConstants.ANT_LOGLEVEL_WARN, monitor);
+            }           
+        };
+    }
 
 }
index 41b27dc..2fd42d3 100644 (file)
@@ -21,14 +21,14 @@ import org.eclipse.ui.console.IConsole;
 
 public interface EasyAntConsole extends IConsole{
 
-       void show();
-       void close();
-       boolean isOpen();
-       
-       void info(String msg);
-       void error(String msg);
-       
-        /**
+    void show();
+    void close();
+    boolean isOpen();
+    
+    void info(String msg);
+    void error(String msg);
+    
+     /**
      * Show the console.
      * 
      * @param showNoMatterWhat
index 6459b8a..d2f25e5 100644 (file)
@@ -23,21 +23,21 @@ import org.eclipse.ui.console.IConsoleFactory;
 import com.google.inject.Inject;
 
 public class EasyAntConsoleFactory implements IConsoleFactory {
-       
-       private EasyAntConsole console;
-       
-       public EasyAntConsoleFactory(){
-               Activator.getEasyAntPlugin().injectMembers(this);
-       }
-       
-       @Inject
-       public void setConsole(EasyAntConsole console) {
-               this.console = console;
-       }
-       
-       public void openConsole() {             
-               if (console != null) {
-                       console.show();
-               }
-       }
+    
+    private EasyAntConsole console;
+    
+    public EasyAntConsoleFactory(){
+        Activator.getEasyAntPlugin().injectMembers(this);
+    }
+    
+    @Inject
+    public void setConsole(EasyAntConsole console) {
+        this.console = console;
+    }
+    
+    public void openConsole() {     
+        if (console != null) {
+            console.show();
+        }
+    }
 }
index dfd6a2f..9938308 100644 (file)
@@ -32,66 +32,66 @@ import org.eclipse.ui.console.IConsoleManager;
 import com.google.inject.Inject;
 
 public class EasyAntConsoleImpl extends IvyConsole implements EasyAntConsole {
-       
-       private boolean isOpen=false;
-       
-       public boolean isOpen() {
-               //TODO get the stat
-               return isOpen;
-       }
+    
+    private boolean isOpen=false;
+    
+    public boolean isOpen() {
+        //TODO get the stat
+        return isOpen;
+    }
 
-       public void setOpen(boolean isOpen) {
-               this.isOpen = isOpen;
-       }
-       
-       @Inject
-       public EasyAntConsoleImpl(ImageProvider imageProvider) {                
-               super("EasyAnt", imageProvider.getConsoleImageDescriptor());            
-       }
+    public void setOpen(boolean isOpen) {
+        this.isOpen = isOpen;
+    }
+    
+    @Inject
+    public EasyAntConsoleImpl(ImageProvider imageProvider) {        
+        super("EasyAnt", imageProvider.getConsoleImageDescriptor());        
+    }
 
-       public void show() {            
-               IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
-               IConsole[] existing = manager.getConsoles();
-               boolean exists = false;
-               for (int i = 0; i < existing.length; i++) {
-                       if (this == existing[i]) {
-                               exists = true;
-                       }
-               }
-               if (!exists) {
-                       manager.addConsoles(new IConsole[] { this });
-               }
-               manager.showConsoleView(this);
-               setOpen(true);
-               
-               //show the Error log view
-               showErrorLogView();
-               
-       }
-       
-       private void showErrorLogView(){
-           if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
+    public void show() {        
+        IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
+        IConsole[] existing = manager.getConsoles();
+        boolean exists = false;
+        for (int i = 0; i < existing.length; i++) {
+            if (this == existing[i]) {
+                exists = true;
+            }
+        }
+        if (!exists) {
+            manager.addConsoles(new IConsole[] { this });
+        }
+        manager.showConsoleView(this);
+        setOpen(true);
+        
+        //show the Error log view
+        showErrorLogView();
+        
+    }
+    
+    private void showErrorLogView(){
+        if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
             if (PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() != null) {
                     try {
-                                               PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.pde.runtime.LogView", null, IWorkbenchPage.VIEW_ACTIVATE);
-                                       } catch (PartInitException e) {
-                                               Activator.getEasyAntPlugin().log(IStatus.ERROR, "Cannot show the Error Log view.", e);
-                                       }
+                        PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.pde.runtime.LogView", null, IWorkbenchPage.VIEW_ACTIVATE);
+                    } catch (PartInitException e) {
+                        Activator.getEasyAntPlugin().log(IStatus.ERROR, "Cannot show the Error Log view.", e);
+                    }
             }
-           }
-       }
+        }
+    }
 
-       @Override
-       public void error(String msg) {
-               showErrorLogView();
-               super.error(msg);
-       }
+    @Override
+    public void error(String msg) {
+        showErrorLogView();
+        super.error(msg);
+    }
 
-       public void close() {
-               IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
-               manager.removeConsoles(new IConsole[] { this });
-               //ConsolePlugin.getDefault().getConsoleManager().addConsoleListener(new MyLifecycle());
-               setOpen(false);
-       }
-       
+    public void close() {
+        IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
+        manager.removeConsoles(new IConsole[] { this });
+        //ConsolePlugin.getDefault().getConsoleManager().addConsoleListener(new MyLifecycle());
+        setOpen(false);
+    }
+    
 }
index 52f36e5..ebfa301 100644 (file)
@@ -23,28 +23,28 @@ import org.eclipse.ui.part.IPageBookViewPage;
 
 public class EasyAntConsolePageParticipant implements IConsolePageParticipant {
 
-       //private CloseConsoleAction closeAction;
+    //private CloseConsoleAction closeAction;
 
-       public void init(IPageBookViewPage page, IConsole console) {
-               // closeAction = new IvyConsoleRemoveAction(console);
-               // IToolBarManager manager =
-               // page.getSite().getActionBars().getToolBarManager();
-               // manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, closeAction);
-       }
+    public void init(IPageBookViewPage page, IConsole console) {
+        // closeAction = new IvyConsoleRemoveAction(console);
+        // IToolBarManager manager =
+        // page.getSite().getActionBars().getToolBarManager();
+        // manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, closeAction);
+    }
 
-       public void dispose() {
-       //      closeAction = null;
-       }
+    public void dispose() {
+    //  closeAction = null;
+    }
 
-       @SuppressWarnings("unchecked")
-       public Object getAdapter(Class adapter) {
-               return null;
-       }
+    @SuppressWarnings("unchecked")
+    public Object getAdapter(Class adapter) {
+        return null;
+    }
 
-       public void activated() {
-       }
+    public void activated() {
+    }
 
-       public void deactivated() {
-       }
+    public void deactivated() {
+    }
 
 }
index c1ab0ef..2f22ee1 100644 (file)
@@ -33,70 +33,70 @@ import org.eclipse.core.runtime.IStatus;
  * This class unpack the default EasyAnt repository in local file system.
  */
 public class RepositoryInstaller {
-       static final int BUFFER_SIZE = 102400;
-       static final String REPOSITORY_ARCHIVE_PATH = "repository.zip";
-       private URL interpreterZipUrl;
+    static final int BUFFER_SIZE = 102400;
+    static final String REPOSITORY_ARCHIVE_PATH = "repository.zip";
+    private URL interpreterZipUrl;
 
-       public void install(File installDir) {
-               this.interpreterZipUrl = Activator.getDefault().getBundle().getResource(REPOSITORY_ARCHIVE_PATH);
-               try {
-                       unPackArchive(installDir);
-               } catch (IOException e) {
-                       Activator.getEasyAntPlugin().log(IStatus.ERROR, "Cannot install EasyAnt repository", e);
-               }
-       }
+    public void install(File installDir) {
+        this.interpreterZipUrl = Activator.getDefault().getBundle().getResource(REPOSITORY_ARCHIVE_PATH);
+        try {
+            unPackArchive(installDir);
+        } catch (IOException e) {
+            Activator.getEasyAntPlugin().log(IStatus.ERROR, "Cannot install EasyAnt repository", e);
+        }
+    }
 
-       private void unPackArchive(File installDir) throws IOException {
-               InputStream inputStream = this.interpreterZipUrl.openStream();
-               ZipInputStream zipFileStream = new ZipInputStream(inputStream);
-               ZipEntry zipEntry = zipFileStream.getNextEntry();
-               while (zipEntry != null) {
-                       File destination = new File(installDir.getPath(), zipEntry.getName());
-                       if (!zipEntry.isDirectory()) {
-                               /*
-                                * Copy files (and make sure parent directory exist)
-                                */
-                               File parentFile = destination.getParentFile();
-                               boolean parentFileExist = isFileExists(parentFile);
-                               if (!parentFileExist) {
-                                       parentFileExist = parentFile.mkdirs();
-                               }
-                               if (parentFileExist) {
-                                       OutputStream os = null;
-                                       try {
-                                               os = new FileOutputStream(destination);
-                                               byte[] buffer = new byte[BUFFER_SIZE];
-                                               while (true) {
-                                                       int len = zipFileStream.read(buffer);
-                                                       if (zipFileStream.available() == 0) {
-                                                               break;
-                                                       }
-                                                       os.write(buffer, 0, len);
-                                               }
-                                       } finally {
-                                               if (null != os) {
-                                                       os.close();
-                                               }
-                                       }
-                               } else {
-                                       Activator.getEasyAntPlugin().log(IStatus.ERROR,
-                                                       "Installing EasyAnt repository, but " + parentFile + " already exists!");
-                               }
-                       } else {
-                               boolean created = destination.mkdirs();
-                               if (!created) {
-                                       Activator.getEasyAntPlugin().log(IStatus.ERROR,
-                                                       "Installing EasyAnt repository. Cannot create directory: " + destination);
-                               }
-                       }
-                       zipFileStream.closeEntry();
-                       zipEntry = zipFileStream.getNextEntry();
-               }
-               inputStream.close();
-               zipFileStream.close();
-       }
+    private void unPackArchive(File installDir) throws IOException {
+        InputStream inputStream = this.interpreterZipUrl.openStream();
+        ZipInputStream zipFileStream = new ZipInputStream(inputStream);
+        ZipEntry zipEntry = zipFileStream.getNextEntry();
+        while (zipEntry != null) {
+            File destination = new File(installDir.getPath(), zipEntry.getName());
+            if (!zipEntry.isDirectory()) {
+                /*
+                 * Copy files (and make sure parent directory exist)
+                 */
+                File parentFile = destination.getParentFile();
+                boolean parentFileExist = isFileExists(parentFile);
+                if (!parentFileExist) {
+                    parentFileExist = parentFile.mkdirs();
+                }
+                if (parentFileExist) {
+                    OutputStream os = null;
+                    try {
+                        os = new FileOutputStream(destination);
+                        byte[] buffer = new byte[BUFFER_SIZE];
+                        while (true) {
+                            int len = zipFileStream.read(buffer);
+                            if (zipFileStream.available() == 0) {
+                                break;
+                            }
+                            os.write(buffer, 0, len);
+                        }
+                    } finally {
+                        if (null != os) {
+                            os.close();
+                        }
+                    }
+                } else {
+                    Activator.getEasyAntPlugin().log(IStatus.ERROR,
+                            "Installing EasyAnt repository, but " + parentFile + " already exists!");
+                }
+            } else {
+                boolean created = destination.mkdirs();
+                if (!created) {
+                    Activator.getEasyAntPlugin().log(IStatus.ERROR,
+                            "Installing EasyAnt repository. Cannot create directory: " + destination);
+                }
+            }
+            zipFileStream.closeEntry();
+            zipEntry = zipFileStream.getNextEntry();
+        }
+        inputStream.close();
+        zipFileStream.close();
+    }
 
-       private boolean isFileExists(File file) {
-               return (null != file && file.exists());
-       }
+    private boolean isFileExists(File file) {
+        return (null != file && file.exists());
+    }
 }
index 07c7744..e4fff6b 100644 (file)
@@ -61,267 +61,267 @@ import com.google.inject.Inject;
  */
 public class EasyAntModuleDescriptorExtension implements ModuleDescriptorExtension {
 
-       private IvyModuleDescriptorModel model;
-       private IvyTag rootTag;
-       private EasyantCoreService easyantCoreService;
-               
-       @Inject
-       public void setEasyantCoreService(EasyantCoreService easyantCoreService) {
-               this.easyantCoreService=easyantCoreService;
-       }
-       
-       public EasyAntModuleDescriptorExtension() {
-               super();
-               Activator.getEasyAntPlugin().injectMembers(this);
-       }
+    private IvyModuleDescriptorModel model;
+    private IvyTag rootTag;
+    private EasyantCoreService easyantCoreService;
+        
+    @Inject
+    public void setEasyantCoreService(EasyantCoreService easyantCoreService) {
+        this.easyantCoreService=easyantCoreService;
+    }
+    
+    public EasyAntModuleDescriptorExtension() {
+        super();
+        Activator.getEasyAntPlugin().injectMembers(this);
+    }
 
-       public IvyModuleDescriptorModel contributeModel(IvyModuleDescriptorModel model) {
-               this.model = model;
-               this.rootTag = model.getRootIvyTag();
-               contributeEasyAntTag();
-               return model;
-       }
+    public IvyModuleDescriptorModel contributeModel(IvyModuleDescriptorModel model) {
+        this.model = model;
+        this.rootTag = model.getRootIvyTag();
+        contributeEasyAntTag();
+        return model;
+    }
 
-       private IvyTag contributeEasyAntTag() {
-               IvyTag easyAntTag = createEasyAndTag();
-               return easyAntTag;
-       }
+    private IvyTag contributeEasyAntTag() {
+        IvyTag easyAntTag = createEasyAndTag();
+        return easyAntTag;
+    }
 
-       private IvyTag createEasyAndTag() {
-               IvyTag easyAntTag = new IvyTag(EASYANT_TAG, "Describes how to build this module with EasyAnt.");
-               easyAntTag.addAttribute(new IvyTagAttribute(EASYANT_TYPE_ATTR, "The name of the build type used to build this module.", true,
-                               createBuildTypesValueProvider()));
-               model.addTag(easyAntTag);
-               getDescriptionTag().addChildIvyTag(easyAntTag);
-               easyAntTag = createEasyAndTagChilds(easyAntTag);
-               return easyAntTag;
-       }
+    private IvyTag createEasyAndTag() {
+        IvyTag easyAntTag = new IvyTag(EASYANT_TAG, "Describes how to build this module with EasyAnt.");
+        easyAntTag.addAttribute(new IvyTagAttribute(EASYANT_TYPE_ATTR, "The name of the build type used to build this module.", true,
+                createBuildTypesValueProvider()));
+        model.addTag(easyAntTag);
+        getDescriptionTag().addChildIvyTag(easyAntTag);
+        easyAntTag = createEasyAndTagChilds(easyAntTag);
+        return easyAntTag;
+    }
 
-       private IvyTag createEasyAndTagChilds(IvyTag easyAntTag) {
-               createPropertyTag(rootTag, easyAntTag);
-               createPluginTag(rootTag, easyAntTag);
-               return easyAntTag;
-       }
+    private IvyTag createEasyAndTagChilds(IvyTag easyAntTag) {
+        createPropertyTag(rootTag, easyAntTag);
+        createPluginTag(rootTag, easyAntTag);
+        return easyAntTag;
+    }
 
-       private IvyTag getDescriptionTag() {
-               return model.getIvyTag(IVY_INFO_TAG, IVY_MODULE_TAG);
-       }
+    private IvyTag getDescriptionTag() {
+        return model.getIvyTag(IVY_INFO_TAG, IVY_MODULE_TAG);
+    }
 
-       private IDocumentedValueProvider createBuildTypesValueProvider() {
-               final List<String> buildTypes = getBuildTypes();
-               IDocumentedValueProvider buildTypesValueProvider = new IDocumentedValueProvider() {
-                       public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
-                               return buildTypes.toArray(new String[buildTypes.size()]);
-                       }
-                       public String getDocForValue(String value, IvyFile ivyFile) {
-                               String description = easyantCoreService.getBuildTypeDescription(value);
-                               return description;
-                       }
-               };
-               return buildTypesValueProvider;
-       }
+    private IDocumentedValueProvider createBuildTypesValueProvider() {
+        final List<String> buildTypes = getBuildTypes();
+        IDocumentedValueProvider buildTypesValueProvider = new IDocumentedValueProvider() {
+            public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
+                return buildTypes.toArray(new String[buildTypes.size()]);
+            }
+            public String getDocForValue(String value, IvyFile ivyFile) {
+                String description = easyantCoreService.getBuildTypeDescription(value);
+                return description;
+            }
+        };
+        return buildTypesValueProvider;
+    }
 
-       private List<String> getBuildTypes() {
-               // load default build types
-               final ArrayList<String> buildTypes = new ArrayList<String>();
-               Job job = new Job("Easyant - Getting list of Build Types (" + EASYANT_BUILD_TYPES_ORG + ") " + "from repository ...") {
-                       protected IStatus run(IProgressMonitor monitor) {
-                               for (String module : easyantCoreService.getAllCoreBuildTypes()) {
-                                       String shortName = module.substring(module.indexOf("#")+1);
-                                       buildTypes.add(shortName);
-                                       buildTypes.add(module);
-                               }
-                               return Status.OK_STATUS;
-                       }
-               };
-               job.setPriority(Job.LONG);
-               job.schedule();
-               return buildTypes;
-       }
+    private List<String> getBuildTypes() {
+        // load default build types
+        final ArrayList<String> buildTypes = new ArrayList<String>();
+        Job job = new Job("Easyant - Getting list of Build Types (" + EASYANT_BUILD_TYPES_ORG + ") " + "from repository ...") {
+            protected IStatus run(IProgressMonitor monitor) {
+                for (String module : easyantCoreService.getAllCoreBuildTypes()) {
+                    String shortName = module.substring(module.indexOf("#")+1);
+                    buildTypes.add(shortName);
+                    buildTypes.add(module);
+                }
+                return Status.OK_STATUS;
+            }
+        };
+        job.setPriority(Job.LONG);
+        job.schedule();
+        return buildTypes;
+    }
 
-       private IvyTag createPropertyTag(IvyTag root, IvyTag parent) {
-               // Contribute <property name="" value=""> Tag
-               IvyTag propertyTag = new IvyTag(EASYANT_PROPERTY_TAG, "Define a property in order to configure the build type or plugins.");
-               propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PROPERTY_NAME_ATTR, "The name of property. (associated with the 'value' tag)", false,
-                               createPropertyNameValueProvider()));
-               propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PROPERTY_VALUE_ATTR, "The value of property identified by the 'name' tag", false,
-                               createPropertyValueProvider()));
-               propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PROPERTY_FILE_ATTR, "Define a property file containing some properties 'name=value' pairs.", false));
-               model.addTag(propertyTag);
-               parent.addChildIvyTag(propertyTag);
-               return propertyTag;
-       }
+    private IvyTag createPropertyTag(IvyTag root, IvyTag parent) {
+        // Contribute <property name="" value=""> Tag
+        IvyTag propertyTag = new IvyTag(EASYANT_PROPERTY_TAG, "Define a property in order to configure the build type or plugins.");
+        propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PROPERTY_NAME_ATTR, "The name of property. (associated with the 'value' tag)", false,
+                createPropertyNameValueProvider()));
+        propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PROPERTY_VALUE_ATTR, "The value of property identified by the 'name' tag", false,
+                createPropertyValueProvider()));
+        propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PROPERTY_FILE_ATTR, "Define a property file containing some properties 'name=value' pairs.", false));
+        model.addTag(propertyTag);
+        parent.addChildIvyTag(propertyTag);
+        return propertyTag;
+    }
 
-       private IvyTag createPluginTag(IvyTag root, IvyTag parent) {
-               // Contribute <plugin module="" as=""> Tag
-               IvyTag propertyTag = new IvyTag(EASYANT_PLUGIN_TAG, "Define a plugin used to contribute additionnal parts of the build process.");
-               propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PLUGIN_MODULE_ATTR, "The name of the plugin.", true,
-                               createPluginModuleValueProvider()));
-               propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PLUGIN_AS_ATTR, "The name of the prefix used to call plugin's targets, i.e. for 'as=\"myplugin\"': myplugin:target1", true));
-               propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PLUGIN_MODE_ATTR, "The kind of import.", true,
-                               createPluginModeValueProvider()));
-               propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PLUGIN_MANDATORY_ATTR, "The mandatory status", false,
-                               createPluginMandatoryValueProvider()));
-               model.addTag(propertyTag);
-               parent.addChildIvyTag(propertyTag);
-               return propertyTag;
-       }
+    private IvyTag createPluginTag(IvyTag root, IvyTag parent) {
+        // Contribute <plugin module="" as=""> Tag
+        IvyTag propertyTag = new IvyTag(EASYANT_PLUGIN_TAG, "Define a plugin used to contribute additionnal parts of the build process.");
+        propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PLUGIN_MODULE_ATTR, "The name of the plugin.", true,
+                createPluginModuleValueProvider()));
+        propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PLUGIN_AS_ATTR, "The name of the prefix used to call plugin's targets, i.e. for 'as=\"myplugin\"': myplugin:target1", true));
+        propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PLUGIN_MODE_ATTR, "The kind of import.", true,
+                createPluginModeValueProvider()));
+        propertyTag.addAttribute(new IvyTagAttribute(EASYANT_PLUGIN_MANDATORY_ATTR, "The mandatory status", false,
+                createPluginMandatoryValueProvider()));
+        model.addTag(propertyTag);
+        parent.addChildIvyTag(propertyTag);
+        return propertyTag;
+    }
 
-       private IDocumentedValueProvider createPluginModuleValueProvider() {
-               final List<String> buildPlugins = getBuildPlugins();
-               IDocumentedValueProvider pluginModuleValueProvider = new IDocumentedValueProvider() {
-                       public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
-                               return buildPlugins.toArray(new String[buildPlugins.size()]);
-                       }
-                       public String getDocForValue(String value, IvyFile ivyFile) {
-                               String description = easyantCoreService.getPluginDescription(value);
-                               return description;
-                       }
-               };
-               return pluginModuleValueProvider;
-       }
+    private IDocumentedValueProvider createPluginModuleValueProvider() {
+        final List<String> buildPlugins = getBuildPlugins();
+        IDocumentedValueProvider pluginModuleValueProvider = new IDocumentedValueProvider() {
+            public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
+                return buildPlugins.toArray(new String[buildPlugins.size()]);
+            }
+            public String getDocForValue(String value, IvyFile ivyFile) {
+                String description = easyantCoreService.getPluginDescription(value);
+                return description;
+            }
+        };
+        return pluginModuleValueProvider;
+    }
 
-       private List<String> getBuildPlugins() {
-               final ArrayList<String> buildPlugins = new ArrayList<String>();
-               // load default build plugins
-               Job job = new Job("Easyant - Getting list of Plugins (" + EASYANT_BUILD_PLUGINS_ORG + ") from repository ...") {
-                       protected IStatus run(IProgressMonitor monitor) {
-                               for (String module : easyantCoreService.getAllCorePlugins()) {
-                                       String shortName = module.substring(module.indexOf("#")+1);
-                                       buildPlugins.add(shortName);
-                                       buildPlugins.add(module);
-                               }
-                               return Status.OK_STATUS;
-                       }
-               };
-               job.setPriority(Job.LONG);
-               job.schedule();
-               return buildPlugins;
-       }
+    private List<String> getBuildPlugins() {
+        final ArrayList<String> buildPlugins = new ArrayList<String>();
+        // load default build plugins
+        Job job = new Job("Easyant - Getting list of Plugins (" + EASYANT_BUILD_PLUGINS_ORG + ") from repository ...") {
+            protected IStatus run(IProgressMonitor monitor) {
+                for (String module : easyantCoreService.getAllCorePlugins()) {
+                    String shortName = module.substring(module.indexOf("#")+1);
+                    buildPlugins.add(shortName);
+                    buildPlugins.add(module);
+                }
+                return Status.OK_STATUS;
+            }
+        };
+        job.setPriority(Job.LONG);
+        job.schedule();
+        return buildPlugins;
+    }
 
-       private IDocumentedValueProvider createPluginModeValueProvider() {
-               IDocumentedValueProvider pluginModeValueProvider = new IDocumentedValueProvider() {
-                       public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
-                               return new String[] { EASYANT_PLUGIN_MODE_IMPORT, EASYANT_PLUGIN_MODE_INCLUDE };
-                       }
-                       public String getDocForValue(String value, IvyFile ivyFile) {
-                               //TODO get documentation for import and include
-                               return null;
-                       }
-               };
-               return pluginModeValueProvider;
-       }
+    private IDocumentedValueProvider createPluginModeValueProvider() {
+        IDocumentedValueProvider pluginModeValueProvider = new IDocumentedValueProvider() {
+            public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
+                return new String[] { EASYANT_PLUGIN_MODE_IMPORT, EASYANT_PLUGIN_MODE_INCLUDE };
+            }
+            public String getDocForValue(String value, IvyFile ivyFile) {
+                //TODO get documentation for import and include
+                return null;
+            }
+        };
+        return pluginModeValueProvider;
+    }
 
-       private IDocumentedValueProvider createPluginMandatoryValueProvider() {
-               IDocumentedValueProvider pluginMandatoryValueProvider = new IDocumentedValueProvider() {
-                       public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
-                               return new String[] { Boolean.TRUE.toString(), Boolean.FALSE.toString() };
-                       }
-                       public String getDocForValue(String value, IvyFile ivyFile) {
-                               return null;
-                       }
-               };
-               return pluginMandatoryValueProvider;
-       }
+    private IDocumentedValueProvider createPluginMandatoryValueProvider() {
+        IDocumentedValueProvider pluginMandatoryValueProvider = new IDocumentedValueProvider() {
+            public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
+                return new String[] { Boolean.TRUE.toString(), Boolean.FALSE.toString() };
+            }
+            public String getDocForValue(String value, IvyFile ivyFile) {
+                return null;
+            }
+        };
+        return pluginMandatoryValueProvider;
+    }
 
-       private IDocumentedValueProvider createPropertyValueProvider() {
-               IDocumentedValueProvider propertyValueValueProvider = new IDocumentedValueProvider() {
+    private IDocumentedValueProvider createPropertyValueProvider() {
+        IDocumentedValueProvider propertyValueValueProvider = new IDocumentedValueProvider() {
 
-                       public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
-                               PropertyDescriptor propertyDescriptor = getPropertyDescriptor(att, ivyFile);
-                               if (propertyDescriptor != null) {
-                                   String value = propertyDescriptor.getDefaultValue();
-                                   if(value==null){
-                                       value = propertyDescriptor.getValue();
-                                   }
-                                   if(value!=null){
-                                       return new String[] { value };
+            public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
+                PropertyDescriptor propertyDescriptor = getPropertyDescriptor(att, ivyFile);
+                if (propertyDescriptor != null) {
+                    String value = propertyDescriptor.getDefaultValue();
+                    if(value==null){
+                        value = propertyDescriptor.getValue();
                     }
-                               return new String[] {};  
-                               }
-                               return new String[] {};
-                       }
-                       public String getDocForValue(String value, IvyFile ivyFile) {
-                               return null;
-                       }
-               };
-               return propertyValueValueProvider;
-       }
+                    if(value!=null){
+                        return new String[] { value };
+                    }
+                    return new String[] {};  
+                }
+                return new String[] {};
+            }
+            public String getDocForValue(String value, IvyFile ivyFile) {
+                return null;
+            }
+        };
+        return propertyValueValueProvider;
+    }
 
-       private IDocumentedValueProvider createPropertyNameValueProvider() {
-               IDocumentedValueProvider propertyNameValueProvider = new IDocumentedValueProvider() {
-                       public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
-                               String buildType = getBuildType(ivyFile);
-                               if (buildType != null) {
-                                       List<PropertyDescriptor> propertyDescriptors = easyantCoreService.getPropertiesForBuildType(buildType);
-                                       String[] names = new String[propertyDescriptors.size()];
-                                       int i = 0;
-                                       for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
-                                               names[i] = propertyDescriptor.getName();
-                                               i++;
-                                       }
-                                       return names;
-                               }
-                               return new String[] {};
-                       }
-                       public String getDocForValue(String value, IvyFile ivyFile) {
-                               String buildType = getBuildType(ivyFile);
-                               if(buildType!=null){
-                                       PropertyDescriptor propertyDescriptor = getPropertyDescriptor(buildType, value);
-                                       if(propertyDescriptor!=null){
-                                               return propertyDescriptor.getDescription();
-                                       }
-                               }
-                               return null;
-                       }
-               };
-               return propertyNameValueProvider;
-       }
+    private IDocumentedValueProvider createPropertyNameValueProvider() {
+        IDocumentedValueProvider propertyNameValueProvider = new IDocumentedValueProvider() {
+            public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
+                String buildType = getBuildType(ivyFile);
+                if (buildType != null) {
+                    List<PropertyDescriptor> propertyDescriptors = easyantCoreService.getPropertiesForBuildType(buildType);
+                    String[] names = new String[propertyDescriptors.size()];
+                    int i = 0;
+                    for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
+                        names[i] = propertyDescriptor.getName();
+                        i++;
+                    }
+                    return names;
+                }
+                return new String[] {};
+            }
+            public String getDocForValue(String value, IvyFile ivyFile) {
+                String buildType = getBuildType(ivyFile);
+                if(buildType!=null){
+                    PropertyDescriptor propertyDescriptor = getPropertyDescriptor(buildType, value);
+                    if(propertyDescriptor!=null){
+                        return propertyDescriptor.getDescription();
+                    }
+                }
+                return null;
+            }
+        };
+        return propertyNameValueProvider;
+    }
 
-       List<PropertyDescriptor> propertyDescriptorsCache;
-       private PropertyDescriptor getPropertyDescriptor(String buildType, String propertyName) {
-               if(propertyDescriptorsCache==null){
-                       propertyDescriptorsCache= easyantCoreService.getPropertiesForBuildType(buildType);
-               }
-               for (PropertyDescriptor propertyDescriptor : propertyDescriptorsCache) {
-                       if (propertyName.equals(propertyDescriptor.getName())) {
-                               return propertyDescriptor;
-                       }
-               }
-               return null;
-       }
-       
-       private PropertyDescriptor getPropertyDescriptor(IvyTagAttribute att, IvyFile ivyFile) {
-               String buildType = getBuildType(ivyFile);
-               if (ivyFile.getAllAttsValues().containsKey(EASYANT_PROPERTY_NAME_ATTR)) {
-                       String propertyNameValue = ivyFile.getAllAttsValues().get(EASYANT_PROPERTY_NAME_ATTR).toString();
-                       if (buildType != null && propertyNameValue != null) {
-                               List<PropertyDescriptor> propertyDescriptors = easyantCoreService.getPropertiesForBuildType(buildType);
-                               for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
-                                       if (propertyNameValue.equals(propertyDescriptor.getName())) {
-                                               return propertyDescriptor;
-                                       }
-                               }
-                       }
-               }
-               return null;
-       }
+    List<PropertyDescriptor> propertyDescriptorsCache;
+    private PropertyDescriptor getPropertyDescriptor(String buildType, String propertyName) {
+        if(propertyDescriptorsCache==null){
+            propertyDescriptorsCache= easyantCoreService.getPropertiesForBuildType(buildType);
+        }
+        for (PropertyDescriptor propertyDescriptor : propertyDescriptorsCache) {
+            if (propertyName.equals(propertyDescriptor.getName())) {
+                return propertyDescriptor;
+            }
+        }
+        return null;
+    }
+    
+    private PropertyDescriptor getPropertyDescriptor(IvyTagAttribute att, IvyFile ivyFile) {
+        String buildType = getBuildType(ivyFile);
+        if (ivyFile.getAllAttsValues().containsKey(EASYANT_PROPERTY_NAME_ATTR)) {
+            String propertyNameValue = ivyFile.getAllAttsValues().get(EASYANT_PROPERTY_NAME_ATTR).toString();
+            if (buildType != null && propertyNameValue != null) {
+                List<PropertyDescriptor> propertyDescriptors = easyantCoreService.getPropertiesForBuildType(buildType);
+                for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
+                    if (propertyNameValue.equals(propertyDescriptor.getName())) {
+                        return propertyDescriptor;
+                    }
+                }
+            }
+        }
+        return null;
+    }
 
-       @SuppressWarnings("unchecked")
-       private String getBuildType(IvyFile ivyFile) {
-               if (EASYANT_TAG.equals(ivyFile.getParentTagName())) {
-                       int[] indexes = ivyFile.getParentTagIndex();
-                       if (indexes != null && indexes.length > 0) {
-                               Map<String, String> allAttsValuesForEasyAntTag = ivyFile.getAllAttsValues(indexes[0] + 1);
-                               String typeValue = allAttsValuesForEasyAntTag.get(EASYANT_TYPE_ATTR);
-                               return typeValue;
-                       }
-               }else if (IVY_INFO_TAG.equals(ivyFile.getParentTagName())) {
-                       Map<String, String> allAttsValuesForEasyAntTag = ivyFile.getAllAttsValues(ivyFile.getOffset() + 1);
-                       String typeValue = allAttsValuesForEasyAntTag.get(EASYANT_TYPE_ATTR);
-                       return typeValue;
-               }
-               return null;
-       }
-       
+    @SuppressWarnings("unchecked")
+    private String getBuildType(IvyFile ivyFile) {
+        if (EASYANT_TAG.equals(ivyFile.getParentTagName())) {
+            int[] indexes = ivyFile.getParentTagIndex();
+            if (indexes != null && indexes.length > 0) {
+                Map<String, String> allAttsValuesForEasyAntTag = ivyFile.getAllAttsValues(indexes[0] + 1);
+                String typeValue = allAttsValuesForEasyAntTag.get(EASYANT_TYPE_ATTR);
+                return typeValue;
+            }
+        }else if (IVY_INFO_TAG.equals(ivyFile.getParentTagName())) {
+            Map<String, String> allAttsValuesForEasyAntTag = ivyFile.getAllAttsValues(ivyFile.getOffset() + 1);
+            String typeValue = allAttsValuesForEasyAntTag.get(EASYANT_TYPE_ATTR);
+            return typeValue;
+        }
+        return null;
+    }
+    
 }
index 9ee28ef..fcce937 100644 (file)
@@ -32,60 +32,60 @@ import com.google.inject.Inject;
 
 public class BuildLifeCycleContentProvider implements ITreeContentProvider {
 
-       private EasyantProjectService easyantProjectService;
+    private EasyantProjectService easyantProjectService;
 
-       public BuildLifeCycleContentProvider() {
-       }
+    public BuildLifeCycleContentProvider() {
+    }
 
-       @Inject
-       public void setEasyantProjectService(EasyantProjectService easyantProjectService) {
-               this.easyantProjectService = easyantProjectService;
-       }
+    @Inject
+    public void setEasyantProjectService(EasyantProjectService easyantProjectService) {
+        this.easyantProjectService = easyantProjectService;
+    }
 
-       public Object[] getElements(Object inputElement) {
-               if (inputElement instanceof IvyFileEditorInput) {
-                       IvyFileEditorInput ivyFileEditorInput = (IvyFileEditorInput) inputElement;
-                       IFile ivyFile = ivyFileEditorInput.getFile();
-                       List<PhaseReport> phaseReports = easyantProjectService.getPhases(ivyFile);
-                       List<TargetReport> targetReports = easyantProjectService.getTargets(ivyFile);
-                       ArrayList<Object> o = new ArrayList<Object>();
-                       o.addAll(phaseReports);
-                       o.addAll(targetReports);
-                       Object[] input = o.toArray(new Object[o.size()]);
-                       return input;
-               }
-               return new Object[0];
-       }
+    public Object[] getElements(Object inputElement) {
+        if (inputElement instanceof IvyFileEditorInput) {
+            IvyFileEditorInput ivyFileEditorInput = (IvyFileEditorInput) inputElement;
+            IFile ivyFile = ivyFileEditorInput.getFile();
+            List<PhaseReport> phaseReports = easyantProjectService.getPhases(ivyFile);
+            List<TargetReport> targetReports = easyantProjectService.getTargets(ivyFile);
+            ArrayList<Object> o = new ArrayList<Object>();
+            o.addAll(phaseReports);
+            o.addAll(targetReports);
+            Object[] input = o.toArray(new Object[o.size()]);
+            return input;
+        }
+        return new Object[0];
+    }
 
-       public void dispose() {
-       }
+    public void dispose() {
+    }
 
-       public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-       }
+    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+    }
 
-       public Object[] getChildren(Object parentElement) {
-               if (parentElement instanceof PhaseReport) {
-                       PhaseReport phaseReport = (PhaseReport) parentElement;
-                       //if (phaseReport.getName().equals("compile")) {
-                       //      System.out.println("coucou");
-                       //}
-                       List<TargetReport> targetReports = phaseReport.getTargetReports();
-                       return targetReports.toArray(new TargetReport[targetReports.size()]);
-               }
-               return null;
-       }
+    public Object[] getChildren(Object parentElement) {
+        if (parentElement instanceof PhaseReport) {
+            PhaseReport phaseReport = (PhaseReport) parentElement;
+            //if (phaseReport.getName().equals("compile")) {
+            //  System.out.println("coucou");
+            //}
+            List<TargetReport> targetReports = phaseReport.getTargetReports();
+            return targetReports.toArray(new TargetReport[targetReports.size()]);
+        }
+        return null;
+    }
 
-       public Object getParent(Object element) {
-               return null;
-       }
+    public Object getParent(Object element) {
+        return null;
+    }
 
-       public boolean hasChildren(Object element) {
-               if (element instanceof PhaseReport) {
-                       PhaseReport phaseReport = (PhaseReport) element;
-                       List<TargetReport> targetReports = phaseReport.getTargetReports();
-                       return (targetReports != null && targetReports.size() > 0);
-               }
-               return false;
-       }
+    public boolean hasChildren(Object element) {
+        if (element instanceof PhaseReport) {
+            PhaseReport phaseReport = (PhaseReport) element;
+            List<TargetReport> targetReports = phaseReport.getTargetReports();
+            return (targetReports != null && targetReports.size() > 0);
+        }
+        return false;
+    }
 
 }
index a148493..7944ee6 100644 (file)
@@ -66,231 +66,231 @@ import com.google.inject.Inject;
 //import com.google.inject.Inject;
 
 public class BuildLifecycleBlock extends MasterDetailsBlock {
-       private FormPage page;  
+    private FormPage page;  
 
-       private BuildLifeCycleContentProvider buildLifeCycleContentProvider;
-       private BuildLifecycleLabelProvider buildLifecycleLabelProvider;
-       private EasyantProjectService easyantProjectService;
-       private PhaseDetailsPage phaseDetailsPage;
-       private TargetDetailsPage targetDetailsPage;
-       private EasyAntConsole console;
-       private ImageProvider imageProvider;
-       private boolean enableInfoLogLevel = false;
-       private boolean enableVerboseLogLevel = false;
-       private boolean enableDebugLogLevel = false;
-       
-       
-       public BuildLifecycleBlock() {}
-       
-       @Inject
-       public void setImageProvider(ImageProvider imageProvider) {
-               this.imageProvider = imageProvider;
-       }
-       
-       @Inject
-       public void setConsole(EasyAntConsole console) {
-               this.console = console;
-       }
-       
-       @Inject
-       public void setPhaseDetailsPage(PhaseDetailsPage phaseDetailsPage) {
-               this.phaseDetailsPage = phaseDetailsPage;
-       }
+    private BuildLifeCycleContentProvider buildLifeCycleContentProvider;
+    private BuildLifecycleLabelProvider buildLifecycleLabelProvider;
+    private EasyantProjectService easyantProjectService;
+    private PhaseDetailsPage phaseDetailsPage;
+    private TargetDetailsPage targetDetailsPage;
+    private EasyAntConsole console;
+    private ImageProvider imageProvider;
+    private boolean enableInfoLogLevel = false;
+    private boolean enableVerboseLogLevel = false;
+    private boolean enableDebugLogLevel = false;
+    
+    
+    public BuildLifecycleBlock() {}
+    
+    @Inject
+    public void setImageProvider(ImageProvider imageProvider) {
+        this.imageProvider = imageProvider;
+    }
+    
+    @Inject
+    public void setConsole(EasyAntConsole console) {
+        this.console = console;
+    }
+    
+    @Inject
+    public void setPhaseDetailsPage(PhaseDetailsPage phaseDetailsPage) {
+        this.phaseDetailsPage = phaseDetailsPage;
+    }
 
-       @Inject
-       public void setTargetDetailsPage(TargetDetailsPage targetDetailsPage) {
-               this.targetDetailsPage = targetDetailsPage;
-       }
+    @Inject
+    public void setTargetDetailsPage(TargetDetailsPage targetDetailsPage) {
+        this.targetDetailsPage = targetDetailsPage;
+    }
 
-       @Inject
-       public void setEasyantProjectService(EasyantProjectService easyantProjectService) {
-               this.easyantProjectService = easyantProjectService;
-       }
+    @Inject
+    public void setEasyantProjectService(EasyantProjectService easyantProjectService) {
+        this.easyantProjectService = easyantProjectService;
+    }
 
-       @Inject
-       public void setBuildLifecycleLabelProvider(BuildLifecycleLabelProvider buildLifecycleLabelProvider) {
-               this.buildLifecycleLabelProvider = buildLifecycleLabelProvider;
-       }
+    @Inject
+    public void setBuildLifecycleLabelProvider(BuildLifecycleLabelProvider buildLifecycleLabelProvider) {
+        this.buildLifecycleLabelProvider = buildLifecycleLabelProvider;
+    }
 
-       @Inject
-       public void setBuildLifeCycleContentProvider(BuildLifeCycleContentProvider buildLifeCycleContentProvider) {
-               this.buildLifeCycleContentProvider = buildLifeCycleContentProvider;
-       }
+    @Inject
+    public void setBuildLifeCycleContentProvider(BuildLifeCycleContentProvider buildLifeCycleContentProvider) {
+        this.buildLifeCycleContentProvider = buildLifeCycleContentProvider;
+    }
 
-       public void setPage(FormPage page) {
-               this.page = page;
-       }
-       
-       @Override
-       protected void createMasterPart(final IManagedForm managedForm, final Composite parent) {
-               createBuildLifecyclePart(managedForm, parent);
-       }
+    public void setPage(FormPage page) {
+        this.page = page;
+    }
+    
+    @Override
+    protected void createMasterPart(final IManagedForm managedForm, final Composite parent) {
+        createBuildLifecyclePart(managedForm, parent);
+    }
 
-       protected void createBuildLifecyclePart(final IManagedForm managedForm, final Composite parent) {
-               FormToolkit toolkit = managedForm.getToolkit();
-               Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
-               section.setText("Build Lifecycle");
-               section.setDescription("The build lifecycle has the following build phases:");
-               section.marginWidth = 10;
-               section.marginHeight = 5;
-               Composite client = toolkit.createComposite(section, SWT.WRAP);
-               GridLayout layout = new GridLayout();
-               layout.numColumns = 2;
-               layout.marginWidth = 2;
-               layout.marginHeight = 2;
-               client.setLayout(layout);
-               toolkit.paintBordersFor(client);
+    protected void createBuildLifecyclePart(final IManagedForm managedForm, final Composite parent) {
+        FormToolkit toolkit = managedForm.getToolkit();
+        Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
+        section.setText("Build Lifecycle");
+        section.setDescription("The build lifecycle has the following build phases:");
+        section.marginWidth = 10;
+        section.marginHeight = 5;
+        Composite client = toolkit.createComposite(section, SWT.WRAP);
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 2;
+        layout.marginWidth = 2;
+        layout.marginHeight = 2;
+        client.setLayout(layout);
+        toolkit.paintBordersFor(client);
 
-               section.setClient(client);
-               final SectionPart spart = new SectionPart(section);
-               managedForm.addPart(spart);
-               TreeViewer viewer = new TreeViewer(client);
-               GridData gd = new GridData(GridData.FILL_BOTH);
-               gd.heightHint = 20;
-               gd.widthHint = 100;
-               viewer.getTree().setLayoutData(gd);
-               viewer.addSelectionChangedListener(new ISelectionChangedListener() {
-                       public void selectionChanged(SelectionChangedEvent event) {
-                               managedForm.fireSelectionChanged(spart, event.getSelection());
-                       }
-               });
-               viewer.addDoubleClickListener(new IDoubleClickListener(){
-                       public void doubleClick(DoubleClickEvent event) {
-                               ISelection selection = event.getSelection();
-                               if(selection instanceof StructuredSelection){
-                                       StructuredSelection structuredSelection = (StructuredSelection)selection;
-                                       if(!structuredSelection.isEmpty()){
-                                               Object o = structuredSelection.getFirstElement();                                               
-                                               if(o instanceof PhaseReport){
-                                                       runPhase((PhaseReport)o);
-                                               }else if(o instanceof TargetReport){                                                    
-                                                       runTarget((TargetReport)o);
-                                               }
-                                       }
-                               }                               
-                       }                       
-               });
-               viewer.setContentProvider(buildLifeCycleContentProvider);
-               viewer.setLabelProvider(buildLifecycleLabelProvider);
-               viewer.setInput(page.getEditor().getEditorInput());
-               // viewer.expandAll();
-       }
+        section.setClient(client);
+        final SectionPart spart = new SectionPart(section);
+        managedForm.addPart(spart);
+        TreeViewer viewer = new TreeViewer(client);
+        GridData gd = new GridData(GridData.FILL_BOTH);
+        gd.heightHint = 20;
+        gd.widthHint = 100;
+        viewer.getTree().setLayoutData(gd);
+        viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+            public void selectionChanged(SelectionChangedEvent event) {
+                managedForm.fireSelectionChanged(spart, event.getSelection());
+            }
+        });
+        viewer.addDoubleClickListener(new IDoubleClickListener(){
+            public void doubleClick(DoubleClickEvent event) {
+                ISelection selection = event.getSelection();
+                if(selection instanceof StructuredSelection){
+                    StructuredSelection structuredSelection = (StructuredSelection)selection;
+                    if(!structuredSelection.isEmpty()){
+                        Object o = structuredSelection.getFirstElement();                       
+                        if(o instanceof PhaseReport){
+                            runPhase((PhaseReport)o);
+                        }else if(o instanceof TargetReport){                            
+                            runTarget((TargetReport)o);
+                        }
+                    }
+                }               
+            }           
+        });
+        viewer.setContentProvider(buildLifeCycleContentProvider);
+        viewer.setLabelProvider(buildLifecycleLabelProvider);
+        viewer.setInput(page.getEditor().getEditorInput());
+        // viewer.expandAll();
+    }
 
-       private void runPhase(final PhaseReport phase){
-               Job job = new WorkspaceJob("Easyant running phase " + phase.getName() + "...") {
-                       @Override
-                       public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
-                               easyantProjectService.runBuild(getProject(), phase.getName(), getLogLevel(), monitor);
-                               return Status.OK_STATUS;
-                       }
-               };
-               job.schedule();
-       }
-       
-       private void runTarget(final TargetReport target){
-               Job job = new WorkspaceJob("Easyant running target " + target.getName() + "...") {
-                       @Override
-                       public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {                          
-                               easyantProjectService.runBuild(getProject(), target.getName(), getLogLevel(), monitor);
-                               return Status.OK_STATUS;
-                       }
-               };
-               job.schedule();
-       }
-       
-       private int getLogLevel(){
-               int logLevel = EasyAntConstants.ANT_LOGLEVEL_WARN;
-               if(enableInfoLogLevel){
-                       logLevel = EasyAntConstants.ANT_LOGLEVEL_INFO;
-               }
-               if(enableVerboseLogLevel){
-                       logLevel = EasyAntConstants.ANT_LOGLEVEL_VERBOSE;
-               }               
-               if(enableDebugLogLevel){
-                       logLevel = EasyAntConstants.ANT_LOGLEVEL_DEBUG;
-               }
-               return logLevel;
-       }
-       
-       protected void registerPages(DetailsPart detailsPart) {
-               phaseDetailsPage.setProject(getProject());
-               detailsPart.registerPage(PhaseReport.class, phaseDetailsPage);
-               targetDetailsPage.setProject(getProject());
-               detailsPart.registerPage(TargetReport.class, targetDetailsPage);
-       }
+    private void runPhase(final PhaseReport phase){
+        Job job = new WorkspaceJob("Easyant running phase " + phase.getName() + "...") {
+            @Override
+            public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
+                easyantProjectService.runBuild(getProject(), phase.getName(), getLogLevel(), monitor);
+                return Status.OK_STATUS;
+            }
+        };
+        job.schedule();
+    }
+    
+    private void runTarget(final TargetReport target){
+        Job job = new WorkspaceJob("Easyant running target " + target.getName() + "...") {
+            @Override
+            public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {              
+                easyantProjectService.runBuild(getProject(), target.getName(), getLogLevel(), monitor);
+                return Status.OK_STATUS;
+            }
+        };
+        job.schedule();
+    }
+    
+    private int getLogLevel(){
+        int logLevel = EasyAntConstants.ANT_LOGLEVEL_WARN;
+        if(enableInfoLogLevel){
+            logLevel = EasyAntConstants.ANT_LOGLEVEL_INFO;
+        }
+        if(enableVerboseLogLevel){
+            logLevel = EasyAntConstants.ANT_LOGLEVEL_VERBOSE;
+        }       
+        if(enableDebugLogLevel){
+            logLevel = EasyAntConstants.ANT_LOGLEVEL_DEBUG;
+        }
+        return logLevel;
+    }
+    
+    protected void registerPages(DetailsPart detailsPart) {
+        phaseDetailsPage.setProject(getProject());
+        detailsPart.registerPage(PhaseReport.class, phaseDetailsPage);
+        targetDetailsPage.setProject(getProject());
+        detailsPart.registerPage(TargetReport.class, targetDetailsPage);
+    }
 
-       @Override
-       protected void createToolBarActions(IManagedForm managedForm) {
-               final ScrolledForm form = managedForm.getForm();
-               Action setLogLevelAction = new LogLevelDropDownAction();
-               form.getToolBarManager().add(setLogLevelAction);
-       }
+    @Override
+    protected void createToolBarActions(IManagedForm managedForm) {
+        final ScrolledForm form = managedForm.getForm();
+        Action setLogLevelAction = new LogLevelDropDownAction();
+        form.getToolBarManager().add(setLogLevelAction);
+    }
 
-       private IProject getProject() {
-               if (page.getEditor().getEditorInput() instanceof IFileEditorInput) {
-                       IFileEditorInput fileEditorInput = (IFileEditorInput) page.getEditor().getEditorInput();
-                       IFile ivyFile = fileEditorInput.getFile();
-                       return ivyFile.getProject();
-               }
-               return null;
-       }
-       
-       private class LogLevelDropDownAction extends Action implements IMenuCreator {
-               private Menu menu;
-               
-               public LogLevelDropDownAction(){
-                       super("setDebugLogLevel", Action.AS_DROP_DOWN_MENU);
-                       setMenuCreator(this);
-                       setToolTipText("Set the log level in console view.");
-                       setImageDescriptor(imageProvider.getDebugLogLevelImage());              
-               }
-               
-               public Menu getMenu(Menu parent) { return null; }
-               public Menu getMenu(Control parent) {
-                       if (menu == null){
-                               menu = new Menu(parent);
-                               MenuItem info = new MenuItem(menu, SWT.CHECK);
-                               info.setText("INFO");
-                               info.addSelectionListener(new SelectionListener() {
-                                       public void widgetSelected(SelectionEvent e) {
-                                               enableInfoLogLevel=!enableInfoLogLevel;
-                                               phaseDetailsPage.setLogLevel(getLogLevel());
-                                               targetDetailsPage.setLogLevel(getLogLevel());
-                                       }
-                                       public void widgetDefaultSelected(SelectionEvent e) {}
-                               });
-                               MenuItem verbose = new MenuItem(menu, SWT.CHECK);
-                               verbose.setText("VERBOSE");
-                               verbose.addSelectionListener(new SelectionListener() {
-                                       public void widgetSelected(SelectionEvent e) {
-                                               enableVerboseLogLevel=!enableVerboseLogLevel;
-                                               phaseDetailsPage.setLogLevel(getLogLevel());
-                                               targetDetailsPage.setLogLevel(getLogLevel());
-                                       }
-                                       public void widgetDefaultSelected(SelectionEvent e) {}
-                               });
-                               MenuItem debug = new MenuItem(menu, SWT.CHECK);
-                               debug.setText("DEBUG");
-                               debug.addSelectionListener(new SelectionListener() {
-                                       public void widgetSelected(SelectionEvent e) {
-                                               enableDebugLogLevel=!enableDebugLogLevel;
-                                               phaseDetailsPage.setLogLevel(getLogLevel());
-                                               targetDetailsPage.setLogLevel(getLogLevel());
-                                       }
-                                       public void widgetDefaultSelected(SelectionEvent e) {}
-                               });
-                       }
-                       return menu;
-               }
-               
-               public void dispose() {
-                       if (menu != null){
-                               menu.dispose();
-                               menu=null;
-                       }
-               }
-               
-               public void run() {}
-       }
-               
-}
\ No newline at end of file
+    private IProject getProject() {
+        if (page.getEditor().getEditorInput() instanceof IFileEditorInput) {
+            IFileEditorInput fileEditorInput = (IFileEditorInput) page.getEditor().getEditorInput();
+            IFile ivyFile = fileEditorInput.getFile();
+            return ivyFile.getProject();
+        }
+        return null;
+    }
+    
+    private class LogLevelDropDownAction extends Action implements IMenuCreator {
+        private Menu menu;
+        
+        public LogLevelDropDownAction(){
+            super("setDebugLogLevel", Action.AS_DROP_DOWN_MENU);
+            setMenuCreator(this);
+            setToolTipText("Set the log level in console view.");
+            setImageDescriptor(imageProvider.getDebugLogLevelImage());      
+        }
+        
+        public Menu getMenu(Menu parent) { return null; }
+        public Menu getMenu(Control parent) {
+            if (menu == null){
+                menu = new Menu(parent);
+                MenuItem info = new MenuItem(menu, SWT.CHECK);
+                info.setText("INFO");
+                info.addSelectionListener(new SelectionListener() {
+                    public void widgetSelected(SelectionEvent e) {
+                        enableInfoLogLevel=!enableInfoLogLevel;
+                        phaseDetailsPage.setLogLevel(getLogLevel());