<page xmlns="http://projectmallard.org/1.0/"
      type="topic" style="task"
      id="anjuta-project-files">

  <info xmlns:facet="http://projectmallard.org/facet/1.0/">
    <facet:tag key="all-pages" value="whatever"/> <!--Include page in index-->
    <link type="guide" xref="index#anjuta-project-management" group="second"/>
    <link type="seealso" xref="project-manager"/>
    <link type="seealso" xref="project-manager-target"/>
    <revision pkgversion="3.0" version="0.1" date="2011-03-27" status="incomplete"/>
    <desc>
      Add or remove files from a project.
    </desc>
    <credit type="author">
      <name>Sébastien Granjoux</name>
      <email>seb.sfo@free.fr</email>
    </credit>
    <credit type="editor">
      <name>Philip Chimento</name>
      <email>philip.chimento@gmail.com</email>
    </credit>
  </info>

  <title>Add or remove files</title>

  <p>
    If the project backend supports it, you can add or remove files in your
    project without editing the project file.
  </p>

  <section>
    <title>Add files</title>
  
    <steps>
      <item>
        <p>
 	  Select the target where you want to add the new source file in
          the <gui>project view</gui>, click on the right mouse button to
          make the <gui>project context menu</gui> appear and select
          <gui>Add Source File</gui>.
        </p>
        <p> 
          Or from the <gui>main menu</gui>, select <guiseq><gui>Project</gui>
          <gui>Add Source File</gui></guiseq>
        </p>

        <note style="tip">
          <p>
            The target allows you to group files, and has a type which defines
            how the files are used inside. A program target contains source
            files, which will be compiled to create the target.
            On the other hand, a data target only groups data files which will
            be installed in the same place.
          </p>
        </note>
      </item>
      <item>
        <p>
	  You can select another target in the top <gui>target tree view</gui>.
        </p>
        <p>
          Click on the <gui>Select file to add</gui> button to get a file
          chooser dialog where you can select several files.
        </p>
      </item>
      <item>
        <p>
          When you have chosen the target and the files, click on the <gui>Add</gui>
          button to add those files to your project.
        </p>
      </item>
    </steps>
    
    <note style="tip">
      <p>
        Some project formats require the file to be under the project
        directory. Added source files outside the project directory are
        automatically copied inside to fulfill this requirement.
      </p>
    </note>
  </section>

  <section>
    <title>Remove a file</title>

    <steps>
      <item>
        <p>
          Select the file you want to remove in the
          <gui>project view</gui>, click on the right mouse button to
          make the <gui>project context menu</gui> appear and select
          <gui>Remove</gui>.
        </p>
      </item>
      <item>
        <p>
	  Confirm the removal. The file will only be removed from the project,
          not from your disk.
        </p>
      </item>
    </steps>
  </section>

</page>

