- Open your web browser and visit this link: https://www.eclipse.org/downloads/download.php?file=/technology/epp/down...
- Download this file and save this file to downloads.
- Open Terminal, Enter the downloads directory. You can acess this directory by the entering the following in the command line. --> "cd Downloads
- Once your in the downloads directiory, you must find the downloaded eclipse folder. You can list all files in the directiory with the following command. --> "ls"
- After entering the command shown above, all the files in the download directory will be listed. The eclipse file should look something like this -> "eclipse-php-2019-12-R-linux-gtk-x86_64.tar.gz"
- Extract the file by entering the following command, "tar xvfz "eclipse-php-2019-12-R-linux-gtk-x86_64.tar.gz" "
- Enter the eclipse folder by entering "cd eclipse"
- Run the script to open eclipse. The script is the following --> "./eclipse"
- Elipse IDLE will open.
cd Downloads
tar xvfz "eclipse-php-2019-12-R-linux-gtk-x86_64.tar.gz
cd eclipse
./eclipse
Eclipse Configuration
How to make Drupal Files reconised as PHP Files
- Open Window in Eclipse IDLE
- Window --> Prefrences -->General --> Content Types --> Text --> PHP Content Types --> Add the *.engine, *.theme, *.install, *.inc, *.make (for Drush make files), *.module, *.profile and *.test file types so that these files will be recognized as PHP
How to make sure the file encoding and characters are Unix friendly so that any code can be committed back in to the Drupal repositories.
- Window --> Prefrences --> General --> Workspace
-
Check Text file encoding and select "UTF -8"
-
Check New text file line delimiter and select "Unix"
Ensure that spaces are used instead of tabs:
- Window --> Prefrences --> General --> Editors --> Text Editors, Check Insert spaces for tabs.
- Window --> Prefrences --> General --> Editors --> Text Editors --> PHP --> Code Style --> Formatter, Set Tab policy: Spaces. Set Indentation size to 2
How to remove trailling whitespaces
- Go to Window->Preferences->PHP->Editor->Save Actions
- Check 'Remove trailing whitespace' and select 'All lines'.