eclipse
play

Eclipse Software Engineering with an Integrated Development - PowerPoint PPT Presentation

Eclipse Software Engineering with an Integrated Development Environment (IDE) Markus Scheidgen Friday, 26. October 2012 Agenda What is eclipse and why bother? - An introduction to eclipse. eclipse fundamentals (Java) development


  1. Eclipse Software Engineering with an Integrated Development Environment (IDE) Markus Scheidgen Friday, 26. October 2012

  2. Agenda ‣ What is eclipse and why bother? - An introduction to eclipse. ‣ eclipse fundamentals ‣ (Java) development with eclipse ★ reading code ★ writing code ★ build and run code ★ debugging ★ testing ‣ collaborative work with eclipse ★ task management ★ version control ‣ beyond Java programming ‣ extending eclipse ★ plug-ins and equinox ★ Java Development Toolkit APIs ★ eclipse modeling framework ‣ further reading 2 Friday, 26. October 2012

  3. introduction Friday, 26. October 2012

  4. What is eclipse? ‣ Eclipse started as a proprietary IBM product (IBM Visual age for Smalltalk/Java). ‣ Eclipse is open source - it is a general purpose open platform that facilitates and encourages the development of third party plug-ins. ‣ Eclipse is best known as an Integrated Development Environment (IDE). ‣ Eclipse was originally designed for Java, now supports many other languages. ★ C, C++, Python, PHP, Ruby ★ XML, HTML, CSS ★ ant, maven, and many more 4 Friday, 26. October 2012

  5. What is eclipse not? ‣ Eclipse is not a programming language. ‣ Eclipse is not a software modeling tool; but it can be used as one. 5 Friday, 26. October 2012

  6. Integrated Development Environments (IDEs) In this lecture we manly see eclipse as an IDE. ‣ Programming requires the use of many tools: ★ editors (vim, emacs) ★ compilers (gcc, javac) ★ code analyzers (lyn) ★ debuggers (gdb, jdb) ★ build-tools (make, ant, maven) ★ version control (cvs, svn, git, ClearCase) ‣ IDEs integrate those tools into a single coherent environment. ★ one rich graphical user interface ★ one configuration scheme ★ The di ff erent tools are connected with each other. 6 Friday, 26. October 2012

  7. Why bother? ‣ IDEs are omnipresent. ‣ Many software engineering tools only have rudimentary interfaces. ‣ IDEs can automate many processes in software engineering: ★ building, testing ★ generation of boiler-plate code 7 Friday, 26. October 2012

  8. fundamentals Friday, 26. October 2012

  9. Installation (I) ‣ download: http://www.eclipse.org/downloads/ ★ Eclipse 3.x releases are: Callisto, Europa, Ganymede, Galileo, Helios, Indigo ( 3.7 , recommended), Juno (4.2) ★ There is a 32- and 64-bit version for Windows, MacOS, and Linux/Unix. ★ Eclipse is java-based but uses SWT, a GUI-toolkit with platform specific versions. ★ There are di ff erent packages (di ff erent collections of plug-ins) for di ff erent use-case. Download Eclipse IDE for Java Developers when in doubt. 9 Friday, 26. October 2012

  10. Installation (II) ‣ after download: ★ You have a .zip- or .tar.gz -file. ★ unzip ★ The unzipped folder contains an executable eclipse(.exe) ‣ start eclipse: ★ You will have to choose a workspace. The workspace is the place were eclipse will store all your work and configurations. Workspaces can be switched later. Choose a new directory somewhere in your home folder. ★ You leave the welcome screen with the right-hand-side arrow. 10 Friday, 26. October 2012

  11. The Workspace ‣ ... shows your current work. ‣ ... is fully configurable, (via Window menu). ★ Views can be moved, removed, added. ★ You can switch between perspectives (specific arrangement of views). ‣ Views can be very general (e.g. Problems , Outline) or specific (e.g. Package Explorer (java), Task List (mylyn)) ‣ The workspace has a menu bar (top) and status bar (bottom) ‣ The workspace and views have action bars ‣ The space in the “middle” contains open editors. Editors may change the menu bar. 11 Friday, 26. October 2012

  12. Eclipse Vocabulary ‣ Workbench, Perspective, Editor, View ‣ Project ★ organizational unit for your work ★ corresponds to a folder on your hard-drive, by default in the workspace directory ★ is a resource ‣ Resource ★ generic term for folders, files, and sometimes file-like (virtual resources) entities ‣ Preferences ★ eclipse wide configuration ★ organized by plug-ins ‣ Properties ★ project specific configuration ★ allows to create project specific settings for large parts of the preferences 12 Friday, 26. October 2012

  13. Java Development Tools (JDT) Friday, 26. October 2012

  14. Java Development Tools (JDT) ‣ ... is a set of plug-ins that turn eclipse into a Java-IDE ‣ JDT comprises of: ★ Java editor with syntax highlighting, code-completion, templates, refactorings, navigation, ... ★ Package explorer ★ Java specific views for ★ documentation ★ debugging ★ type-hierarchies ★ outline ★ Java search ★ Java builder 14 Friday, 26. October 2012

  15. Java Projects ‣ A Java project is a special project. ‣ A Java project contains: ★ source folders with your sources ★ other folders and files you add (e.g. jars, ant-scripts, etc.) ★ the compiled .class-files (hidden) ★ references to used libraries ‣ Projects can be configured through a property editor ★ Most configurations are projects specific changes to the global eclipse wide configuration. ★ Most important for java projects is the Java Build Path: ★ source folders and class folder ★ dependencies (other Java projects you need resources from, e.g. classes) ★ libraries (internal and external jars and system libraries) 15 Friday, 26. October 2012

  16. Anagrams, a Simple Programming Exercise ‣ Dave Thomas (aka pragmatic Dave ) defines Code Katas as fundamental training exercises for programming: http://codekata.pragprog.com ‣ Anagrams are sets of words that are made up from the same letters. ‣ Problem: Find all anagrams in a list of words. ‣ We use a small word list from Kevin's Word List Page (http://wordlist.sourceforge.net) as example. 16 Friday, 26. October 2012

  17. Write Java ‣ Create Classes, Interfaces, and Package from the Project Explorer. ‣ Use code-completion and templates with crtl-space. ‣ Use refactorings from the refactor context-menu. ‣ Use quick-fixes to deal with errors ( crtl-1 ). ‣ Generate code (e.g. getter and setter) from the source context-menu. ‣ Organize imports from the source context-menu. ‣ Extract interface from the refactor context-menu. 17 Friday, 26. October 2012

  18. Read Java ‣ Navigate with F3 ‣ Search for references and declarations ‣ View type-hierarchies and call-hierachies with the context-menu ‣ Use the outline-view ‣ Use the Java search ‣ Lookup Java-Doc with hovers ‣ Mark Occurrences from the action bar 18 Friday, 26. October 2012

  19. Build and Run Java ‣ Builds automatically for simple project configurations. ‣ Run from the context-menu. ‣ Look at run-configurations from the action bar and change the arguments. ‣ Add an external .jar library to your project. 19 Friday, 26. October 2012

  20. Debug Java ‣ Use debug instead of run. ‣ Add breakpoints. ‣ Switch to the debug-perspective as o ff ered. ‣ Step-in, step-over, step-return, and resume (F5-F8) ‣ Look at variables in the variable view. ‣ Inspect expressions from the context-menu. ‣ Use the expressions view (show view first from the Window menu). ‣ Add exception break points. ‣ Switch frames in the debug view. ‣ Use “hot-deploy” (i.e. change the code and save it while running). 20 Friday, 26. October 2012

  21. Testing with JUnit ‣ Create a test-case from the Package Explorer. ‣ Run the test-case from the context menu. ‣ Navigate through failing test from the JUnit view. ‣ Debug a test-case from the context menu. ‣ Inspect run-/debug-configurations for JUnit. ‣ Run all test-cases in a project from the Package Explorer. 21 Friday, 26. October 2012

  22. collaborative work with eclipse Friday, 26. October 2012

  23. Task management (with Mylyn) ‣ Problems to solve: ★ Information overload ★ Slow context switches ‣ Import and manage tasks (e.g. bugs and feature requests) in eclipse ‣ Workspace state (e.g. open editors) is bound to the active task ‣ You can switch between task and automatically switch between workspace states 23 Friday, 26. October 2012

  24. Version Control (with SVN) ‣ Install subversive, using the eclipse Marketplace ★ use the latest “pure Java” svn connector ‣ Open the repositories view and create a new repository. ‣ Share a project via the Package Explorer. Notices the di ff erences in the Package Explorer’s resource presentation. ‣ Change a file and compare it with the latest version from the repository via the Package Explorer. ‣ Use the comparison editor to revert changes. ‣ Commit your changes via the Package Explorer. ‣ Explore the history view. 24 Friday, 26. October 2012

  25. beyond Java programming Friday, 26. October 2012

  26. Popular O ffi cial Eclipse Projects http://www.eclipse.org/projects/listofprojects.php ‣ Eclipse Platform, JDT, PDE ‣ Eclipse Modeling Project Eclipse Modeling Framework (EMF) ★ EMF ★ EMF compare ★ relational database mappings ★ Graphical Modeling Framework ★ Xtext ★ Model-2-Model and Model-2-Text ★ UML/OCL tools ★ ‣ Mylyn task management ‣ Service Oriented Architecture (SOA) ‣ Languages: C/C++, Python, Scala ‣ Eclipse Web Tools Platform J2EE ★ Javascript ★ XML ★ Web Services ★ 26 Friday, 26. October 2012

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend