Installer Eclipse sous Windows

De PGVWiki
Sauter à la navigation Sauter à la recherche

Il existe beaucoup d'IDEs disponibles pour travailler avec des fichiers PHP et bien entendu vous pouvez utiliser les outils que voulez. Toutefois, j'ai trouvé beaucoup d'avantages dans l'utilisation d'Eclipse pour développer PhpGedView:

  • Intégration avec CVS et SVN. Vous n'avez pas besoin d'effectuer des aller retours entre les programmes.
  • Open Source
  • Mise en surbrillance de la syntaxe PHP et complètement automatique du code
  • Documentation PHP intégrée (on peut obtenir de la documentation API documentation sur les fonctions et sur les classes simplement en les survolant avec la souris)
  • Mise en surbrillance de la syntaxe des scripts HTML et JavaScript et modification
  • Soutien planifié pour un déboguage intégré dans un futur proche

Cette page vous explique comment installer Eclipse pour pouvoir travailler sur PhpGedView.

Plug-ins de PHP Eclipse

Eclipse est un IDE extensible qui vous permet d'installer des plugins pour réaliser différents types de développement. Pour pouvoir développer PHP dans l'IDE Eclipse, vous devez installer un plugin PHP pour Eclipse.

Il existe deux principaux Plug-ins PHP:

  • PHPEclipse - un projet open source indépendant du projet Eclipse.
  • Eclipse PHP IDE - un projet interne au projet Eclipse sponsorisé par IBM et Zend pour produire un IDE PHP.

Ces deux plugins sont très biens. J'ai trouvé le débogueur PHPEclipse très lent lorsqu'il travaille avec PhpGedView. Le debogueur Eclipse PHP IDE est encore au stade du développement.

Obtenir Eclipse

Vous pouvez télécharger la dernière version d'Eclipse ici http://www.eclipse.org/downloads/

Vous pouvez également choisir de récupérer le paquet logiciel complet fourni par le projet PHP IDE. Ce paquet vous offre tout ce dont vous avez besoin pour démarrer en utilisant PHP avec Eclipse. http://download.eclipse.org/tools/php/downloads/index.php?release=I20060926-024

Installer le plugin PHP

Si vous avez installé le paquet complet susmentionné ce paragraphe ne vous concerne pas et vous pouvez démarrer Eclipse. Dans le cas contraire, il vous faut effetuer les actions suivantes:

  1. Téléchargez l'un des plugins suivants:
  2. Décompressez fichiers correspondants et copiez les répertoires features et plugins dans votre répertoire Eclipse
  3. Démarrez Eclipse et basculez sur la perspective
    1. You may need to close the Welcome Page if you have never used Eclipse before.
    2. Using the menus, navigate to: Window->Open Perspective->Other...
    3. Select PHP from the list of Perspectives
      • If you don't see PHP listed as one of the options, then you are probably missing some other required plugins. See the documentation for your selected plug-in to see what other plugins are required.

Installing the Subclipse Subversion Plugin

Eclipse includes built-in support for CVS. So if you plan to use the CVS code you are set.

But you probably want to use the latest development code from the Subversion (SVN) repository. In order to access Subversion from Eclipse, you will need to install the Subclipse plugin

The Subclipse plugin should be installed using Eclipse's online update manager. The Subclipse team has put together a good install guide here: http://subclipse.tigris.org/install.html

Checkout the Project from SVN

  1. First you should check that you have a good workspace location.
    1. From the File menu select the Switch Workspace option
    2. You should choose a workspace that is outside the user space (i.e. Documents and Settings) because IIS and the Windows ACL will have trouble accessing all of the include files and will give you lots of permissions errors.
    3. A good location would be something like C:\workspace or C:\phpgedview\workspace
  2. Open the SVN Repository Perspective
    1. From the Window menu select the Open Perspective menu item, then select the Other option
    2. The select perspective window appears. Choose the SVN Repository Exploring option from the list and hit OK
  3. Right click in the SVN Repository view and select the New -> Repository Location option.
    1. Set the repository URL to: https://phpgedview.svn.sourceforge.net/svnroot/phpgedview
  4. Checkout the files as a new PHP project
    1. Expand the https://phpgedview.svn.sourceforge.net/svnroot/phpgedview repository
    2. Expand the trunk element
    3. Right-click on the phpGedView folder and select "Checkout..."
    4. Select the option to Check out as a project configured using the new project wizard and click Finish
    5. Choose PHP as the project option
    6. Enter a name for your project and click finish