Sei sulla pagina 1di 8

ECLIPSE

Eclipse is an ​integrated development environment (IDE) used in ​computer programming​, and in


2014 was the most widely used Java IDE in one website's poll.​[6] It contains a base ​workspace
and an extensible ​plug-in system for customizing the environment. Eclipse is written mostly in
Java and its primary use is for developing Java applications, but it may also be used to develop
applications in other ​programming languages via plug-ins, including ​Ada​, ​ABAP​, ​C​, ​C++​, ​C#​,
Clojure​, ​COBOL​, ​D​, ​Erlang​, ​Fortran​, ​Groovy​, ​Haskell​, ​JavaScript​, ​Julia​,[7]
​ ​Lasso​, ​Lua​,
NATURAL​, ​Perl​, ​PHP​, ​Prolog​, ​Python​, ​R​, ​Ruby (including ​Ruby on Rails framework), ​Rust​,
Scala​, and ​Scheme​. It can also be used to develop documents with ​LaTeX (via a TeXlipse
plug-in) and packages for the software ​Mathematica​. Development environments include the
Eclipse Java development tools (JDT) for Java and Scala, Eclipse CDT for C/C++, and Eclipse
PDT for PHP, among others.

Eclipse Versions -
The various versions are:

● Eclipse 1.0 (November 7, 2001): based on an earlier Java IDE called VisualAge from
IBM.
● Eclipse 2.0 (June 28, 2002)
● Eclipse 2.1 (March 28, 2003)
● Eclipse 3.0 (June 25, 2004)
● Eclipse 3.1 (June 28, 2005)
● Eclipse 3.2 (June 30, 2006) (Callisto - named after one of the Jupiter's Galilean
moons): started annual simultaneous release of all the related Eclipse projects.
● Eclipse 3.3 (June 25, 2007) (Europa - named after another Jupiter's Galilean moons)
● Eclipse 3.4 (June 19, 2008) (Ganymede - named after yet another Jupiter's Galilean
moons)
● Eclipse 3.5 (June 12, 2009) (Galileo - named after the great 17th century scientist and
astronomer Galileo Galilei)
● Eclipse 3.6 (June 23, 2010) (Helios - named after god of the sun in Greek
Mythology)
● Eclipse 3.7 (June 23, 2011) (Indigo)
● Eclipse 4.2 (June 27, 2012) (Juno)
● Eclipse 4.3 (June 2013) (Kepler)
● Eclipse 4.4 (June 2014) (Luna)
● Eclipse 4.5 (June 2015) (Mars)
● Eclipse 4.6 (June 2016) (Neon)
● Eclipse 4.7 (June 2017) (Oxygen)
● Eclipse 4.8 (June 2018) (Photon)
● Eclipse 2018-09 (4.9)
● Eclipse 2018-12 (4.10)

Evolution of Eclipse IDE -


History :- ​Eclipse was originally started by IBM in the late 1990s in response to the need for a
common development platform for all IBM products. IBM realized the value of having a
complete set of tools in one environment or” workbench” that would work seamlessly together.
This ​integrated development environment​(IDE) allowed customers to work in, and build custom
development and application environments, respectively.In 2001, to facilitate developer adoption
of the IDE, IBM decided to provide Eclipse with an open-source, royalty-free license. This
allowed companies to use and include Eclipse in their own commercial products. ​The Eclipse
Foundation was formed with the support of industry leaders like Borland, IBM, MERANT, QNX
Software Systems, Rational Software, Red Hat, SuSE, TogetherSoft, and Webgain. This led to
more commitments to support and use Eclipse to develop commercial products. The founding
Strategic Developers and Strategic Consumers were Ericsson, HP, IBM, Intel, MontaVista
Software, QNX, SAP, and Serena Software.

The foundation eventually established itself as a not-for-profit organization with its main goals to
guide, implement, and share the development of open source Eclipse projects in a vendor-neutral
environment. Skip McGaughey, spokesperson for Eclipse, said that this move would “create
long-term opportunities for reuse, interoperation and innovation that enable both providers and
consumers to take development tool technology to the next level in functionality, integration and
usability.”

Eclipse Today :- ​Eclipse has proven to be a stable and mature development platform. It is
widely used among commercial companies to create powerful applications — not only for
software development, but for diverse industries such as banking, automotive, medical and space
exploration.

Eclipse maximizes developer productivity because it provides the framework applications need
for development, debugging, and deployment.

The full Eclipse Software Development Kit (SDK) includes Eclipse projects (specifically the
Platform), the Java Development Tools (JDT), and the Plug-in Development Environment
(PDE).
Because it is written in Java, Eclipse supports most platforms and operating systems. However,
Eclipse is not limited to Java; it supports several languages by adding those specific plug-in
components.

Eclipse itself was designed as a collection of components for extensibility. Besides the platform
runtime kernel, nothing else is hard coded and all of the functionality is provided by plug-ins. All
plug-ins are required to be developed under the OSGi framework implementation called
Equinox, which provides a standardized environment for integrating existing code.

Although a lot of generic functionality is built into Eclipse, there is also an extensive list of
plug-ins a customer can leverage, such as the Team Support features and Source Code Control
options, which allow the developer to customize their environment and facilitate the
development of new tools. For example, for an organization developing a new application, the
Eclipse platform provides a central integration point for the application and can be split up into
several development components within the organization that make the development of
large-scale applications much easier.

Downloading Eclipse-
You can download eclipse from ​http://www.eclipse.org/downloads/​. The download
page lists a number of flavors of eclipse.

Installation of Eclipse on Windows -


Step 0: Install JDK
To use Eclipse for Java programming, you need to first install Java Development Kit (JDK).
Read "​How to Install JDK for Windows​".

Step 1: Download
Download Eclipse from ​https://www.eclipse.org/downloads​. Under "Get Eclipse IDE 2018-12"
⇒ Click "Download Packages". For beginners, choose the "Eclipse IDE for Java Developers"
and "Windows 64-bit" (e.g., "eclipse-java-2018-12-R-win32-x86_64.zip" - about 184MB) ⇒
Download.

Step 2: Unzip
To install Eclipse, simply unzip the downloaded file into a directory of your choice (e.g.,
"c:\myproject").
I prefer the zip version, because there is no need to run any installer. Moreover, you can simply
delete the entire Eclipse directory when it is no longer needed (without running any un-installer).
You are free to move or rename the directory. You can install (unzip) multiple copies of Eclipse
in the same machine.

Launching Eclipse IDE -


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

When eclipse 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.

Parts of an Eclipse Window

The major visible parts of an eclipse window are −

● Views
● Editors (all appear in one editor area)
● Menu Bar
● Toolbar

Importing
This page will show you how to Import the following items:

● Importing a file​ into an existing Project


● Importing an Eclipse Project
● Importing an archived Eclipse Project​, when you want to open an existing project
which has been archived into a .jar file.
● Importing an archived file​, when you want to import an archived file into an existing
Project.

Importing an Eclipse Project -

Suppose you have already created an Eclipse project, and you want to import the project into
Eclipse.
1. Open ​File->Import
2. Select "Existing Projects into Workspace" from the Selection Wizard

3. Select ​Next​ to get the Import Wizard. Browse to find the location of the Project

4. Make sure the Project you want is checked, then hit ​Finish​.

Importing a Project as a Jar file -


jar is a JDK tool for archiving a set of files in a directory so they are stored as a single file. This
is very convenient for copying these files. Since a Java program typically contains many files
(one for each class), they are typically archived. An archived file contains the suffix ​.jar.​ In this
example, we will import a Project which has been archived, ​Welcome.jar​.

1. Open ​File->Import
2. Select "Existing Projects into Workspace" from the Selection Wizard

3. Select ​Next to get the Import Wizard. Check "Select archive file" and Browse to find the
location of the Project

4. Make sure the Project you want is checked, then hit ​Finish​. You will find the Project
unarchived and ready for you

Importing an archived file into an existing project -


jar is a JDK tool for archiving a set of files in a directory so they are stored as a single file. This
is very convenient for copying these files. Since a Java program typically contains many files
(one for each class), they are typically archived. An archived file contains the suffix ​.jar.​ In this
section we will import a file into an existing project.

1. Open ​File->Import
2. Select "Archive File" from the Selection Wizard

3. Select ​Next to get the Import Wizard. Browse to find the location of the file. Since it is an
archived file, it will contain several Java class files. The file ​META-INF was created by
the ​jar​ program. Select the entire directory

4. Select ​Finish​. You will see a new package (in this case called ​Pizza)​

5. A ​package is just a directory of Java classes which have been packaged together into a
single file. You must include the Java declaration package Pizza; in each class, so the
Java compiler knows where to find the class. Here is an example form one of the classes
Proxy entries -
When using ​Manual proxy provider there are three predefined schemas to set settings for:
HTTP, HTTPS and SOCKS. Configuration for each schema is displayed in the ​Proxy entries
table. To edit settings for a particular schema double-click the entry or select the entry and click
Edit... button. If ​Port field is left blank default port number will be used. Following table lists
default port numbers for each of the predefined schemas.

Connecting to database using eclipse -


The steps are as follows,

Step 1:

Open Eclipse IDE and Select Database Perspective (​Windows >> Open Perspective >> Other)​ .

Eclipse IDE would look like below.

​Step 2:

Create Connection Profile: Here we will create profile for connecting to ​DB​.

Method 1:​ Right click on “​Database Connections”​ and click ​New.

Method 2: ​Click on​ “​New Connection Profile”​ ​button in “​Data Source Explorer”​ view.

Step 3:

Select DB (Oracle in this case) to connect from popup window. And provide connection profile
name (JBT in this case).

Click Next. In next screen provide DB connection details as shown below.

Once provide you can check if connection to DB is successful or not by clicking “​Test
Connection​” button as shown above.

If everything is fine it should show Ping Succeed popup window as below. If not then check
connection related details.

After providing the connection related details click Finish. If everything is fine then a new
Connection profile named ​JBT​ will be created in Data Source Explorer view as show below.

Step 4: Execute Query

Here we will learn to execute query to DB and see the DB results. To execute a query you will
require “​SQL Scrapbook“​ .

To open SQL scrapbook click scrapbook button on top.


It will open new SQL scrap book, from there you can execute sql query. To view the result of the
query fired you will require “​SQL Results”​ view which can be opened from ​Windows >> Show
View >> Other.​

Keyboard shortcuts for executing query.

● Execute All : ​CTRL+ALT+X


● Execute Selected Text : ​ALT+X
● Execute Selected Text as one statement : ​ALT+C

Step 6: Execution Plan

Execution plan of the query can also be checked via Eclipse IDE. To view Execution plan
“​Execution Plan”​ view needs to be opened. Eclipse IDE can show execution plan in two ways.

1. Text Explain Plan


2. Graphic Explain Plan

Text Explain Plan

Select the query and right click and select “​Execute Text Explain Plan​” menu. It will display
explain plan as shown below.

Graphic Explain Plan

Select the query and right click and select “​Execute Graphic Explain Plan​” menu. It will
display explain plan as shown below.

Advantages of Eclipse

● Code Completion​, instead of digging through documentation you should be able to tab
your way through methods and save yourself a lot of writing
● Refactoring​, Global Find and Replace is no replacement for good refactoring support,
that starts with renaming functions, variables, classes, ... and ends with some of the
functionality that you can find in current Java IDE
● Syntax Checking​, helping you out with writing correct code while you type
● Free and Open Source
● Most used Java IDE
● Can be used to develop applications in other languages such as C++, Ruby, HTML5,
PHP, etc
● Rich Client Platform
● Refactoring
● Code Completion
● Extensions and Plugins
● Tools

D​isadvantages of Eclipse
Be careful of some of the pitfalls of using an IDE as it may not be ideal for everyone and might
not be suitable in every situation.

1. ​Learning curve​:

​IDEs are complicated tools. Maximizing their benefit will require time and patience.
2. A sophisticated IDE may not be a good tool for beginning programmers:

3. Will not fix bad code, practices, or design

Potrebbero piacerti anche