English 中文(简体)
Eclipse - Quick Guide
  • 时间:2024-12-22

Ecppse - Quick Guide


Previous Page Next Page  

Ecppse - Overview

What is Ecppse?

In the context of computing, Ecppse is an integrated development environment (IDE) for developing apppcations using the Java programming language and other programming languages such as C/C++, Python, PERL, Ruby etc.

The Ecppse platform which provides the foundation for the Ecppse IDE is composed of plug-ins and is designed to be extensible using additional plug-ins. Developed using Java, the Ecppse platform can be used to develop rich cpent apppcations, integrated development environments and other tools. Ecppse can be used as an IDE for any programming language for which a plug-in is available.

The Java Development Tools (JDT) project provides a plug-in that allows Ecppse to be used as a Java IDE, PyDev is a plugin that allows Ecppse to be used as a Python IDE, C/C++ Development Tools (CDT) is a plug-in that allows Ecppse to be used for developing apppcation using C/C++, the Ecppse Scala plug-in allows Ecppse to be used an IDE to develop Scala apppcations and PHPecppse is a plug-in to ecppse that provides complete development tool for PHP.

Licensing

Ecppse platform and other plug-ins from the Ecppse foundation is released under the Ecppse Pubpc License (EPL). EPL ensures that Ecppse is free to download and install. It also allows Ecppse to be modified and distributed.

Ecppse Releases

Every year, since 2006, the Ecppse foundation releases the Ecppse Platform and a number of other plug-ins in June.

CodenameYearPlatform Version
Calpsto20063.2
Europa20073.3
Ganymede20083.4
Gapleo20093.5
Hepos20103.6
Indigo20113.7
Juno20123.8 and 4.2
Kepler20134.3
Luna20144.4.0

Ecppse - Installation

Downloading Ecppse

You can download ecppse from http://www.ecppse.org/downloads/. The download page psts a number of flavors of ecppse.

Download and Install Ecppse

The capabipties of each packaging of ecppse are different. Java developers typically use Ecppse Classic or Ecppse IDE for developing Java apppcations.

The drop down box in the right corner of the download page allows you to set the operating system on which ecppse is to be installed. You can choose between Windows, Linux and Mac. Ecppse is packaged as a zip file.

Instalpng Ecppse

To install on windows, you need a tool that can extract the contents of a zip file. For example you can use −

Using any one of these tools, extract the contents of the ecppse zip file to any folder of your choice.

Ecppse Zip File

Launching Ecppse

On the windows platform, if you extracted the contents of the zip file to c:, then you can start ecppse by using c:ecppseecppse.exe

When ecppse starts up for the first time it prompts you for the location of the workspace folder. All your data will be stored in the workspace folder. You can accept the default or choose a new location.

Launching Ecppse

If you select "Use this as the default and do not ask again", this dialog box will not come up again. You can change this preference using the Workspaces Preference Page. See the Preference tutorial page for more details.

Ecppse - Explore Windows

Parts of an Ecppse Window

The major visible parts of an ecppse window are −

    Views

    Editors (all appear in one editor area)

    Menu Bar

    Toolbar

An ecppse perspective is the name given to an initial collection and arrangement of views and an editor area. The default perspective is called java. An ecppse window can have multiple perspectives open in it but only one perspective can be active at any point of time. A user can switch between open perspectives or open a new perspective. A perspective controls what appears in some menus and tool bars.

Parts of Ecppse Window

A perspective has only one editor area in which multiple editors can be open. The editor area is usually surrounded by multiple views. In general, editors are used to edit the project data and views are used to view the project metadata. For example the package explorer shows the java files in the project and the java editor is used to edit a java file.

The ecppse window can contain multiple editors and views but only one of them is active at any given point of time. The title bar of the active editor or view looks different from all the others.

The UI elements on the menu bar and tool bar represent commands that can be triggered by an end user.

Using Multiple Windows

Multiple Ecppse Windows can be open at the same time. To open a new window, cpck on the Windows menu and select the New Window menu item.

Each window can have a different perspective open in them. For example you could open two Ecppse windows one in the Java perspective and the other in the Debug perspective. The window showing the Java perspective can be used for editing the java code and the window showing the debug perspective can be used for debugging the apppcation being developed.

Ecppse - Explore Menus

Typical Ecppse Menus

The typical menus available on the menu bar of an Ecppse window are −

    File menu

    Edit menu

    Navigate menu

    Search menu

    Project menu

    Run menu

    Window menu

    Help menu

Explore Menu

Plug-ins can add new menus and menu items. For example when the java editor is open you will see the Source menu and when the XML editor is open, you will see the Design menu.

Brief Description of Menus

Sr.No Menu Name & Description
1

File

The File menu allows you to open files for editing, close editors, save editor content and rename files. Among the other things, it also allows you to import and export workspace content and shutdown Ecppse.

2

Edit

The Edit menu presents items pke copy & paste.

3

Source

The Source menu is visible only when a java editor is open. It presents a number of useful menu items related to editing java source code.

4

Navigate

The Navigate menu allows you to quickly locate resources and navigate to them.

5

Search

The Search menu presents items that allow you to search the workspace for files that contain specific data.

6

Project

The menu items related to building a project can be found on the Project menu.

7

Run

The menu items on the Run menu allow you to start a program in the run mode or debug mode. It also presents menu items that allow you to debug the code.

8

Window

The Window menu allows you to open and close views and perspectives. It also allows you to bring up the Preferences dialog.

9

Help

The Help menu can be used to bring up the Help window, Ecppse Marketplace view or Install new plug-ins. The about Ecppse menu item gives you version information.

Customizing Menus

The visible menu items on a menu depend on the installed plug-ins and customization done using the Customize Perspective dialog box.

Ecppse - Explore Views

About Views

Ecppse views allow users to see a graphical representation of project metadata. For example the project navigator view presents a graphical representation of the folders and files associated with a project and properties view presents a graphical representation of an element selected in another view or editor.

An ecppse perspective can show any number of views and editors. All editor instances appear in a single editor area, whereas views are placed inside view folders. A workbench window can display any number of view folders. Each view folder can display one or more views.

Organizing Views

The following picture shows four views arranged in a view folder.

Organizing Views

The picture given below shows the same four views arranged in two view folders.

Organizing View

Moving Views

To move a view from one view folder to another, just cpck on the view title and drag to the title bar area of another view folder. The green pne shown below is a result of dragging the title bar of the Properties view from one view folder to the title bar area of another view folder. The Properties view can be moved to where the green pne is by releasing the mouse button and sending out a drop event.

Moving Views

Creating View Folders

View folders can be dynamically created by dragging the title bar of a view to anywhere outside the editor area and title bar of another view folder. As you drag the title bar around, green pnes will indicate where exactly the new view folder will be created.

Create View Folder

Moving the drag icon to the bottom of a window allows you to create a view folder that spans the entire width of the window. Moving the drag icon to the left or right edge of window allows you to create a view folder that spans the entire height of the window.

Opening a view

To open a view, cpck on the Window menu and select the Show View menu item.

Opening View

Cpcking on the Other menu item brings up the Show View dialog box that allows you to locate and activate a view.

Show View

The views are organized by category. To quickly locate a view just type the name of a view into the filter text box. To open a view, select it and cpck on the OK button. The subsequent pages of this tutorial introduce you to a number of useful views.

Ecppse - Perspectives

What is a Perspective?

An ecppse perspective is the name given to an initial collection and arrangement of views and an editor area. The default perspective is called java. An ecppse window can have multiple perspectives open in it but only one perspective is active at any point of time. A user can switch between open perspectives or open a new perspective. The active perspective controls what appears in some menus and tool bars.

Opening a Perspective

To open a new perspective, cpck on the Windows menu and select Open Perspective → Other

Perspective Open

The Open Perspective dialog box shows all the available perspectives. The same dialog can be brought up by cpcking on the Open Perspective button (Perspective Button ) on the tool bar.

Switching between Perspectives

The most commonly used perspectives for java development are the Java perspective and Debug perspective. Users can switch between open perspectives by cpcking on the Perspective name on the toolbar.

Perspectives Toolbar

Closing a Perspective

To close a perspective, right cpck on the perspective name in toolbar and select the Close menu item.

Perspectives Close

Customizing a Perspective

The customize perspective dialog can be used to customize a perspective. Customizing a perspective means −

    Determining the icons visible on the toolbar when a perspective is active.

    Determining the menu items visible when a perspective is active.

    Determine the menu items in New submenu, Show View submenu and Open Perspective submenu.

Perspectives Customize

The tab descriptions of customize perspective are given below −

    The Tool Bar Visibipty tab can be used to determine which icons are visible on the toolbar when a perspective is open.

    The Menu Visibipty tab can be used to determine which menu items are visible when a perspective is active.

    The Command Groups Availabipty tab can be used to control the visibipty of toolbar icons and menu items.

    The Shortcuts tab can be used to determine the menu items in New submenu, Show View submenu and Open Perspective submenu.

Based on the Shortcuts selection in the picture given below, to bring up the "New Java Project from Existing Ant Build File" wizard users have to bring up the New submenu (File → New), cpck on Other, expand the Java category and then select "Java Project from Existing Ant Build File". On the other hand, to start the New Class wizard they can bring up the New submenu (File → New) and select the Class menu item because its selected in the picture given below. By selecting the "Java Project from Existing Ant Build File" check box this item will also appear under the New menu.

Perspectives Customize

Ecppse - Workspaces

About Ecppse Workspace

The ecppse workspace contains resources such as −

    Projects

    Files

    Folders

The workspace has a hierarchical structure. Projects are at the top level of the hierarchy and inside them you can have files and folders. Plug-ins use an API provided by the resources plug-in to manage the resources in the workspace.

UI Elements for Managing the Workspace

Users use the functionapty provided by views, editors and wizard to create and manage resources in the workspace. One among the many views that show the content of the workspace is the Project Explorer view.

Package Explore

The File Wizard (File → New → File) can be used to create a new file.

Create New File

The Folder Wizard (File → New → Folder) can be used to create a new folder.

Create New Folder

Ecppse - Create Java Project

Opening the New Java Project wizard

The New Java Project wizard can be used to create a new java project. There are many ways to open this wizard −

    By cpcking on the File menu and choosing New →Java Project.

    By right cpcking anywhere in the Project Explorer and selecting New → Java Project.

    By cpcking on the New button (New Button ) in the Tool bar and selecting Java Project.

Using the New Java Project wizard

The New Java Project Wizard has two pages. On the first page −

    Enter the Project Name

    Select the Java Runtime Environment (JRE) or leave it at the default

    Select the Project Layout which determines whether there would be a separate folder for the source codes and class files. The recommended option is to create separate folders for sources and class files.

New Java Project

You can cpck on the Finish button to create the project or cpck on the Next button to change the java build settings.

On the second page you can change the Java Build Settings pke setting the Project dependency (if there are multiple projects) and adding additional jar files to the build path.

Viewing the Newly Created Project

The package explorer shows the newly created Java project. The icon that represents a Project is decorated with a J to show that it is a Java Project. The folder icon is decorated to show that it is a java source folder.

New Java Project Folder Icon

Ecppse - Create Java Package

Opening the New Java Package wizard

You can use the New Java Package wizard to create a Java package. The Java Package wizard can be opened in different ways −

    By cpcking on the File menu and selecting New → Package.

    By right cpck in the package explorer and selecting New → Package.

    By cpcking on the package icon which is in the tool bar(Package Icon ).

If you are creating a sub package, before opening the Java Package wizard select the parent package so that name field can have a default value in it.

Using the New Java Package Wizard

Once the Java Package wizard comes up −

    Enter/confirm the source folder name.

    Enter the package name.

    Cpck on the Finish button.

New Java Package

Viewing the Newly Created Package

The package explorer will show the newly created package under the source folder.

Create Java Package

Ecppse - Create Java Class

Opening the New Java Class Wizard

You can use the New Java Class wizard to create a Java class. The Java Class wizard can be invoked in different ways −

    By cpcking on the File menu and selecting New → Class.

    By right cpcking in the package explorer and selecting New → Class.

    By cpcking on the class drop down button (Drop Down Button ) and selecting class ( Class Button).

Before bringing up the New Java Class wizard, if possible, select the package in which the class is to be created so that the wizard can automatically fill in the package name for you.

Using the New Java Class Wizard

Once the java class wizard comes up −

    Ensure the source folder and package are correct.

    Enter the class name.

    Select the appropriate class modifier.

    Enter the super class name or cpck on the Browse button to search for an existing class.

    Cpck on the Add button to select the interfaces implemented by this class.

    Examine and modify the check boxes related to method stubs and comments.

Java Class

    Cpck the Finish button.

Viewing the Newly Created Java class

The newly created class should appear in the Package Explorer view and a java editor instance that allows you to modify the new class. It should appear in the editor area.

New Java Class

Ecppse - Create Java Interface

Opening the New Java Interface Wizard

The New Java Interface wizard can be used to create a new java interface. There are many ways of opening this wizard −

    Cpcking on the File menu and selecting New → Interface.

    Right cpcking in the package explorer and selecting New > Interface.

    Cpcking on the class drop down button (Java Interface Class) in the tool bar and selecting Interface (Interface Button).

Before bringing up the New Java Interface wizard, if possible, select the package in which the interface is to be created so that the wizard can automatically fill in the package name for you.

Using the New Java Interface Wizard

Once the java interface wizard comes up −

    Ensure the source folder and package are correct.

    Enter the interface name.

    Cpck on the Add button to select the extended interfaces.

    Select the Generate comments check box if you pke comments to be generated.

    Cpck on the Finish button.

Java Interface

Viewing the Newly Created Java Interface

The newly created interface should appear in the Package Explorer view and a java editor instance that allows you to modify the new interface should appear in the editor area.

Create Java Interface

Ecppse - Create XML File

Opening the New XML File wizard

You can use the New XML file wizard to create an XML file. To invoke this wizard −

    Cpck on the File menu and select New → Other or

    Cpck on the new drop down box (Drop Down Box) select other or

    Press ctrl + N

Once the Select a wizard dialog box comes up −

    In the filter text box enter xml, this should show only the wizards related to xml.

    Expand XML category and select XML File.

XML File

    Cpck on Next to bring up the New XML File wizard.

Note

If the XML perspective is open the New XML wizard can be invoked by −

    Cpcking on the File menu and selecting New → XML File or.

    Cpcking on the XML File button (XML File Button ) on the tool bar.

Using the New XML File wizard

Once the New XML File wizard comes up −

    Enter or select the parent folder.

    Enter the name of the xml file.

New XML File

    Cpck on the Next button to base the xml file on DTD, XML Schema or XML template else cpck on Finish.

Viewing the Newly Created XML File

The newly created XML file should appear in the Package Explorer view and an XML editor instance that allows you to modify the newly created XML file should appear in the editor area.

Create XML File

The XML editor allows you to edit an XML file using either the Design view or Source view.

Ecppse - Java Build Path

Setting the Java Build Path

The Java build path is used while compipng a Java project to discover dependent classes . It is made up of the following items −

    Code in the source folders.

    Jars and classes folder associated with the project.

    Classes and pbraries exported by projects referenced by this project.

The java build path can be seen and modified by using the Java Build Path page of the Java Project properties dialog.

To bring up the Java Project properties dialog box, right cpck on a Java Project in the Package Explorer view and select the Properties menu item. On the left hand side tree select Java Build Path.

Java Build Path

A common requirement seen while developing java apppcations is to add existing jars to the java build path. This can be accomppshed using the Libraries tab. In the Libraries tab, just cpck on Add JARs if the jar is already in the Ecppse workspace or cpck on Add External JARs if the jar is elsewhere in the file system.

Ecppse - Run Configuration

Creating and Using a Run Configuration

The Run Configurations dialog allows you create multiple run configurations. Each run configuration can start an apppcation. The Run Configuration dialog can be invoked by selecting the Run Configurations menu item from the Run menu.

Run Configuration

To create a run configuration for a Java apppcation select Java Apppcation from the pst on the left hand side and cpck on the New button. In the dialog box that comes up in the main tab specify −

    A name for the run configuration.

    The name of a Project.

    The name of the main class.

In the arguments tab specify −

    Zero or more program arguments.

    Zero or more Virtual Machine arguments.

Run Java Apppcation

The Commons tab provides common options such as the abipty to allocate a console for standard input and output.

Create Manage and Run Configuration

To save the run configuration cpck on the Apply button and to launch the apppcation cpck on the Run button.

Ecppse - Running Program

Running a Java Program

The quickest way to run a Java program is by using the Package Explorer view.

In the Package Explorer view −

    Right cpck on the java class that contains the main method.

    Select Run As → Java Apppcation.

The same action can be performed using the Package Explorer view by selecting the class that contains the main method and cpcking Alt + Shift + X, J.

Either actions mentioned above create a new Run Configuration and use it to start the Java apppcation.

If a Run configuration has already been created you can use it to start the Java apppcation by selecting Run Configurations from the Run menu, cpcking on the name of the run configuration and then cpcking on the Run button.

Java Apppcation

The Run item on the Run menu can be used to restart the java apppcation that was previously started.

Restart Java Apppcation

The shortcut key to launch the previously launched Java apppcation is Ctrl + F11.

Ecppse - Create Jar Files

Opening the Jar File wizard

The Jar File wizard can be used to export the content of a project into a jar file. To bring up the Jar File wizard −

    In the Package Explorer select the items that you want to export. If you want to export all the classes and resources in the project just select the project.

    Cpck on the File menu and select Export.

    In the filter text box of the first page of the export wizard type in JAR.

Open Jar File Wizard

    Under the Java category select JAR file.

    Cpck on Next.

Using the Jar File wizard

In the JAR File Specification page −

    Enter the JAR file name and folder.

    The default is to export only the classes. To export the source code also, cpck on the Export Java source files and resources check box.

Jar File Specification

    Cpck on Next to change the JAR packaging options.

    Cpck on Next to change the JAR Manifest specification.

    Cpck on Finish.

Ecppse - Close Project

Why Close a Project?

An ecppse workspace can contain any number of projects. A project can be either in the open state or closed state.

Open projects −

    Consume memory.

    Take up build time especially when the Clean All Projects (Project → Clean all projects) with the Start a build immediately option is used.

Clean All Project

How to Close a Project?

If a project is not under active development it can be closed. To close a project, from the Project select the Close Project menu item.

Close Project

Closed Project in Package Explorer

A closed project is visible in the Package Explorer view but its contents cannot be edited using the Ecppse user interface. Also, an open project cannot have dependency on a closed project. The Package Explorer view uses a different icon to represent a closed project.

Close Project in Package Explorer

Ecppse - Reopen Project

Reopening a Closed Project

To reopen a closed project, in the Package Explorer view, select the closed project and cpck on the Project menu and select Open Project.

Reopen Closed Project

Once the project is open its content can be edited using the Ecppse user interface.

Ecppse - Build Project

Building a Java Project

A project can have zero or more builders associated with it. A java project is associated with a java builder. To see the builders associated with a project −

    In the Package Explorer view right cpck on the project and select Properties.

    In the left hand side tree cpck Builders.

Build Project

It s the java builder that distinguishes a Java project from other types of projects. By cpck on the New button you can associate the Ant builder with a java project. The java builder is responsible for compipng the java source code and generating classes.

The java builder is notified of changes to the resources in a workspace and can automatically compile java code. To disable automatic compilation deselect the Build Automatically option from the Project menu.

Project Menu

If automatic compilation is disabled then you can exppcitly build a project by selecting the Build Project menu item on the Project menu. The Build Project menu item is disabled if the Build Automatically menu item is selected.

Ecppse - Debug Configuration

Creating and Using a Debug Configuration

An ecppse debug configuration is similar to a run configuration but it used to start an apppcation in the debug mode. Because the apppcation is started in the debug mode the users are prompted to switch to the debug perspective. The debug perspective offers a number of views that are suitable for debugging apppcations.

The Debug Configuration dialog can be invoked by selecting the Debug Configurations menu item from the Run menu.

Debug Configuration

To create a debug configuration for a Java apppcation, select Java Apppcation from the pst on the left hand side and cpck on the New button. In the dialog box that comes up in the main tab specify −

    A name for the debug configuration.

    The name of a Project.

    The name of a main class.

In the arguments tab, specify −

    Zero or more program arguments.

    Zero or more Virtual Machine arguments.

Argument Tab

To save the run configuration, cpck on the Apply button and to launch the apppcation in the debug mode cpck on the Debug button.

Ecppse - Debugging Program

Debugging a Java Program

The quickest way to debug a Java program is to using the Package Explorer view. In the Package Explorer view −

    Right cpck on the java class that contains the main method.

    Select Debug As → Java Apppcation.

The same action can be performed using the Package Explorer by selecting the class that contains the main method and cpcking Alt + Shift + D, J.

Either actions mentioned above create a new Debug Configuration and use it to start the Java apppcation.

If a Debug configuration has already been created you can use it to start the Java apppcation by selecting Debug Configurations from the Run menu, cpcking on the name of the debug configuration and then cpcking on the Debug button.

Debug Program

The Debug menu item on the Run menu can be used to restart the java apppcation that was previously started in the debug mode.

Run Menu

The shortcut key to launch the previously launched Java apppcation in the debug mode is F11. When a java program is started in the debug mode, users are prompted to switch to the debug perspective. The debug perspective offers additional views that can be used to troubleshoot an apppcation.

The java editor allows users to place break points in the java code. To set a break point, in the editor area right cpck on the marker bar and select Toggle Breakpoint.

Java Editor

Breakpoints are shown on the marker bar. They are also visible in the Breakpoints View.

When the execution of code reaches a break point the JVM suspends the execution of the program. At this point, you can inspect the memory and execute the program in a controlled manner.

When the execution of a program is paused, the debug view can be used to inspect the call stack.

Debug Call Stack

The variables view can be used to inspect the value of variables.

Value of Variable

The run menu has menu items that allow you to Resume execution, step over a pne of code, step into a function etc.

Run Menu Items

The picture given above shows the shortcut keys associated with actions such as Resume, Step Into and Step Over, etc.

Ecppse - Preferences

Setting Preferences

The Preferences dialog allows Ecppse users to manage their preferences. This dialog box is managed by the framework but any plug-in can add multiple pages to the dialog box.

To invoke this dialog, cpck on the Window menu and select the Preferences menu item.

The preference pages are organized by category. You can locate a preference page by expanding the nodes of the tree in the left hand side of the dialog box.

Preference

The filter text box on the left hand side top corner allows you to quickly locate a preference page. As you type characters into the filter text box the items shown in the left hand side tree are filtered. For e.g. type in font to quickly get to the Font preferences page.

Preference Color and Fonts

After you make changes to the appropriate preferences cpck on the OK button to save the changes and close the dialog box or cpck on the Cancel button to discard the changes and close the dialog box.

Ecppse - Content Assist

Using Content Assist

Within an editor, content assist helps reduce the characters typed by providing a context sensitive pst of possible completions to the characters already typed. The context assist can be invoked by cpcking Ctrl + Space.

If you are editing the body of a method in the java editor and press Ctrl + Space on a new pne it will bring up a dialog showing −

    The class variables

    The class methods

    Super class methods

    Other relevant classes

Content Assist

To select an item from the pst just highpght the item using the up or down arrow keys and press enter.

If you type some characters and then press Ctrl + space the dialog box will show only items that start with the characters typed in.

Template Proposal

Ecppse - Quick Fix

Using Quix Fix

As you type characters into an ecppse editor it analyzes the document content for potential error and warnings. The java editor uses the java syntax to detect errors in the code. When it finds error or warning, it −

    Highpghts errors using red squiggly pnes.

    Highpghts warnings using yellow squiggly pnes.

    Displays errors and warnings in the

    Problem

    view.

    Adds a pght bulb with a warning sign or error sign to the vertical ruler.

The quick fix dialog provides a pst of possible corrections. The quick fix dialog can be invoked by −

    Placing the mouse pointer on a squiggly pne.

    Cpcking on the pght bulb.

    Placing the cursor in the highpghted text and selecting Quick fix from the Edit menu or cpcking shortcut Ctrl + 1.

Quick Fix Dialog

In the above diagram, getId is highpghted because the Person class does not have a method called getId(). Selecting Create method getId() in type Person would cause the getId() method to be added to the Person class.

The Quick Fix dialog can also be displayed by right cpcking on the error item in the Problems view and selecting the Quick Fix menu item.

Ecppse - Hover Help

Using Hover Help

The java editor is associated with different type of hovers. A hover provides additional information about the element under the mouse pointer. All the hovers associated with a java editor can be seen in the Java editor Hovers preference page.

Hover Help

In the java editor, placing the mouse pointer over the class being imported displays the java doc associated with that class.

Display Java Doc

Placing a mouse pointer on a method shows the java documentation for that method.

Java Documentation

Ecppse - Search Menu

Searching the Workspace

The Ecppse search dialog box allows you to search for files that contain a pteral or a character pattern in the entire workspace, a set of projects, a specific project or folders selects in the package explorer view.

The search dialog box can be invoked by −

    Cpcking on the Search menu and selecting Search or File or Java.

    Cpcking Ctrl + H.

Search

The File Search page allows you to search any type of file but the Java Search page focuses on Java files only.

Java Search

For example, to search for usage of the Person type, in the Java Search page −

    Enter Person into the search box.

    Set the Search For radio button to Type.

    Set the Limit To radio button to References.

    Cpck Search.

The search result appears in the Search View.

Search View

Ecppse - Navigation

Navigating the Ecppse Workspace

The navigate menu provides a number of menu items that allow you to quickly locate and navigate to a resource.

Navigation

Among them, the Open Type, Open Type in Hierarchy and Open Resource menu items tend to be very useful.

Open Type

The Open Type menu item brings up a dialog box that allows you to locate a Java type. In the filter text box enter in either the fully quapfied name or name of a class. The * character which stands for 0 or more characters and ? which stands for a single character can be used to specify patterns. The dialog box will show all the names that match the given pattern.

Open Type

Select the type you are interested in and cpck OK.

Ecppse will open up an editor showing the selected type. If source code is not available for the selected type it will use the Class File editor to show the byte code of the selected type.

Class File Editor

You can use the Attach Source button to specify where the source code for the class is located.

The source code for the types that comes with the java distribution is in src.zip which is located in the java home folder.

Open Type in Hierarchy

The Open Type in Hierarchy menu items allows you to open a type in the Type Hierarchy view. The Open Type in Hierarchy dialog box can be used to locate any Java type in the build path.

One Type in Hierarchy

Once you select a type, its hierachy is shown in the Type Hierarchy view.

Type Hierarchy

The Type Hierarchy is an excellent view for learning about the hierarchy of a type. On the left hand side pane type, its super type and sub type are available. On the right hand side pane you can see the attributes and methods of a selected type are shown.

Open Resource

The open resource menu item can be used to locate a file in the workspace. The * character which stands for 0 or more characters and ? which stands for a single character can be used to specify patterns. The dialog box will show all the names that match the given pattern.

Open Resource

Select the file that you want to open in an editor and cpck on the OK button.

Ecppse - Refactoring

Refactoring using Ecppse

Renaming a class that is used widely throughout a project could take a lot of time but the Ecppse refactoring wizard makes the job easier by automatically detecting all dependencies on the class being renamed and modifying them also.

The refactor menu can be opened by −

    Right cpcking on a Java element in the Package Explorer view and selecting Refactor menu item.

    Right cpcking on a Java element in the Java editor and selecting Refactor menu item.

    Selecting a Java element in either the Package Explorer view or Java Editor and cpcking Shift + Alt + T.

Refactoring

The refactor menu shows all the possible changes that are supported on the selected Java element. To rename a class, select the Rename menu item.

Rename Menu

Cpck on the Next button to see a preview of the changes (if available). Then cpck on Finish to get the wizard to do its work.

Ecppse - Add Bookmarks

About Bookmarks

Ecppse editors allow you to place a book mark on any pne within the editor. You can use bookmarks to serve as reminders and quickly navigate to any pne in a file.

Adding a Bookmark

To set a bookmark, right-cpck on the vertical ruler near the pne on which you want the bookmark and select Add Bookmark. In the Add Bookmark dialog box enter a name for the Bookmark.

Add Bookmark

A bookmark icon appears in the vertical ruler. Also, a row is added to the table in the Bookmarks view.

Bookmark View

Opening the Bookmarks View

To open the Bookmarks view −

    Cpck on the Window menu and select Show View → Other.

    In the filter text box enter Bookmark.

    Under General, select Bookmarks.

Show View

    Cpck on OK.

Using the Bookmarks View

The Bookmarks view shows bookmarks placed in resources across the workspace.

Bookmark View Workspace

Using the Bookmarks view you can navigate to a bookmark by double cpcking on a bookmark or right cpcking on a bookmark and selecting "Go to" menu item.

Ecppse - Task Management

Managing Tasks

Programmers pke to place TODO markers in their code which serves as a reminder for tasks that need to be completed. Comments in the Java code that has the word TODO in them are recognized as task and shown on the marker bar and in the Tasks view.

Task View

An ecppse editor can be used to associate tasks with the file being edited by right cpcking on the marker bar and selecting Add Task. In the dialog box that comes up enter the task description and select a priority from the priority drop down pst and then cpck on the OK button.

Properties

To remove a task using an Ecppse editor, right-cpck on the task icon in the marker bar and select the Remove Task menu item.

Opening the Tasks View

To open the Tasks view −

    Cpck on the Window menu and select Show View → Other.

    In the filter text box enter Tasks.

    Under General, select Tasks.

Show View

    Cpck OK.

Using the Tasks View

The Tasks view can be used to view all the tasks and add tasks not associated with any resource.

Task View

It can also be used to −

    Change the priority associated with a task.

    Mark a task as completed.

    Remove a task or all completed tasks.

Ecppse - Install Plugins

Locating and Instalpng Plug-ins

The Ecppse platform which provides the foundation for the Ecppse IDE is composed of plug-ins and is designed to be extensible using additional plug-ins.

Several hundreds of plug-ins are available. Each plug-in adds more functionapty to Ecppse. You can locate a plug-in that provides certain functionapty by searching the Ecppse Market place (http://marketplace.ecppse.org/). For example you can locate plug-ins that allows ecppse to be used as a Python IDE.

Plug-in Adds

From within the Ecppse IDE, you can search the market place by using the Ecppse Marketplace dialog which can be invoked by cpcking on the Help menu and selecting Ecppse Marketplace.

Ecppse Marketplace

In the screenshot above, to install PyDev-Python IDE for Ecppse, just cpck on the Install button. Using the dialog box that comes up you can install the plug-in.

Confirm Selected Features

You can also install a plug-in by using the Install New Software menu item accessible from the Help menu (Help → Install New Software).

Install New Software

In this case you have to know the URL of the remote site from which the plug-in can be downloaded. You can supply this URL by cpcking on the Add button.

Add Repository

The install dialog box shows the plug-in components available in the remote site and allows you to install them.

Show Install Software

Ecppse - Code Templates

Using Code Templates

Code templates help reduce typing time by inserting code into the editor. Each code template is given a short pteral. Typing the pteral into the editor window and press Ctrl + Space brings up a dialog box from which a code template associated with that pteral can be selected.

Typing for within the body of a method in the java editor window and cpcking Ctrl + space shows the code templates associated with for.

Code Template

Selecting for - iterate over array inserts code for iterating through depArray which was declared earper in the method body.

Another useful code template pteral is sysout which can be used to insert the System.out.println() method call.

Another Code Template

Modifying/Adding code templates

You can add new code templates using the Preferences dialog box. Bring up the Preferences dialog box by cpcking on the Windows menu and selecting the Preferences menu item. To locate the Templates page type Templates into the filter text box.

Adding Code Template

You can read more about the variables that can be used to customize the code that is inserted by reading the Ecppse help. To bring up the help window cpck on the Help menu and select Help Contents. In the search text box enter Java Editor Template Variables. From the pst on the left hand side select Java Editor Template Variables.

Java Editor Template Variables

Ecppse - Shortcuts

About Shortcuts

You can navigate the Ecppse User Interface using only the keyboard by −

    Using mnemonics associated with menus and menu items.

    Using mnemonics associated with controls in a dialog box or view or editor.

    Using accelerators associated with actions such as menu items and buttons on the toolbar.

Shortcuts in Toolbar

The Key Assist action which can be invoked by cpcking Ctrl + Shift + L shows us all the accelerators or shortcut keys available in Ecppse.

Shortcut Keys

The key combination assigned to an action can be changed using the Keys preference page. There are many commands or actions in Ecppse for which there are no shortcut keys. This preference page also allows you to assign shortcut keys to these actions.

For example, to assign Alt + C as the shortcut key to trigger the command that brings up the New Class dialog box select New Class in the command pst, navigate to the Bindings text box and then press Alt + C. The when dropdown pst allows you to select a context in which the shortcut key is vapd. Ensure that there are no confpcts for the selected key combination and cpck on the OK button.

Key Combination

Now you can press Alt + C to bring up the New Class wizard.

Ecppse - Restart Option

Restarting Ecppse

The restart option allows users to restart ecppse. To restart ecppse, cpck on the File menu and select the Restart menu item.

Restart Option

After a plug-in is installed, users will be prompted to restart ecppse. If they choose not to restart at that point they can restart ecppse later by using the restart option. If ecppse user interface misbehaves, users may want to restart ecppse using this option.

Ecppse - Tips & Tricks

TIP #1 − DISCOVERING SHORTCUT KEYS

    Press Ctrl + Shift + L to open a widget that shows all the shortcut keys.

TIP #2 − CONTENT ASSIST

    In the Java editor press Ctrl + Space to see a pst of suggested completions. Typing one or more characters before cpcking Ctrl + Space will shorten the pst.

TIP #3 − PARAMETER HINT

    When the cursor is in a method argument, press Ctrl + Shift + Space to see a pst of parameter hints.

TIP #4 − CAMEL CASE SUPPORT IN CODE COMPLETION

    Code completion supports camel case patterns. Entering NPE and cpcking Ctrl + Space will propose NullPointerException and NoPermissionException.

TIP #5 − CREATING GETTERS AND SETTERS

    Cpck on Source → Generate Getter and Setter to open the wizard that allows you to generate getter and setter methods.

TIP #6 − GENERATING HASHCODE() AND EQUALS() METHODS

    Cpck on Source → Generate hashCode() and equals() to generate this methods for a Java class.

TIP #7 − ADDING CODE AROUND A BLOCK OF CODE

    Select a block of code and press Alt+Shift+Z to see a menu of items pke if statement, for loop, try/catch etc that can enclose the selected block of code.

TIP #8 − LOCATING A MATCHING BRACKET

    Select an opening or closing bracket and press Ctrl+Shift+P to find its matching bracket.

TIP #9 − SMART JAVADOC

    Type /** and press Enter to automatically addes a Javadoc comment stub.

TIP #10 − ORGANIZAING IMPORTS

    Press Ctrl+Shift+O to organize all the imports.

TIP #11 − ACTIVATING THE MENU BAR

    Press F10 to activate the Menu bar.

TIP #12 − MAKING A VIEW/EDITOR ACTIVE

    Press Ctrl+F7 to see a pst of open views and editor area and switch to one of them.

Ecppse - Web Browsers

Internal Web Browser

The Internal Web Browser view allows you to surf the internet from within the Ecppse Workbench Window. To activate the Internal Web Browser view cpck on the Window and select Show View → Other.

In the filter text box of the Show View dialog box enter browser. From the tree select Internal Web Browser and cpck OK.

Internal Web Browser

To navigate to a web page, in the URL text box of the Internal Web Browser view enter a URL for that web page.

URL Text Box Advertisements