160 likes | 306 Views
COSC-4840 Software Engineering. Lab Session 2 Eclipse and Java Prepared by Nadya Kuzmina This presentation is mostly based upon “Java Development with Eclipse” by Peter Nehrer[1]. Eclipse [2]. The main project - the Software Development kit (SDK) consists of: JDT (Java Development Tools)
E N D
COSC-4840 Software Engineering Lab Session 2 Eclipse and Java Prepared by Nadya Kuzmina This presentation is mostly based upon “Java Development with Eclipse” by Peter Nehrer[1]
Eclipse [2] • The main project - the Software Development kit (SDK) consists of: • JDT (Java Development Tools) • PDE (Plugin Development Environment) • JDT provides a developer with necessary tools to build Java projects. • PDE enables a developer to extend Eclipse.
Eclipse Projects [2] • Eclipse projects are listed at http://www.eclipse.org/projects/ • The Tools Project delivers different tools built upon Eclipse platform: • Visual Editor is a GUI builder framework • EMF (Eclipse Modeling Framework) is a modeling tool
Eclipse Workbench [1] • Workbench is the visual interface (a set of windows) for Eclipse around which all of the components are organized. • A typical workbench window consists of the menu, toolbar, editor and several views (of the same data displayed in the editor). A view is a form of presentation of data. • A perspective is the selection of views and their layout. Perspectives are user-customizable.
Eclipse Workspace Resource Model [1] • Model that is used when interacting with the filesystem. • Elements of this model are called Resources. • Resources are organized in a tree hierarchy which resembles the file system. • Workspace – is the root of the model. • All Workspace contents are organized into Projects, which in turn contain Folders and Files.
Help Menu [1] • Help Contents – opens a separate help window with documentation (very useful!). • Dynamic Help displays a list of topics relevant to your current workbench activity. • Key Assist (also invoked by pressing Ctrl+Shift+L) displays a list of the various keyboard shortcuts. • Tips and Tricks will bring you to a special Help topic with helpful suggestions on how to make the most out of your application. • Lastly, Cheat Sheets will walk you step-by-step through some common but potentially complex tasks. • Software Updates lets you update Eclipse applications with the latest patches and new functionality using the built-in Configuration Management facility.
Window Menu [1] • Manage perspective • Select views • Navigate between views and editors • New Editor option – lets you open a new instance of the currently active editor. It allows you to edit two parts of the same file at the same time which would otherwise not fit into the same window. You may need to drag the tab to the bottom portion of the editor area—this will "tile" the two editor windows so that you can see both at the same time. • Preferences lets you customize your application. Note that you can share your preference settings with other team members by exporting and importing them using the corresponding wizard (choose File -> Import/Export, then select the Preferences wizard).
Run Menu [1] • The only standard function it provides is the ability to configure and run external tools—a very important integration point between Eclipse and other tools (if all else fails, you can integrate external tools into Eclipse using this function). • The Run menu is typically populated with plug-in-specific functions, depending on the current perspective.
Project Menu [1] • The Project menu is related to the Eclipse Resource model. It provides functions to open and close selected projects, as well as to manage project builds. • The last menu option enables you to open the selected project's Properties dialog.
Search Menu [1] • The Search menu's top option brings up the Search dialog, which gives you the ability to search your workspace for different kinds of resources. • Different search tabs provide options specific to the type of resource (for example, Java files) being searched. • The type of search supported by default is a simple file search. Search results are displayed in a special view, which is opened as needed. • The rest of the Search menu items provide shortcuts to specific search tabs in the Search dialog.
Navigate Menu [1] • The Navigate menu provides functions that let you navigate through your workspace resources as well as editors, edit locations, and annotations. Because of that, most of its functionality is editor and tool-specific.
Edit Menu [1] • The Edit menu groups the typical editing functions, such as Undo, Redo, Cut, Copy, Paste, Delete, Select All, and Find/Replace (also referred to as Global Actions). These are typically available at all times (regardless of what editor is currently active), but exactly what they do depends on the particular editor. (For example, a text editor may allow you to copy the selected text into your clipboard, whereas a drawing editor will copy the selected graphic figures, and so on.)
File Menu [1] • Many of the File Menu’s options are resource-oriented. Others, such as Close, Close All, Save, Save As..., Revert, and Print are editor-related (each editor type provides its own implementation of these). • New, Import, and Export options bring up their corresponding wizard selection dialogs. The New sub-menu exposes shortcuts to wizards most relevant in the current perspective. (For example, Java perspective will have a new Package, Class, Interface, and the like.) • Exactly which New, Import, and Export wizards are available depends on your application and/or the set of installed plug-ins. At a minimum, you can create new Projects, Folders, and plain text Files; import projects from an external location in the filesystem, and import and export preferences and resources to/from archive files or the filesystem. • Rounding up the contents of the File menu, Switch Workspace allows you to switch your workspace without having to restart Eclipse, and Exit will let you go home after a good day's work.
The article “Java Development with Eclipse” [1] section “Here Comes Java” contains most of the material we covered in class. Source Editing and Refactoring Examples
Eclipse Resources • Eclipse Online Help: Help->Help Contents
References • Peter Nehrer “Java Development with Eclipse”, http://www.developer.com/java/data/article.php/10932_3528616_1 • Peter Nehrer “Meet Eclipse” http://www.developer.com/lang/article.php/3518006