In almost all source code input fields, we'll find a numbered section that indicates the number of lines loaded. Also, the majority of source input fields highlight the current line (where the text cursor currently lies), by default, in light yellow. These settings can be changed in General settings in the section Printing & Code. Additionally, in these fields, the user can change the text case or change the indentation by selecting a portion of it and hit
Ctrl + U for upper case text,
Ctrl + Shift + U for lower case text,
Tab to ident right and
Shift + Tab to ident left. The mentioned actions can be activated via the context menu as well.
pgModeler allows the loading of the contents of external source files to assign them to any object which demands the usage of a SQL source, for instance, function, view, or custom SQL code. The area highlighted in the red rectangle in the image below shows the buttons available in any input field that is configured to accept source code via an external editor.
Load file enables the user to simply load the contents of an external text file into the current field, nothing more. Now, the
Edit source will do some tricks and write the contents of the field in a temporary file and open it in the configured external editor. Inside the loaded editor lies the contents of the source field focused in pgModeler that was saved to the temporary file. The user can now edit the file open externally but must not forget to save it. Once the editor is closed, pgModeler detects the changes on the temporary file and places its new contents in the focused field. The
Clear action is used to wipe out all text in the current field.
In the General settings (see below), the user can define which editor will open when requested as well as its arguments (specific for any chosen editor). It's important to warn the user to take care of the application being assigned as an external source editor. Since pgModeler isn't capable of guess if the selected executable is really an editor or a system command that wipes out all data from the computer, the user always needs to double-check what application is being used as the preferred source code editor.