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:Language Overview"

 
(158 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Introduction  =
+
<span style="font-size:smaller;">&lt;&nbsp;[[EDT| EDT wiki home]]</span>
  
This essay gives an overview of the EGL language.&nbsp;  
+
This overview introduces the EGL language as&nbsp;defined&nbsp;in EGL Core and as extended&nbsp;by Eclipse IDE for the EGL Web Developer.&nbsp;Reference details are in the EDT help system, which is made available when you install a download from the following site:&nbsp; [http://www.eclipse.org/edt/download/ www.eclipse.org/edt/download/].
  
== Compilation <br> ==
+
In many ways, EGL is like other programming languages. It includes familiar constructs such as loops and transfers of control. It is built on a set of '''types''', each of which defines the operations that are available for each value of the type. Last, it involves a process for validating source code and for converting the source code into a less abstract form, closer to the runtime need.
  
In relation to any modern programming language, an automated process converts source code from a relatively abstract form to a more concrete, platform-specific one. For example, the logic might be compiled into machine code, or into byte codes that can be read by a virtual machine.&nbsp;
+
EGL is special in its reliance on '''stereotypes''', which are declarations used by the software that&nbsp;transforms the source code to another form such as Java or JavaScript.  
  
[ summarize typical compilation.&nbsp;&nbsp;identify how the EGL tech is different and why. ]
+
Stereotypes&nbsp;offer simplicity. First,&nbsp;they ensure&nbsp;that the&nbsp;output&nbsp;created for a&nbsp;source-code&nbsp;element such as&nbsp;"Handler" includes details for a particular use;&nbsp;for example, to be runnable on a&nbsp;full-page web browser.&nbsp;The developer who&nbsp;writes a custom Handler element and declares the appropriate&nbsp;stereotype does not need to know a lot about a browser to write&nbsp;the code. He can rely on&nbsp;the pre-tested logic that is created by an EGL JavaScript generator.&nbsp;The pre-tested&nbsp;logic&nbsp;supplements the custom logic.&nbsp;&nbsp;&nbsp;
  
== Types and values  ==
+
Second, stereotypes provide a way to extend the language.&nbsp;The creation of a&nbsp;new kind of stereotype&nbsp;enables an existing source-code element&nbsp;to have an&nbsp;alternative use. For example, a&nbsp;future stereotype might allow a developer to write a custom Handler element and then to&nbsp;create output for a mobile device that&nbsp;runs under&nbsp;the Android operating system. This alternative&nbsp;option requires that the extender&nbsp;create Java classes that&nbsp;add to the&nbsp;existing generator logic.&nbsp;
  
In general usage, a '''type''' such as integer or string defines a set of values and a set of operations that can be applied to those values. For example, integers are whole numbers that can be added, subtracted, and so forth; and the number 5 is a value of that type.  
+
The mechanism for using stereotypes is provided by&nbsp;EGL Core, which includes the&nbsp;basic rules of EGL syntax.&nbsp;Most stereotypes are provided by an EGL extension, and the first extension is Eclipse IDE for the EGL&nbsp;Developer.<br>
  
The meaning is much the same in programming, where every value is “of a type.” The type defines the structure of the value and the set of operations that can be applied to the value.
+
We describe stereotypes in the&nbsp;first of&nbsp;the following pages and&nbsp;proceed to&nbsp;other aspects of the language:&nbsp;<br>
  
=== Reference and value types ===
+
*[[EDT:Language Overview02|EGL types and values]]
 +
*[[EDT:Language Overview03|Packages and type-name resolution]]
 +
*[[EDT:Language Overview04|Syntax and scope]]
  
In general, types are of two kinds, reference and value:
+
<br> <br>
  
*A '''reference type''' defines an '''object''', which is a value in a memory area that was allocated specifically to hold&nbsp;the value. The object is referenced from some logic and is an instance of the type. In this case, the words ''value ''and ''instance'' are interchangeable.
+
&nbsp;  
*A '''value type '''defines a value that is embedded in an object rather than being referenced from it.
+
  
Also in general, a '''field declaration''' is a coded statement that has two effects: <br>
+
&nbsp;
  
*Declares a value of a type.
+
[[Category:EDT]]
*Names a memory area that provides access to the value. If the value is based on a reference type, the memory area holds an address or other detail that points to the value. If the value is based on a value type, the memory area contains the value itself.
+
 
+
Turning now to the syntax of EGL, consider the following field declarations:<br><br><br>
+

Latest revision as of 10:41, 10 July 2012

EDT wiki home

This overview introduces the EGL language as defined in EGL Core and as extended by Eclipse IDE for the EGL Web Developer. Reference details are in the EDT help system, which is made available when you install a download from the following site:  www.eclipse.org/edt/download/.

In many ways, EGL is like other programming languages. It includes familiar constructs such as loops and transfers of control. It is built on a set of types, each of which defines the operations that are available for each value of the type. Last, it involves a process for validating source code and for converting the source code into a less abstract form, closer to the runtime need.

EGL is special in its reliance on stereotypes, which are declarations used by the software that transforms the source code to another form such as Java or JavaScript.

Stereotypes offer simplicity. First, they ensure that the output created for a source-code element such as "Handler" includes details for a particular use; for example, to be runnable on a full-page web browser. The developer who writes a custom Handler element and declares the appropriate stereotype does not need to know a lot about a browser to write the code. He can rely on the pre-tested logic that is created by an EGL JavaScript generator. The pre-tested logic supplements the custom logic.   

Second, stereotypes provide a way to extend the language. The creation of a new kind of stereotype enables an existing source-code element to have an alternative use. For example, a future stereotype might allow a developer to write a custom Handler element and then to create output for a mobile device that runs under the Android operating system. This alternative option requires that the extender create Java classes that add to the existing generator logic. 

The mechanism for using stereotypes is provided by EGL Core, which includes the basic rules of EGL syntax. Most stereotypes are provided by an EGL extension, and the first extension is Eclipse IDE for the EGL Developer.

We describe stereotypes in the first of the following pages and proceed to other aspects of the language: 



 

 

Back to the top