Moving Resources Between Eclipse and Rational Software Architect


North Carolina State University
CSC 326 - Software Engineering
Laurie Williams, Dright Ho, Sarah Heckman. [Contact Authors]


0.0 Outline
1.0 Reasoning Behind Using Eclipse and Rational Software Architect in CSC 326
2.0 Exporting a Project from Eclipse
3.0 Exporting a Project from Rational Software Architect
4.0 Importing an Existing Project into Eclipse
5.0 Importing a Project into Rational Software Architect
6.0 Project Submission Guidelines

1.0 Reasoning Behind Using Eclipse and Rational XDE in CSC 326

As student in CSC 326, you may be wondering why we are using both Eclipse and Rational Software Architect as development environments in lab. There are several reasons why this is so:

  1. You need to be familiar with the Eclipse environment for your final project.
  2. Several of the plug-ins we are using are only compatable with Eclipse 3.1, and Rational Software Architect is still running Eclipse 3.0.
  3. Rational Software Architect provides an excellent modeling environment. We have searched for a modeling plug-in for Eclipse, and Ormondo is a good one; however, Ormondo's code generation is not quite as good or intuitive as Software Architect. Ormondo is also a commercial tool; there is an academic licence, but it requires a professor to ask for it. There is also a 30 day trial.

So, since we wish to provide you with both testing and modeling tools, we are using both Eclipse and Rational XDE. Eclipse will be used for most of your development and testing, while Rational XDE will be used for modeling and possible code generation.

Moving projects between Eclipse and Rational XDE is not difficult. The extra modeling files that are generated by Rational XDE are ignored by Eclipse. The most likely problem, will be build path problems when switching between the two IDEs. Build path problems will also arise when you open a project in either IDE on a different computer.

Each computer has a unique setup of Eclipse and Rational XDE. The default location to install Eclipse is under the C:. This is the way it is configured in the labs. The Eclipse directory contains a plugins/ folder when all the plug-ins to Eclipse are stored. The most important plug-in is JUnit, since you will be adding junit.jar to the build path in order to test your project. If you add JUnit to the class path through Eclipse, then it will make the junit.jar file available through a relative path that involves the Eclipse install directory. This may cause problems when opening the project in Rational XDE. Rational XDE also contains a plugins/ directory under its install directory (usually Program Files/Rational XDE/). This plugins/ directory will also contain a junit.jar file, but it may not be the latest version of JUnit. A way to solve this problem would be to add junit.jar to the lib/ directory under your project and add it to the class path as a local JAR.

When you first import a project into either Eclipse or Rational XDE, it will attempt to compile the project. If there are any build path errors a red x will be displayed on the project. You can change the build path settings by right clicking on the project and selecting: Properties > Java Build Path > Libraries Tab.

Note: Make sure that you remove old build path settings before adding new ones for the application and/or system that you are using.

Top | Contents

2.0 Exporting Resources from Eclipse

2.1 There are two ways to export resources from Eclipse.

2.1.1 Select a project, then select File > Export...

2.1.2 Right click on the project, and select Export...

2.2 The Export dialog is now displayed. There are 7 ways to export resources in Eclipse.

  • Deployable features : Exports a plug-in project as a deployable feature.
  • Deployable plug-ins and fragments : Exports a plug-in project as a plug-in or fragment of a plug-in. You will most likely be using this one for your project.
  • File system : Exports the project as a file system. Note: If you are going to import the project into Eclipse or Rational XDE later, make sure that you have the .project and build path files in the file system.
  • JAR file : Makes the project into a jar file
  • Javadoc : Exports the Javadoc generated for the project
  • Team Project Set : Exports shared projects.
  • Zip file : Makes the project into a zip file. Note: If you are going to unzip and open the project in Eclipse or Rational XDE later, make sure that you have the .project and build path files in the file system.


Export a File System


Export a Zip File

Top | Contents

3.0 Exporting Resources from Rational XDE

2.1 There are two ways to export resources from Rational XDE.

2.1.1 Select a project, then select File > Export...

2.1.2 Right click on the project, and select Export...

2.2 The Export dialog is now displayed. There are 7 ways to export a resources in Rational XDE.

  • File system : Exports the project as a file system. Note: If you are going to import the project into Eclipse or Rational XDE later, make sure that you have the .project and build path files in the file system.
  • JAR file : Makes the project into a jar file
  • Javadoc : Exports the Javadoc generated for the project
  • RAS file : Won't use
  • Team Project Set : Exports shared projects.
  • XMI export : Won't use
  • Zip file : Makes the project into a zip file. Note: If you are going to unzip and open the project in Eclipse or Rational XDE later, make sure that you have the .project and build path files in the file system.


Export a File System


Export a Zip File

Top | Contents

4.0 Importing An Existing Project into Eclipse

Note: It is easiest to import a project by, first, unzipping it in some directory, then importing an "Existing Project into the Workspace".

2.1 There are two ways to import resources into Eclipse.

2.1.1 Select File > Import...

2.1.2 Right click in the Package Explorer view, and select Import...

2.2 The Import dialog is now displayed.

  • Select General > Existing Project into Workspace and click Next.
  • Choose either Select root directory or Select archive file and click the associated Browse to locate the directory or file containing the projects.
  • Under Projects select the project or projects which you would like to import.
  • Click Finish to start the import.

 


Import an Existing Project
Top | Contents

5.0 Importing Resources into Rational XDE

2.1 There are two ways to import resources into Rational XDE.

2.1.1 Select File > Import...

2.1.2 Right click in the Package Explorer view, and select Import...

2.2 The Import dialog is now displayed. There are 9 formats for importing resources into Rational XDE.

  • Existing Project into Workspace : Imports an existing project into the workspace. Note: The project directory must contain a .project file. This is the best way to open a project in Rational XDE that already exists in the file system. You can open the project in Eclipse even if it is already open in Rational XDE.
  • Existing WebSphere Studio 4.x ClearCase Project into Workspace : Imports a WebSphere Studio ClearCase Project.
  • External Plug-ins and Fragments : Creates a project from an external plug-in or fragment.
  • File system : Imports resources from the local file system. You must have a project already created that you wish to import the resources into. Note: This is not a good way to import a project!
  • RAS file : Won't use
  • Team Project Set : Creates projects from previously exported Team Project Sets.
  • XDE model : Imports an existing XDE model into the specified project.
  • XMI import : Won't use
  • Zip file : Imports zip or jar files from the local file system into the specified project. It unzips the file contents into the selected project.

Note: It is easiest to import a project by, first, unzipping it in some directory, then importing an "Existing Project into the Workspace".


Import an Existing Project


Import a Model

Top | Contents

6.0 Project Submission Guidelines

Projects are to be submitted through the WolfWare submit locker of your lab section. Each project should be exported from Eclipse/Rational XDE as a zip file, or the project folder can be zipped up from inside Windows. It would be helpful if the name of the file that you submit contained your name or unity ID, your partner's name or unityID, and the HW name (something like unityID1_unityID2_hw#.zip). Please make sure you put your name and your partner's name at the top of every file.

The TAs will unzip your project and import it into their Eclipse or Rational XDE workspace. From there we will run your application and grade your documentation and/or models. For best results, it would be a good idea to have all external resources that you need for your project (like fit.jar and junit.jar) in a lib/ directory in your project. We will be willing to do minor build path changes to get your project to work with no penalty, but it is good form to have the project ready to deploy as soon as we import it into Eclipse and/or Rational XDE.

For the final project, you will need to export your project as a "Deployable plug-ins and fragments". Note: Make sure to include your source code when you deploy your plug-in. The TAs will add your plug-in to our Eclipse plugins/ directory and test your plug-in in our version of Eclipse.

Top | Contents

Back to Software Engineering Tutorials

Moving Resources Between Eclipse and Rational XDE Tutorial ©2003-2004 North Carolina State University, Laurie Williams, Dright Ho, Sarah Heckman
Email the authors with any questions or comments about this tutorial.
Last Updated: Friday, July 27, 2007 11:11 AM