incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1071768 [4/7] - in /incubator/easyant/easyant4e: ./ trunk/ trunk/org.apache.easyant/ trunk/org.apache.easyant/META-INF/ trunk/org.apache.easyant/lib/ trunk/org.apache.easyant4e.feature/ trunk/org.apache.easyant4e.releng/ trunk/org.apache.e...
Date Thu, 17 Feb 2011 20:23:04 GMT
Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/icons/sa_onesample48.gif
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/icons/sa_onesample48.gif?rev=1071768&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/icons/sa_onesample48.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/icons/target.gif
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/icons/target.gif?rev=1071768&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/icons/target.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/lib/guice/aopalliance.jar
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/lib/guice/aopalliance.jar?rev=1071768&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/lib/guice/aopalliance.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/lib/guice/guice-2.0.jar
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/lib/guice/guice-2.0.jar?rev=1071768&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/lib/guice/guice-2.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/plugin.properties
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/plugin.properties?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/plugin.properties (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/plugin.properties Thu Feb 17 20:22:56 2011
@@ -0,0 +1,8 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+pluginName = Easyant for Eclipse
+providerName = www.easyant.org

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/plugin.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/plugin.properties
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/plugin.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/plugin.xml?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/plugin.xml (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/plugin.xml Thu Feb 17 20:22:56 2011
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ <copyright>
+ </copyright>
+
+ $Id$
+-->
+
+<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.builders" id="EasyAntBuilder" name="EasyAntBuilder">
+      <builder>
+         <run class="org.apache.easyant4e.builders.EasyAntBuilder" /> 
+      </builder>
+   </extension>
+   
+   <extension point="org.eclipse.ui.ide.projectNatureImages">
+      <image 
+         id="org.apache.easyant4e.natures.EasyAntNatureImage"
+         natureId="org.apache.easyant4e.EasyAntNature"
+         icon="icons/EasyAntNature.gif">
+      </image>
+   </extension>
+
+   <extension point="org.eclipse.ui.popupMenus">
+      <objectContribution
+            adaptable="true"
+            objectClass="org.eclipse.core.resources.IProject"
+            nameFilter="*"
+            id="org.apache.easyant4e.ui.popupMenus.contribution.IProject">
+         <menu id="org.apache.easyant4e.ui.menu" label="EasyAnt" path="additionsEasyAnt">
+               <groupMarker name="nature"/> 
+         </menu>    
+         <action
+               class="org.apache.easyant4e.natures.AddEasyAntNatureAction"
+               enablesFor="1"
+               id="org.apache.easyant4e.natures.AddEasyAntNatureAction"
+               icon = "icons/EasyAntNature.gif"
+               label="Convert Project to EasyAnt Project..."
+               menubarPath="org.apache.easyant4e.ui.menu/nature">
+         </action>
+         <action
+               class="org.apache.easyant4e.natures.RemoveEasyAntNatureAction"
+               enablesFor="1"
+               id="org.apache.easyant4e.natures.RemoveEasyAntNatureAction"
+               icon = "icons/EasyAntNature.gif"
+               label="Remove EasyAnt Nature..."
+               menubarPath="org.apache.easyant4e.ui.menu/nature">
+         </action>
+      </objectContribution>
+   </extension>
+
+   <extension
+         point="org.eclipse.ui.importWizards">
+      <wizard
+            class="org.apache.easyant4e.wizards.EasyAntImportWizard"
+            id="org.apache.easyant4e.wizards.EasyAntImportWizard"
+            category="org.apache.easyant4e.wizards.category"
+            name="Existing EasyAnt Project"
+            icon="icons/EasyAntNature.gif">
+            <description>Import an existing EasyAnt Project</description>
+      </wizard>
+      <category
+            id="org.apache.easyant4e.wizards.category"
+            name="EasyAnt">
+      </category>
+   </extension>
+
+   <extension
+         point="org.apache.ivyde.eclipse.moduleDescriptorExtension">
+      <moduleDescriptor
+            modelContributorClass="org.apache.easyant4e.ivyde.extension.model.EasyAntModuleDescriptorExtension"></moduleDescriptor>
+   </extension>
+   <extension
+         point="org.apache.ivyde.eclipse.editorPage">
+      <editorPage
+            pageClass="org.apache.easyant4e.ivyde.extension.page.BuildPage">
+      </editorPage>
+   </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>
+
+	<extension
+          point="org.eclipse.ui.startup">
+       <startup
+             class="org.apache.easyant4e.Startup"></startup>
+    </extension>
+    <!--
+    <extension
+          point="org.eclipse.ant.core.antTasks">
+       <antTask
+             class="org.apache.easyant.tasks.CoreRevisionCheckerTask"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.CoreRevisionCheckerTask">
+       </antTask>
+       <antTask
+             class="org.apache.easyant.tasks.Import"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.Import">
+       </antTask>
+       <antTask
+             class="org.apache.easyant.tasks.LoadModule"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.LoadModule">
+       </antTask>
+       <antTask
+             class="org.apache.easyant.tasks.ParameterTask"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.ParameterTask">
+       </antTask>
+       <antTask
+             class="org.apache.easyant.tasks.PathTask"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.PathTask">
+       </antTask>
+       <antTask
+             class="org.apache.easyant.tasks.PropertyTask"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.PropertyTask">
+       </antTask>
+       <antTask
+             class="org.apache.easyant.tasks.RepositoryReport"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.RepositoryReport">
+       </antTask>
+       <antTask
+             class="org.apache.easyant.tasks.SubModule"
+             library="lib/easyant-core.jar"
+             name="org.apache.easyant.tasks.SubModule">
+       </antTask>
+    </extension>
+    -->
+<!--
+ 	<extension
+       point="org.eclipse.ui.console.consolePageParticipants">
+    <consolePageParticipant
+          class="org.apache.easyant4e.console.EasyAntConsolePageParticipant"
+          id="org.apache.easyant4e.console.EasyAntConsolePageParticipant">
+       <enablement>
+          <instanceof
+                value="org.apache.easyant4e.console.EasyAntConsole">
+          </instanceof></enablement>
+    </consolePageParticipant>
+ </extension>
+-->
+
+   <!--
+    <extension
+         point="org.eclipse.ui.editors">
+      <editor
+            class="org.apache.easyant4e.ant.editor.AntEditor"
+            extensions="ant"
+            icon="icons/full/obj16/ant_buildfile.gif"
+            id="org.eclipse.ant.ui.internal.editor.AntEditor"
+            name="EasyAnt Editor">
+            <contentTypeBinding
+               contentTypeId="org.eclipse.ant.core.antBuildFile"/> 
+      </editor>
+   </extension>
+   -->
+
+</plugin>

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/plugin.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/plugin.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/plugin.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/ivysettings-remote.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/ivysettings-remote.xml?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/ivysettings-remote.xml (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/ivysettings-remote.xml Thu Feb 17 20:22:56 2011
@@ -0,0 +1,45 @@
+<!--
+   Copyright 2008-2009 the EasyAnt project
+
+	See the NOTICE file distributed with this work for additional information 
+	regarding copyright ownership.
+	
+	Licensed under the Apache License, Version 2.0 (the "License");
+	you may not use this file except in compliance with the License.
+	You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	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>	
+</ivysettings>

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/ivysettings-remote.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/ivysettings-remote.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/ivysettings-remote.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/ivysettings.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/ivysettings.xml?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/ivysettings.xml (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/ivysettings.xml Thu Feb 17 20:22:56 2011
@@ -0,0 +1,40 @@
+<!--
+   Copyright 2008-2009 the EasyAnt project
+
+	See the NOTICE file distributed with this work for additional information 
+	regarding copyright ownership.
+	
+	Licensed under the Apache License, Version 2.0 (the "License");
+	you may not use this file except in compliance with the License.
+	You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	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

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/ivysettings.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/ivysettings.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/ivysettings.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/Activator.java
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/Activator.java?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/Activator.java (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/Activator.java Thu Feb 17 20:22:56 2011
@@ -0,0 +1,121 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e;
+
+import org.apache.easyant4e.modules.EasyAnt4EclipseModule;
+import org.apache.easyant4e.modules.EasyAntCoreModule;
+import org.apache.easyant4e.services.EasyantCoreService;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+import com.google.inject.Inject;
+
+
+/**
+ * This class manage plugin life cycle
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class Activator extends AbstractUIPlugin {
+
+	private EasyAntPlugin easyAntPlugin;
+	private EasyAntCoreModule easyAntCoreModule;
+	private EasyAnt4EclipseModule easyAnt4EclipseModule;
+
+	private EasyantCoreService easyantCoreService;
+	
+	@Inject
+	public void setEasyantCoreService(EasyantCoreService easyantCoreService) {
+		this.easyantCoreService = easyantCoreService;
+	}
+
+	public static final String PLUGIN_ID = "org.apache.easyant4e";
+
+	// 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();
+		}
+	}
+
+	@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);
+	}
+
+	/**
+	 * 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 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);
+		}
+	}
+		
+}

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/Activator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/Activator.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/Activator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntConstants.java
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntConstants.java?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntConstants.java (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntConstants.java Thu Feb 17 20:22:56 2011
@@ -0,0 +1,60 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+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 int ANT_LOGLEVEL_WARN = 1;
+    public static final int ANT_LOGLEVEL_INFO = 2;
+    public static final int ANT_LOGLEVEL_VERBOSE = 3;
+    public static final int ANT_LOGLEVEL_DEBUG = 4;
+
+}

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntConstants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntConstants.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntConstants.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntPlugin.java
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntPlugin.java?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntPlugin.java (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntPlugin.java Thu Feb 17 20:22:56 2011
@@ -0,0 +1,158 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e;
+
+import org.apache.easyant4e.services.EasyantProjectService;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.internal.ui.packageview.ClassPathContainer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.PlatformUI;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Module;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+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);
+	}
+
+}

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntPlugin.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntPlugin.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/EasyAntPlugin.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/Startup.java
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/Startup.java?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/Startup.java (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/Startup.java Thu Feb 17 20:22:56 2011
@@ -0,0 +1,64 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e;
+
+import org.eclipse.core.internal.registry.ExtensionRegistry;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.RegistryFactory;
+import org.eclipse.ui.IStartup;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+// http://wiki.eclipse.org/FAQ_How_do_I_make_my_plug-in_dynamic_aware%3F
+// 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;
+//			}
+//		}
+	}
+
+	/*
+	private Object getUserToken() {
+		IExtensionRegistry registry = RegistryFactory.getRegistry();
+		//return null; // require -Declipse.registry.nulltoken=true
+		return ((ExtensionRegistry) registry).getTemporaryUserToken();
+	}
+*/
+	
+}

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/Startup.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/Startup.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/Startup.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ant/editor/EasyAntEditor.java
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ant/editor/EasyAntEditor.java?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ant/editor/EasyAntEditor.java (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ant/editor/EasyAntEditor.java Thu Feb 17 20:22:56 2011
@@ -0,0 +1,27 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.ant.editor;
+
+/**
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+//@SuppressWarnings("restriction")
+public class EasyAntEditor /*extends org.eclipse.ant.internal.ui.editor.AntEditor*/ {
+
+}

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ant/editor/EasyAntEditor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ant/editor/EasyAntEditor.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ant/editor/EasyAntEditor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/builders/EasyAntBuilder.java
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/builders/EasyAntBuilder.java?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/builders/EasyAntBuilder.java (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/builders/EasyAntBuilder.java Thu Feb 17 20:22:56 2011
@@ -0,0 +1,103 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.builders;
+
+import java.util.Map;
+
+import org.apache.easyant4e.Activator;
+import org.apache.easyant4e.EasyAntConstants;
+import org.apache.easyant4e.services.EasyantProjectService;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+
+import com.google.inject.Inject;
+
+//import com.google.inject.Inject;
+
+/**
+ * The EastAnt builder.
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class EasyAntBuilder extends IncrementalProjectBuilder {
+
+	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;
+		}
+	}
+
+	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);
+			}			
+		};
+	}
+
+}

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/builders/EasyAntBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/builders/EasyAntBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/builders/EasyAntBuilder.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/configurers/Configurer.java
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/configurers/Configurer.java?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/configurers/Configurer.java (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/configurers/Configurer.java Thu Feb 17 20:22:56 2011
@@ -0,0 +1,30 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.configurers;
+
+/**
+ * This interface must be implement to configure use in order to configure a basic eclipse project.
+ * 
+ * In example : you muste add JavaNature, ScalaNature, GroovyNature or others
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public interface Configurer {
+
+}

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/configurers/Configurer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/configurers/Configurer.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/configurers/Configurer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsole.java
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsole.java?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsole.java (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsole.java Thu Feb 17 20:22:56 2011
@@ -0,0 +1,43 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.console;
+
+import org.eclipse.ui.console.IConsole;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public interface EasyAntConsole extends IConsole{
+
+	void show();
+	void close();
+	boolean isOpen();
+	
+	void info(String msg);
+	void error(String msg);
+	
+	 /**
+     * Show the console.
+     * 
+     * @param showNoMatterWhat
+     *            ignore preferences if <code>true</code>
+     */
+    void show(boolean showNoMatterWhat);
+}

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsole.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsole.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsole.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleFactory.java
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleFactory.java?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleFactory.java (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleFactory.java Thu Feb 17 20:22:56 2011
@@ -0,0 +1,48 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.console;
+
+import org.apache.easyant4e.Activator;
+import org.eclipse.ui.console.IConsoleFactory;
+
+import com.google.inject.Inject;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+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();
+		}
+	}
+}

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleImpl.java
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleImpl.java?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleImpl.java (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleImpl.java Thu Feb 17 20:22:56 2011
@@ -0,0 +1,102 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.console;
+
+import org.apache.easyant4e.Activator;
+import org.apache.easyant4e.EasyAntPlugin;
+import org.apache.easyant4e.providers.ImageProvider;
+import org.apache.ivyde.eclipse.ui.console.IvyConsole;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleManager;
+
+import com.google.inject.Inject;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class EasyAntConsoleImpl extends IvyConsole implements EasyAntConsole {
+	
+	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 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);
+					}
+            }
+	    }
+	}
+
+	@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);
+	}
+	
+}

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsoleImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsolePageParticipant.java
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsolePageParticipant.java?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsolePageParticipant.java (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsolePageParticipant.java Thu Feb 17 20:22:56 2011
@@ -0,0 +1,55 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.console;
+
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsolePageParticipant;
+import org.eclipse.ui.part.IPageBookViewPage;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class EasyAntConsolePageParticipant implements IConsolePageParticipant {
+
+	//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 dispose() {
+	//	closeAction = null;
+	}
+
+	@SuppressWarnings("unchecked")
+	public Object getAdapter(Class adapter) {
+		return null;
+	}
+
+	public void activated() {
+	}
+
+	public void deactivated() {
+	}
+
+}

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsolePageParticipant.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsolePageParticipant.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/console/EasyAntConsolePageParticipant.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/RepositoryInstaller.java
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/RepositoryInstaller.java?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/RepositoryInstaller.java (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/RepositoryInstaller.java Thu Feb 17 20:22:56 2011
@@ -0,0 +1,105 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.ivyde.extension;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URL;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import org.apache.easyant4e.Activator;
+import org.eclipse.core.runtime.IStatus;
+
+/**
+ * This class unpack the default EasyAnt repository in local file system.
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class RepositoryInstaller {
+	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);
+		}
+	}
+
+	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());
+	}
+}

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/RepositoryInstaller.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/RepositoryInstaller.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/RepositoryInstaller.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/model/EasyAntModuleDescriptorExtension.java
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/model/EasyAntModuleDescriptorExtension.java?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/model/EasyAntModuleDescriptorExtension.java (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/model/EasyAntModuleDescriptorExtension.java Thu Feb 17 20:22:56 2011
@@ -0,0 +1,330 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.ivyde.extension.model;
+
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_BUILD_PLUGINS_ORG;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_BUILD_TYPES_ORG;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PLUGIN_AS_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PLUGIN_MANDATORY_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PLUGIN_MODE_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PLUGIN_MODE_IMPORT;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PLUGIN_MODE_INCLUDE;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PLUGIN_MODULE_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PLUGIN_TAG;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PROPERTY_FILE_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PROPERTY_NAME_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PROPERTY_TAG;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_PROPERTY_VALUE_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_TAG;
+import static org.apache.easyant4e.EasyAntConstants.EASYANT_TYPE_ATTR;
+import static org.apache.easyant4e.EasyAntConstants.IVY_INFO_TAG;
+import static org.apache.easyant4e.EasyAntConstants.IVY_MODULE_TAG;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.easyant.core.descriptor.PropertyDescriptor;
+import org.apache.easyant4e.Activator;
+import org.apache.easyant4e.services.EasyantCoreService;
+import org.apache.ivyde.common.ivyfile.IvyModuleDescriptorModel;
+import org.apache.ivyde.common.model.IDocumentedValueProvider;
+import org.apache.ivyde.common.model.IvyFile;
+import org.apache.ivyde.common.model.IvyTag;
+import org.apache.ivyde.common.model.IvyTagAttribute;
+import org.apache.ivyde.eclipse.extension.ModuleDescriptorExtension;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+
+import com.google.inject.Inject;
+
+/**
+ * This class provide extension in order to add EasyAnt semantic information in
+ * Ivy module descriptor model.
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+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);
+	}
+
+	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 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 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 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 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 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 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() {
+
+			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 };
+                    }
+			        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;
+	}
+
+	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;
+	}
+	
+}

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/model/EasyAntModuleDescriptorExtension.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/model/EasyAntModuleDescriptorExtension.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/model/EasyAntModuleDescriptorExtension.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifeCycleContentProvider.java
URL: http://svn.apache.org/viewvc/incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifeCycleContentProvider.java?rev=1071768&view=auto
==============================================================================
--- incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifeCycleContentProvider.java (added)
+++ incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifeCycleContentProvider.java Thu Feb 17 20:22:56 2011
@@ -0,0 +1,96 @@
+/* 
+ *  Copyright 2008-2009 the EasyAnt project
+ * 
+ *  See the NOTICE file distributed with this work for additional information
+ *  regarding copyright ownership. 
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ */
+package org.apache.easyant4e.ivyde.extension.page;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.easyant.core.report.PhaseReport;
+import org.apache.easyant.core.report.TargetReport;
+import org.apache.easyant4e.services.EasyantProjectService;
+import org.apache.ivyde.eclipse.ui.core.IvyFileEditorInput;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+import com.google.inject.Inject;
+
+/**
+ * 
+ * @author <a href="mailto:jerome@benois.fr">Jerome Benois</a>
+ */
+public class BuildLifeCycleContentProvider implements ITreeContentProvider {
+
+	private EasyantProjectService easyantProjectService;
+
+	public BuildLifeCycleContentProvider() {
+	}
+
+	@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 void dispose() {
+	}
+
+	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 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;
+	}
+
+}

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifeCycleContentProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifeCycleContentProvider.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/easyant4e/trunk/org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/page/BuildLifeCycleContentProvider.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message