.. _Predefined Projects:

Predefined Projects
===================

.. rst-class:: lead

   The predefined projects capability allows you to quickly access pre-configured project repositories. For example training labs or golden reference projects or projects that you commonly use.

DVT searches for predefined projects in the directory indicated by the ``$DVT_PREDEFINED_PROJECTS`` system variable. In order to support directories spread on the disk, DVT also scans all directories indicated by any other system variable whose name starts with ``$DVT_PREDEFINED_PROJECTS_EXT_``.

.. hint::

   For example, if you installed DVT from a distribution, by default  ``$DVT_PREDEFINED_PROJECTS`` points to ``$DVT_HOME/predefined_projects``. This is a project repository that you can use to explore the DVT features without the initial effort of configuring a project.

At any time, if you wish to change the default location, you just need to point ``$DVT_PREDEFINED_PROJECTS`` to another location. Or add another pre-configured projects repository by pointing ``$DVT_PREDEFINED_PROJECTS_EXT_MY_NEW_REPOSITORY`` to it.

.. hint::
   
   For example if you installed DVT as a plug-in on top of an existing Eclipse installation, ``$DVT_PREDEFINED_PROJECTS`` is unset. But you can download the predefined projects separately, and point the system variable to the folder where you extracted the predefined projects.

Opening a Predefined Project
----------------------------

To open a predefined project use the ``Predefined Project Wizard`` by selecting :menuselection:`File --> New --> Example...` then :menuselection:`DVT Examples --> DVT Predefined Project`.

.. figure:: ../../images/common/predef-proj-filenew.png
   :align: center

You can also open the wizard from the **DVT Project Wizard** by clicking on the Predefined Projects link:

.. figure:: ../../images/common/predef-proj-link.png
   :align: center

Preferences
-----------

In the wizard's main window you can select the ``predefined project`` and the ``target directory``. A copy of the selected project will be placed in the target directory. Keep in mind that:

#.  The target directory **must not** be a parent of or inside of the ``eclipse workspace`` path
#.  The target directory **must** be writable
#.  The selected project **must not** exist in the current workspace

.. figure:: ../../images/common/predef-proj-wizard.png
   :align: center


#.  Quick filter - by project name;
#.  Available predefined projects;
#.  A short description of the selected project;
#.  If you want to change the default target directory (by default is the ``$HOME/dvt_predefined_projects_target`` );
#.  Override target directory (if it already exists);
#.  A message dialog will pop up, with info about all ``$DVT_PREDEFINED_PROJECTS`` & ``$DVT_PREDEFINED_PROJECTS_EXT_*`` environment variables (indicates the directories where DVT scans for predefined projects); See the picture below:

.. figure:: ../../images/common/predef-proj-locations.png
   :align: center

If all the settings are correct, click :guilabel:`Finish`.
