Technical Articles
Portal Home  |  Outer Space  |  SankhyaTechnologiesHome  |  Publish (Secure)  |  Create

Close

Please submit the following details. This information will be displayed on your site. Items marked * are required.

Contact Information                        Bill To: Check Here if same as Contact Information
*Name :
*Organization :
*Address :
*City :
*Country :
*Phone :
*Email ID:
  
*Business Title :
About Us :
*Name :
*Organization :
*Address :
*City :
*Country :
*Phone :
*Email ID:
  
SignUp Fees : Rupees Dollars
Signup Fee:
Annual Charges :
Signup Fee:
Annual Charges :
Enter Coupon :   
I authorize you to bill me to the above address and mail the subscription details. I accept the Terms and Conditions of hamara.in.

Hamara Spaces - SankhyaTechnologies- TechnicalArticles

tweet this    share this      

ActivityMonitoringAnalysis
ApplicationChain
CInputOutputLibrary
DistributedFaultTolerance
DynamicProgramming
EclipseUMLConcepts
GridComputing
L01SmartSitePublishing
L02SmartSitePublishing
L03SmartSitePublishing
L04SmartSitePublishing
LinuxResources
ModelDrivenTransformation
ObjectFileFormat
ProcessDocumentation
ProductDataManagement
SoftwareDebugging_1
SoftwareDebugging_2
WhatIsCORBA
AutovalTraining.pdf
IAmALightPole.pdf
stf-r-abstraction.pdf

Eclipse IDE and UML2 Getting Started Guide

CONTENTS

  1. Introduction to Eclipse Platform
  2. System Requirements
  3. Installation
    1. Installing Eclipse
      1. Installing Eclipse on Linux
      2. Installing Eclipse on Windows
    2. Installing UML2 Plug-in
      1. Installing UML2 Plug-in on Linux
      2. Installing UML2 Plug-in on Windows
  4. Getting Started
    1. Pre-requisites
    2. Using Eclipse
    3. Sample Example
    4. Some Samples
    5. Code Generation

1. Introduction to Eclipse Platform

The Eclipse Platform is an open source, extensible Integrated Development Environment (IDE). It provides the framework using which different software development tools can be integrated under a single environment. For example, a compiler, debugger and simulator can be integrated to provide an IDE using which, progr- ams can be compiled and debugged. The Eclipse project provides a Plug-in Development Environment (PDE). Plug-ins are modules which extend the Eclipse Platform to provide specific functionality. These can be seamlessly integrated to Eclipse at run-time.

The UML2 plug-in provides an implementation of the Unified Model- ing Language (UML) 2.0 metamodel for the Eclipse platform. It is based on the Eclipse Modeling Framework (EMF). The UML2 plug-in allows specification of a system using UML and to convert the UML model into program code.

2. System Requirements

Hardware:
  • Intel Pentium IV processor based PC
  • 256 MB RAM
  • 40 GB Hard Disk
  • CD-ROM drive
Software:
  • Windows NT/XP/2000 or Red Hat Linux ES Release 3
  • Java Runtime Environment v1.4.2 or higher

3. Installation

3.1 Installing Eclipse

The following sections explain the steps involved in installing Eclipse on Linux and Windows.

3.1.1 Installing Eclipse on Linux

This section shows how to install Eclipse on Linux.

Step #1
Insert the Eclipse CD in the drive

Step #2
Mount the cdrom using the following command

Note: you may require super-user permissions to do this.
% mount /mnt/cdrom

Step #3
Copy the eclipse zip file under /tmp directory.
% cp /mnt/cdrom/eclipse-SDK-3.0.1-linux-motif.zip /tmp

Step #4
Unzip the Eclipse SDK file "eclipse-SDK-3.0.1-linux-motif.zip" into a directory [INSTALL-DIR]
% cd [INSTALL-DIR]
% unzip /tmp/eclipse-SDK-3.0.1-linux-motif.zip
Here [INSTALL-DIR] is the location, where you want to install Eclipse IDE Platform.

Step #5
Remove the zip files from /tmp directory.
% rm /tmp/eclipse-SDK-3.0.1-linux-motif.zip

3.1.2 Installing Eclipse on Windows

Please follow these steps to install Eclipse on Windows.

Step #1
Insert the Eclipse CD in the CD drive.

Step #2
Unzip the eclipse zip file.
> cd [INSTALL_DIR]
> unzip [CD DRIVE]/eclipse-SDK-3.0.1-win32.zip
Here [INSTALL_DIR] is the location, where you want to install Eclipse IDE Platform.

Note: The above unzip command comes with cygwin. If the cygwin has not been installed, then install cygwin and include its bin location in the path environment variable.
ex : path=[cygwin loc]\bin;%path%

Another alternative is install WinZIP utility, double click the above zip file and select the [INSTALL_DIR] in the WinZIP wizard.

Now Eclipse is available under [INSTALL-DIR]/eclipse/ directory.

3.2 Installing UML2 Plug-in

This section describes the installation of the Eclipse UML2 plug-in on the Linux/Windows platform.

3.2.1 Installing UML2 Plug-in on Linux

Please follow the below steps to install UML2 Plug-in.

Step #1
Insert the CD containing the UML2 Plugin in the CD drive.

Step #2
Mount the CD drive (if not already mounted) using the following command.

Note: you may require super-user permissions to do this.
% mount /mnt/cdrom

Step #3
Copy EMF and UML zip files under /tmp directory.
% cp /mnt/cdrom/emf-sdo-runtime-2.0.1.zip /tmp
% cp /mnt/cdrom/uml2-SDK-1.1M2.zip /tmp

Step #4
Unzip emf-sdo-runtime-2.0.1.zip and uml2-SDK-1.1M2.zip files into [INSTALL-DIR]/eclipse directory.

Here [INSTALL-DIR] is the directory where Eclipse is installed.
% cd $INSTALL-DIR
% unzip /tmp/emf-sdo-runtime-2.0.1.zip
% unzip /tmp/uml2-SDK-1.1M2.zip

Step #5
Remove the zip files from /tmp directory.
% rm /tmp/emf-sdo-runtime-2.0.1.zip
% rm /tmp/uml2-SDK-1.1M2.zip

3.2.2 Installing UML2 Plug-in on Windows

Please follow the below steps to install UML2 Plug-in on Windows.

Step #1
Insert the UML Plugin CD in the CD drive.

Step #2
Unzip emf-sdo-runtime-2.0.1.zip and uml2-SDK-1.1M2.zip files into [INSTALL-DIR]/eclipse directory.

Here [INSTALL-DIR] is the directory where Eclipse is installed.
% cd [INSTALL-DIR]
% unzip /[CD drive]/emf-sdo-runtime-2.0.1.zip
% unzip /[CD drive]/uml2-SDK-1.1M2.zip

To verify that the UML plugin has been installed successfully, run "eclipse" program from the install directory.Then perform the following steps:
a. Click on Help -> About Eclipse Platform.
b. Click on the Plug-In Details button.
c. Check the emf and uml plug-ins.

4. Getting Started

4.1 Pre-requisites

To use Eclipse, Java Run-time Environment (JRE) must be installed on the system. JRE can be obtained from Sun Microsystems website:
http://java.sun.com/j2se/1.5.0/download.jsp.
From this site, either SDK or the JRE can be down-loaded. Eclipse (v3.0) requires JRE 1.4.2 or higher.

4.2 Using Eclipse


Steps to start Eclipse IDE on Linux:

Step #1
Set the JRE binary directory to the PATH environment var.
% setenv PATH [JRE]/bin:$PATH
Here [JRE] is the location where Java virtual machine is installed.

Step #2
Set the eclipse library path.
% setenv LD_LIBRARY_PATH [INSTALL-DIR]/eclipse:$LD_LIBRARY_PATH

Step #3
Invoke the eclipse program.
% eclipse

Steps to start Eclipse IDE on Windows:

Step #1
Set the JRE binary directory to the PATH environment var.
> PATH=[JRE]/bin;%PATH%
Here [JRE] is the location where Java virtual machine is installed.

Step #2
Invoke the eclipse program.
> cd [INSTALL_DIR]/eclipse
> eclipse
After invoking "eclipse" program, Workbench is launched.

The Workbench
When the Workbench is launched, a dialog is displayed allowing the user to select workspace location. The workspace is the repo- sitory where all the work will be stored. The button, OK, can be selected for the default location.

After the workspace location is chosen, a single Workbench window is displayed. A Workbench window offers one or more perspectives. A perspective contains editors and views, such as the Navigator. Multiple Workbench windows can be opened simultaneously. Initially, in the first Workbench window that is opened, the Resource perspective is displayed.

A shortcut bar appears in the top right corner of the window. This allows the user to open new perspectives and switch between ones already open. The name of the active perspective is shown in the title of the window and its item in the shortcut bar is highlighted.

The title bar of the Workbench window indicates which perspective is active.

Editors and views

A Workbench consists of:

  • perspectives
  • views
  • editors
A perspective is a group of views and editors in the Workbench window. One or more perspectives can exist in a single Workbench window. Each perspective contains one or more views and editors. Within a window, each perspective may have a different set of views but all perspectives share the same set of editors. A view is a visual component within the Workbench.

Editors
Depending on the type of file that is being editing, the appropriate editor is displayed. For example, if a .txt file is being edited, a text editor is displayed in the editor area. The name of file appears in the tab of the editor.

Views
A view can be displayed by selecting it from the Window -> Show View menu. A perspective determines which views may be required and displays these on the Show View submenu. Additional views are available by choosing Other... at the bottom of the Show View submenu.

4.3 Sample Example

Please refer "Getting Started with UML2" in the below site.
http://www.eclipse.org/uml2/

4.4 Some Samples


This section explains the necessary steps to create Use Cases, Actors, Include relation, ans Extend relations. Other UML compon- ents can be created in the similar way.

Steps to create Use Cases :
  1. Select the Model in the UML2 editor.
  2. Right-click and select the New Child -> Owned Member Use Case option from the context menu.
  3. Enter a value for the "Name" property in the "Properties" view.
Steps to create Actors :
  1. Select the Model in the UML2 editor.
  2. Right-click and select the New Child -> Owned Member Actor option from the context menu.
  3. Enter a value for the "Name" property in the "Properties" view.
  4. Select value(s) for the "Use Case" property in the "Properties" view.
Steps to specify "include" relation :
  1. Select the Use Case in the UML2 editor.
  2. Right-click and select the New Child -> include
  3. Enter values for "Name" and "Addition" properties in the "Properties" view.
Steps to specify "extend" relation :
  1. Select the Use Case in the UML2 editor.
  2. Right-click and select New Child -> extend
  3. Enter values for "Name" and "Extended Case" properties in the "Properties" view.
In the same way Activity, Collaboration, State Machine, Interact- ion and Information flow, etc can be created.

4.5 Code Generation

Java Source code can be generated from the model file (*.uml2).

The UML2 API does not directly support code generation. This can be done through import wizard.

Steps to Generate Java Source Code:

  1. Select File -> Import
  2. Choose "UML2 to Ecore" and click on "Next" button
  3. Specify the folder and select the *.uml2 file.
  4. Select "Into folder"
  5. Click on "Finish" button [ *.ecore file is generated. ]
  6. Select File -> New -> Other
  7. Expand "Eclipse Modeling Framework"
  8. Select "EMF Models" and click on "Next"
  9. Select the parent folder and click on "Next"
  10. Select "Load from an EMF code model" and click on "Next"
  11. Select the appropriate *.ecore file by clicking on "Browse Workspace" button. and click on "Next" button
  12. Select the packages
  13. Click on "Finish" button.
  14. Select Generator -> Generate Model Core [ src folder is created under the project directory and it contains all *.java files ]


(C) Copyright 2005 Sankhya Technologies Private Limited

SANKHYA, SANKHYA TECHNOLOGIES, and SANKHYA Software are Trademarks, Service Marks or Registered Trademarks of Sankhya Technologies Private Limited. All other brands and names are the property of their respective owners.


Published On : .

Content published for public or private access is the sole responsibility of the person who originated such Content. Hamara may not monitor or control or endorse the Content published in the space or the channels and cannot take any responsibility for such Content. Please read the terms & conditions of use carefully before using the site.
If you find any harmful, annoying, or illegal content in Hamara.in, please write to info@hamara.in with Subject: REPORT CONTENT - REQUEST REMOVAL