ue_code_editor

This object implements the use of the Scintilla Code Editor

 

 

Declare:

declare=silex=ue_code_editor

silex.start

 

 

Functions and properties

Property

read

write

description

appendtext=text

 

x

 

 

silex.appendtext=<placeholder>
silex.appendtext.fromvariable=variable name
silex.appendtext.fromcolumn=dw_x.item.columnname

 

Example

silex.appendtext.fromvariable=ls_mytext

 

if you move from a variable or column, it's better to use fromvariable or fromcolumn, otherwise beas convert placeholder before inserting in the text

appendnewline

 

x

 

silex.appendnewline=<placeholder>
silex.appendnewline.fromvariable=variable name
silex.appendnewline.fromcolumn=dw_x.item.columnname

 

Example

silex.appendtext.fromvariable=ls_mytext

 

if you move from a variable or column, it's better to use fromvariable or fromcolumn, otherwise beas convert placeholder before inserting in the text

 

if you want to insert the text on current line cursor, use

silex.insertnewline=...

autocomplete=<true/false>

 

x

when set to false the autocompletion system will be deactivated. Standard is true

silex.autocomplete=true

autocompletelength

 

x

sets the number of characteres that have to be entered before the autocomplete list will be shown. Standard is 1

silex.autocompletelength=2

button=type<tab>property

 

x

 

Follow buttins defined

silex.button.<defined button>

 

follow buttons existing

bscript = all default buttons for bscript editing

bscript-assistent = assinstent for scripting

bscript-command = insert methode

bscript-placeholder = insert placeholder

bscript-sql = execute sql

bscript-hana = convert in HANA Style

bscript-run = execute marked code

info = toggle structure view for all objects

 

Example: silex.button.bscript-run

 

Define own buttons:

You can set all propertys with tab delimiter

Follow properties existing

 

name, command, bitmap, tooltip

example:

silex.button.name=myButton<tab>command=messagebox=hello world&

 <tab>bitmap=info.png<tab>tooltip=this is my own icon

 

bind=<datawindow column>

 

x

Binds a column to the object. ( the Editor takes position,size and value from the given Column

 

silex.bind=dw_1.item.description

 

jbscript-logo-small

silex.bind("dw_1.item.description");

clear

 

x

deletes all the text in the editor

silex.clear

convert_hana

 

x

convert marked sql statement to hana syntax

dwedit

 

x

 

With this command you can define the window, in which you want execute script or read all properties

if the window not existing, the commands not working (but no error message)

 

Property

read

write

Description

set

 

x

set the window name

silex=dwedit=set=artikel_edit

if the window is current not open, you can't see the properties from this window

runscript

 

x

eexecute current marked text

getdataobject

x

 

return the file name with relative path of datawindow (PSR File)

getsource

 

x

load source from dwedit

silex.dwedit.getsource

 

 

 

filename

x

 

filename, which current editing

gettext

x

 

 

dw_1.item.mycolumn.value=<silex.gettext>

 

jbscript-logo-small

items.mycolumn.value=silex.get.gettext;

 

if you work with placeholder inside the text, bes replace the placeholder inside the text, if you use this syntax

better is to use the transfer function

 

transfer=object.silex=dw_1.item.mycolumn

 

 

getselectedtext

x

 

return the selected text. If no text selected, the object return the complete text

gettextfromline

x

 

return text from current line

getlinecount

x

 

return count of lines in the text

getcurrentpos

x

 

return current cursor position

getlinelength

x

 

return length of current line

getcurrentlinenumber

x

 

return the current line number. First line ) 1

gotofunction=<function>

 

x

search for the global function. If not existing, insert this at end of source code

hscrollbar=<true/false>

 

x

if set to false the horizontal scrollbar will be hidden. Standard is true

idw

 

x

define bind datawindow

silex.idw=dw_1

inserttext=<text>

 

x

 

silex.inserttext=<placeholder>
silex.inserttext.fromvariable=variable name
silex.inserttext.fromcolumn=dw_x.item.columnname

 

jbscript-logo-small

In JBScript you don't have the problem with placeholder. Use simple syntax

silex.inserttext=dw_1.tems.mycolumn.value;

 

Example

silex.inserttext.fromvariable=ls_mytext

 

jbscript-logo-small

silex.inserttext.fromvariable=ls_mytext;

 

if you move from a variable or column, it's better to use fromvariable or fromcolumn, otherwise beas convert placeholder before inserting in the text

insertnewline

 

x

 

silex.insernewline=<placeholder>
silex.insernewline.fromvariable=variable name
silex.insertnewline.fromcolumn=dw_x.item.columnname

 

Example

silex.insernewline.fromvariable=ls_mytext

intellisense=<off,level 1-3>

 

x

deactivate the intellisense or set to an other level
(this functionality will be activated in a further version)

ismodified

x

 

 

after "loading" or "replace all" the text is "not modified"

 

jbscript-logo-small

if (silex.ismodified) == true) {
  // it's modified
}

 

You can disable this option with

silex.set2notmodified

language

 

x

follow language wor existing

json, bscript, sql, nolanguage, powerbuilder, powershell, xml, html,css, jbscript

ownsettings=<yes/no>=<settingdefinition>

or allowusersetting

 

x

activate to enable changing font and other settings. Changed settings will be saved

silex.ownsettings=yes=myeditorsettings

allows usersettings and saves it in area "myeditorsettings"

 

silex.ownsettings=no

disables settings and sets editor back to default settings

replaceall=text

replaceall=fromvariable=<variable>

replaceall=fromcolumn=<dw_x.item.columnname>

 

x

Replaces the whole text in the editor

resize

 

x

resizes the object

silex.resize

scrollbars=<true/false>

 

x

both scrollbars can be set to visible/invisible

set2notmodified

 

x

set property "text is not modified". property ismodified return failure

setfocus

 

x

sets the focus to the object

setpos_eol

 

x

set cursor to end of line

setpos=x

 

x

set cursor to this position

setline=x

 

x

set cursor to this line (first line = 1)

start or open

 

x

Generates an Scilexer Object in w_beas_edit

silex.start

stop or close

 

x

writes back data if necessary and closes the object

visible=<true/false>

 

x

shows or hides the editor

vscrollbar=<true/false>

 

x

if set to false the horizontal scrollbar will be hidden. Standard is true

x,y,width,max

x

x

coordinate of editor. You must set this only, if you don't bind it to an field. You can set width=max, height=max

 

 

Silex Development System - Info

With the "info" methode you become all information about the linked window (for develope)

silex.info.[methode].property

 

methode / property

read

write

description

width

 

x

define the width of structure view (all properties from edit window) in percent

silex.info.width=50 

widthtoggle

 

x

toggle structure view between 0,30 and 50 %

silex.info.widthtoggle

init

 

x

initialice the information system for a edit window. This need a datawindow. You can define this with the parameter

silex.init=dw_7

doubleclick

 

x

execute the doubleclick event on a line from structure view (internal)

sql

 

x


hana

 

x

convert current marked line to hana style

retrieve

 

x

retrieve all methodes, objects and properties from current window