Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EDT:EGL Language conversion"

 
(19 intermediate revisions by 7 users not shown)
Line 1: Line 1:
EGL language conversion consideration from RBD/EGLCE
+
EGL language conversion considerations from IBM Rational Business Developer and EGL CE.
  
*[[EDT:EGL Language Part Types]]
+
*[[EDT:EGL Language Part Types|EGL Language Classifiers (Part Types)]]
  
{| cellspacing="1" cellpadding="1" border="1" width="800"
+
{| width="800" cellspacing="1" cellpadding="1" border="1"
 
|-
 
|-
| bgcolor="#bbbbbb" align="center" | RBD/EGL CE
+
| align="center" bgcolor="#bbbbbb" | Rational Business Developer
| bgcolor="#bbbbbb" align="center" | EDT
+
| align="center" bgcolor="#bbbbbb" | EDT
 
|-
 
|-
 
| Called program  
 
| Called program  
Line 18: Line 18:
 
|-
 
|-
 
| Nullable  
 
| Nullable  
| <br>
+
| Nullability is a quality of the field or parameter not the type...similar to how database columns define a column to be nullable or not nullable. [http://wiki.eclipse.org/EDT:Language_Overview02#Nullability See Language Overview / Nullability]<br>
 
|}
 
|}
  
 
*[[EDT:EGL Language Function Parameters]]
 
*[[EDT:EGL Language Function Parameters]]
  
{| cellspacing="1" cellpadding="1" border="1" width="800"
+
{| width="800" cellspacing="1" cellpadding="1" border="1"
 
|-
 
|-
| bgcolor="#bbbbbb" align="center" | RBD/EGL CE
+
| align="center" bgcolor="#bbbbbb" | Rational Business Developer
| bgcolor="#bbbbbb" align="center" | EDT
+
| align="center" bgcolor="#bbbbbb" | EDT
 
|-
 
|-
 
| Default is inout  
 
| Default is inout  
Line 32: Line 32:
 
Default is in for reference type  
 
Default is in for reference type  
  
 +
|-
 +
| Array default is inout
 +
| Array default is in, because array is reference type
 +
|-
 +
| timestamp without pattern is inout
 +
| timestamp without pattern default is in, because timestamp without pattern is reference type
 +
|}
 +
 +
*EDT:EGL Language Function Return
 +
 +
{| width="800" cellspacing="1" cellpadding="1" border="1"
 +
|-
 +
| align="center" bgcolor="#bbbbbb" | Rational Business Developer
 +
| align="center" bgcolor="#bbbbbb" | EDT
 +
|-
 +
| Generated Java - A Return statement is not required in the EGL source for a function if the function returns a value.<br>
 +
| Generated Java - A Return statement is required in the EGL source for a function, for all exit points, if the function returns a value.
 
|}
 
|}
  
 
*[[EDT:EGL Language Primitive Types]]
 
*[[EDT:EGL Language Primitive Types]]
  
{| cellspacing="1" cellpadding="1" border="1" width="800"
+
{| width="800" cellspacing="1" cellpadding="1" border="1"
 
|-
 
|-
| bgcolor="#bbbbbb" align="center" | RBD/EGL CE
+
| align="center" bgcolor="#bbbbbb" | Rational Business Developer
| bgcolor="#bbbbbb" align="center" | EDT
+
| align="center" bgcolor="#bbbbbb" | EDT
 
|-
 
|-
 
| time  
 
| time  
| replaced with timestamp
+
|  
 +
Before 0.8.1 M2: replaced with timestamp&nbsp;<br>After 0.8.1 M2: time is now available in EDT
 +
 
 
|-
 
|-
 
| interval  
 
| interval  
 
| Not Supported right now, no replacement
 
| Not Supported right now, no replacement
 
|-
 
|-
| Money, num, bin<br>  
+
| money, num, bin<br>  
 
| use Decimal<br>
 
| use Decimal<br>
 
|}
 
|}
Line 54: Line 73:
 
*[[EDT:EGL Language System Types and Functions]]
 
*[[EDT:EGL Language System Types and Functions]]
  
{| cellspacing="1" cellpadding="1" border="1" width="800"
+
{| width="800" cellspacing="1" cellpadding="1" border="1"
 
|-
 
|-
| bgcolor="#bbbbbb" align="center" | RBD/EGL CE
+
| align="center" bgcolor="#bbbbbb" | Rational Business Developer
| bgcolor="#bbbbbb" align="center" | EDT
+
| align="center" bgcolor="#bbbbbb" | EDT
 
|-
 
|-
 
| system libraries  
 
| system libraries  
Line 64: Line 83:
  
 
|-
 
|-
| currentTimeStamp()<br>dateTimeLib.currentTimeStamp()<br>  
+
| currentDate()<br>DateTimeLib.currentDate()<br>  
| <br>
+
| When you declare aDate data, aDate should be inited with the current date<br>
 
|-
 
|-
| <br>  
+
| currentTime()<br>DateTimeLib.currentTime()<br>
| <br>
+
| Not Supported<br>
 +
|-
 +
| currentTimeStamp()<br>DateTimeLib.currentTimeStamp()<br>
 +
| When you declare temp timestamp, temp is inited with the current timestamp<br>
 +
|-
 +
| StrLib.usaDateFormat<br>StrLib.eurDateFormat<br>StrLib.jisDateFormat<br>StrLib.isoDateFormat<br>
 +
| Constants.usaDateFormat<br>Constants.eurDateFormat<br>Constants.jisDateFormat<br>Constants.isoDateFormat<br>
 +
|-
 +
| StrLib.usaTimeFormat<br>StrLib.eurTimeFormat<br>StrLib.jisTimeFormat<br>StrLib.isoTimeFormat<br>
 +
| Constants.usaTimeFormat<br>Constants.eurTimeFormat<br>Constants.jisTimeFormat<br>Constants.isoTimeFormat<br>
 +
|-
 +
| StrLib.db2StampFormat<br>StrLib.odbcTimeStampFormat<br>
 +
| Constants.db2StampFormat<br>Constants.odbcTimeStampFormat<br>
 +
|-
 +
| DateTimeLib.dayOf(cTimeStamp)<br>DateTimeLib.weekdayOf(cTimeStamp)<br>DateTimeLib.monthOf(cTimeStamp)<br>DateTimeLib.yearOf(cTimeStamp)<br>DateTimeLib.dateOf(cTimeStamp)<br>
 +
| cTimeStamp.dayOf()<br>cTimeStamp.weekdayOf()<br>cTimeStamp.monthOf()<br>cTimeStamp.yearOf()<br>cTimeStamp.dateOf()<br>
 +
|-
 +
| DateTimeLib.timeOf()<br>DateTimeLib.timeValue()<br>
 +
| Not Supported<br>
 +
|-
 +
| DateTimeLib.dateValueFromGregorian()<br>DateTimeLib.dateValueFromJulian()<br>
 +
| DateTimeLib.dateFromGregorian()<br>DateTimeLib.dateFromJulian()<br>
 +
|-
 +
| XMLLib.convertToXML(eglType any)<br>XMLLib.convertToXML(eglType any, document boolean)<br>
 +
| Use XMLLib.convertToXML(eglType any, document boolean)<br>
 +
|-
 +
| ServiceLib.convertFromJSON(json string,eglType any)<br>
 +
| JsonLib.convertFromJSON(json string,eglType any)<br>
 +
|-
 +
| ServiceLib.convertToJSON(eglType any)<br>  
 +
| JsonLib.convertToJSON(eglType any)<br>
 
|}
 
|}
  
 
*[[EDT:EGL Language Statements]]
 
*[[EDT:EGL Language Statements]]
  
{| cellspacing="1" cellpadding="1" border="1" width="800"
+
{| width="800" cellspacing="1" cellpadding="1" border="1"
 
|-
 
|-
| bgcolor="#bbbbbb" align="center" | RBD/EGL CE
+
| align="center" bgcolor="#bbbbbb" | Rational Business Developer
| bgcolor="#bbbbbb" align="center" | EDT
+
| align="center" bgcolor="#bbbbbb" | EDT
 
|-
 
|-
 
| call host program  
 
| call host program  
 
call local program  
 
call local program  
  
Move statement
+
Move statement  
  
 
|  
 
|  
Not supported right now
+
Not supported right now  
  
 
|}
 
|}
Line 91: Line 140:
 
*[[EDT:EGL Language Operators and Expressions]]
 
*[[EDT:EGL Language Operators and Expressions]]
  
{| cellspacing="1" cellpadding="1" border="1" width="800"
+
{| width="800" cellspacing="1" cellpadding="1" border="1"
 
|-
 
|-
| bgcolor="#bbbbbb" align="center" | RBD/EGL CE
+
| align="center" bgcolor="#bbbbbb" | Rational Business Developer
| bgcolor="#bbbbbb" align="center" | EDT
+
| align="center" bgcolor="#bbbbbb" | EDT
 
|-
 
|-
 
| matches  
 
| matches  
Line 103: Line 152:
 
|-
 
|-
 
| bitwise  
 
| bitwise  
| operators support for int types only. RBD supports SmallInt as well
+
| operators support for int types only. Rational Business Developer supports SmallInt as well
 
|}
 
|}
  
 
*[[EDT:EGL Language Stereotypes and Annotations]]
 
*[[EDT:EGL Language Stereotypes and Annotations]]
  
{| cellspacing="1" cellpadding="1" border="1" width="800"
+
{| width="800" cellspacing="1" cellpadding="1" border="1"
 
|-
 
|-
| bgcolor="#bbbbbb" align="center" | RBD/EGL CE
+
| align="center" bgcolor="#bbbbbb" | Rational Business Developer
| bgcolor="#bbbbbb" align="center" | EDT
+
| align="center" bgcolor="#bbbbbb" | EDT
 
|-
 
|-
 
| basicLibrary  
 
| basicLibrary  
Line 136: Line 185:
 
| FORMName <br>  
 
| FORMName <br>  
 
| <br>
 
| <br>
 +
|-
 +
| javaScriptName=xxx<br>
 +
| use externalName=xxx<br>
 +
|-
 +
| d Dictionary{ordering=byInsertion}<br>d Dictionary{ordering=byKey}<br>
 +
| d Dictionary = new Dictionary(true, OrderingKind.byInsertion)<br>d Dictionary = new Dictionary(true, OrderingKind.byKey)<br>The default for caseSensitive is false <br>
 +
|-
 +
| aString string[0]{maxSize=10};<br>anInt int = aString.getMaxSize();<br>
 +
| Not Supported(no more maxSize)<br>
 
|}
 
|}
 +
 +
<br>
 +
 +
EGL Rich UI MVC<br>
 +
 +
{| width="800" cellspacing="1" cellpadding="1" border="1"
 +
|-
 +
| align="center" bgcolor="#bbbbbb" | Rational Business Developer
 +
| align="center" bgcolor="#bbbbbb" | EDT
 +
|-
 +
| validValues annotation
 +
| Not Supported
 +
|-
 +
|
 +
|
 +
|}
 +
 +
<br> '''A note on deployment descriptor files (*.egldd):'''<br>
 +
 +
The model for these files is different in EDT so you cannot reuse deployment descriptors from Rational Business Developer. If you have a *.egldd file that's in the old format, and you want to "reset" it to be empty, you can open it with a text editor and replace it with the following:<br>
 +
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
 +
&lt;egl:deployment xmlns:egl= "http://www.eclipse.org/xmlns/edt/deployment/1.0" &gt;
 +
&lt;/egl:deployment&gt;
 +
</pre>
 +
[[Category:EDT]]

Latest revision as of 13:29, 9 July 2012

EGL language conversion considerations from IBM Rational Business Developer and EGL CE.

Rational Business Developer EDT
Called program Not supported
DataItem,
Stand alone (top level) function
Not supported right now
Datatable,
Structured Record,
Form,
FormGroup
Not supported
Nullable Nullability is a quality of the field or parameter not the type...similar to how database columns define a column to be nullable or not nullable. See Language Overview / Nullability
Rational Business Developer EDT
Default is inout Default is inout for value type

Default is in for reference type

Array default is inout Array default is in, because array is reference type
timestamp without pattern is inout timestamp without pattern default is in, because timestamp without pattern is reference type
  • EDT:EGL Language Function Return
Rational Business Developer EDT
Generated Java - A Return statement is not required in the EGL source for a function if the function returns a value.
Generated Java - A Return statement is required in the EGL source for a function, for all exit points, if the function returns a value.
Rational Business Developer EDT
time

Before 0.8.1 M2: replaced with timestamp 
After 0.8.1 M2: time is now available in EDT

interval Not Supported right now, no replacement
money, num, bin
use Decimal
Rational Business Developer EDT
system libraries all needs to be fully qualified with library name
 i.e. sysLib, dateTimeLib, serviceLib, xmlLib...etc.
currentDate()
DateTimeLib.currentDate()
When you declare aDate data, aDate should be inited with the current date
currentTime()
DateTimeLib.currentTime()
Not Supported
currentTimeStamp()
DateTimeLib.currentTimeStamp()
When you declare temp timestamp, temp is inited with the current timestamp
StrLib.usaDateFormat
StrLib.eurDateFormat
StrLib.jisDateFormat
StrLib.isoDateFormat
Constants.usaDateFormat
Constants.eurDateFormat
Constants.jisDateFormat
Constants.isoDateFormat
StrLib.usaTimeFormat
StrLib.eurTimeFormat
StrLib.jisTimeFormat
StrLib.isoTimeFormat
Constants.usaTimeFormat
Constants.eurTimeFormat
Constants.jisTimeFormat
Constants.isoTimeFormat
StrLib.db2StampFormat
StrLib.odbcTimeStampFormat
Constants.db2StampFormat
Constants.odbcTimeStampFormat
DateTimeLib.dayOf(cTimeStamp)
DateTimeLib.weekdayOf(cTimeStamp)
DateTimeLib.monthOf(cTimeStamp)
DateTimeLib.yearOf(cTimeStamp)
DateTimeLib.dateOf(cTimeStamp)
cTimeStamp.dayOf()
cTimeStamp.weekdayOf()
cTimeStamp.monthOf()
cTimeStamp.yearOf()
cTimeStamp.dateOf()
DateTimeLib.timeOf()
DateTimeLib.timeValue()
Not Supported
DateTimeLib.dateValueFromGregorian()
DateTimeLib.dateValueFromJulian()
DateTimeLib.dateFromGregorian()
DateTimeLib.dateFromJulian()
XMLLib.convertToXML(eglType any)
XMLLib.convertToXML(eglType any, document boolean)
Use XMLLib.convertToXML(eglType any, document boolean)
ServiceLib.convertFromJSON(json string,eglType any)
JsonLib.convertFromJSON(json string,eglType any)
ServiceLib.convertToJSON(eglType any)
JsonLib.convertToJSON(eglType any)
Rational Business Developer EDT
call host program

call local program

Move statement

Not supported right now

Rational Business Developer EDT
matches no longer an operator, have to use String matchesPattern() function instead
like no longer an operator, have to use String isLike function instead
bitwise operators support for int types only. Rational Business Developer supports SmallInt as well
Rational Business Developer EDT
basicLibrary no more basicLibrary
annotation on Library no annotation is supported on library
RuntimeException
no more RuntimeException, use AnyException
IndexOutOfBoundException
InvalidIndexException
PGM includeReferencedFunctions=yes
top level function are not supported
PGM allowUnqualifiedItemReferences = yes
must fully qualify part names
XMLStructure = xmlStructurekind
XMLValue {kind = xmlStructurekind.
FORMName

javaScriptName=xxx
use externalName=xxx
d Dictionary{ordering=byInsertion}
d Dictionary{ordering=byKey}
d Dictionary = new Dictionary(true, OrderingKind.byInsertion)
d Dictionary = new Dictionary(true, OrderingKind.byKey)
The default for caseSensitive is false
aString string[0]{maxSize=10};
anInt int = aString.getMaxSize();
Not Supported(no more maxSize)


EGL Rich UI MVC

Rational Business Developer EDT
validValues annotation Not Supported


A note on deployment descriptor files (*.egldd):

The model for these files is different in EDT so you cannot reuse deployment descriptors from Rational Business Developer. If you have a *.egldd file that's in the old format, and you want to "reset" it to be empty, you can open it with a text editor and replace it with the following:

<?xml version="1.0" encoding="UTF-8"?>
<egl:deployment xmlns:egl= "http://www.eclipse.org/xmlns/edt/deployment/1.0" >
</egl:deployment>

Copyright © Eclipse Foundation, Inc. All Rights Reserved.