User Tools

Site Tools


asc:tutorials:eclipse

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
asc:tutorials:eclipse [2014/10/29 14:26]
aparamonov
asc:tutorials:eclipse [2014/10/29 21:20] (current)
asc
Line 1: Line 1:
 +
 +
 ====== Eclipse ====== ====== Eclipse ======
  
Line 8: Line 10:
   - If you do not have Java, please download and install it. Eclipse needs it.   - If you do not have Java, please download and install it. Eclipse needs it.
   - Download "Eclipse IDE for C/C++ Developers" from http://www.eclipse.org/downloads/   - Download "Eclipse IDE for C/C++ Developers" from http://www.eclipse.org/downloads/
-  - Extract folder "eclipse" to a location where you want to store the executables.  E.G. C:\Program Files\+  - Extract folder "eclipse" to a location where you want to store the executable.  E.G. C:\Program Files\
   - Enter the folder and execute "eclipse". It will ask you for location of the workspace. That's where the source code is stored.   - Enter the folder and execute "eclipse". It will ask you for location of the workspace. That's where the source code is stored.
 +
 +<note tip>For ANL, eclipse is installed in /share/sl6/eclipse/ directory.</note>
  
 ===== Install SVN plugins ===== ===== Install SVN plugins =====
Line 15: Line 19:
   - Run Eclipse and select Help > Install New Software... from the main menu.   - Run Eclipse and select Help > Install New Software... from the main menu.
   - Enter "http://download.eclipse.org/releases/juno" in "work with" and click "Add..."   - Enter "http://download.eclipse.org/releases/juno" in "work with" and click "Add..."
-  - Select "Collaboration --> Subversive SVN team provider" and install it.+  - Select "Collaboration -> Subversive SVN team provider" and install it.
   - Restart Eclipse   - Restart Eclipse
-  - Select Help > Install New Software... from the main menu. +  - Select Help -> Install New Software... from the main menu. 
-  - Enter http://community.polarion.com/projects/subversive/download/eclipse/4.0/luna-site/ in "work with" and click "Add..."+  - Enter [[http://community.polarion.com/projects/subversive/download/eclipse/4.0/luna-site/]] in "work with" and click "Add..."
   - Select "Subversive SVN Connectors" and "SVN Kit" and install them.   - Select "Subversive SVN Connectors" and "SVN Kit" and install them.
   - Restart Eclipse.   - Restart Eclipse.
Line 24: Line 28:
 ===== Access CERN SVN ===== ===== Access CERN SVN =====
  
-  - Window --> Open perspective --> SVN Repository Exploring +  - Window -> Open perspective -> SVN Repository Exploring 
-  - Add New Repository Location. Enter "svn+ssh://svn.cern.ch/reps/atlasoff" as URL. Use your CERN username and password. +  - Add New Repository Location. Enter [[svn+ssh://svn.cern.ch/reps/atlasoff]] 
-  - You can do that to your private SVN repository. +  - Use your CERN username and password. 
-  - Select "AnalysisSUSY --> trunk --> packages.rc"+  - You can also do that to your private SVN repository. 
 +  - Select AnalysisSUSY -> trunk -> packages.rc
   - Right click on the file and select "Show history"   - Right click on the file and select "Show history"
   - Compare tag 620896 to the previous revision.   - Compare tag 620896 to the previous revision.
Line 34: Line 39:
  
 ===== Import a package from SVN ===== ===== Import a package from SVN =====
- 
  
   - Return to "C/C++ Perspective": click the icon in the upper-right corner of the window.   - Return to "C/C++ Perspective": click the icon in the upper-right corner of the window.
   - Right-click on "Project Explorer" and click "import".   - Right-click on "Project Explorer" and click "import".
-  - Select "SVN" --> "Project from SVN". "Next" --> "Browse"+  - Select "SVN" -> "Project from SVN". "Next" -> "Browse"
-  - Navigate to PhysicsAnalysis --> SYSYPhys --> SUSYTools --> tags --> SUSYTools-00-05-00-13+  - Navigate to PhysicsAnalysis -> SYSYPhys -> SUSYTools -> tags -> SUSYTools-00-05-00-13 
 +  - Select "Check out as a project with the name specified:". The project will appear in the Project Explorer. 
 +  - Go to src --> SUSYToolsAlg.cxx and double-click on the file. 
 +  - Right-click on the project name. Select "New -> Covert to a C/C++ Project"
 +  - Select "C Project. Uncheck "Specify project type"
 +  - Now the syntax checking, indexing, and autocomplete are enabled. 
 + 
 +===== Edit the code  ===== 
 + 
 +  - Press Shift+Ctrl+F 
 +  - It will auto-alight the code. 
 +  - Go to line 128 and type "jets_" and press "Ctrl+Space". The auto-coplete will finish the name. 
 +  - Delete "jets_shallowCopy" and enter ";" instead. 
 +  - Let's commit that into the SVN repository. 
 +  - Right-click on SUSYToolsAlg.cxx and select "Team -> Commit..."
 +  - Select "Yes." Enter your comment and click "OK"
 +  - Ops.. we do not have permissions to do that.   
 +  - Well, that is how you synchronize your code with a repository. 
 +  - Right-click on SUSYToolsAlg.cxx and select "Team -> Revert". The file is returned to the original state. 
 + 
 +===== Add libraries  ===== 
 + 
 +  - You may want to keep your code aware of external libraries (e.g. ROOT).
  
  
asc/tutorials/eclipse.1414592770.txt.gz · Last modified: 2014/10/29 14:26 by aparamonov