Jump to: navigation, search

Difference between revisions of "EDT:How to move RBD app to EDT"

(Modify EGL code)
Line 16: Line 16:
  
 
== Modify EGL code  ==
 
== Modify EGL code  ==
This is a handy list of thing to modify. It is recorded when we move RBD samples and test apps to EDT. See the [http://wiki.eclipse.org/EDT:EGL_Language_conversion EGL Language conversion page] for more information about updates to EGL.  
+
This is a handy list of thing to modify. It is recorded when we move RBD samples and test apps to EDT.  
 +
See the [http://wiki.eclipse.org/EDT:EGL_Language_conversion EGL Language conversion page] for more information about updates to EGL.  
 +
The [http://wiki.eclipse.org/EDT:Code_snippets] is a good place to find code.
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
 
! style="width: 35%" | RBD
 
! style="width: 35%" | RBD
Line 23: Line 26:
 
|-
 
|-
 
|<source lang="java">
 
|<source lang="java">
employeeList Employee[0];
+
employeeList Employee[0];
 
</source>
 
</source>
 
|<source lang="java">
 
|<source lang="java">
employeeList Employee[];
+
employeeList Employee[];
 
</source>
 
</source>
 
|Dimension is not allowed on Array declaration, change to [ ].  
 
|Dimension is not allowed on Array declaration, change to [ ].  
 
|-
 
|-
 
|<source lang="java">
 
|<source lang="java">
program MyProgram type BasicProgram {}
+
program MyProgram type BasicProgram {}
 +
library MyLibrary type BasicLibrary {}
 +
record recordName type BasicRecord
 
</source>
 
</source>
 
|<source lang="java">
 
|<source lang="java">
program MyProgram
+
program MyProgram
 +
record recordName
 +
library MyLibrary
 
</source>
 
</source>
 
|Basic stereotypes including BasicLibrary, BasicProgram, BasicRecord are removed. A part without stereotype is the basic type  
 
|Basic stereotypes including BasicLibrary, BasicProgram, BasicRecord are removed. A part without stereotype is the basic type  

Revision as of 00:34, 30 November 2011

An EDT project has different layout with an RBD project, the best way to make RBD code working in EDT is to create a new EDT project and copy the code to it. There have also been some changes to the EGL language that may require you to change your RBD-developed code to be modified prior to running on EDT. 

Move code to an EDT project

  1. Create a new EDT project.
    1. If the application contains RUI Handlers, choose either Web2.0 client application or Web 2.0 client application with service depending on if the application also contains services.
    2. If the application contains only Programs and common code, choose Basic.
  2. Copy EGL files and packages from the RBD project to the EDT project
  3. Configure EGL Compiler and generators. Compiler setting is a new feature in EDT which allows setting of different generators for each package and file.
    1. Select JavaScript Generator for Rich UI Handlers, Widgets and any common parts(Record, Library) which are referenced by Rich UI Handlers or Widgets
    2. Select Java Generator for Services, Programs and any common parts referenced by Services or Programs
    3. Common parts require both JavaScript Generator and Java Generator are suggest to be put into a separate package which is configured with both Generators
    4. Compiler setting of a parent resource is inherited by the children. Setting the package is usually good enough.
    5. Refactor package and code is sometimes necessary


Modify EGL code

This is a handy list of thing to modify. It is recorded when we move RBD samples and test apps to EDT. See the EGL Language conversion page for more information about updates to EGL. The [1] is a good place to find code.

RBD EDT Comments
employeeList Employee[0];
employeeList Employee[];
Dimension is not allowed on Array declaration, change to [ ].
program MyProgram type BasicProgram {}
library MyLibrary type BasicLibrary {}
record recordName type BasicRecord
program MyProgram
record recordName
library MyLibrary
Basic stereotypes including BasicLibrary, BasicProgram, BasicRecord are removed. A part without stereotype is the basic type
	record recordName type BasicRecord
	record recordName
	library MyLibrary type BasicLibrary {}
	library MyLibrary