begin at the beginning n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Eclipse PowerPoint Presentation
Download Presentation
Eclipse

Loading in 2 Seconds...

play fullscreen
1 / 22
wesley

Eclipse - PowerPoint PPT Presentation

269 Views
Download Presentation
Eclipse
An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Begin at the Beginning Eclipse

  2. Where to Find it: • www.eclipse.org • www.eclipse.org/articles • www.eclipse.org/newsgroups • www.eclipse.org/eclipse/development/main.html

  3. Install and run: • Download and decompress in install directory • Does not modify registry • Repeat to reinstall • No hidden spy-ware • (Re)installation is painless • Install your own Java jre or jdk beforehand • Run eclipse.exe; make your own shortcut, etc C:\Program Files\eclipse

  4. First Look (Resource Perspective): view editor Toolbar with Resource Perspective selected view view

  5. What is a Perspective? • Collection of views (not editable) and editors • Good for a particular task • Resource Perspective: managing files (functionality found in the java perspective) • Java Perspective: developing java code • Debug Perspective: debugging java code • Three views in this perspective: • Navigator: displays file system • Task: lists outstanding tasks • Outline: presents outline (if it exists) of other resources

  6. work, work, work Workbench versus Workspace • Workspace: • Asked at first startup to specify file system location. This becomes your workspace. • Put it outside the Eclipse home directory (for easy re-install) • Manages resources, grouped as projects • Handles communication between components • You can have several workspaces • Workbench: • Displays menus and toolbars (perspectives decide which) • Looks “native”

  7. The Eclipse Platform native code The eclipse platform kernel manages resources basic GUI Workspace Component Workbench Component Team Component (CVS) Help Component (XML) CVS client extensible Additional Plug-in Additional Plug-in JDT plug-in PDE plug-in plug-ins come with their own perspectives, views, editors, etc roll-your-own java devtool plug-in devtool

  8. Multiplicity: • You can start up multiple Eclipse windows (Java and Debug Perspectives for example) • You can have multiple Eclipse installs unzipped in different install directories. • When testing new plug-ins there is even a “runtime workbench” so you won’t mess up your current work environment.

  9. Default perspective: • Since we want to develop java code the default perspective for us is the Java Perspective Select Window/Preferences…/General/Perspectives and from the Available List select Java and click on Make Default.

  10. First Java Project: • Select File/New/Project/Java Project and click on Next • The following window appears

  11. A new java project: Becomes the subdirectory where project files stored Separate src and bin directories

  12. Perspectives, Views and Editors: Resource Java Debug Perl etc The Workbench has several perspectives; only one is visible at a time. A perspective is a collection of views and editors that also appear in different perspectives Navigator Package Console Tasks etc JDT Java code editor XML editor Mocrosoft Word etc

  13. Views vs Editors: • Views display data without the ability to edit • Editors edit! • Views and Editors get stacked • Select Window/Preferences/General/Editors/File Associations to associate editors with file extensions • Double clicking on a Java class in the Package View opens the Java editor on the .java file. • Perspectives come with a predefined (but modifiable) set of Views and Editors

  14. The Java Perspective Java file editor Perspective toolbar Project Class files and contents Class outline List of all open projects (deleting a project from this view does not delete the project from the file system) Output window

  15. Creating a Java class: • Click on circled-C icon • Select File/New/Class • Right-click Package Explorer View and select New/Class

  16. New Java class dialog Get used to “packaging” your java classes Typically the project folder Name of the class

  17. Java coding: • Code Assist prompts with method/variable names • Invoked by typing . operator or Ctrl-space. • Editor red-lines syntax errors (with fix hints) • Reformat by selecting Source/Format • Modify Code Assist by selecting Window/Preferences/Java Editor/Code Assist • Quick Fix suggests code fixes. Hover over error/light bulb icon in left margin marker bar • Minimize comments and method bodies

  18. Scrapbook: • Create a new scrapbook page File/New/Other/(Java Run/Debug)/Scrapbook Page The file extension will automatically be .jpage. • From here you can execute code snippets by following the steps on the following slide. • If you need to import other packages right click the scrapbook editor and select Set Imports.

  19. Using the Scrapbook: 2: Copy or type code to be executed into the editor 3: Select the code you want to execute 1: Double click the Package View scrapbook entry to open an editor. 4: Right click the editor window and select Execute How you include import statements 5: View the output in the Console window

  20. The Package Explorer: • Deleting projects from this view doesn’t delete them from the file system • Open an existing project by importing it to this view. Select File/Import

  21. Disaster Recovery • Save your useful Workspace project folders • Delete your Eclipse directory. • Unzip the Eclipse download • Replace any project folders in your new Workspace • Newversion of Eclipse? • copy old project folders to new Workspace directory

  22. Using a Repo • Your project will be stored on a repo managed by Aram. • The repo address iswhere n is a number from 1 to 6. • Someone must start the project first on Eclipse and then save it to the repo and then others can create a new project in their Eclipse by importing it from the repo. • There is a lot of useful information that you should acquire regarding Eclipse and repositories so don't pass up this opportunity. https://cs/newpaltz.edu/repos/se-g0n