Eclipse 3.0 PDT Setup for ullright on Ubuntu 12.04LTS
Installation
Tested for Ubuntu 11.10, 12.04 LTS and Eclipse PDT 3.0.x
Preparation
For a local dev installation we recommend to use /var/www as Eclipse workspace.
Change the owner to your user to allow this. Assuming your username is "klemens":
- sudo chown klemens:klemens /var/www
Install Oracle Java for Ubuntu 12.04
See the bottom of this document for Java installation instructions for Ubuntu 11.10
- sudo add-apt-repository ppa:webupd8team/java
- sudo apt-get update
- sudo apt-get install oracle-java7-installer
- java -version
- Should return:
- java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)
Install Eclipse PDT
- Download latest version from http://download.eclipse.org/tools/pdt/downloads/
- Extract the file to ~/bin/eclipse ("~" stands for your home directory)
- Launch eclipse
- Exit Eclipse
Fix Ubuntu javaHL path bug:
- sudo apt-get install libsvn-java
- sudo find /usr -name libsvnjavahl-1.so
- Example output: /usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so
- gedit ~/bin/eclipse-php/eclipse-php.ini
- Add the path (without the filename) a line after -vmargs as follows:
-
-Djava.library.path=/usr/lib/x86_64-linux-gnu/jni
Installing plugins
- Launch eclipse
- Default workspace: /var/www
- Install svn plugin. Install subclipse: (recommended)
- Help -> Install new software -> Add
- Name: Subclipse
- URL: http://subclipse.tigris.org/update_1.6.x/
- Check all checkboxes
- "Next"
- "Select All", uncheck "Mylyn"
- "Next"
- Agree to terms -> "Finish"
Note if you cannot click the "Finish" button, try to go back and forth until it works. - Restart Now: "Yes"
- Install yamlEditor:
- Help -> Install new software -> Add
- Name: yamlEditor
- URL: http://dadacoalition.org/yedit/
Configuration
Window -> Preferences
- General -> Appearance -> Colors and Fonts
- Basic -> Text Font -> Edit -> Monospace 11pt
- General -> Editors -> Text Editors
- Display tab width: 2
- Insert spaces for tabs: checked
-
- Show print margin: checked
- Print margin column: 80
- PHP -> Code Style -> Formatter
- Tab policy : Spaces
- Indendation size: 2
- Javascript -> Code Style -> Formatter
- -> edit (tab = 2 spaces)
PHP Paste Indentation Bug
- Open workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.php.ui.prefs by your text editor.
- vi /var/www/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.php.ui.prefs
- Add "smartPaste=true".
Run -> External tools -> External tools configuration
- "New" Icon
- Name: refresh completely
- Location: ${project_loc}/batch/refresh_completely
- Working Directory: ${project_loc}
- Tab "Build": uncheck "Build before launch"
- Tab "Refresh": check "The project containing the selected resource"
- "New" Icon
- Name: symfony cache-clear
- Location: ${project_loc}/symfony
- Working Directory: ${project_loc}
- Arguments: cache:clear
- Tab "Build": uncheck "Build before launch"
- "New" Icon
- Name: get and load production database
- Location: ${project_loc}/symfony
- Working Directory: ${project_loc}
- Arguments: ullright:get-and-load-production-database
- Tab "Build": uncheck "Build before launch"
- "New" Icon
- Name: get production uploads
- Location: ${project_loc}/symfony
- Working Directory: ${project_loc}
- Arguments: ullright:get-production-uploads
- Tab "Build": uncheck "Build before launch"
- "New" Icon
- Name: publish
- Location: ${project_loc}/symfony
- Working Directory: ${project_loc}
- Arguments: ullright:publish
- Tab "Build": uncheck "Build before launch"
- "New" Icon
- Name: publish only files
- Location: ${project_loc}/symfony
- Working Directory: ${project_loc}
- Arguments: ullright:publish --only-files
- Tab "Build": uncheck "Build before launch"
Run -> External Tools -> Organize Favorites -> Add All
Exclude ullFileStreamable files for ullMail
- Right click on "web/uploads/ullFilestreamable" -> Properties
- Resource -> Resource Filter ->Add
- Exclude All
- Files & Folders
- All children (recursive)
- *.*
Old Stuff:
Note: this guide assumes using Ubuntu (9.10) and PDT 2.1 SR2
- Install Java:
- sudo aptitude install sun-java6-bin
- Make sure we're using the correct java:
- sudo update-alternatives --config java
- 64-bit users: At the moment we recommend installing a 32-bit Java VM since there's no Eclipse PDT all-in-one package for 64-bit systems.(Spring 2009)
- sudo aptitude install ia32-sun-java6-bin
- sudo update-alternatives --config java
- Note that this permanently changes your active Java VM.
- As an alternative, manually installing everything for your architecture should work too.
- Download from http://download.eclipse.org/tools/pdt/downloads/
- Extract the file to ~/bin/eclipse
Workaround for Button-Bugcreate file start_eclipse.sh in ~/bin/eclipseinsert content in start_elipse.sh:-
export GDK_NATIVE_WINDOWS=1
./eclipse make start_eclipse.sh executeablerun Eclipse via start_eclipse.sh
- Launch eclipse