User Tools

Site Tools


asc:tutorials:eclipse

Eclipse

This example touches only the basics. Some of our colleagues managed to integrate Eclipse with the ATLAS TDAQ environment: https://twiki.cern.ch/twiki/bin/view/Sandbox/TdaqSwEclipse

Install Java and Eclipse

  1. If you do not have Java, please download and install it. Eclipse needs it.
  2. Download “Eclipse IDE for C/C++ Developers” from http://www.eclipse.org/downloads/
  3. Extract folder “eclipse” to a location where you want to store the executable. E.G. C:\Program Files\
  4. Enter the folder and execute “eclipse”. It will ask you for location of the workspace. That's where the source code is stored.
For ANL, eclipse is installed in /share/sl6/eclipse/ directory.

Install SVN plugins

  1. Run Eclipse and select Help > Install New Software… from the main menu.
  2. Enter “http://download.eclipse.org/releases/juno” in “work with” and click “Add…”
  3. Select “Collaboration → Subversive SVN team provider” and install it.
  4. Restart Eclipse
  5. Select Help → Install New Software… from the main menu.
  6. Select “Subversive SVN Connectors” and “SVN Kit” and install them.
  7. Restart Eclipse.

Access CERN SVN

  1. Window → Open perspective → SVN Repository Exploring
  2. Add New Repository Location. Enter svn+ssh://svn.cern.ch/reps/atlasoff
  3. Use your CERN username and password.
  4. You can also do that to your private SVN repository.
  5. Select AnalysisSUSY → trunk → packages.rc
  6. Right click on the file and select “Show history”
  7. Compare tag 620896 to the previous revision.
  8. Now you can see what has changed. When the change was made. Who did that. The comments are also displayed.

Import a package from SVN

  1. Return to “C/C++ Perspective”: click the icon in the upper-right corner of the window.
  2. Right-click on “Project Explorer” and click “import”.
  3. Select “SVN” → “Project from SVN”. “Next” → “Browse”.
  4. Navigate to PhysicsAnalysis → SYSYPhys → SUSYTools → tags → SUSYTools-00-05-00-13
  5. Select “Check out as a project with the name specified:”. The project will appear in the Project Explorer.
  6. Go to src –> SUSYToolsAlg.cxx and double-click on the file.
  7. Right-click on the project name. Select “New → Covert to a C/C++ Project”.
  8. Select “C Project. Uncheck “Specify project type”.
  9. Now the syntax checking, indexing, and autocomplete are enabled.

Edit the code

  1. Press Shift+Ctrl+F
  2. It will auto-alight the code.
  3. Go to line 128 and type “jets_” and press “Ctrl+Space”. The auto-coplete will finish the name.
  4. Delete “jets_shallowCopy” and enter ”;“ instead.
  5. Let's commit that into the SVN repository.
  6. Right-click on SUSYToolsAlg.cxx and select “Team → Commit…”.
  7. Select “Yes.” Enter your comment and click “OK”.
  8. Ops.. we do not have permissions to do that.
  9. Well, that is how you synchronize your code with a repository.
  10. Right-click on SUSYToolsAlg.cxx and select “Team → Revert”. The file is returned to the original state.

Add libraries

  1. You may want to keep your code aware of external libraries (e.g. ROOT).
asc/tutorials/eclipse.txt · Last modified: 2014/10/29 21:20 by asc