Jump to: navigation, search

Difference between revisions of "Compiler"


(Output area)
 
(20 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Overview==
 
 
The {{UBIK}} compiler assembles and compiles customizing code into invokable .NET assemblies. It also creates the necessary tables, views and stored procedures in the database. In short: compiling a {{UBIK}} data model is a necessary step to bring custom classes and their behavior to life.
 
The {{UBIK}} compiler assembles and compiles customizing code into invokable .NET assemblies. It also creates the necessary tables, views and stored procedures in the database. In short: compiling a {{UBIK}} data model is a necessary step to bring custom classes and their behavior to life.
 +
 +
[[File:UI_CompileWindow.png|220px|thumb|right|Compiler window previewing code]]
  
 
==User interface==
 
==User interface==
Line 27: Line 28:
 
| Version comment|| Stores a comment to the current customizing version; after pressing {{key press|Enter}} it will be assembled into the code and can later be retrieved via the assembly's static ''VersionComment'' property
 
| Version comment|| Stores a comment to the current customizing version; after pressing {{key press|Enter}} it will be assembled into the code and can later be retrieved via the assembly's static ''VersionComment'' property
 
|}
 
|}
 +
 +
{{Hint|Always perform a syntax check before an actual download (release)}}
  
 
===Preview area===
 
===Preview area===
 +
[[File:UI_CompileWindow_UI.png|220px|thumb|right|UI code preview]]
 +
The major portion of this window is consumed by the code preview area, which basically consists of two [[Code Editor]] components:
  
 
{| class="wikitable" | width = "50%"
 
{| class="wikitable" | width = "50%"
Line 34: Line 39:
 
! Tab !! Purpose  
 
! Tab !! Purpose  
 
|- align="left"
 
|- align="left"
| Object Code || This area holds the entire object code, consisting of  
+
| Object Code || This area holds the entire object code, consisting of generated code snippets for
* MetaClasses
+
* general information about the customizing
* MetaProperties
+
* each MetaClass
* Specific code for MetaClasses
+
* each own MetaProperty of a MetaClass
* Code library for all MetaClasses
+
* each overridden event (if applicable)
 +
* each overridden method or property (if applicable)
 +
* MetaClass-specific custom code (if applicable)
 +
* Custom code library for all MetaClasses (if applicable)
 
|- align="left"
 
|- align="left"
| UI Code || This area holds the code for the visual representation of MetaClasses and their MetaProperties
+
| UI Code || This area holds the code generated for the visual representation of MetaClasses and their MetaProperties, which is today comprised by a list of editing controls, one for each defined MetaProperty
 
|}
 
|}
  
 
The code in the preview area can be modified. However, it is not recommended to do that since changes that are made here will not be saved back to the original objects. That means that the change will only be effective for the next compilation run, once the code is reassembled it will be lost.
 
The code in the preview area can be modified. However, it is not recommended to do that since changes that are made here will not be saved back to the original objects. That means that the change will only be effective for the next compilation run, once the code is reassembled it will be lost.
 +
 +
===Output area===
 +
[[File:Studio-Output-Area.PNG|220px|thumb|right|Failed example output of the code compiler]]
 +
The lower third of the window delivers output messages for the performed actions. If any error occurs, the corresponding line in the output stack will be colored <span style="color:red;">red</span>. On the left of the message is a small icon to indicate the type of message (error, success or warning). In the tool strip above is a toggle to activate and deactivate the output of warnings and trivial information. Success and error messages cannot be deactivated.
 +
 +
For the code-compiling actions, the native messages from the .NET compiler will be redirected here and linked to the source code in the preview area.
 +
 +
{{Hint|Double-click an error line to get navigated to the corresponding code line in the source!}}
 +
 +
[[Category:Coding|Compiler]]
 +
[[Category:Pages with broken file links|Compiler]]
 +
 +
===Status strip===
 +
On the very left, the status strip shows the path where released customizing assemblies will be deployed to. This path is defined by the [[UBIK Studio Basics#Database specific settings|setting data path]] and a trailing \bin\ directory.
 +
The right area features a progress bar, indicating the status of code assembling operations.
 +
 +
==See also==
 +
* [[Code Editor]]
 +
* [[Coding box]]
 +
* [[Debugger]]
 +
 +
[[Category:Coding|Compiler]]

Latest revision as of 12:32, 31 July 2020

The UBIK® compiler assembles and compiles customizing code into invokable .NET assemblies. It also creates the necessary tables, views and stored procedures in the database. In short: compiling a UBIK® data model is a necessary step to bring custom classes and their behavior to life.

Compiler window previewing code

User interface

The UBIK® compiler can be accessed via UBIK® Studio's Build menu. Once launched, it will immediately start to fetch all available customizing code from the data model and assemble it into C# code. Depending on the size of the data model, this might takes a while. When finished, the assembled code is presented in the preview area.

Toolbar

Item Purpose
Compile database structure Creates the necessary tables, views and procedures in the database; normally this is done by the Kernel on the fly while modelling, so using this menu item should only be necessary if you feel that something didn't end up correctly in the database
Check syntax Compile the customizing code into .NET assemblies into a temporary assembly, for the purpose of safely checking the actual compiler output; use this option to see if your code actually works
Compile and test local Compile the customizing code into .NET assemblies, without deploying them to the shared deployment path, i.e. without making it available to anyone else; use this option to test your customizing in your local {{UBIK} Studio before releasing it
Compile and release Compile the customizing code into .NET assemblies, deploy them to the shared deployment path and mark the current version as released for everyone
Version major Indicates the major version number of the customizing, which is always tied to the major version of UBIK®; it will be assembled into the code and can later be retrieved via the assembly's static VersionMajor property
Version minor Indicates the minor version number of the customizing; click to increase manually; it will be assembled into the code and can later be retrieved via the assembly's static VersionMinor property
Version revision Indicates the revision of the customizing; it is typically set to currently released revision + 1, can be increased manually by clicking on it; it will be assembled into the code and can later be retrieved via the assembly's static VersionRevision property
Version comment Stores a comment to the current customizing version; after pressing Enter it will be assembled into the code and can later be retrieved via the assembly's static VersionComment property
IC Hint square.pngAlways perform a syntax check before an actual download (release)

Preview area

UI code preview

The major portion of this window is consumed by the code preview area, which basically consists of two Code Editor components:

Tab Purpose
Object Code This area holds the entire object code, consisting of generated code snippets for
  • general information about the customizing
  • each MetaClass
  • each own MetaProperty of a MetaClass
  • each overridden event (if applicable)
  • each overridden method or property (if applicable)
  • MetaClass-specific custom code (if applicable)
  • Custom code library for all MetaClasses (if applicable)
UI Code This area holds the code generated for the visual representation of MetaClasses and their MetaProperties, which is today comprised by a list of editing controls, one for each defined MetaProperty

The code in the preview area can be modified. However, it is not recommended to do that since changes that are made here will not be saved back to the original objects. That means that the change will only be effective for the next compilation run, once the code is reassembled it will be lost.

Output area

Failed example output of the code compiler

The lower third of the window delivers output messages for the performed actions. If any error occurs, the corresponding line in the output stack will be colored red. On the left of the message is a small icon to indicate the type of message (error, success or warning). In the tool strip above is a toggle to activate and deactivate the output of warnings and trivial information. Success and error messages cannot be deactivated.

For the code-compiling actions, the native messages from the .NET compiler will be redirected here and linked to the source code in the preview area.

IC Hint square.pngDouble-click an error line to get navigated to the corresponding code line in the source!

Status strip

On the very left, the status strip shows the path where released customizing assemblies will be deployed to. This path is defined by the setting data path and a trailing \bin\ directory. The right area features a progress bar, indicating the status of code assembling operations.

See also