Eclipse: Difference between revisions

From Bitpost wiki
No edit summary
No edit summary
Line 3: Line 3:
|-
|-
| We always want these: CDT, PDT, WTP (Web Tools Platform, includes JSTP for Javascript support)
| We always want these: CDT, PDT, WTP (Web Tools Platform, includes JSTP for Javascript support)
# Get and run the [http://www.eclipse.org/downloads/ Eclipse Installer] and install one of the big ones
* Go to [http://www.eclipse.org/downloads/ Eclipse Installer] and install one of the big ones (avoid the installer)
## PDT is good but there are instructions below to bolt on any of the three - so anything goes with your starting choice
** PDT is good but there are instructions below to bolt on any of the three - so anything goes with your starting choice
# Install to development/eclipse/mars
* install into development/eclipse folder (be careful not to install to eclipse/eclipse, if so just move and fix eclipse.ini)
# Run and select this as the default workspace, do not prompt again: /home/m/development/eclipse-workspace
* Run and select this as the default workspace, do not prompt again: /home/m/development/eclipse-workspace
# Install PDT
* Install PDT
## Help-> Install New Software -> Add... -> Find latest PDT site [ here] -> add https://wiki.eclipse.org/PDT/Installation
** Help-> Install New Software -> Add... -> Find latest PDT site [ here] -> add https://wiki.eclipse.org/PDT/Installation
## e.g. for Mars1, use http://download.eclipse.org/tools/pdt/updates/3.6/
** e.g. for Mars1, use http://download.eclipse.org/tools/pdt/updates/3.6/
# Install WTP
* Install WTP
## Help-> Install New Software -> Add... -> add -> "WTP Mars", http://download.eclipse.org/webtools/repository/mars/ -> select WTP 3.7.1
** Help-> Install New Software -> Add... -> add -> "WTP Mars", http://download.eclipse.org/webtools/repository/mars/ -> select WTP 3.7.1
# Install CDT
* Install CDT
## Help-> Install New Software -> Add... -> Find the latest CDT site [https://eclipse.org/cdt/downloads.php here], and add it
** Help-> Install New Software -> Add... -> Find the latest CDT site [https://eclipse.org/cdt/downloads.php here], and add it
## e.g. for Mars1, use http://download.eclipse.org/tools/cdt/releases/8.8
** e.g. for Mars1, use http://download.eclipse.org/tools/cdt/releases/8.8
## Install CDT Main Features; CDT Optional Features: autotools memoryview misc multicore qt unittest vc++ visualizer
** Install CDT Main Features; CDT Optional Features: autotools memoryview misc multicore qt unittest vc++ visualizer
# Close eclipse and update the settings folder to point to the common shared location (make sure the development/config repo is available):
* Close eclipse and update the settings folder to point to the common shared location (make sure the development/config repo is available)
** use shared eclipse settings, to avoid problems like [http://stackoverflow.com/questions/13893942/eclipse-c-formatter-puts-new-line-before-method-identifiers this].
  cd ~/development/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings
  cd ~/development/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings
  ln -fs /home/m/development/config/common/home/m/development/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/* .
  ln -fs /home/m/development/config/common/home/m/development/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/* .
# Import all the existing projects that you need (A better Trader, Hang The DJ, etc.).  You can import existing projects from ~/development, easy peasey!
* put ~m/development/eclipse/eclipse.ini into config
# Install the [https://marketplace.eclipse.org/content/terminal-plug terminal plugin] so you can run CI right in eclipse.  Just drag the "install" button there to the eclipse toolbar.
* Import all the existing projects that you need (A better Trader, Hang The DJ, etc.).  You can import existing projects from ~/development, easy peasey!
* Install the [https://marketplace.eclipse.org/content/terminal-plug terminal plugin] so you can run CI right in eclipse.  Just drag the "install" button there to the eclipse toolbar.
|}
|}
{| class="mw-collapsible mw-collapsed wikitable"
{| class="mw-collapsible mw-collapsed wikitable"

Revision as of 23:02, 24 March 2016

Eclipse Mars installation
We always want these: CDT, PDT, WTP (Web Tools Platform, includes JSTP for Javascript support)
  • Go to Eclipse Installer and install one of the big ones (avoid the installer)
    • PDT is good but there are instructions below to bolt on any of the three - so anything goes with your starting choice
  • install into development/eclipse folder (be careful not to install to eclipse/eclipse, if so just move and fix eclipse.ini)
  • Run and select this as the default workspace, do not prompt again: /home/m/development/eclipse-workspace
  • Install PDT
  • Install WTP
  • Install CDT
  • Close eclipse and update the settings folder to point to the common shared location (make sure the development/config repo is available)
    • use shared eclipse settings, to avoid problems like this.
cd ~/development/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings
ln -fs /home/m/development/config/common/home/m/development/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/* .
  • put ~m/development/eclipse/eclipse.ini into config
  • Import all the existing projects that you need (A better Trader, Hang The DJ, etc.). You can import existing projects from ~/development, easy peasey!
  • Install the terminal plugin so you can run CI right in eclipse. Just drag the "install" button there to the eclipse toolbar.
Eclipse settings for all portable C++ boost projects
  • Set up .bashrc with my standard ENV vars for boost, c++ (and use notes there to build latest boost, if needed)
  • Set up build-Debug and build-Release folders via bootstrap force [debug|release], then configure build configurations for them both
  • Configure the project according to these Eclipse project configuration screenshots
Eclipse annoyances
  • To get problems to reset on build, I had to turn on (for all configs, then exit/restart): Project->Properties->C++ Build->Settings->Error Parsers-> [x] GNU gmake Error Parser 7
  • Click only ERRORS on Annotations dropdown arrow to bypass noise - I still can't get Ctrl-[,|.] to navigate errors, insanity
eclipse java project layout format
Eclipse uses a workspace which holds projects. Java apps written with Eclipse are organized as follows:
  • Eclipse workspace (can also be the top version-control folder)
    • project folder (typically one "app" that you can "run")
      • package(s) (named something like "com.developer.project.application")
        • classes (each class is contained in one file)
eclipse new project from existing code
You can set up a new project without specifying anything about it, just to browse the code.
			File->New Project->Empty
			Name: bbby2e05
			Location: c:\
			[ ] Create subdir
			---
			Show all files
			select everything in include, rc->include in project
			repeat for src
			dont worry about mak or install folders for now, just add files later as needed
			save all
			---
			then set up a repo for it!
			cd c:\bbb2e05
			git init (plus add cpp c hpp h, commit, set up daily, sync on bitpost)
It is also possible to set up a C++ makefile or PHP project from existing code.
			(rclick projects area)->New->Project...->C++->Makefile Project with existing code
			(name it and make sure Show all files is selected)

General Usage

  • To set bookmarks in a file, you MUST open it via the Navigator / Project explorer. Drag/drop to IDE will disable bookmarking (doh!!).
  • My customized keys
Alt+Shift+A      block select
Shift+Ctrl+k     customize keys even further!  :-)

Install and configure

  • Install PHP ("PDT"), Java and C++ ("CDT") environments, they each have something worthwhile.
  • Select Visual Studio keys
  • Set up automatic refresh:
Preferences > General > Startup and shutdown > Refresh workspace on startup
Preferences > General > Workspace > Refresh automatically