<!--
  ~ Copyright 2009 the original author or authors.
  ~
  ~ 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.
  -->
<chapter id="eclipse_plugin">
    <title>The Eclipse Plugin</title>
    <note>
        <para>This chapter is a work in progress.</para>
    </note>
    
    <para>The Eclipse plugin generates files that are used by <ulink url="http://eclipse.org">Eclipse IDE</ulink>, thus making it possible to import the project into Eclipse (<guimenuitem>File</guimenuitem> - <guimenuitem>Import...</guimenuitem> - <guimenuitem>Existing Projects into Workspace</guimenuitem>). Both external and project dependencies are considered.</para>
    <para>To use the plugin, include in your build script:
<programlisting><![CDATA[
usePlugin('eclipse')	
]]></programlisting>
</para>
<para>The Eclipse plugin will create different files depending on the other plugins used. If used together with the Java Plugin, <filename>.project</filename> and <filename>.classpath</filename> files will be generated. If used with the War plugin, additional wtp files will be generated.</para>
<section>
        <title>Usage</title>
<para>There are several tasks (presented in <xref linkend='eclipsetasks'/>) that the Eclipse plugin provides, but you will probably use only <literal>eclipse</literal> task by executing <userinput>gradle eclipse</userinput>.
</para>
    </section>
    <section>
        <title>Tasks</title>
<para>The Eclipse plugin adds the tasks shown in <xref linkend='eclipsetasks'/> to a project.
        </para>
        <table id='eclipsetasks'>
            <title>Eclipse plugin - tasks</title>
            <thead>
                <tr>
                    <td>Task name</td>
                    <td>Depends on</td>
                    <td>Type</td>
                </tr>
            </thead>
            <tr>
                <td>
                    <literal>eclipse</literal>
                </td>
                <td><literal>eclipseCp</literal>, <literal>eclipseProject</literal>, <literal>eclipseWtp</literal></td>
                <td><literal>-</literal></td>
            </tr>
            <tr>
                <td>
                    <literal>eclipseClean</literal>
                </td>
                <td>
                    <literal>-</literal>
                </td>
                <td><apilink class="org.gradle.api.tasks.ide.eclipse.EclipseClean"/></td>
            </tr>
            <tr>
                <td>
                    <literal>eclipseCp</literal>
                </td>
                <td>
                    <literal>-</literal>
                </td>
                <td><apilink class="org.gradle.api.tasks.ide.eclipse.EclipseClasspath"/></td>
            </tr>
            <tr>
                <td>
                    <literal>eclipseProject</literal>
                </td>
                <td>
                    <literal>-</literal>
                </td>
                <td><apilink class="org.gradle.api.tasks.ide.eclipse.EclipseProject"/></td>
            </tr>
            <tr>
                <td>
                    <literal>eclipseWtp</literal>
                </td>
                <td>
                    <literal>-</literal>
                </td>
                <td><apilink class="org.gradle.api.tasks.ide.eclipse.EclipseWtp"/></td>
            </tr>
            <tr>
                <td>
                    <literal>eclipseWtpModule</literal>
                </td>
                <td>
                    <literal>-</literal>
                </td>
                <td><apilink class="org.gradle.api.tasks.ide.eclipse.EclipseWtpModule"/></td>
            </tr>
        </table>
    </section>

</chapter>