CloudTran Home

 
  
 
Contents  >   5.  Defining Applications In Eclipse
 


5.1 Creating the Project

The first step is to create the project in Eclipse.

 5.1.1  Directory Structure
 5.1.2  Creating the Project

5.1.1  Directory Structure
Eclipse developers usually create many projects in one workspace.

We recommend you create define one CloudTran application - represented by the main project - per workspace. This is because CloudTran creates additional projects in the workspace, one for each modelled processing unit. If you have more than one application in the workspace, there will be a lot of Eclipse projects from the different applications - we find this confusing.

In fact, in the distributed examples, there is another level of directory. Our recommendation - and this is a change from the distributed examples, based on experience - is that you try to create this naming system:

   examples/cloudTran/     -- all the examples
      YourApp/                     -- 'YourApp', for example
         workspace/                -- optional directory following Eclipse conventions
            YourApp/               -- the modelled/main project - same name as above
               .project
               YourApp.osm         -- the model
               build.xml           -- the Ant build file to build the whole App

            YourApp_CtFramework/  -- generated project for the framework
               build.xml           -- the Ant build file for this project

The YourApp_CtFramework is only one of the directories generated. The total number of directories generated by the build is actually the number of PUs you define + 2.


5.1.2  Creating the Project
See the tutorial section for the mechanics of creating the project.

To achieve the directory structure recommended above, do this:

  • Create the holding directory holdingDir - e.g. examples/cloudTran
  • Create the directory for the appName - e.g. YourApp - beneath it.
  • Create the 'workspace' directory beneath that.
  • Now start, or restart, Eclipse using "holdingDir/YourApp/workspace" as the workspace
  • Create the project using File/New/Project, CloudTran Development, CloudTran Project.
  • Use YourApp as both the Project name and Model name.

Copyright (c) 2001-2011 CloudTran Inc.